Game Development Community

Plan for Alex "Delerium" Scarborough

by Alex Scarborough · 09/03/2005 (2:47 am) · 0 comments

So, I've encountered a problem with most of my ongoing projects. I have a lot of art dependent code, and no art to test it with. Creates a bit of a problem. I can use the stock TGE art to confirm that it works, but I really have no clue how well it will work in a real game. So, while I acquire funds to hire an artist, I'm left with a fair amount of freetime to fill in. So, about four hours ago, I decided that I would learn a bit of OpenGL.

Fastforward to now, I'm in the home stretch of rewriting the TGE particle engine to use batch rendering in a vertex array instead of rendering on a per particle basis. I'm pretty sure doing this completely destroys all hope of animated textures on particles though (at least for my simplistic "works on my ATI Rage 128 Pro" implementation), so it may just be limited to a fun little side project. That, and there's the fact that I seem to be failing to get the thing to recognize the loaded texture and we've got some happy fun times ahead.

I have no doubt that someone more skilled with OGL could point out exactly where I'm going wrong, but then again given that I've had a fun time doing this and I've found it to be rather easy, I'm sure anyone remotely skilled in OGL already did this during a coffee break or something.

Anyhow, it is late, I'm going to bed. Tomorrow I'll poke at it more and if it starts working, maybe I'll profile the old particle rendering and my batched render and see what kind of performance gain/hit I have wrought. Who knows, I might turn this into a resource if there's demand.

edit: It's now about eight hours later, most of that was sleep. I took another look at my code. Today I have learned an important OGL lesson. If you're data must be loosely packed in the array so everything gets read properly, do *not* tightly pack the texture coordinate array because then it can't really draw a texture. Time to profile this sucker and see what kind of gains/hits this gets. Then maybe mess around with multitexturing and multiple passes to get texture animation working again.

another edit: Profiler says 2-2.5x speedup. Not bad for my first foray into rendering.