Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 911 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Java System #85480
08/10/06 19:45
08/10/06 19:45
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline 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 Offline
User
EpsiloN  Offline
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 ?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Java System [Re: EpsiloN] #85482
08/10/06 21:25
08/10/06 21:25
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline OP
Expert

Joined: Jan 2003
Posts: 4,305
The difference is, that 3dgs does not control the multiplayer connection.

This gives more flixibility.
Though, the collision detection needs to be calculated in Java then.
But this can be done for less complex RPG Levels.
Java gives you more options for really complicated Ai and Gamecalculations
(Object oriented).
It is not trivial to program though.

Re: Java System [Re: Damocles] #85483
08/12/06 12:36
08/12/06 12:36
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline OP
Expert

Joined: Jan 2003
Posts: 4,305
Ok, the chatserver works over the net with my router...

good starting point to test more complex datatrasmission

Re: Java System [Re: Damocles] #85484
08/14/06 20:40
08/14/06 20:40
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Any news an this thing? I would like how you handle the vars (so, how you define for which var you sent the value) and if you use the IDs of A6 or another system to sent entity skills and params;

Thanks for advice,
Bloodline

Re: Java System [Re: TWO] #85485
08/14/06 22:28
08/14/06 22:28
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline 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.

Re: Java System [Re: Damocles] #85486
08/15/06 09:30
08/15/06 09:30
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Nice, I know that all things in C-Script have IDs, and I know how to read it from an entity but how do you get the IDs of the vars?

Bloodline

Re: Java System [Re: TWO] #85487
08/15/06 15:53
08/15/06 15:53
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline OP
Expert

Joined: Jan 2003
Posts: 4,305
Im Augenblick ist das alles sehr primitiv gehalten.

Fest definierte variable werden in der Sende und Emfange version direkt ausgelesen.

read_id -> id aus dem Datenstrom
read_value -> zugehöriger wert

zB, abfragen aller möglichen cases:
...
if(read_id==13){is_raining=read_value;return;}
...


beim schreiben:

...
if(move_forward!=move_forward_old)
{
move_forward_old=move_forward;
send_id=13;
send_var=move_forward;add_to_sendlist(send_id,send_var);
}
...

so ist erstmal das prinzip,

es gibt sicherlich die möglichkeit variablen "direkter" auszulesen,
aber das ist dann eher ne performancesache.

Die Menge der Daten auf der Clientseite, die gesendet werden ist ja auch sehr
viel geringer als die empfangenen werte in einem MMOG.

Re: Java System [Re: Damocles] #85488
08/15/06 16:25
08/15/06 16:25
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Hmm, also für Entitys gibbet die interne A6 ID, die auch per handle(entity) ausgelesen werden: http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/679739/an/0/page/0#Post679739

Für die Variablen müsste es au sowas geben, ich frag mal JCL

Re: Java System [Re: TWO] #85489
08/15/06 19:59
08/15/06 19:59
Joined: Jan 2003
Posts: 4,305
Damocles Offline OP
Expert
Damocles  Offline OP
Expert

Joined: Jan 2003
Posts: 4,305
Wichtiger als die performance ist allerdings, das der code gut lesbar und leicht nachvollziehbar ist.
Deswegen würde ich eher die langsame aber intuitive methode mit dem auslesen über
variablen-namen benutzen.
Wenn der Code sehr groß wird, ist er so leichter zu debuggen und zu verändern.
Bei einem Multiplayerspiel liegt das größte Performanceproblem bei der Netzwerkverbindung,
und den damit zusammenhängenden Datenstrom, und weniger beim Code der auf dem Client berechnet wird.

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1