Is Shiva Server right for me?  [SOLVED]

How to get the best of multi player experience

Is Shiva Server right for me?

Postby Scalpulator » 2014-10-09 09:29

So I got my first game completed; now I want to convert it to multiplayer.

I would like to have clients connect to a server. Once four clients connect, I want the server to spin-off a match, and immediately wait for four more players to connect.

I don't want the server to run a scene or do anything other than receive messages and send them to the other three clients. Will Shiva Server work for this? Is the programming all done in the client's game for the matchmaking or do I make a separate "game" for the server?

Thanks!
Scalpulator
Fresh Boarder
Fresh Boarder
 
Posts: 7
Joined: 2014-04-09 21:04

Re: Is Shiva Server right for me?  [SOLVED]

Postby broozar » 2014-10-09 12:09

hi,

thanks for your interest in ShiVa Server! It's good you asked, so we can get a couple of points straight before you decide on a purchase.

- shiva server is a broadcast server. all clients connect to this server application, and when some client sends something to the server, the other clients get it.
- there are no games, scenes or STKs running on the server. all it does is handle the network traffic, the game itself runs on the clients.
- you cannot program the server application. all the coding is done in your shiva game. so the server cannot "spin-off a match", your game has to.

hope that answers all your questions. i think shiva server is a good match for your scenario. you can test how the server works with ShiVa Server PLE which comes with every installation of ShiVa.

best regards
User avatar
broozar
Administrator
Administrator
 
Posts: 4172
Joined: 2007-09-16 10:22
Location: Berlin - Germany

Re: Is Shiva Server right for me?

Postby psychicsoftware » 2014-10-09 20:51

Felix, could you get the download package fixed for Server Unlimited? I have asked a few times in other threads without any answer.

When I download S3DServer_1.9.2.0.UNLIMITED.zip, I find the the version in both the Linux and Windows folders is Advanced rather than Unlimited. Now, of course I would not mind that at all, except for the fact that the Linux version of 1.9.2 which I want to use keeps crashing on Debian Wheezy.

I tried falling back to 1.8.0 Unlimited, which I have in backup.. it doesn't crash, however it has bugs which make it unusable.
Sam.
psychicsoftware
Platinum Boarder
Platinum Boarder
 
Posts: 355
Joined: 2010-10-10 14:36
Location: Galway, Ireland

Re: Is Shiva Server right for me?

Postby broozar » 2014-10-10 00:23

is it not updated already? :oops: will remind the team again tonight. thanks for reporting.
User avatar
broozar
Administrator
Administrator
 
Posts: 4172
Joined: 2007-09-16 10:22
Location: Berlin - Germany

Re: Is Shiva Server right for me?

Postby Scalpulator » 2014-10-10 15:05

Thanks Broozar. I went through the documentation and was able to join two clients to a server and session for testing purposes. I plan to do something like this in my game:

1. A client connects to server and joins "lobby" session.
2. Once there are four clients in the lobby, then each client leaves the "lobby" session and joins a game session ( i.e. "match" .. x ).
3. After the match, the match session is destroyed.

Am I using sessions correctly? I can't seem to find a way to send events to users in the session, however. There is server.getSessionUserCountAt, but how do you actually get the users in a session. I see there is application.getUserAt. Is there something equivalent for sessions? Thanks.
Scalpulator
Fresh Boarder
Fresh Boarder
 
Posts: 7
Joined: 2014-04-09 21:04

Re: Is Shiva Server right for me?

Postby Scalpulator » 2014-10-12 00:38

After reading the First Contact example and playing around a bit, I think I misunderstood the application functions. It appears they only return users for the current session, so I need to use those instead of the server.getSessionUserCountAt function. Maybe server.getSessionUserCountAt is for returning counts for sessions other that the current one.
Scalpulator
Fresh Boarder
Fresh Boarder
 
Posts: 7
Joined: 2014-04-09 21:04

Re: Is Shiva Server right for me?

Postby Fraser » 2014-10-12 04:13

I did what you want to do for an online 1 vs 1 battleship game.

In your case if you want 4 players and then start game:

____________________________________________________

:arrow:
PlayerX goes online and enumerates all sessions on server.

:arrow:
If no sessions exist then PlayerX starts a session and waits. END.

:arrow:
If 1 or more sessions exist then PlayerX gets user count of all sessions (server.getSessionUserCountAt)

:arrow:
If all sessions have 4 users then PlayerX starts a new session and waits. END.

:arrow:
PlayerX Joins session with highest user count that is less than 4

:arrow:
If PlayerX makes the session now have 4 players then PlayerX sends a message to all session users to start the game.

:arrow:
If PlayerX makes the session now <4 players then PlayerX waits, can send message to all other session users "hello new player joined".
____________________________________________________

NOTE: Sessions will exists forever on the server until the server is restarted. You cannot "destroy" sessions... No problem, with the above scheme they just get re-used.

You can see the max number of player you ever had online by counting the sessions on the running server, and divide by 4 in your case. You only create a new session when you need one.

You may set a cron job to restart the server ever day or week, if you find the server hangs occasionally. This will obviously kill any games in progress.
Fraser,
User avatar
Fraser
Platinum Boarder
Platinum Boarder
 
Posts: 1324
Joined: 2012-02-05 19:28
Location: Europe

Re: Is Shiva Server right for me?

Postby Scalpulator » 2014-10-13 06:56

That's great Fraser! I will do something like that. No point in complicating it by moving players around in sessions; just let them play in the session they join. Thanks.
Scalpulator
Fresh Boarder
Fresh Boarder
 
Posts: 7
Joined: 2014-04-09 21:04

Re: Is Shiva Server right for me?

Postby broozar » 2014-10-14 20:36

for everyone else having problems with the current 1.9.2 server PLE, here is the fixed archive:
http://shivaengine.com/download/Server/ ... .2.PLE.exe
User avatar
broozar
Administrator
Administrator
 
Posts: 4172
Joined: 2007-09-16 10:22
Location: Berlin - Germany


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron