[Project] RTS game engine : OpenRTS is released

Hi everybody,

This topic present the evolution of my project for real-time strategy game engine.

Follow me on twitter

Update 24/04/2015
It’s done ! OpenRTS is realeased as an open-source project in developpement, under MIT licence. You can follow the discussion from that point.

Hope you’ll like it !

Update 06/04/2015
Given the enthousiasm of the community for this RTS game engine, and the willingness of some to participate, I decided that this project must become ours, and to release it under an open source licence.

It will be a hard work of writting for me, to create wiki, doc and forum, so I hope many of you will join and help !

Follow the discussion here from that point

Update 02/2015
The editor has now all tools needed to begin to create content.
Still a lot of work to do to have a complete RTS game engine, but the code has come to an important stage.
Thanks for all your encouraging comments !

Update 01/2015
Map editor has a GUI and maps are serialisable.
Watch this post for more details.

Update 12/2014
Map editor is implemented with basic features : cliff elevation, ground deformation and ground texture painting !
Map can be loaded and saved.
More details in this post

http://s10.postimg.org/49j7ogm09/code101.png

Update 11/2014
Back to the huge work needed on map creation. First thing was to create procedural generation of natural cliffs.

http://s2.postimg.org/q4h8m9mjd/code075.png

Update 08/2014
After a lot of work on unit movement and behavior, I focused on more visual effects : projectiles, particule effects, physics for garbage, etc.

http://s12.postimg.org/jlb7ma465/code055.jpg

Original post
Here is a short demo of the real-time strategy game engine i’m working on since about two monthes.

Map is drawned from hand-made image files for elevation and textures mixing. I simply use an image editor and “pixel art” my map.

Units are managed by a finite-state machine for tactics. Movements and pathfinding are computed by steering behaviors and flow fields. It’s not perfect but gets the job done for now. Still a lot of work on this part.

All units data is defined in XML format. Meaning that the source code know absolutely nothing of the content. I use the Stracraft 2 mechanism (Units, Weapons, Effects chains, etc.) to keep the engine as “genre independant” as possible.

User interface is made with NiftyGUI. Lots of work here too.

Please forgive the poor graphics, it’s only for testing purpose. I will try to add models and effects (like explosions or canon fire). It seems to be very important in that kind of game for action comprehension.

Ask questions if you want !

Hope you’ll like it :slight_smile:

Thanks to the jMonkey community for the amazing support !

http://s27.postimg.org/6odr68u83/code043.jpg

13 Likes

[reserved]

2 Likes

Hi,

Look interesting enough for me… :slight_smile: Since i 've try to write a RTS game and later an RTS engine also, some concerns about your “engine” aspect I may ask?

  1. Is it going to use XML as the main resources for Maps and configurations for Mods, or later with Editors?
  2. Is there a “Build order” mechanism which is the most effective constraint and challange for human player to overcome. If there is, how can i modify this Build order.
  3. Is it going to be a network-enable game engine?

Hi and thanks for your interest !

A maximum of ressources will be stored in XML files. I have a library of object definitions, and a factory to instanciate the right thing at the right place. Key word is : “Source code know nothing of the game it launches”. Another important feature is that XML may be changed at runtime, for experimenting purpose. The files are checked every second for changes, and all game data are updated in realtime.

For the specific game I have in mind, I don’t have the very common “base building” feature. I prefer something like a MOKA, focused on squads and confrontations. But for the engine, the feature will be implemented anyway. Structures, reaserches and ressources will have XML definitions, with a basic tree architecture. Concerning the build order itself, for what I know, it is most defined by the comunity of players than the dev themselves ^^

And yes, the engine will certainly have multiplayer feature, thanks to jMonkey :slight_smile:

Why xml for pure data? It has its place for tagged text representation (html-like), but for data representation, json or yaml are so much nicer, both from readability and API point of view…

I used XML because it’s well known by most users but you’re right, it’s not the best choice for pure and basic data. I will maybe refactor that one day ^^

A short video presenting the new features in a fight : projectiles, particles, physics…

And a new low poly art style !

We hope you will enjoy. Please leave a comment !

2 Likes

Look good,

might I suggest to display the hp bars for items, that are not at full health and/or taken damage the last X seconds?

Yes you might ^^ there is tons of work to do, and GUI is one of the less achieved part.

I think that after correction of various bug on motion, tactical AI and visual effects, we will work on the map, which is quite simple for now. I’m afraid that GUI will come later, later…

A new visual of the game.

We are working on the map and landscape. According to the low poly art style, and after a lot of expreiments, we decided to generate natural cliffs procedurally, instead importing them as 3d model assets. This allow variety and “stochascticity”. The cliff shown in the picture is generate from a bmp file that only specifies level differences.

A procedural natural cliff

1 Like

Maybee an interesting inspiration for necessary features.

http://springrts.com

Hi there !

News from the RTS engine ! I’ve worked on the map editor for a while. Now the map is all made inside the editor, saveable and loadable as files, defined by editable XML definitions for general style.

The editor has four main tools :

  • Cliff tool : allows to change ground level and places necessary cliffs. Many cliff’s styles can now cohabit on a single map.
  • Height tool : deforms the ground in real time (update normals and bi-normals for the texture smoothing and normal map fidelity)
  • Texture atlas tool : paint the ground with up to 8 diffuse maps (and normal maps) in real time
  • Sun lighting : Can move the sun light and the shadow caster (compass and daytime), change color, intensity, ambiant… in real time

The pencil is customizable :

  • three different shapes : circle, square and diamond
  • many different apply method : rough, airbrush, noise, smooth…
  • any size
    and is contextual : snapping grid when apllying cliff tool, pixel perfect with atlas tool, etc. The pencil as a preview shape the fallow the ground deformation :slight_smile:

GUI is not very user friendly for now, but the features work fast and are efficient.

At each step of the progress, I thank jMonkey that allows anything to be quickly done and pretty nice and fast.

Here are some visuals.




3 Likes

Hi everybody !

The editor slowly come to life and we have now a simple but efficient GUI (thanks Nifty and Nifty Editor !).

News :

  • editor’s GUI !
  • serialisation (New/Save/Load)
  • more tools (ramps, sunlight, units and assets placement)
  • more modes (noise, texture propagation, relief smoothing/uniforming…)
  • more fps :smile:

And we can switch between editor and game with only a clic. Every in-game data is still in XML format and can be easily patched.

Here is a video showing the terrain modeling. I hope you enjoy !

4 Likes

Looking good! Keep it up!

Hi! Is your project opensource? Because I’m thinking on writing level editor for my game too, and was thinking if I could look up your code somewhere

Hi and thanks for your interest. The project is not officialy open source but I’m absolutly OK to share algorithms, implementations and explanations, so do not hesitate to ask !

Is the basic scheme grid based or do you use navigation meshes to do movement etc.?

Thanks ! I’ll try :smile:

The map is grid based. The pathfinding is executed by flow fields, and the units’ behave is managed by a steering machine (avoidance and separation). I didn’t use the navigation meshes, but the code has lot of similarity, for what I know.

Great stuff @methusalah

1 Like

Thank you very much ^^