Sign in to follow this  
  • entries
    65
  • comments
    133
  • views
    77723

The House of Plans and Code

Sign in to follow this  

76 views

I wanted to have something a little more...shall we say "screenshot laden" for this update, but...twasn't meant to be.

After a couple of false starts (and more than a week of not updating this journal), I think I have a decent skeleton for my graphics code. I've done everything using virtual classes (essentially interfaces), mostly so that I don't have to put the member variables for the classes into the header files (that way, classes that I overhaul internally don't require me to rebuild anything except for that object's file itself).

A breakdown of (some of) the specifics of the graphics "engine" for those who care (if such a person truly exists):

  • Everything in the actual world is going to be an Object.
  • An Object is an instance of a Model with positional information (i.e. a world matrix)
  • A Model is a Mesh combined with Materials
  • A Mesh contains static vertex/index buffers and attribute tables to split it into different material "slots" (that the Model can fill in with materials)
  • Consequently, all of the world data will be static (in buffer only - things can animate, but it will be done completely in-shader)
  • A Mesh can also hold different index sets for different LODs (but a Mesh at a lower LOD does not use any different vertices than a higher-LOD mesh - the LODs all use the same vertices)
  • The game can add and remove objects to/from the renderer. Then the game can update the position of the objects, and changes will be reflected on-screen, with no more external effort
  • The renderer will handle visibility determination for all objects (with different methods being used for "mostly static" and "fully dynamic" objects)
  • The effects will be handled using (After much effort to do it a different way) DirectX .fx files. System parameters will be used via semantics. Any parameters without semantics should be set by the material
  • Post-process filters will be simple effects, with a different set of usable semantics which refer to the texture to use. The render target will be set via an annotation on the pass
  • The UI code will be a very simple windowing system (i.e. pretty much buttons/text/sliders/maybe a text edit box or two). I haven't looked into DirectX's new UI utilities, but I might use them, if they're easy

Hopefully in the next few days I'll have the skeleton filled in with actual code. Code that produces screenshots. Screenshots that don't suck. Until then, I'll try to update this more often (and preferably make it more interesting).
Sign in to follow this  


2 Comments


Recommended Comments

What model format are you going to use? .x?

What about a physics engine? Or are you going the homebrewed route?

Good luck on your engine, I'd like to see what you come up with. Racing games rock. You're going for a wipeout-style futuristic racing game?

- Dan

Share this comment


Link to comment
Yeah, I'm going for a Wipeout/F-Zero-ish racing game. Though probably not hovercraft. It depends.

The physics are going to be homegrown, as what I'm doing is not particularly tricky (actually, I tried to get ODE to work, but I had nothing but problems). Also, I'm going for arcadey physics vs. the actual realistic sort (though there will be a grain of true physics in there, it'll just be...softened a bit, for fun-factor).

Model format is also homegrown, I suppose, though it's pretty much a direct dump of the vertices, indices, and the vertex format. I could use .x, I suppose, but the code's already written to do it this way.

Yeah, today's post was about the graphics, mostly because it was a good way for me to organize my thoughts in a place where I could get at them later (I can do all the thinking in the world, but if I can't remember what I came up with, then what was the point?)

Thanks for the encouragement!

Share this comment


Link to comment

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