## Lazteroids 2

posted in Lame? Where?!
Published August 16, 2005
Advertisement
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.
0 likes 2 comments

Comments

NoMonkey
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.
August 16, 2005 04:31 PM
Ravuya
In the time you've been planning Lazteroids 2, I've shipped six ports of three complete games.

Just get it done.
August 16, 2005 04:32 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Math is hard

1471 views

## uhh

1655 views

## lol

1415 views

## new gaem?!

1343 views

## GH Tourney

1481 views

## Guitar Hero

1446 views

## Beyond Hell

1409 views
Advertisement
Advertisement