|
Java System
#85480
08/10/06 19:45
08/10/06 19:45
|
Joined: Jan 2003
Posts: 4,305
Damocles
OP
Expert
|
OP
Expert
Joined: Jan 2003
Posts: 4,305
|
I am currenly playing around with a Multiplayer System on Java basis, so that the connection and datatransmission is handled by the Java Client/Server and the Java client communicates with the 3dGS enviroment.
This gives me a lot more in flexibility than the native Gamstudio Multiplayer commands. (no entity-handeling overhead, no session connect problems, or client limitations)
it is not a serious development for a certain game, more like a testrun, if all the concepts work together.
The datatransmission will be not fast enough for a shooter, but sufficient for Online Roleplaying or RTS.
The first step is to get a decent Java client/server, that works on the internet, and transmits data-packages and chatstrings.
the next step is to bind the Java client to 3dGS (in a very crude -but functioning- way currently, for a more eloquent approch I need the help of a C++ programmer)
The gameserver could be linked to a 3dGS enviorment, or handled fully by a Java instance. (this way it is possible to run the server on common Linux online hosts) Java has got a good database connectivity too.
The reason why i use Java, is bacause I am trained in it, and dont have a good knowledge on C++. Java is very flexible for large programs, that dont require a 3D rendering.
I will posts some stuff, whenever I have a Java Client/Server (Chat), to test the online connectivity, and amount/speed of datatransmissions.
3dgs does not need to run in the faulty multiplayer mode, which enhances the development.
Does anyone have experiences with Java (Socket programming), and how it handles online? The hard thing will be to tackle the router-issue.
|
|
|
Re: Java System
[Re: Damocles]
#85481
08/10/06 21:17
08/10/06 21:17
|
Joined: Jan 2006
Posts: 968
EpsiloN
User
|
User
Joined: Jan 2006
Posts: 968
|
I was thinking about that , about making the server a completely diffrent program. My first thought was about mIRC sockets , databases...whatever you wish , and its fast. It doesnt render anything...the only problem that I thought about was that mIRC doesnt have wait functions. But I didnt even tested this , because I remembered the 'dedicated server' command isnt this the same ?
|
|
|
Re: Java System
[Re: TWO]
#85485
08/14/06 22:28
08/14/06 22:28
|
Joined: Jan 2003
Posts: 4,305
Damocles
OP
Expert
|
OP
Expert
Joined: Jan 2003
Posts: 4,305
|
Since I dont have a dll plugin currently, I have to use a very crude method to communicate with the Javaclient. CScript Basically encodes the information to be send into a specific format, and reads it out that way. The Javaclient on the other end does the same, and transmits the data to the server.
Variables cant be written directly into the communication link between Java and 3dgs. There is a function written in c-script, that saves the ID of the variable and the value.
the same goes for strings, altough strings are mainly used for the chat channel, so it is handled a bit different.
the variables have an defined ID number. Such that var is_raining for example gets the predefined ID 445.
so sending "445 1" can be read out as, variable is_raining = true, by the javaclient.
Entityskills, need to get the id of the entity and the skillnumber, and the value.
The java-client can transmit these values, and the Java-server can asign them to the related object-instance.
So the Java-Server could handle the whole Gamelogic on Java-Basis. With all the advantages (like object oriented programming, SQL Connection, Useful GUI for presenting the current server-data, AI based on objects, Linux compatibility)
Stuff like collision-detection needs to be calculated by Java itself though. But this is managable whenever the gameworld is designed more abstract, without detailed collision detection.
Curretly I can send variables and Strings to the clients, and by them to the server, and return the data to specific or all clients. Its still just a test ot mehtods and not for a specific game. Maybe one wants to take up the system to transform it into a MMO game system.
|
|
|
|