?
Solved

RTS - how do I code it with few machines?

Posted on 2014-10-14
9
Medium Priority
?
164 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 1332 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 28

Assisted Solution

by:dpearson
dpearson earned 668 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 1332 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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