Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

## Lazteroids 2

Sign in to follow this  


Okay, a serious post on the development front. I've been thinking a lot about my game and how everything on it's inside's work. It's gotten to the point where I can't put this stuff any longer, so I'm going to mention this stuff here in case anyone has any input on it (yeah right), and so i can come back later and remind myself what I was doing.

I've given myself a Christmas deadline. I've been working on this for far too long, far longer than needed. So, with any luck, my game will be done by Christmas, hopefully sooner.

I was reading Garret Foster's article on scene graphs. It makes sense but some of what he talks about there I will not be doing, specificaully the way his Update() functions call render. Seems like a waste to render each object separately as it traverses through the tree. So, I'm going to have my Update function (for my objects) call my CRenderer::AddToList(CObject *). That way the scenegraph isn't doing the rendering, and the rendering can get all done in one spot after the scenegraph traversal is done.

Which brings me to my rendering engine. Currently i'm just calling CObject::Render() which does a poor job of rendering the object. I did that for quick testing purposes and never got rid of it, so here's what i'm going to do. I'm going to have a CRenderer::Render() function which will do a few things. First it will sort the list of all objects. It will take anything that does has an alpha value less than full and put it in a separate list. I would now have two lists, one for non-transparent objects and another for transparent objects.

Then the Render() function will sort the non-alpha'd list by texture ID and then render it by getting a vertex array out from CObject::GetVertexArray(). I'm sure a bit more can be done there, but we'll see. Then on to the alpha'd list. I will sort that list by texture ID as well, and possibly by distance. A friend made mention that I probably won't have to draw the alpha'd objects from back to front if i'm using occlusion, whatever that is. I'll have to look that up. It's rather simple, i think, which is good because i've never written a scene graph or a rendering mechanism before. This will be interesting.

Those are the next two tasks on my game. Hopefully it doesn't bork things too much, and will, hopefully, speed things up. After I get my scenegraph in place I can work on frustum culling and things of that nature. I've got quite a ways to go...

EDIT: I can't type.
Sign in to follow this  


Recommended Comments

Your thoughts on rendering during the traversal are the same as mine. I intend on having a seperate renderer, as usual, and also seperate the alpha from the from the others. This is the same way we are doing things for 0 A.D. so it sounds like you've got the right idea!

Keep up the good work man.

Share this comment

Link to comment
In the time you've been planning Lazteroids 2, I've shipped six ports of three complete games.

Just get it done.

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!