Jump to content

Game frame rendering?


Blade
 Share

Recommended Posts

I have another curiosity regarding C&C and RA, how do they render their graphics? I'm guessing in DOS they would pretty much have to blit to a frame buffer and then flip that to the VGA card and use their own primitives for clipping, line drawing and such. In windows do they do something similar and blit to a single direct draw surface using their own functions or do they make use of the direct draw primitives and functions instead? Also, do they redraw everything each frame or keep track of dirty regions that need to be redrawn?

Link to comment
Share on other sites

As far as I know, the game has a ton of drawing surfaces layered on top of each other. Probably like, one for the bare terrain, one for the buildings/units/etc stuff on top of the terrain, one for the mouse hovering over it. Beyond that, I dunno.

 

As for redraw regions, judging from the fact that units that are too large leave behind 'trails' of bad refresh information, it seems every unit has an area around itself that it refreshes as it moves. For C&C1 I found a switch on units to put that on 64x64 pixels (meaning "this units is a large unit"), which I switched on for all units to facilitate modding. For smaller units, it's normally the size of a cell, being 24x24.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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