My project is a stickman fighting 1v1 game. I wanted to make them punch and kick, but I'm not sure how the hitboxes would work. What attacks do you recommend? If it's melee, how would I go about doing it?
Depends. Is every frame a unique costume, or are you actually animating it with sprites? If it's animated with sprites, should be as easy as using the touching block. However, if you aren't, I suggest making a 2d list of positions (1 dimension for the attack variant, 1 dimension for the frame, and a dimension for x vs y, so a 3d list in total) for the contact point, and having some sort of hitbox clone follow them when the animation triggers. For example, if a player punches, that hitbox is on the hand they are punching with, and as it moves along, it checks if it's contacting the other player.
For the most part, though, just about any kind of attack should be able to work. Most of them only have a finite number of important contact points, so as I said, should be possible.
I think it should be a one frame kick. Check out my Fighting simulator game feel free to copy anything you want.
Thank you! What are the controls though? I can't seem to figure it out.
Controls for 2 player mode player 1: wasd to move r to attack and t to to a super attack and there is a 10 second cool down for super attacks. Player 2 arrow keys to move L to attack and m to super attack. 1 player move same controls for player 1 but player 2 just chases you try to get the best time possible! And for the 10 second cool down you can’t move because the super attack was super powerful!