Jump to content
IGNORED

For whom it may concern - Elite-like Line Drawing


RSS Bot

Recommended Posts

Inspired by this blog entry, I spend spend some time with the line drawing part of Elite.

 

Since there is no double-buffer (like Elite), I experimented with 3 ways of line drawing:

1. Clearing the whole screen and then drawing all lines.

2. Plotting pixels with XOR, erasing the old and immediately redrawing the new line

one by one.

3. Plotting pixels with XOR, erasing all lines first and then redrawing all new lines.

 

The constant clearing time in variation 1 slows down the frame rate when there is not much to draw, but would increase it when there are more than ~140 pixel to plot in a frame. The problem is, that unlike in variation 2 and 3, the screen is flickering quite a lot as a whole and not all lines are displayed for the same amount of time.

 

Variation 2 displays all lines but the one currently redrawn. Unfortunately this leads to a lot of artefacts.

 

The 3rd variation is a compromise between 1 (all lines displayed the same amount of time) and 3 (less artefacts), which IMO looks best and seems to be the way Elite draws its lines too (maybe someone can confirm this?).

 

Attached are NTSC and PAL binaries (using E7 bank switching) plus the source code (if anyone is interested, nothing too special) displaying a single Thargon. The code tries to use the free CPU time (pretty imperfectly) which is much larger for PAL. Therefore the PAL version runs much faster.

 

Still both are not running very fluently even though the status display and any 3D movements and transformations are still missing. There is a little room for improvement (like self-modfying code and better CPU time utilization), but I am not very positive this would gain enough to get close enough to an acceptable frame rate.

 

http://www.atariage.com/forums/index.php?app=blog&blogid=144&showentry=6682

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...