Solved

RTS - how do I code it with few machines?

Posted on 2014-10-14
9
150 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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
 
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 38
servlet requestdispatcher include and forward differences 1 30
expectj telnet failing 5 36
pagenation logic how it is working in my code 1 30
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
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 learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

772 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