Today I started to figure out the block rendering system. Moonman, like Terraria, will have two layers of blocks, the current collidable layer and a background layer. Referring to my earlier mockup
, I need at a minimum the following features:
- Draw full blocks, sloped blocks, half blocks
- Have a background layer and foreground layer
- Have a repeating texture on the blocks (in the mockup the texture is 2 blocks wide, making repetition a little less obvious)
e.g., the blocks on the edge of the cave's back wall are rendered differently, giving a rough edge
I started to make some headway on this today, but I'll hopefully do a lot more tomorrow. Here's what I've got so far. Not too exciting to look at at the moment, but making progress nonetheless...
Once the above features are implemented, I'll move on to another part of the game, probably the actual mining system, but some further features I'll eventually add to the rendering system are:
- Tinting blocks based on sky colour
- Modelling light (shadows and ambient occlusion)
- Caching chunks of the world to textures
- Special effects (e.g., a glow for moonore)
thx for reading..