Skip to main content
gamedev.net
🔒 Locked

Engine Design, Your input...

Started by GroZZleR 6 replies 700+ views
Original Post
GroZZleR
GroZZleR
How do you guys normally design your engine? Mine normally just materializes out of nowhere out of need =P I'll be chipping away on CGraphics, and it'll end up like: class CGraphics { SwapBuffer(); LoadBitmap(char sFile); }; class CPerson { BITMAP Sprite; }; Oh wait a minute, my CPerson class is going to be loading their own sprites, so I guess I have to take LoadBitmap out of CGraphics or make it static. But that just leaves one function left in CGraphics, so I might as well just dissolve the whole class... And what I originally thought was going to be a tight engine now becomes a series of utility functions and globals =P How do your engines turn out / what are your tips to making 'em turn out good? How do you design 'em? How do you make your entities tie in with your renderer, so that you can render your entire scene nicely? [edited by - GroZZleR on August 29, 2003 9:50:08 PM]
drarem
drarem
Mine turn out like crap =) ATM I keep all the graphics in one class, I/O in another, math in yet another, and so on..

but how bout making CGraphics a friend of CPerson so it can access the same variables/functions from the CGraphics class? Google it, here is one site:

http://www.fmi.uni-konstanz.de/~kuehl/c++-faq/friends.html

I fseek, therefore I fam.
I'll give you a beating like Rodney King who deserved it!=====================================Any and all ideas, theories, and text c2004,c2009 BrainDead Software. All Rights Reserved.
Kaezin
Kaezin
My engines are spontaneous too

Don''t ask me how, but my mind somehow plans ahead and I hardly if ever have to change the engine. Frequently do I think of something to add to the engine and think that it''s gonna be tough to do, but like I said earlier, my mind plans ahead for these things and it turns out to work really well.

Anyway, I usually just have a dynamic list of objects that is drawn automatically. After the *necessary* updates (such as increasing the object''s position if it has velocity), I have a seperate update check for actual game code.
Half the people you know are below average.Trogdor the Burninator
GroZZleR
GroZZleR
Thats more or less how my graphics engine is turning out, just loop through a list of all the current entities and if they''re visible or whatever, render ''em.

I guess my brain doesn''t plan ahead as thoroughly as yours =P
billybob
billybob
i didn''t plan and its turning out pretty good. if you don''t plan its luck whether it works out or not planning would greatly increase the chance though.
thedustbustr
thedustbustr
I planned and I''ve redesigned 3 times in an an attempt to make it readable and kill all the bugs. Often, when your engine looks like shit (and is in its EARLY stages) a recode (read: reogranization with lots of cutting and pasting code) can save lots of time later.
original vesoljc
original vesoljc
quote:
Original post by thedustbustr
I planned and I''ve redesigned 3 times in an an attempt to make it readable and kill all the bugs. Often, when your engine looks like shit (and is in its EARLY stages) a recode (read: reogranization with lots of cutting and pasting code) can save lots of time later.


3 times? my current project is at build 16
Abnormal behavior of abnormal brain makes me normal...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.