Two sprites per chunk. One is for "harmless" blocks, like ground and other for spikes. All I need to know here is whether player collides with something harmful or not. I don't need anything fancy here. And chunk sprites will be pretty small (144x144px), so speed shouldn't be big issue.
I got sidetracked a bit by making present for my Mom's upcoming birthday. Anyway, I'm planning to get into SHL today again.
OK. Got worldgen working properly (I think). Now I need to make some finishing touches such as generating destructible blocks, then will get into actual chunk rendering.
Next thing will be to write class and code for animated sprites.
While SHL will require just one looped animation per object (if animated at all) such as Mario or enemies, I'll do it properly by writing reusable code that can take for any number of animations. So it'll take some time.
Just some info: I've moved all Chunk-related things not related to world generation into its own class. This means I had to rename TChunk into TChunkData as TChunk is now class name (TChunkData = array of array of byte). This will lead to cleaner code. Now I need to finish some Tileset-related things.
Also you can track my progress here: http://livedo.sparklinlabs.com/qvear
Ok. Worldgen is officially finished. Now I can get to other stuff, like tileset handling.
Here's demo of world generator: https://dl.dropboxusercontent.com/u/...rldgentest.rar
Brown pixels on chunk are ground tiles, green are "ground coverage" tiles (in game it'll be seen like one of indestructible blocks in Super Mario Land), red are spikes and blue ones are destructible blocks.
Demo features two cats, one of which can be moved using arrows. They also collide, using pixel-perfect collision (using PMASK method)!
Reason for strange executable name is that project was originally "hello world" type of deal, but I've figured out that by making actual game I would learn much more (and so far I did!).
Project update: Finished TTileset class, now I need to get chunks to render with some actual tiles, not cranked up pixels. Mario ripping time!
//edit: Could tell me if you know of any full set of tiles from Super Mario Land? I'd rather not touch Tile Layer Pro unless it is absolutely necessary.
Last edited by Darkhog; 20-06-2013 at 04:20 PM.
Bookmarks