• entries
  • comments
  • views

Progress Too Slow!

Sign in to follow this  


So I spent some time last night and this morning trying to get some graphics on the engine screen. Naturally I had my old faithful radial menus there, but I wanted something a bit better; I tried to just create a sphere mesh via the D3DX functions and draw-segment it, however that didn't give me anything, I of course neglected setting a shader and everything else so I dunno why I expected it to work *shrug*, I need more time to do it properly but I was hoping for some fast gratification.

I spent some time creating my game-state hierarchy, which consists of a base class StateNode, which contains a parent node and child nodes in a typical tree structure; a few classes extend this such as World, Room, Actor.

World acts as the root Game-State node and it's the root of rendering,transformation,serialization, etc.

Rooms exist within the world and are places that can be viewed, the World has a currentRoom property which specifies which room the player is looking at. Children of rooms can be Actors, and likely other nodes for static geometry that I've not dreamed of yet.

Actors are interactive entities that have animated geometry attached to them, which can move around, act as lights, have conversational topics associated with them etc.

It's a pretty standard object grouping combined with some SceneGraph traits.

Multiple operations will traverse this tree, especially for rendering.

I've yet to decide how to deal with rendering; I know that I'll want to group things I render by their translucency then shaders then textures; given this it seems that a Renderable interface for renderable objects might be used, then starting at a root point (the selected room perhaps) execute getRenderables() which returns back a list of all the nested renderable objects.

To keep things sorted perhaps a 'RenderingBucket' is passed in getRenderables() this object allows you to submit a renderable to the bucket which sorts it appropriately based on it's attributes, then when finished the rendering bucket can be flushed and rendered by the graphics object?

Changes are this design will be in flux for a while, but it seems like i'm on the right path.

I would love some insight if anyone has any to share :)
Sign in to follow this  


Recommended Comments

I have a bucket-based rendering infrastructure implemented now. It works pretty well; I can describe the system if you like, although it may be a bit overcomplex for your situation.

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