Solved

RTS - how do I code it with few machines?

Posted on 2014-10-14
9
137 Views
Last Modified: 2014-10-20
Hi

It doesn't look like I can code an RTS on 2 machines.  I was hoping Java Threading could overcome massive network entanglements. I suspect that pro's use some system to spawn clients remotely.

How do pro's make their client engines? Does Eclipse have a remote spawning panel?
Or, do I make a Thread to spawn new clients on remote machines, passing the byte code on?

Thanks
0
Comment
Question by:beavoid
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 16

Accepted Solution

by:
krakatoa earned 333 total points
ID: 40381774
It doesn't look like I can code an RTS on 2 machines.

It might not be perfect, but you should be able to simulate multiple clients on one of the two machines, since each client can be started in its own JVM, and you can do that as many times as the RAM and chip will bear.
0
 
LVL 26

Assisted Solution

by:dpearson
dpearson earned 167 total points
ID: 40381786
I'm not sure I quite understand what you're looking to do.

When you're doing early development you should be fine to start up the clients and the server all on the same machine.  They can connect using sockets - the hostname would just be "localhost".  You will probably always do most of your development this way because it's the simplest to deal with.

Then as the client gets more sophisticated and you want to actually test across a real network you can setup a second machine and use some remote connection service (e.g. Remote Desktop if you're developing on Windows) so you have a window open on the remote machine and can issues commands, e.g. to start running the client(s).

For the final deployment, your players will ultimately download the client from some website and start it up on their machines.

All the same code should work without any modification in all 3 situations and should be viable ways to run the whole system throughout development.  (This assumes you develop on a machine with a decent amount of RAM - like maybe 16GB and are targeting your game to work on something a bit smaller - like 4GB).

Hope that helps,

Doug
0
 
LVL 16

Assisted Solution

by:krakatoa
krakatoa earned 333 total points
ID: 40381824
should be fine to start up the clients and the server all on the same machine.  They can connect using sockets

Yes, that's what I was getting at. But of course if he has two machines, it would be preferable to use one as the server and one as the (multiple) client factory, since you'd be connecting over Sockets in any case.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40381884
I suspect that pro's use some system to spawn clients remotely.
Not sure what you mean by that. Clients are not 'spawned'. They are created as a separate app by the decision of a user and they then connect to the server, which handles the client(s) (see my point in your last q)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 16

Expert Comment

by:krakatoa
ID: 40381961
And I'd say that before you write one line of game event code, you should build a prototype client-server network, as we have outlined above, with both TCP and UDP sockets, and, inter alia, ensure that you have separate threads dedicated to monitoring the network status - i.e. the up or downstate of the server and clients - otherwise your project will stand less than zero chance of working.

And remember, in the real world, you'd want to make use of already-invented wheels if you can, to wit the plethora of possibilities in this lot.
0
 

Author Comment

by:beavoid
ID: 40385908
Can Eclipse start each build on a new JVM ?
So, my client machine can be made to use n JVM's? - 1 for each client?
How?

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40386253
Not sure but it would be easy enough to just start n clients from the command line
Your main problem would be actually (i'm guessing you want to load test the server) simulating 'real' activity from the clients. To do that properly, you need to be able to automate them
0
 

Author Comment

by:beavoid
ID: 40387188
Yes. My client engine is an abstract class, with movement methods and such, so simulating 'real' activity will not be a problem. It will make AI doable.
thx.
0
 

Author Closing Comment

by:beavoid
ID: 40393601
Thanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now