A89: Scroller Engine


[Prev][Next][Index][Thread]

A89: Scroller Engine




Hey,

I'm considering making a scrolling engine(Contra), and am wondering what
techniques/theories you guys have used in making your games...

Since C has became available, I have come up with the following idea:

All Characters, Enemies, Turrets, Bosses are inside an object structure(in
OOP languages, container) containing all their data, like what sprite,
frame, weapon, etc..

All Projectiles like bullets and powerups are in their own objects to save
space(they don't need as much data).

All objects are organized into a variable pointer 'database'(char* or void*
not sure)that has the addresses where all the character objects are located.
an Integer variable would say how many objects are active(on screen)at a
time, ditto for projectiles. Object Database will be cleaned every level,
projectiles dynamically(when they leave the screen)

I'm thinking of using a frame based system running at about 30fps... every x
milliseconds a function is ran which draws the background, reads the
database for objects, runs code based on that(AI, etc.), updates projectile
data, and garbage collects projectiles if needed.

What do you guys think of this? I'm not sure because I borrow alot of ideas
from more advanced engines(QuakeIII comes to mind).




Follow-Ups: