Forum C# from nonoba to playerio

from nonoba to playerio

Postby eltacodeldiablo » August 15th, 2010, 7:26 pm

So I already started making a game using nonoba and wanted to try playerio b/c of the better features (such as the facebook connect options). Also I probably should have thought about designing it based on a more structured MVC pattern.

A lot of the methods/classes and things are different so I went ahead and tried to change what I could... might have to redo things because they don't really make sense. Is there anything I can do to make the process easier?

2nd question:
I seem to have a problem with running the server at all. I went back and tried the nonoba server and it worked fine. Upon running debug (the server) to test converted code using playerio kit it says:
"Unable to listen with a socket on port 8184. The port might be in use by another process. The development server can't run without being able to listen to port 8184." I couldn't think of any programs and even downloaded a port to process exe to find what could have caused this to happen but it only shows the server itself as the only thing listening to the port. Not sure what the problem is.

Thanks!
eltacodeldiablo
 
Posts: 3
Joined: August 15th, 2010, 4:22 pm

Re: from nonoba to playerio

Postby Oliver » August 16th, 2010, 11:35 am

Hey,

With regards to your 1st question: Player.IO is based upon Nonoba, and they're not all that different... I don't think there is an easy way to port other than just keep going until it compiles and runs.

2nd question: It's a bug with the latest version of the development server on systems that don't have IPv6 -- fix will be out today.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: from nonoba to playerio

Postby eltacodeldiablo » August 16th, 2010, 5:07 pm

Thanks for the reply Oliver. Yeah it only took around an hour to fix syntax errors to get it to compile - I just have to test to see if it works the same as before.
As for the IPv6 problem thanks - yeah I disabled it for reason so I guess it shouldn't be a problem really. I'm happy to start again after almost a year of not coding. With the new features in playerio I hope it will be a lot of fun.
Do you any tips to incorporate design patterns in how all this works? I was looking at MVC for multiplayer games (i'm trying to recreate a multiplayer card game) and puremvc looks daunting. I suppose I already created my own View (as3 code/graphics) model (card decks/players hands) and control (game) classes but I don't think I was specifically thinking about any design at all.
Thanks again.
eltacodeldiablo
 
Posts: 3
Joined: August 15th, 2010, 4:22 pm

Re: from nonoba to playerio

Postby Oliver » August 16th, 2010, 5:25 pm

Hey,

We won't be adding layers on top of the current structure of our client side and server side code. You're more than welcome to structure one or both using MVC or any other design patterns.. there is nothing preventing you from doing it; we just don't supply a default example :-)

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: from nonoba to playerio

Postby Oliver » August 16th, 2010, 5:26 pm

Oh, stupid me. You asked for tips...

Hmm... I don't know how you'd go about structuring your game with MVC... somebody who knows better than me will have to answer that...

_ Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: from nonoba to playerio

Postby Benjaminsen » August 16th, 2010, 7:24 pm

The problem with 8184 is now fixed. Simply download a new Development Package.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: from nonoba to playerio

Postby eltacodeldiablo » August 18th, 2010, 1:47 am

PlayerIO developement server
Game Errors:
(dll: the location of the dll)
ServersideGameCode.classname constructor has 3 parameters
ServersideGameCode.classname constructor has 3 parameters
ServersideGameCode.classname constructor has 3 parameters

so another problem that occured when trying to transfer nonoba->playerio...
When I run the server.. it gives me an error somehow that you can't have multiple parameters in a constructor...
I put other classes (this is a card game) like Card, Deck, etc which have constructors with multiple parts in
a single file called Game.cs under the namespace ServersideGameCode along with the GameCode class which extends Game<Player>. Whats the problem?
the simple workaround that works is making the constructor have no parameters to call an init method that does
the same thing as I wanted the constructor to do in the first place which kind defeats the purpose of it.

thanks.
eltacodeldiablo
 
Posts: 3
Joined: August 15th, 2010, 4:22 pm

Re: from nonoba to playerio

Postby Oliver » August 19th, 2010, 10:29 am

Anything that inherits from Game<P> must not have any constructor or a parameterless constructor. Everything else can have as many constructors as you like.

We create instances of your game at runtime, when the client calls createRoom() or createJoinRoom(), which is why we need the Game<P> class not have any constructor (or a parameterless constructor), since we don't have any parameters to pass to it.

If you want parameterized creation of rooms, you can send data in the initData arguments to createRoom() and createJoinRoom(), and use them in the serverside GameStarted() method which is called when a game is created.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#



cron