openai / retro

Retro Games in Gym
MIT License
3.35k stars 524 forks source link

Create Save State #259

Open Traviktox opened 2 years ago

Traviktox commented 2 years ago

Hello,

how is it possible to create your own save state? I already followed the instruction at https://github.com/openai/retro/issues/33 and tried different cores on retroarch and different emulators, also gzipped them, but when I start it, the games start from the beginning of the game. Can someone help me?

onaclov2000 commented 1 year ago

Have you taken a look here? (I posted a little about how to create save states programmatically) https://github.com/openai/retro/issues/235

Not sure what system you're using, but you can possibly use this to get started. As far as getting a save state later in the game, you have two options, 1. Figure out a way to manually control the game inputs to get where you want the save state to be, then save. or 2. let the AI algo run until it gets where you want to be, then have it automatically save states.

For example I was playing with Super Metroid, I set it up so when the room changes, it creates a save state. This means I can re-start the game anywhere it's managed to get to.