A new project!

Hi all!

We are so new with ionic, and we have the opportunity to make a new project. We need to make a turn based game and we don’t know which library to use. I think that we must use socket.io, what do you think?

Thanks you so much!

Hmm well with a turn based game there is actually a lot of different ways you could go about it. Sockets wouldn’t be a bad idea, but I think there are more efficient ways to do it.

For example:

You could keep a database of games and their turns, then when a player plays a turn the server will send a push notification to the other players saying that they have gone, or that the next player needs to go.

Since you can send JSON with push notifications it could potentially work really well.

Socket.IO would be awesome for some real time games, just remember that socket.io is it’s own protocol and trying to write a server in anything but javascript and their library is a huge pain in the butt, if you can even get it to work. A simple web socket or regular old TCP (With security of course) might be more flexible in what you can do to expand your servers

I was told there are issues with websockets and phones? and whats why you cant run the angular chat app on a phone. Can you confirm this? If I mis informed then I look forward to doing more with this.

1 Like

Hmmm there might be performance issues because it isn’t a full browser but I believe them not working is recently outdated.

http://caniuse.com/#feat=websockets

As far as this site is concerned it’s working. I’m on my phone right now so I can’t write anything but I’ll give web sockets and socket io a test.

Also: I have a web socket web app for a company I contract for and that works in safari on my phone.

1 Like

in modern in ionic case (safari and chrome) you can use socket.io… in works in my simple testapp where i can send a message to the nodejs socke-io backend and receive a repsonse…

simple… very simple but it works (tested on Android 4.4, 5.0.2 and iPhone5 with ios7)

http://socket.io/

1 Like