• entries
    437
  • comments
    1000
  • views
    335837

Hydra

Sign in to follow this  

104 views

I spent last night working on Hyrda a while. The previous version used individual PCX files for the sprite textures, creating a texture each time I loaded a sprite. For a few objects this was ok, but when you get into the realm of using tiled backgrounds individual calls to glBindTexture for each texture aren't ideal. One way of optimising this would be to draw all the tiles of a specific texture and then making the change, but this again isn't the best way to go. The management and indexing system needed to achieve this would be too complicated to make it worthwhile.

So I started looking into spritesheets / tiled texturing. For the unaware, a tile texture is essentially a single texture with all of your tiles/sprites on it. You adjust the uv co-ords of your quads to 'cookie cut' out the correct sprite for rendering. For the sake of a little pre-calculation of the uv co-ords you get use of multiple sprite textures without neededing to change the texture. For a tiled background, this sounds ideal.

I knocked up a prototype spritesheet system and it appeared to work aside from a small sideeffect, the game started crashing when I loaded individual textures. The debugger has tracked it down to a read into a memory structure from file, but I suspect that this code is not to blame for the crash - it worked flawlessly with the individual textures and sprites. No, I'm thinking now that the spritesheet loader is to blame somewhere, but I can't for the life of me figure out where. The memory it accesses all seems fine - but it must be corrupting the heap somewhere :/ As I'm coding in old-school C98, the fluid studios memory manager is useless to me. In fact it just laughs in my face when I start using it ;)

I'll roll up my sleeves tonight and start fighting the bastard some more.

After being pulled away from the computer I sat down and started drawing some sketches of the basic ships to use. I'm going for low-res graphics, sprite sizes are 32x32, maybe 64x64 depending on the detail I want. It's interesting designing for such a low resolution, you find yourself wanting to add some detail but you simply don't have the pixels to spare! Instead I'll go for some recognisable shapes and ride with that. I've not decided on the palette depth to use. I'll probably stay with something safe like 256 colours - it's not really worth ramping up the colours when the resolution is so low.

Keeping things low res is pretty cool, mainly because I'm no artist ;) It'll also help get the retro feel I want from the game - in doing so I can imagine that I will alienate half of my audience; many people will probably overlook a game that's designed to look like it's from the 80's because they're used to 64 kazillion colours and their 3d graphics hardware doesn't even fart at the number of vertices it's given.

I'm hoping to keep it simple like this and port it to the DC - something about playing with the gamepad makes it a winner :)
Sign in to follow this  


4 Comments


Recommended Comments

Not been online/around much lately, but all sounds/looks interesting to me [smile] - will keep my eye on progress!

Jack

Share this comment


Link to comment
Pixel art really is awesome if you're not so good at bigger stuff. [grin] Fingers crossed for garish colours and bleepy chiptunes, then?

Share this comment


Link to comment
Not sure about the chiptunes, I might have to commission someone else for that :D

That said, I used to mess around with Trackers on my Amiga, so maybe if SoundTracker still lives I might attempt assaulting people's eardrums at some point.

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