Computer Science Canada Character Collision |
Author: | andrew. [ Sat May 31, 2008 3:04 pm ] |
Post subject: | Character Collision |
Hi guys, I am currently making a game I call "Super Mario Battle" which is based on Super Mario War. I have the main game done, but I'm not satisfied with the quality of the character collision. At first, I had the character collision as if statements, but that didn't work because player 1's if statement was first. So then I put the if statements when you press a button. So for example when player 1 presses left, it checks if he is hitting player 2 on player 2's right side. It also moves the other player over so you can "push" people. When you download the game, you can see that sometimes it works and sometimes it doesn't. I can't figure out why it's not reliable. Any help would be greatly appreciated. Also, this is just my main code. I will change this soon to make different modes and stuff and then I will upload the final game (which may or may not have AI). EDIT: I managed to fix it a bit, but even though it wasn't perfect I went on in the game. |