Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: collechess on November 11, 2011, 07:17:51 am

Title: Multiplayer in Axe?
Post by: collechess on November 11, 2011, 07:17:51 am
Is it possible to have multiplayer via the link cable thing in Axe.  If so, can someone give me a general idea of how or refer me to a tutorial?
Title: Re: Multiplayer in Axe?
Post by: Stefan Bauwens on November 11, 2011, 07:24:25 am
Multiplayer with two calc's actually just means sending files from the one calc to the other. I can't answer your question because I don't know if this is possible. If it doesn't we'll just have to force Quigibo. :P
Title: Re: Multiplayer in Axe?
Post by: Wellen on November 11, 2011, 08:18:07 am
Multiplayer with two calc's actually just means sending files from the one calc to the other. I can't answer your question because I don't know if this is possible. If it doesn't we'll just have to force Quigibo. :P
Yes you can, with
Send(BYTE,TIME)|Tries to send the byte across the linkport. It will keep trying until the other calculator receives the byte or time runs out. Returns 1 if the byte was sent successfully or 0 if it timed-out. Time is in the order of microseconds.
Get|Checks if the sender is trying to send anything. Returns the byte if it was received or -1 if nothing was sent. No waiting is done.
Title: Re: Multiplayer in Axe?
Post by: C0deH4cker on November 11, 2011, 11:20:29 pm
You will have to set it up in such a way that the needed data (such as score, position, speed, etc.) gets sent from calc to calc. Then, the program will have to parse the sent data.
Title: Re: Multiplayer in Axe?
Post by: InternetCliche on November 15, 2011, 05:59:52 pm
I have tried this. It did not end well. The amount of blood exceeded safe flying limits. But seriously, I don't think calcs are the best for multi-system multiplayer.
Title: Re: Multiplayer in Axe?
Post by: BalancedFury on November 15, 2011, 06:01:06 pm
Its possible [|:{P
My bro made something like facebook chatting except that he quit on it before he finished :D
Title: Re: Multiplayer in Axe?
Post by: InternetCliche on November 15, 2011, 06:03:05 pm
Its possible [|:{P
My bro made something like facebook chatting except that he quit on it before he finished :D
Ignoring the blood, it did work. Just not well. And i meant for games. The delay is acceptable for chat.
Title: Re: Multiplayer in Axe?
Post by: saintrunner on November 15, 2011, 06:06:04 pm
is there (if not someone needs to make one!) a wireless connector to go between calcs? that would make a chat program more practical!
Title: Re: Multiplayer in Axe?
Post by: DJ Omnimaga on November 15, 2011, 06:06:31 pm
Multiplayer is possible if done well. It requires a lot of experience in Axe programming, though, so I would advise against taking on such large project if you are still kinda new or intermediate to Axe Parser.

For good multiplayer connection, you must have one of the calc waiting data from the other calc, then once the other calc sends it, it goes in wait mode, waiting for the updated data from the other calc, in a ping-pong fashion. That way if the connection is poor or if you disconnect the calcs then reconnect them, it will simply wait until both calcs are reconnected. This can be slow in some cases, though, but it allow for games to remain in sync. (Not every 83+ run at the same speed, for example. one 83+ can be 6.0001 MHz while the other can be 6.0250 MHz)
Title: Re: Multiplayer in Axe?
Post by: InternetCliche on November 15, 2011, 06:07:48 pm
...
For good multiplayer connection, you must have one of the calc waiting data from the other calc, then once the other calc sends it, it goes in wait mode, waiting for the updated data from the other calc, in a ping-pong fashion. That way if the connection is poor or if you disconnect the calcs then reconnect them, it will simply wait until both calcs are reconnected. This can be slow in some cases, though, but it allow for games to remain in sync...
Yeah, I did something like that. Slow as... something that is slow.
Title: Re: Multiplayer in Axe?
Post by: flyingfisch on November 15, 2011, 06:09:02 pm
Slow as... something that is slow.

Molasses in January on the south pole?
Title: Re: Multiplayer in Axe?
Post by: InternetCliche on November 15, 2011, 06:11:22 pm
Slow as... something that is slow.

Molasses in January on the south pole?
Except that January is one of the warmest month of the year on the south pole.
Title: Re: Multiplayer in Axe?
Post by: saintrunner on November 17, 2011, 03:57:21 pm
AHH geography! I slept through that class!
Title: Re: Multiplayer in Axe?
Post by: jsj795 on November 17, 2011, 04:47:53 pm
Slow as... something that is slow.

Molasses in January on the south pole?
Except that January is one of the warmest month of the year on the south pole.

I loled

Also note that not many people have link cables as the 2.5mm are hard to acquire sometimes :/ but nice multiplayer games are pretty cool
Title: Re: Multiplayer in Axe?
Post by: Happybobjr on November 17, 2011, 04:54:49 pm
yes multiplayer is possible.
and amazingly easy and fun.
http://ourl.ca/8454
I think last release was a dud, but one before that should work.

You should know however, 2 player games do not work with the 83+, Nspire 84 emu, and 7 foot cable.
If you need any help with making a two player game, just call on me.
Don't forget to make your send commands have if statments combined.

So something like....
if getkey(3)
If send(3,60000)
X+1->1
end
end

or else you will get out of sync.
Title: Re: Multiplayer in Axe?
Post by: ztrumpet on November 17, 2011, 05:23:27 pm
This game, made by Quigibo before he created Axe, demonstrates just how fun two player link play can be. <nostalgia> I remember playing this in Algebra II... </nostalgia>

http://www.ticalc.org/archives/files/fileinfo/423/42355.html
Title: Re: Multiplayer in Axe?
Post by: Yeong on November 17, 2011, 07:20:37 pm
This game, made by Quigibo before he created Axe, demonstrates just how fun two player link play can be. <nostalgia> I remember playing this in Algebra II... </nostalgia>

http://www.ticalc.org/archives/files/fileinfo/423/42355.html
OMG I missed that game so much :D
Title: Re: Multiplayer in Axe?
Post by: Quigibo on November 18, 2011, 05:43:23 am
Fun fact: The link routine Axe uses was just copied over from that game and optimized slightly.

Like I always say, linking is easy, but syncing is hard.  Puyo Puyo runs fast because it only needs to send data when a particular "event" occurs (combos).  Event driven programming style is a little different than what you're used to but basically you put the Get() in your main loop so its always ready to receive an event.  Don't forget, Get() doesn't delay or wait unless the other calc is sending something.

You send data by first sending an enumerated event type (1 bytes) followed by the event data (which may be different length depending on the event).  For instance you might need to send a character's position.  This can be done by sending a "X change" event followed by the x coordinate whenever that coordinate changes and a "Y change" event followed by a y coordinate.  The actual transfer speed is about 500 bytes per second maybe.  If your main loop is running at 30fps and don't mind reducing to 20fps that's about 8 bytes per frame of data you can send which is probably enough for a decent subsets of multiplayer games.