|
Post by Leif Bloomquist on Apr 20, 2006 12:36:03 GMT -5
Ideas?
A couple of initial ideas - sum up the bytes of both IP addresses, and the highest sum goes first.
Alternately, we could go based on the alphabetical order of the players, but I don't know how that would be done in ML.
|
|
|
Post by fuzz64 on Apr 25, 2006 20:39:16 GMT -5
Another idea is to read the sid chip for 2 random numbers... whichever player gets the highest number gets to go first?
|
|
|
Post by Leif Bloomquist on Apr 26, 2006 12:30:50 GMT -5
Interesting idea, but how will the two copies of the game "know" what the answer was? In oter words, the player that doesn't go first has to know that too, so it can sit and wait while the first player goes.
|
|
|
Post by fuzz64 on Apr 28, 2006 12:05:39 GMT -5
There's 2 ways I can think of for the random number thing...
1) Both computers come up with a random number. They then send that number to the other system. Both computers compare, and whichever computer had the higher number goes first while the other waits.
2) One computer comes up with 2 random numbers.. the first number is for itself, and the second number for player 2. It figures out which number is larger, and sends the result to computer 2. Computer 2 simply sits and waits until it's told if it gets to go first or not.
As for alphabetical order...
I believe you can simply read in memory wherever the names are being stored... If, for example, player one's name is stored at $4000 and player 2's is at $5000, you can
LDA $4000 CMP $5000 BEQ BOTH FIRST LETTERS ARE THE SAME, CHECK LETTER 2 BMI P1's NAME IS BEFORE P2's ;code for P2's name being before P1
|
|
|
Post by thurstan on May 5, 2006 5:31:06 GMT -5
From a non coders point of view I think the above options would be the simplest.
Next question how do you decide which computer is computer 1 and 2?
|
|
|
Post by fuzz64 on May 6, 2006 13:19:04 GMT -5
I have no idea
|
|
|
Post by Leif Bloomquist on May 8, 2006 12:52:28 GMT -5
That's why I thought something inherent to each computer would be the best approach (such as its IP, or a random number). That way each computer "knows" the answer for both itself and the other computer.
Another way would be...I would expect that the players would have some independent means of communication (IRC, phone etc) to set up the game anyway. So we could simply have them agree on who goes first and who goes second beforehand, and then press either 1 or 2.
|
|
|
Post by fuzz64 on May 10, 2006 9:22:39 GMT -5
Only problem really with the press 1 or 2 deal is what happens if someone with "large thumb syndrom" (like me) presses the wrong number by accident? Will the games crash, or will there be some sort of checking procedure for that as well?
|
|
|
Post by Leif Bloomquist on May 10, 2006 15:04:16 GMT -5
Look at the flowcharts, what do you think will happen?
|
|