Making RTS

If you just throw 5000 units into a scene and expect the engine to deal with everything, then you will not get good performance at all. I expect that to be the same with pretty much any engine and any language. 5000 independent units in a battle is huge even by the standards of most major RTS's.



You will have to do a lot of specific optimization work to get good performance, and quite probably contribute some changes to the engine itself. Even then there are no guarantees. This is the nature of pushing the limits.

Alric said:

If you just throw 5000 units into a scene and expect the engine to deal with everything, then you will not get good performance at all. I expect that to be the same with pretty much any engine and any language. 5000 independent units in a battle is huge even by the standards of most major RTS's.

You will have to do a lot of specific optimization work to get good performance, and quite probably contribute some changes to the engine itself. Even then there are no guarantees. This is the nature of pushing the limits.


That number goes beyond huge even. A lot of RTS' have unit caps, generally for performance/balance reasons. Games that don't have a soft cap anyways, in regards to how many resources are in the game (e.g. C&C comes to mind). Generally, a few hundred units is considered huge. And in a large network game I doubt every player will even have that amount at any given time. To judge performance, I'd rather go by practical benchmarks rather than impractical ones.

At least that's traditional RTS', if you're going for gameplay like Sins of a Solar Empire or Supreme Commander where you can zoom in and out of extremely large maps spanning entire worlds or a galaxy, that's something all together different, and would require a lot of effort on your part. Even then "5000 units" is probably still impractical.

"Even then "5000 units" is probably still impractical."



So if i want a RTS game, where maps are extremly large, number of units are extremly lot and need nice graphics,  JMonkeyEngine (or the Java platform?) not enought?

Or everything is depends on the programmer(s) skill?



Simply i don't understand, is it possible or not? Never seen a complex game done with Java unfortunately.

boci, I think it's quite clear according to what they replied… To sum up, it's not possible if you dont modify deply the engine (jme or else) itself. So I guess it depends if you are highly skilled.

The good thing about jme is, you can easily prototype something.

Just create a SimpleGame, create 5000 boxes and see in what kind of issues you run.


I thought exactly like this: http://worldundersiege.cateia.com/gallery.php#

This is done by Ogre.



Do you think is it doable with JME?



Okay i understand that i need many works. But i'am interested in your opinion.



Thanks!

Based on the screenshots, jME is certainly capable of producing that sort of graphic quality.



Scale will be your problem not quality - and based on the website, that is a turn based game not a RTS. Even with that in mind, the number of units shown in the battles is nowhere near what you're talking about.

I'am talking on other forums about the units number. Everbody is talking about that i need to implement myself.

I thinking for the logic that refresh unit's pathfinding,etc algorithm.

So i nearly convinced that its doable with Jme. But of course i will try it.



Edit:

I will try to implement for few units. Which can move, fire, etc…

And have networking.

if it successfull, let's see what if i have more and more units.

i think i will need to optimize my algorithm and jme will do that…

Scale will be your problem not quality


But not because the Java or JME, right?
You mean, i will need a good workflow, fast algorithm for AI /pathfinding,etc/, networking, etc
So the problem not will be the Java or JME but the programming  of the game.
But not because the Java or JME, right?


Right, not specifically. There will be a lot of challenges and development to do, whichever engine you choose.
Choice of language [i[is[/i] a factor, and the Java vs C++ or whatever debate is well documented elsewhere.

But the quality of your algorithms will be many times more important - badly optimized code on that scale will kill any system in any language.

if you worry about having too many unities, never forget about SharedNode, unless they share models animation too…

Just in case this question is still up for someone:
Yes, there are people who create RTS games in Java using OpenGL. One nice example is

It was created without JME though.

It’s kind of cool that we still have these threads from ~15 years ago but to anyone reading this thread now: recognize that this was back in jme2 days and the engine changed a LOT since then. It also has a bunch of add-on libraries (like Zay-ES for ECS) that would make an RTS a lot easier to manage today.

4 Likes

There’s this, done with jMonkeyEngine

4 Likes