Scratch Module 2 Week 6 - Create Your Own World
Another classic game type this week: the dungeon crawler. This covers all the basic elements of moving through a multi-room maze, including coins, pick-ups and enemies. Once you have these basics, a game like this could be expanded indefinitely.
I've changed the colours and sprites, added more coins and enemies, and made it so that the blue door only opens when you touch it (it just felt more intuitive that way!). With a bit more time, you could add more rooms, make trickier enemies and hide keys all around the map.
Problems with movement of irregular-shaped objects
The sprite here - a plain square - is pretty dull. What if you wanted to make it more interesting? Well, that's easy to do, but tricky to do right. Because in general, you want your sprite to point in the direction it's heading. And again, if you choose a top-down sprite, like the bug, it's easy, as it will rotate to where it's pointing. But if you use a side-on sprite, it doesn't look so good.
You can improve this by switching rotation mode to 'flip', but then it flips to its original direction whenever you go up or down, and that feels weird too. Also, bump into a wall, then hit up, and it flips, touches the wall with its butt, and moves -4, which is now down, leaving it still touching the wall.
I fixed this by turning off rotation, and making a flipped costume, so it switches costume whenever left or right are pressed. There was also a glitch caused by pressing 2 directions at the same time, so I checked for the wall within each keypress section. And that made for lots of repeated code, so I made a block to tidy it all up.