A tale of two melvins


Global Game Jam 2024 was a few weeks ago, and I made a video game version of the popular sport Melvinball where you try and get all the melvins, and steal your opponent's melvins too.  These are melvins:  

 

The PIGSquad Twitch showcase just happened, and it was really fun to watch Marlowe and Will battle it out - this was the highlight of the jam for me (if the embed doesn't work, watch on Twitch):


I started the week noodling around making a squishy ball character, without much of a game idea.


It's made up of a few balls that are jointed together with physics, so it's not a real soft body simulation but it looks good enough for me.  The tricky part was drawing the deforming blob around the balls.  I found a couple ways of doing it:

1) Use Unity's 2D skinned mesh.  So, you create a shape with bones and weights, same as with a 3D workflow.  This was a pain to set up, and also I couldn't get it stable, since whenever the internal balls got into a weird position, it would completely glitch out.  I award this 0 melvins.

2) Use Unity's 2D Sprite Shape Renderer/Controller.  Even though it's meant to be used with 2D tiled backgrounds, this worked way better.  You update a bezier curve every frame, and Unity draws an edge around it and fills the interior with a sprite graphic, which is exactly what I wanted.  Thanks to this YouTube video for the idea and basic implementation, 10 out of 10 melvins.


Each of the outer circles is jointed to the inner one, and its immediate neighbors, using spring joints, so they are all trying to keep the circle shape, but with a bit of squish.  For moving and jumping, I keep track of whenever one of the outer balls is in contact with the ground.  When the player presses jump or move, only the balls that are touching the ground have some forces applied, so if you time it right you get a bit more of a jump after a good squish.

The background is made of random colliders that have a world-space shader applied, so it looks like one solid object even though it's really a bunch of overlapping rectangles.  That let me quickly move things around and experiment with different level designs.

Unfortunately I did not have anyone to playtest with this time around, so the game didn't actually get played properly by two people until well after the jam.  I think the balance actually came out okay for the most part.  If I had been able to playtest, I think I would have made the antigravity movement faster and more fun, since it's a bit painfully slow.  I don't remember what I was thinking...I do remember I wanted to have little arms and legs come out of the players so it looked like they were crawling around weirdly.

But then, there were about 100 ideas that I didn't have time to do - such is the way of the game jam.

Get Melvinball

Leave a comment

Log in with itch.io to leave a comment.