Need good advice

Previous topic - Next topic

Omadan

Heres the scene.

I want to create an iOS game which will play over the Net.

This is what I want to achieve, I have listed it so its easier to follow.

1. player connects to server.
2. another player connects to server.

as soon as 2 players are connected they will play via each other but via Peer to Peer topology (P2P), so no need to interact with server anymore, thus server load will be reduced tremendously. I just want to use server as a meeting point.

3. other players will continue to connect to server and be paired against one another just like points 1-2.

Im I being too ambitious here or is this possible. I also read that hosting a session in an iOS device is not good. 3g loss of connections etc.

I really want to know your thoughts on this.

if this works I can assure you all that this project will be a hit.

Thanks all.

If you want further clarification just ask here :)

kind regards
Top Arcade Apps - Best game for mobiles and computers

http://www.toparcadeapps.com

matchy

Sounds great but I have no idea about the 3G issue as WiFi is fine with my test of multiplayer iOS server and various clients.

Quote from: Omadan on 2012-Jul-25
if this works I can assure you all that this project will be a hit.

An idea of game concept would help in understanding the need for bandwidth. eg. High real time (Quake) vs low turn based (Worms). 

r0ber7

Sounds like a sound plan. Here's what I would try to figure out if it was my plan.

Communication between client and server:
- which port to use?
- what kind of language to code the server in?

Chances are not all ports are permitted, so you could run a php script on the server which deals with this, since TCP port 80 will likely be permitted and it would be an easy option providing you run a web server. You could also code your own server from scratch, which is kinda fun but takes more time.

Communication between two clients after server mediation:
- UDP or TCP?

I hear UDP is faster but has a chance of packet loss. So if you choose UDP, you might want to code in some packet checking. TCP doesn't have packet loss problems as far as I recall, but you'd have to open up a port on one of the clients for the other to connect to, and I'm not sure how iOS treats listening on port requests.

Omadan

Hi guys, thanks for replies.

Game will consist on real time action but as I mentioned earlier, only for 2 players. Server is just place to connect clients and then they are off on a p2p game.

server side, I am intending on writing it either on php or jnode. more familiar with php though.

other alternatives could be included, just tell me why you think its better, only if you know 100% please.

Thanks all again.
Top Arcade Apps - Best game for mobiles and computers

http://www.toparcadeapps.com

matchy

It would be as simple to send the other user's IP address from the web server.

What particular real time action? As I have a 3D multi-player server/client wip and I'm interested in what and how you plan to transfer data and communication to the peer. 

Omadan

Hey matchy.

Real time action would be very similar to wow's arena action. Im sure you have heard of it maybe even played it, dunno :P

the actual packets bits bytes this and the other is still to be decided but its just gona be 2 players for now. p2p.

first i want to work on a solid framework which is perfect.

eg:
P1 connects.
P2 connects.

start the p2p with ip addresses etc.

they will fight vs one another.

winner will be announced and get points.

more players will obviously be connecting and they will be paired etc...

obviously I need tcp for guarantee and in order delivery.

it should be fun for all us to play now that im thinking about it hehe
Top Arcade Apps - Best game for mobiles and computers

http://www.toparcadeapps.com

matchy

p2p would be easier and different, regardless of tcp/bt but there would have to be one create game server that contains the level data and the other a client. I play WoW (World of Warcraft) and that is quite complex as there are real-time positions but turn based combat rolling.

Another example of an issue for real time I have tackled is, originally, i would transmit the positions of the flying ammo but this was not efficient. So I changed this to faster ammo and only broadcasting one line of the ammo vector so that all that is seen is the end of where the ammo hit on the wall or player.

Although I've tried but not implemented, the other concept of predicting movement. That is, only the pulse vector, rather than the position, of players is required so that they walk smoothly on the other clients. Of course this get to complicated for now and just broadcast player pos if fine for now.