Post subject: Safe states on PC
Joined: 4/20/2013
Posts: 5
Hello everyone! I have recently picked up the idea to create a TAS of the PC version of Grand Theft Auto: Vice City. Because of the apparent lack of an emulator to do so, I figured that I'd have to find a way to do at least frame advance and safe states. So far I have managed to implement a rudimentary form of frame advance. Safe states are a lot more difficult of course, that is why I'm here asking for advice. Personally I was thinking that the best solution is to run the game in a virtual machine and use safe states from that. Which virtual machine would be best for accomplishing this? Any suggestions for other types of software I could use to implement safe states are very much appreciated as well of course!
Post subject: Re: Safe states on PC
Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
Lighnat0r wrote:
I have recently picked up the idea to create a TAS of the PC version of Grand Theft Auto: Vice City. Because of the apparent lack of an emulator to do so, I figured that I'd have to find a way to do at least frame advance and safe states. So far I have managed to implement a rudimentary form of frame advance. Safe states are a lot more difficult of course, that is why I'm here asking for advice.
You would also need some way to capture input and replay it later...
Joined: 4/20/2013
Posts: 5
Ilari wrote:
You would also need some way to capture input and replay it later...
While that is absolutely true if I want to actually post a full TAS run (and that would indeed be one of the ultimate goals), for now I'm mostly interested in exploring the possibilities of a TAS for the game and possibly finding new ss strats, so that has a slightly lower priority. (nevertheless, any advice is useful ofc) (On a side note, the game itself has memory addresses which keep track of any key input, reading the values of those addresses probably gives me a good (enough) way of capturing input.)
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
How did you accomplish frame advance? Did you hack the game itself? I too was looking into how I might tas the PC version of Vice City. I was looking into the extensive hacks/mods of the game to see if I could maybe do rudimentary input recording/playback
It's hard to look this good. My TAS projects
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Have you tried win32-hourglass?
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Joined: 4/20/2013
Posts: 5
adelikat wrote:
How did you accomplish frame advance? Did you hack the game itself? I too was looking into how I might tas the PC version of Vice City. I was looking into the extensive hacks/mods of the game to see if I could maybe do rudimentary input recording/playback
I first need to stress that it is (currently) a pretty rudimentary solution. I used MHS (memory hacking software) to set hotkeys for pauseprocess and resumeprocess and then created a autohotkey script which first presses the resume key and after a period of 1/30 sec (this is possible since the game runs at a fixed 30 fps because of the built in frame limiter) it presses the pauseprocess key. This is of course only as accurate as more or less 1 frame, but it is the best I could do in a limited amount of time. If I can get other stuff to work as well, I'll take another look at this.
Patashu wrote:
Have you tried win32-hourglass?
I have looked at it, but I gathered from the development thread that it only works with 'simple' games so far, with (most of) the TAS's using hourglass being 2D platformers. A quick check on mostly default settings seemed to indicate it wouldn't work.
Post subject: Re: Safe states on PC
nfq
Player (94)
Joined: 5/10/2005
Posts: 1204
Lighnat0r wrote:
Because of the apparent lack of an emulator to do so,
there is a ps2 emulator, which could be used to TAS vice city. some people have made TASes with it at least: http://www.youtube.com/watch?v=qMD_oDHkeqU i don't know how they did them though, because i couldn't get the playback to sync well enough that it would be possible to make a TAS.
Post subject: Re: Safe states on PC
Joined: 4/20/2013
Posts: 5
nfq wrote:
there is a ps2 emulator, which could be used to TAS vice city. some people have made TASes with it at least: http://www.youtube.com/watch?v=qMD_oDHkeqU i don't know how they did them though, because i couldn't get the playback to sync well enough that it would be possible to make a TAS.
I have seen koeiprogenitor's TAS, in fact it was one on my motivations to make a TAS myself since it uses old strats, is a superplay than a speedrun and while is has some TAS-only tricks, its pretty much a waste of TAS possibilities (which could very well be due to the bad quality of the emulator though). As you mentioned, desyncing is one of the reasons I didn't go with the PS2 emulator, I figured that if I was going to do a TAS on a shoddy framework, I might as well do it on something I prefer, PC that is. Additionally, all current VC speedrunners use the PC version and I want to show/know what is possible with that version (as you might know, there are differences between the platforms, most prominently the aiming system which admittedly wouldn't be used anyway but serves as a decent example). And finally, I don't think I can legally get vice city running on an emulator so I prefer the PC way.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
Are you familiar with GTA Stunting? If not, check out some of the videos on YouTube. I am sure those kind of antics open up all kinds of crazy-ass shortcuts that no one would ever dream of using in a real-time speedrun.
Joined: 4/20/2013
Posts: 5
Warepire wrote:
Are you familiar with GTA Stunting? If not, check out some of the videos on YouTube. I am sure those kind of antics open up all kinds of crazy-ass shortcuts that no one would ever dream of using in a real-time speedrun.
Thanks, I'll check it out. There are usually a couple of stunts during rta runs (most of which are unintended and mean the run is over), but exploiting the gta physics in the game is certainly interesting (both in speed and in viewing experience :D) Also a quick update: I have currently set up save states using the snapshot feature of VMWare. As it is now, it's actually not as bad as I feared. I can save the state with a 1 frame loss max. Loading a save state means losing <1sec, possibly even less with the right set-up. It does take ~30 sec to save/load though and the game occasionally glitches out by running at double speed for a couple of seconds. Not sure what exactly causes the glitching yet, it might be avoidable. I've also tried VirtualBox, but the game wouldn't run in it. Haven't had the time to test any other programs yet. I'm also looking into eliminating AutoHotkey from the frame advance and just do the whole thing in MHS in order to eliminate some of the inconsistency it is causing (setting it to skip 1/3rd of a frame will semi-randomly skip 1/3-3/3rd of a frame). I'm not too concerned about a small delay on its own since I can just calculate that into the delay I set myself, just that it's not consistently the same amount of delay. Unfortunately that requires C++ knowledge which I currently lack. adelikat, have you had any success with finding something for input recording/playback? EDIT: Good news, after some testing the glitching doesn't seem to have anything to do with save states. Bad news, I haven't figured out how to solve it. My most likely theory now is that my cpu isn't fast enough :/