Doing proper layering in 2D games sucks. Period. It seems like sprites keep on getting mislayered with other sprites. Object shadows are now properly layered, but they eat up more CPU power now, since they are essentially just normal sprites with color (0,0,0,128). I'm going to have to play with my drawing order some more. Something like this would be ideal:
1) Ground (grass, snow, sand, whatever)
2) Tiles (paths, floors, walls, etc)
3) Wall shadows
4) Sprite shadows
5) Sprites (players, bullets, trees, boxes, etc)
6) HUD stuff
Right now player names and healthbars render on the same layer as the player, so names/healthbars vanish under trees and boxes oftentimes. Very annoying. :P
Not null, but not valid either
I finally realized where a lot of the access violation errors I've been getting are coming from. I was under the impression -- for whatever reason -- that Delphi had a primitive-ish garbage collection system that would generally take care of nulling out pointers/objects for me. I was wrong. Thus all of my nice "if blah <> nil then" checks were in vain. Well, not all of them, but several. I can catch if they are null, but not if they point to data that is now invalid. Doh. This is catching a lot on respawn-point lists and outgoing exposives (mines, claymores, etc) lists. Some more fun there. Makes me want to use C# or Java something fierce.
And some more random bugs with (the newly added) team-chat, player joining (again!), mines/claymores detonating on dead players, and enigmatic bad packet headers.
I know I'm complaining, but I need to vent somehow. Who better than the readers of my journal? :P (Hehe, sorry, you guys know it's nothing personal :P)
Arctic Outpost: new map!
Our first fan-map has been created by DarkCampainger (yes, intentional mispelling): "Artic Outpost". It's a very attractive Free-For-All map with lots of tight corridors and rooms, as well as a nice open area for bigger brawls. Here's some random screens:
Awesome work, DC! [smile]