I have made a 2D fighting game in scratch. It was easy getting started and it got harder as I went along, I didn’t have to much trouble putting together the code except for making global variables that would work for everything and assigning buttons. Another difficult part was getting all the characters to detect collision with each other and having a reasonable life point system. The easy parts were coming up with ideas and setting up the characters aside from key assigning part. https://scratch.mit.edu/projects/61646052/ the link to my game, feel free to edit it or enjoy it in anyway you’d like
Its fairly simple, the 4 characters have keys assigned to their movement and punching abilities, it was a little bit tricky to set up 4 different characters without matching the same keys or having it be scrambled, it wouldn’t make much sense to have for example, a W punch and an M punch on the same character.
As I said earlier, it was a bit tedious to get 4 characters working at the same time, other then that collision and the life point system had to be considered. Variables control 90% of my code, it controls the collision, and the life points, which is a major factor in the game. (Change Scorpion Health by -20), so when the characters are hit it subtracts 20 points. And when the character dies, the if then hide statement causes it to disappear
Explanation of Confusing parts:
So the costumes control the punching action of every character, the buttons that are assigned to a certain character make the character switch to a certain costume, and enacts the punch and collision. As far as the x and y coordinates go, that puts the characters in different starting position. There all about the same maybe some a few degrees off, each character has the same advantage. The characters have been shrunk down to fit the game. The characters are programmed to just disappear when their life points are gone, and then are shown again above 0.
Music and Background:
I added music and a Mortal Kombat background stage to give the game some character, as I’ve left out blood and sound effects, the music took a second to figure out, and I had to fit the background to the game
I hope I’ve explained anything that was confusing to viewers and I hope you’ll find humor and fun in my game and edit it in anyway you’d like. I had a lot of fun making this over the course of the last weeks of the class.