Hello JGO!
Today I have a few questions regarding my new project, the Starshock renewal. I’m redoing the entire game with completely new graphics and sounds. However, I want to ensure that the game runs the best without the GPU bottleneck.
I realise that VBOs are generally used to draw static objects, and animations are done with shaders nowadays. However I’m not so sure on how I should go on about doing three things. I don’t want to stream to VBOs because I’ve heard a good deal of people telling me not to do it because of the CPU to GPU bottleneck. So the cases are:
First is the level itself, there are static parts, and dynamic parts. The static parts are the walls and other things that are always the same since the creation of a level and are not effected by any foreign sources. The dynamic parts are ones like doors (which are animated and move when the player gets close by) and tiles with animated textures, simply moving their texture atlas position per-frame. Another thing I’m not sure how to do the fastest. See below:
I think dividing the level into few small chunks, writing those into a VBO and then drawing those will work for the static parts, but how am I going to handle a lot of animated tiles? Am I supposed to have individual VBOs for each and every one of them and use shaders to transform them?
Second is the UI. Just like the above, I’m not so sure on how I should handle this as well. It has a lot of moving parts, font rendering, flashy lights and such.
The third are the billboards, and also the part I’m most puzzled about. Billboards for one that haven’t heard the term before, are the way enemies and items are draw, say, in Doom. Basically quads that are always facing the player all the time. How am I going to do this without streaming to a VBO?
So I THINK what answers my question is unfortunately streaming to a VBO. However, let’s say for the case of billboarded enemies where I have to do transformation calculations on the CPU, how appreciable is this method? Shouldn’t I generate and use transformation matrices and apply the on shaders? Even though Starshock is a very small game, I’m also looking forward to find some answers for bigger projects with more complex geometry and animations.
I hope someone out there can answer my questions and help me resolve my troubles, thank you for your time everybody!