Friday, December 14, 2012

Pixel art is hard :(

Added in my own sprites, didn't spend too much time on them (and I'm not an artist) but I think they turned out decent enough for place holder images.

I spent a lot more time actually coding some low-level code which doesn't actually show anything now but will help a lot once the game gets bigger. Last post I just had everything in 1 class/file to test things out, but now I've sorted everything appropriately.

For starters, I made a simple way to group up sprites so that I can load/unload groups of sprites. This will help if I ever plan on making it run on mobile devices (need to unload things when not needed due to low-memory). So now it's just a matter of grouping sprites appropriately and loading them when needed, for example, if the game was going from one area to another, we may want to load the groups of sprites containing characters/enemies used in the next area as well as the terrain tiles used. This is how I've set things out since it should make loading/unloading large amounts of sprites easier.

Another thing I created was an abstract Map class with only 1 child for now (the map in the image below) but I plan on having subclasses which are stuff like LoadedMap (a map loaded from a file) and GeneratedMap (a map with random generated terrain). Plan is to have random generated maps (terrain and perhaps more) and then classes extending GeneratedMap which will customise the generation (water, mountains, deserts, etc). I hope to have at least a little to show in terms of random maps next post.



2 comments:

  1. Is the shading on the dirt on the right side done through some form of processed shading, or is that just how the sprites were drawn? Looks good!

    ReplyDelete