Game Saves

Saving games in progress

Discussion about the game and its default mods.
Post Reply
wolfeman
Posts: 2
Joined: Mon Jul 18, 2016 2:06 am

Game Saves

Post by wolfeman »

Hi all, I'm new to OpenRA, but have played alot of TD, RA, TS, RA2 and DK2000 way back when they first came out. I love all the games built by Westwood. Always so much fun.

What I liked about the original games is the fact that I can start a game and save my progress. As I have always liked playing the campaigns. So far while playing I haven't seen this ability in either TD or RA. I am willing to try and contribute this feature, but would like to know if any one else has tried this, is in progess, or if some one can give some pointers on where in the code i can look to achieve this.

I have experience with C++ and Java, so C# is a bit new to me, but I'm willing to give it a try. So far I have setup my development environment on windows.

I have to see how the code handles the game, but I off the top of my head I would have to save the state of map, basically what triggers have happened and what still need to happen, where all the units/buildings are on the map, and their status. plus the factions status i.e money and perhaps queue status'.

User avatar
anjew
Posts: 552
Joined: Sat Nov 08, 2014 4:16 am

Post by anjew »

Im not a dev but here is the ticket for Save Game Support
https://github.com/OpenRA/OpenRA/issues/2743
Image

Declan
Posts: 16
Joined: Sun Feb 15, 2015 5:13 pm

Post by Declan »

The easiest way to implement this would be to play through a replay file until it comes to the end then give control to players. It might take a while to load a big game with lots of players / events with a long duration.

abcdefg30
Posts: 643
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

You can also join the devchat on IRC ( #openra ): http://webchat.freenode.net/?channels=openra

wolfeman
Posts: 2
Joined: Mon Jul 18, 2016 2:06 am

Post by wolfeman »

Thanks guys I will look into the IRC channel.

I understand that the replay is an option and looks like it was implemented by Mailaender in the ticket referenced, although I couldn't get it to work in RA. The ticket was closed so I assume the change made it into the latest release. I probably missed something during the replay that gives control to the user.

But I think it should be possible to save the state of all the objects that make up the world and write those values to a file and then load the state from a file.

Its gonna be difficult but I think it can be done and should be done to make the experience closer to the original since that is one of the development goals.

I need to figure out how to add options to the menu's and then map those buttons to proper functions that will store the state.

lucassss
Posts: 144
Joined: Mon Jan 04, 2016 1:55 pm

Post by lucassss »

A silly hack can be that to just save a time value, and then start the game by running the replay and giving manual control back at the correct point in time.

Post Reply