Skip to main content
gamedev.net
🔒 Locked

My current engine design

Started by chbfiv Oct 15, 2003 at 12:39 PM 4 replies 1.4k views
Original Post
chbfiv
chbfiv
A simple engine design so far, A few things have yet to be implemented.
Singleton Template
vector3f Template
vector2f Template
System //Interface
3DObject //Interface
    Model -3DObject //Mesh or Meshes 
        StaticModel - Model
        DynModel - Model
Sound //Interface
    SoundEffect - Sound
    AmbientNoise - Sound
    VocalSound - Sound
Resource //Interface
Kernel - Singleton // Core
    TaskManager - System,Singleton //Handles all other Managers
    ResourceManager - System,Singleton
        Mesh - Resource
        Sound - Resource
        Image - Resource
        XMLFile - Resource
    InputManager - System,Singleton //Handles settings and Events
    GfxManager - System,Singleton //Mem/render
    SoundManager - System,Singleton //starts/stops sounds on Event
    GameManager - System,Singleton //Gameplay uses all other Kernel classes

 
The reason I posted the design is because I was looking for some input on the design, maybe things I overlooked or what have you. Any comments are welcome because I take the good with the bad=) thanks ahead of time!
-BourkeIV
superpig
superpig
Music/CDAudio?

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse
chbfiv
chbfiv
I read all your Enginuitys=) I didn't quite understand your Singleton Template and I was going to test it later today as a mater of fact. Just off the top of my head, I remember the Constructor was public, which is not that normal for a Singleton.

As for music and CD audio, I dont see that as much of a problem seeing that im using SDL and OpenAL. Thanks for pointing it out.

edit, typo


[edited by - chbfiv on October 15, 2003 2:17:41 PM]
-BourkeIV
superpig
superpig
quote:
Original post by chbfiv
I read all your Enginuitys=) I didn''t quite understand your Singleton Template and I was going to test it later today as a mater of fact. Just off the top of my head, I remember the Constructor was public, which is not that normal for a Singleton.

Yeah, to be honest it''s not much of a Singleton in that respect - there''s just an assert that warns you when you abuse it, rather than it actually stopping you. I should probably change it to a protected constructor and a public static Construct() function or something...

quote:

As for music and CD audio, I dont see that as much of a problem seeing that im using SDL and OpenAL. Thanks for pointing it out.

OK, but I said that after looking at your Sound interface. Is Music and CD-Audio not going to have manager/interface code at all, and you''re just going to use OpenAL directly? I personally found that writing a ''jukebox'' - a manager-type class that could load a bunch of music tracks, browse through them, play, pause, and stop - was pretty useful.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse
chbfiv
chbfiv
Well my ResourceManager loads during the Init phase of the program, so that other objs can use those resources. So, say someone wants to add/remove tracks, or inserts a CD; I don''t need it to add to my Static Resources. I could have two types of resources, static/normal, or just add a custom ''jukebox'', as your example. I want to include a dyn state terrain, so sound is not the only resource that will need a normal vs...Needless to say, I got some thinking todo yet. I just dont want to get so far as to depend on a bad design.


also, please note that
vector3f - Template,vector2f - Template was just me bing mindless, I call mine vertex, and its a template lol, not opengl.

-BourkeIV

Topic Locked

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

Sign in to reply to this topic.