Solved

RTS - how do I code it with few machines?

Posted on 2014-10-14
9
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 27

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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iterator/ListIterator approach 17 54
Java Restore security prompts not working 10 139
Java: The Public Class Main 4 45
Java program running SQL query 5 48
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

733 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