Recording your gameplay in-game, Age of Empires-like...

So yeah, i get that this might just be a bit too far-fetched, but is it possible to code your project to kind of re-play a game you've played? That is, akin to several strategy games like AoE series, Rise of Nations, etc. where you can go to 'Recorded games' file and replay the game from earlier. Is this even remotely / hypothetically possible, by f.ex. making the instances remember their actions smhw by stacking global variables or so?
 

Morendral

Member
It's completely possible, and I've seen some assets for sale on the market place to do similar things.

There are lots of ways of going about this though. For instance, you can have instances record their actions and locations somewhere, and then use that information to display them in a playback mode. I'd probably store it in a data structure or more permanently in a text file. I'd then probably use timelines to control the instances.
 
It's completely possible, and I've seen some assets for sale on the market place to do similar things.

There are lots of ways of going about this though. For instance, you can have instances record their actions and locations somewhere, and then use that information to display them in a playback mode. I'd probably store it in a data structure or more permanently in a text file. I'd then probably use timelines to control the instances.
Thanks for quick reply. Glad to hear its possible, but how exactly can i store the data, f.ex. in a text file? Would this require a ton of work to control with the timelines?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
AoE and most RTS games would record and then replay player actions.

Non-RTS games can usually get away with recording and replaying inputs, in which case you'd need to refit your input system to support reading from a buffer instead of polling keyboard/gamepad.

Also this will require making your game deterministic, which means that everything should act the same given the same initial state and inputs - would need to store initial RNG seed and make sure that no in-game actions depend on something that can change externally.
 

Morendral

Member
Thanks for quick reply. Glad to hear its possible, but how exactly can i store the data, f.ex. in a text file? Would this require a ton of work to control with the timelines?
Well that sort of the point of all of this, isn't it? Trying to figure out how to do it. Text files are an example of a way to store data. Regardless of if you use those or not, you need to figure out a way to store information and then recall it as needed and then use it.

Using text files means you will have to get comfortable with the text file functions which you can find in the manual, or find some examples on the forums.

Best of luck with your project
 
N

NeZvers

Guest
There's a decent way to do it and tutorial is not bad too -
Pretty efficient way to do - instead of saving each frame button is held is to save button pressed and release.
 
thanks guys. Yeah, lots of GM jargon here, gotta admit. I'm probably taking took big a leap here, but i do have a decent RTS game in development, so i thought i'd give it a shot. I'll be checking some examples and NeZvers tutorial vid link to find out more. I'll get to you guys if i bump into smth odd.
 
Top