I have spent a few days learning and wrestling with point sprites. Amazing things. Basically, they are billboards (2D polygons that always face the camera)...and you only have to specify the 3D position of its centre and the texture. Upside is that you can have thousands of them using HLSL (processed by GPU). Downside is that all the variables like TEXCOORDn, etc get trashed by them, so you can't, say, send an UV offset to animate. I found a way around that by using multiple calls. Could just use quads, I know, but this works.
The above screenshot shows the current <b>fail</b> graphics. Just place holders, really, as I am more concerned with the interactivity/engine at the moment, than pretty graphics and level design. Anyway, it shows a simple fire effect using point sprites. I am changing the color from blue to white to yellow to red, so it looks like gas being ignited. Quite a cheap and effective effect. I may randomise the angle slightly to give a widening flame.
EDIT: Fireballs now are blocked by walls/actors and can injure/kill actors. It is starting to feel like a game, now. I am not quite sure how to handle death in the game ie Do the actors lay on the ground, do they raise up to the heavens (or sink down below) or do they flash and disappear ? For the moment, they are just being rotated to look like they are laying down.
As for my site, gameinfonline.com, well, my host (freehostia) is playing silly buggers with an upgrade. I may move this project diary to a blog or facebook (vomit) or something. Would be nice to get feedback, etc.
No comments:
Post a Comment