We’ve wasted no time after finishing World 3 and we are steaming ahead onto World 4!
This week I’ve programmed the first three obstacles for World 4, which I’ll detail a little down below. If you like gifs, and explanations, read on. I’ve got you covered ;)
Spring Trap
These are Spring Traps. If you touch them, they’ll push you in whatever direction they’re facing. These will likely be used as both transportation and obstacles. We could use them to help the player bridge large gaps, or we could use them to launch the player into roof spikes. Multiple options are good :)
These were kind of a pain to make as there were multiple ways to go about it but I was restricted a little by the way the animation is set up. The end result is still good though.
Bear Trap
Here we have the Snappy Bois, also known as Bear Traps. They do what most bear traps do. Snap shut when you stand on them. They do damage if you’re caught and will hold you in place for a while. Wiggling from side to side lets you escape a bit faster. We might hide these behind grass or something.
These were fun to program as they were fairly simple and I really love the way they came out in the end. The snapping and wiggling to get free seems really satisfying to me :)
Ground Types
Finally, we have some new ground types. This is the first time in the game we’re having the ground type actually change the player’s movement properties. So far we have ice and snow. Ice is slippery so you slow down and speed up way slower than normal. Snow is thick and deep so it slows down your max speed and makes you stop faster.
This was a fun programming challenge. We’ve had friction in the game since I updated the entire platforming frame work a while ago. What we didn’t have was the ability to reduce the player’s max speed or acceleration based on ground type. So I had to added the ability to do that. Then there was the challenge of having a nice transition from being on ground with non standard physics, to off of it. At first, jumping in the air would immediately change the physics back to normal. So if you were on ice you could speed up and slow down at a normal speed by simply jumping. This rendered the ground types almost pointless so I added transition functionality to the players speed properties. Now the player’s speed properties smoothly transition from the previous ground type back to the normal settings over time rather than instantaneously. This means jumping is no where near as effective in getting around the challenge of ground types. We can change the time it takes to transition back to normal however we please too. It turned out to be a really nice solution.
Thanks for reading this weeks devlog! Let us know what you think in the comments. We’d love to hear some feedback! If you don’t feel like typing out feedback at least let us know which of these obstacles is your favorite using the poll. It’s one click, cmon ;)
Also, follow our game page for more updates like this!
0 comments