SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion

Reply
 
Thread Tools Search this Thread
Old 06-04-2017   #1
GreenKnight9000
Default How to TAS?

Recently, I saw many SRB2 TAS and I thought i'd give it an attempt but quickly hit a wall when Hourglass wouldn't cooperate with SRB2
Is there a better program/ specific setup for Hourglass I could use for TASing SRB2?
GreenKnight9000 is offline   Reply With Quote
Old 06-04-2017   #2
Rapidgame7
pressure pressure pressure
 
Rapidgame7's Avatar
Default

Personally I haven't got Hourglass to run with SRB2 (yet), but you could keep trying to tweak the settings on Hourglass and play with some combination of command line arguments on SRB2. Something there has to work, probably.
__________________
Quote:
<Steel Titanium> so many eggman laughs
<Rapidgame7> hehehe HEHE HEhEhe
<Rapidgame7> AAAAAUUUUGGGGH
Rapidgame7 is offline   Reply With Quote
Old 06-04-2017   #3
GreenKnight9000
Default

Quote:
Originally Posted by Rapidgame7 View Post
Personally I haven't got Hourglass to run with SRB2 (yet), but you could keep trying to tweak the settings on Hourglass and play with some combination of command line arguments on SRB2. Something there has to work, probably.
hmm...
I'll see...
GreenKnight9000 is offline   Reply With Quote
Old 06-05-2017   #4
RedEnchilada
happy, pretty, lovely!
Developer
 
RedEnchilada's Avatar
Default

Hi, those were probably my TAS videos! The main unfortunate thing about TASing SRB2 is that I've had to compile slightly modified EXEs to get around the following issues:
  • The RNG seed is initialized to a different value every boot, and Hourglass doesn't seem to hook in early enough to lock that in. There's an srand call somewhere in the source, and changing the passed-in argument to 0 makes it consistent enough to use.
  • Hourglass seems unable to feed arrow key input to SRB2 properly? My usual workaround is mapping numpad 2/4/6/8 to the arrows in the win32 input-handling code.
I don't have a current EXE to post since the last TAS work I did was around three patches ago. I can put one together if you're interested. I've found that Hourglass only works well with the DirectDraw builds, so if you've tried running srb2win.exe through it you won't have much luck.

As far as running the game, you need to change Message Sync Mode to Unchecked (native messaging) and Wait Sync Mode to Asynchronous (unchecked waits). This has to be done every time you open Hourglass as it isn't persisted.

Finally, I use the following command-line arguments:
-win -height 800 -width 1280 -nojoy -nomouse -nomusic -nodigmusic

-win is required to run the game in a window; otherwise the game won't look right.
-width and -height can be whatever, and generally shouldn't affect sync if you change it
-nojoy and -nomouse are simply disabling systems that Hourglass can't hook into anyway. You might not need these, but it's better safe than sorry to me.
-nomusic and -nodigmusic will disable all game music. Sorry. I had severe sync problems whenever music was running.

Once you've accomplished aaaaaaaall of that, it's a simple matter to make the TAS. The game will probably crash a lot when you load savestates, though, which will get super-annoying when you're working on a longer TAS. My old Windows 7 laptop had periodic game crashes, and my new Windows 10 laptop has near-constant crashing. (I almost gave up on the TD TAS because I would have to replay the file three times before it let me do a few rerecords without crashing. >:U)

Oh, and make sure to clean up any save files generated by the game before you replay the movie! That will cause a lot of desyncs if you don't. (gamedata.dat, config.cfg, and any srb2sav*.ssg files should always be reset to the state they were in before the movie.)
__________________
Quote:
<@toaster> '"sonic robot explosion 2", the hot new sensation for teens looking for a good time, tempts many children away from god each year'
av src
RedEnchilada is offline   Reply With Quote
Old 06-07-2017   #5
GreenKnight9000
Default

Quote:
Originally Posted by RedEnchilada View Post
Hi, those were probably my TAS videos! The main unfortunate thing about TASing SRB2 is that I've had to compile slightly modified EXEs to get around the following issues:
  • The RNG seed is initialized to a different value every boot, and Hourglass doesn't seem to hook in early enough to lock that in. There's an srand call somewhere in the source, and changing the passed-in argument to 0 makes it consistent enough to use.
  • Hourglass seems unable to feed arrow key input to SRB2 properly? My usual workaround is mapping numpad 2/4/6/8 to the arrows in the win32 input-handling code.
I don't have a current EXE to post since the last TAS work I did was around three patches ago. I can put one together if you're interested. I've found that Hourglass only works well with the DirectDraw builds, so if you've tried running srb2win.exe through it you won't have much luck.

As far as running the game, you need to change Message Sync Mode to Unchecked (native messaging) and Wait Sync Mode to Asynchronous (unchecked waits). This has to be done every time you open Hourglass as it isn't persisted.

Finally, I use the following command-line arguments:
-win -height 800 -width 1280 -nojoy -nomouse -nomusic -nodigmusic

-win is required to run the game in a window; otherwise the game won't look right.
-width and -height can be whatever, and generally shouldn't affect sync if you change it
-nojoy and -nomouse are simply disabling systems that Hourglass can't hook into anyway. You might not need these, but it's better safe than sorry to me.
-nomusic and -nodigmusic will disable all game music. Sorry. I had severe sync problems whenever music was running.

Once you've accomplished aaaaaaaall of that, it's a simple matter to make the TAS. The game will probably crash a lot when you load savestates, though, which will get super-annoying when you're working on a longer TAS. My old Windows 7 laptop had periodic game crashes, and my new Windows 10 laptop has near-constant crashing. (I almost gave up on the TD TAS because I would have to replay the file three times before it let me do a few rerecords without crashing. >:U)

Oh, and make sure to clean up any save files generated by the game before you replay the movie! That will cause a lot of desyncs if you don't. (gamedata.dat, config.cfg, and any srb2sav*.ssg files should always be reset to the state they were in before the movie.)
Quote:
I can put one together if you're interested
I think that'd be most kind, thank you ever so much!
And that GFZ 2 Score Attack TAS blew my god damn mind
GreenKnight9000 is offline   Reply With Quote
Old 06-11-2017   #6
RedEnchilada
happy, pretty, lovely!
Developer
 
RedEnchilada's Avatar
Default

Quote:
Originally Posted by GreenKnight9000 View Post
I think that'd be most kind, thank you ever so much!
And that GFZ 2 Score Attack TAS blew my god damn mind
http://lyrawearspants.com/wads/srb2hg_19.exe Here you go!

And to appease the GPL gods, you can compile a TAS EXE yourself by applying this diff to any branch on the SRB2 repo. (The EXE linked above was based off the 2.1.19 release tag.)
__________________
Quote:
<@toaster> '"sonic robot explosion 2", the hot new sensation for teens looking for a good time, tempts many children away from god each year'
av src
RedEnchilada is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.