itch.io is community of indie game creators and players

Devlogs

Monday Day 4: Solidifying Code

"Star Digger" Movement Demo
A browser game made in HTML5

I spent a few late hours getting the Sprite and Starfield classes working better. While not perfect, they’re good enough to work as placeholders for the concept so I can move on.

After wasting a bunch of time looking at the Starfield visual, I realized that there’s been a change in the world coordinate system and how visuals (e.g. sprites) are being scaled to them. I’ll have to spend some time tomorrow debugging this so sprites are not automatically scaled to fit one world unit. I’d like to make the world units equal to screen units at Z=0, which would make it easier to put together a layout.

I have a janky maze drawing class, which is currently drawing the walls with the default sprite as I don’t have a wall sprite yet. Incidentally, the default sprite is 256px square, and the ship sprite is 64px square, but they’re drawing at the same size. I need to straighten all that out.

A text block defines

const MAP = `
X...............
..X..XXX..X.....
..X..XXX........
................
..X....XXXXX....
...........X....`;

Currently, the map is being drawn upside-down, but that’s OK for now! Overall, I’m happy that the tooling is coming together so I can quickly throw-in stuff like this.

Files

  • sna-underworld 2024-1119 main #8888aa6.zip 893 kB
    Nov 19, 2024
Download "Star Digger" Movement Demo
Leave a comment