This will be a dev log for my latest attempt at finishing another small game, starting from the very beginning (day 3 to be exact) and hopefully ending up with a polished desktop release.
Dracopillar (name suggestions welcome), is inspired by Snake, but you will play a fire-breathing caterpillar monster and have full, continuous control over your movement. I don’t have any other design decisions made for certain yet (uh oh), but it will be some sort of action-shooter with relatively short playthrough times.
All I have so far is a basic character movement protoype. You can walk around, pick up more body segments, and switch directions (your tail becomes your head). It took a few iterations, but I’m reasonably happy with it now. All the segments are the same and each one is mostly independent. Their script can either do nothing, act as a follower segment, or be controlled by a player. Hopefully this will make it easy to handle your body breaking apart, as well as local multiplayer.
The feet animation is still pretty bad, I will probably work on that next. My initial method of only moving the feet when they got a certain distance from the body worked fairly well, but then they didn’t alternate nicely at all, so currently they’re just moved on a repeating timer. Now it doesn’t adapt well to different movement speeds though, so I may go back to the old method.
Here’s a gif: (the feet are also lagging behind here due to low framerate while recording)
Interesting!
Btw, how to you record the video? Have you tried the “start_record” event? There shouldn’t be any framerate drops due to the recording then.
Ah! Good point. I’ve never tried the built-in recorder, I’m just using ScreenToGif. I just tried copy-and-pasting the “start_record” line from the docs, but I got: “ERROR:ENGINE: Unable to start recording (-2)”. Do you know what that means?
Hmm, noticed that it doesn’t print anything extra there, but I wonder what width/height you have of your project? In the code it says it should be a multiple of 8.
Hmm, strange, I’ve tested both your versions (same as the docs), and for me it works. Both with 800x600 and 960x640. I’m on OSX, what platforms are you on?
Hmm, well that’s a bummer. Let me know if there’s anything else I can do to help debug it.
2: Better feet animation
It turns out the trick to generating a decent walk animation is to keep track of the ‘balance’ of the feet and try to keep them on opposite sides of the body (front/back). That’s pretty much all you need to do in fact. As the body moves, both feet fall behind, and when you hit a balance threshold, you step the furthest foot to the other side. This way they only move when they need to, and automatically sync up when moving at a constant speed. There’s some other stuff to figure how far to step and cover up some edge cases, but that’s the gist of it.
Here’s what it looks like in action: (not entirely natural, but good enough for this I think)
Thanks to my earlier setup efforts, adding other players only took about 20 minutes! I just had to add the input bindings, make the player controller only check for its own inputs, and add a simple player spawner. For now I set up four players, but the only limiting factor at this point is having input bindings for all of them.
I also got grabbing multi-segment chains mostly working. There are still some occasional annoying bugs that I have to hunt down. I colored the segments based on their owner and allowed players to steal chunks of other players to test it out. Here’s me trying to control two players at once: