Right server

67 views
Skip to first unread message

Daniel

unread,
Dec 1, 2014, 6:43:48 PM12/1/14
to jets...@googlegroups.com
Hey, before I ask my question I want to say how thankful I am to you, Abraham. So I have a 3d game right now ready for a gamekeeper to be connected to it, how can I do this? I looked at the jet server and there are a lot of main() which one should I choose?

Thanks!

Abraham Menacherry

unread,
Dec 1, 2014, 6:56:48 PM12/1/14
to jets...@googlegroups.com
Daniel,

General steps to be followed are

1. Create your own java project and in the pom.xml put in the following dependency
<dependency>
    <groupId>com.github.menacher</groupId>
    <artifactId>nadron</artifactId>
    <version>0.5</version>
</dependency>
2. Create a SpringConfig class just like the one at https://github.com/menacher/java-game-server/blob/netty4/example-games/src/main/java/io/nadron/example/SpringConfig.java you will need to setup the protocol(like messageBufferProtocol)
methods like the following to setup your game room and game bean.
@Bean(name = "danielGame") public Game danielGame(){// create your game bean here};
@Bean(name = "danielGameRoom") public Game danielGameRoom(){// create your game room bean here};
and the lookupservice method like @Bean(name = "lookupService") lookupServer(){ put the game room in the lookup service map within this method}

3. Now you can use the main class as shown here https://github.com/menacher/java-game-server/blob/netty4/example-games/src/main/java/io/nadron/example/GameServer.java to actually start off the game.

Please go through the package https://github.com/menacher/java-game-server/tree/netty4/example-games/src/main/java/io/nadron/example/lostdecade to see the game logic etc of an example game.

Thanks,
Abraham.
Reply all
Reply to author
Forward
0 new messages