Making an augmented reality multiplayer game

By multiplayer, I mean local devices. I know there’s HTTP Request, but is there a suitable URL that will allow me to store coordinates and stats?

Not unless you set one up on the internet, no

You can use network sockets to transmit data directly between devices, but they don’t always update reliably, which can cause significant lag

@Ignatz The only things that will be AR are the battles. One person uses their own customized humanoid to cast magic attacks on the other customized humanoid.

if that requires real time networking, you may have reliability problems

Do you think the reliability would be better if the players were sitting in the same room, on the same wifi network? Do you have any code you could share so I can see how you handled the sockets in your 3D prototype?

I wonder if one could make a simple asteroids like game, or if the lag would be too problematic.

I guess if the lag were too significant for real time games, maybe we could do a turn-based game of some sort. My kids are aching to play local multiplayer games, and there aren’t that many good ones in the IOS App Store. We used to be big fans of Asphalt 8 - a racing game, but they recently removed the ability to play local multiplayer.

I just traded in my PS4 for a Wii U for that primary reason - too few good local multiplayer games. Now we’ve got Mario Kart and Super Mario Brothers, and we’re happier. And Trine.

@interactivenyc

This is the thread for sockets:
https://codea.io/talk/discussion/6344/luasocket-questions#latest

It has a couple of examples. I tried to make pong (link is in that thread). It didn’t work.

Are sockets over the local network or are they ad-hoc peer-to-peer? I can’t even remember now.

Although neither me nor @Ignatz could get them working for an action-based game, that doesn’t mean it’s not possible. I think the trick is to send the smallest viable amount of good quality data.

It is tricky to develop tho, because unlike on a computer, you need 2 devices. I only have 1 iPad, so I installed the other instance on an iPhone, using Xcode. But then if you need to develop iteratively, it really slows things down having to push new code to the other device.

(the solution would be to write a client that can suck in the new code OVER SOCKETS! But I have no time to do this now)

But yeah, right now, in terms of what the 3 or 4 people who tried it and posted their code on the forum achieved, only slightly asynchronous gameplay (eg anything turn-based) is possible. No one got live-updating action 2-player working properly. But don’t let that put you off trying! Eternal fame on the Codea Talk boards would be yours!

I tried on two iPads sitting next to each other. It worked fine, except that suddenly I would get nothing through on one iPad for several seconds.

I should point out that the code does not include any smoothing of packets to reduce lag, but I figured that if you had transmission gaps of several seconds, there was no point doing any smoothing. One solution may be to transmit less frequently, but since I was only sending a tiny amount each time, I didn’t think I was overloading.

I’ll try to make a simple example using the code I used from above, as a demo.

Never mind. I might stick to simpler things. After all, I am not experienced with programming.