Hi all,
Ive always been curious to know, how real time multi-player games work.
A simple case: tic tac toe
- player 1 and 2 see a game board.
- player 1 places an "X" on the board.
- ? would you then upload the data for that move to a server eg. a json package {player=1,cell=5,shape="x"},
- ? the other application is polling for new data?.. and sees the server is updated, so it downloads the latest data and updates the screen.
- player 2, makes a move...etc
In full size game worlds, like WOW,Runescape,Habbo etc.. where you have a room full of players interacting, would that be the same principle ?
is this doable with Lua/Gideros ?
Hmmm
Comments
a) have a central server and when each client changes the world state, it sends it to server and server resends updated world state to all devices
b) peer to peer connections, without the specific central server (although one of the peers may act like one) and in this case it is more handy to dispatch events to update specific cases, what other peer did
2) and yes with lua sockets it is definitely possible in Gideros, here is a sample DrawTogether app in Gideros based on Gideros Unite framework (one of my homeworks in university )
https://github.com/ar2rsawseen/GiderosUnite
And here is more information on Gideros Unite:
http://appcodingeasy.com/Gideros-Mobile/Gideros-Unite-framework-for-multiplayer-games
And if you want to create everything your self, here is more information on Lua Sockets:
http://appcodingeasy.com/Gideros-Mobile/Using-LuaSocket-in-Gideros
ive always wondered about it.
http://artleeapps.com/
Bubble Adventure - Colors