ShiVa3D
multiplayer game
All about the StoneScriptmultiplayer game
by siml » 16 Jun 2012, 14:34
hi everyone.
i want to create a client and server.
in my my server game,in the mainAI,in OnInit event, i wrote this code:
and in my clent game in OnInit Event i wrote this code :
this.searching is a state that in Onloop of this i wrote it:
but why log.message ( "Connected" ) never happened.
did i miss something?
i want to create a client and server.
in my my server game,in the mainAI,in OnInit event, i wrote this code:
- Code: Select all
network.createServer ( network.kDefaultServerPort );
log.message ( "server created" );
and in my clent game in OnInit Event i wrote this code :
- Code: Select all
network.searchForServers ( 5354 );
this.seraching ( );
this.searching is a state that in Onloop of this i wrote it:
- Code: Select all
if(network.getStatus ( )==network.kStatusSearchFinished) then
network.setCurrentServer (network.getServerNameAt ( 0 ) )
log.message ( "Connected" )
end
but why log.message ( "Connected" ) never happened.
did i miss something?
Re: multiplayer game
by Cheramu » 16 Jun 2012, 16:39
Maybe it is returning "network.kStatusNone"?
http://www.stonetrip.com/developer/doc/api/network-kStatusNone
http://www.stonetrip.com/developer/doc/api/network-kStatusNone
Platform: interactive visual art
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
- Cheramu
- Senior Boarder

- Posts: 58
Re: multiplayer game
by Cheramu » 16 Jun 2012, 17:06
Are you running 2 shiva editor instances (server and client) on the same pc?
Platform: interactive visual art
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
- Cheramu
- Senior Boarder

- Posts: 58
Re: multiplayer game
by siml » 16 Jun 2012, 17:38
shoud i use PLE server or something?
i dont know how networking work in shiva.
please explain to me
i dont know how networking work in shiva.
please explain to me
Re: multiplayer game
by Cheramu » 16 Jun 2012, 20:04
I used you're code and i get the message connected.
(created one client game and one server game, started the server and after that the client)
(created one client game and one server game, started the server and after that the client)
Platform: interactive visual art
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
- Cheramu
- Senior Boarder

- Posts: 58
Re: multiplayer game
by siml » 17 Jun 2012, 04:55
i'm confused. 
do you do anything on PLE?
or did you do anything else?
do you do anything on PLE?
or did you do anything else?
Re: multiplayer game
by Cheramu » 17 Jun 2012, 09:04
Did not do anything else, if you post you're 2 games exported to ste i can try that.
Platform: interactive visual art
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
- Cheramu
- Senior Boarder

- Posts: 58
Re: multiplayer game
by siml » 17 Jun 2012, 15:35
this my simple sample game
- Attachments
-
Desktop.zip- (2.12 KiB) Downloaded 13 times
Re: multiplayer game
by Cheramu » 17 Jun 2012, 17:42
Works for me Shiva Editor Web Edition version 1.9.1. Can't help you further.
Platform: interactive visual art
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
Tools: polyglot-dialogue editor
Scripts: rmi xml network example, dialogue example
- Cheramu
- Senior Boarder

- Posts: 58
12 posts
• Page 1 of 1