Solved

RTS - how do I code it with few machines?

Posted on 2014-10-14
9
149 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My project did see openJDK that I installed. What could be the problem 7 121
allswap challenge 6 75
Systems talking to each other 5 123
unix in java example 9 52
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

932 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

8 Experts available now in Live!

Get 1:1 Help Now