TIB: help needed with multiplayer BASIC game for 83+


[Prev][Next][Index][Thread]

TIB: help needed with multiplayer BASIC game for 83+




I'm trying to make sort of a two-player "snake" game that has no "dots" that 
you have to eat. The winner is the last one standing, and you just basically 
have to try and "entrap" your opponent, making them crash into you, 
him/herself, or the surrounding wall. I've gotten it to work PERFECTLY on a 
single calculator(player 1 uses arrow keys, player two uses number pad(e.g.: 
8=Up, 2=Down)). I had to settle for this uncomfortable method of gameplay 
because I can't seem to figure out how to realy info from one calc to another 
simultaneously. The only info needed to be exchanged are the "current" X, Y 
coordinates for each player. After calling a GetKey subroutine, the new 
coordinates for each player are calculated. What SHOULD happen is a sort of 
"GetCalc(X2, Y2)" on player 1's calc and "GetCalc(X1, Y2)" on player 2's 
calc. Both coordinates should then de displayed on each calculator, and thus 
a two-player, two-calculator game should work!!! However, this was not the 
case. Even after throwing a while loop around each GetCalc() to make sure 
both calculators got each other's info at the same time, it still didn't 
work. The actual error was, after initializing, it would immediately say 
player 2 or player 1 wins, depending most likely on whichever player pressed 
"enter" to get into the game first. Please, someone who has experience making 
two-player games in 83 BASIC, help me!!!

-Donny