Finally!!! Shining Force 1 in under 2 hours! I can never look at this game again!

Battles with Big savings (>30sec)

#3 to Alterone

Killed less of the Dwarves, saves a ton of time.

#7 - Marionette Battle

Bought the Spear for Mae in chapter 1, and this was the reason. Saved 37 seconds.

#12 - Elliott Battle

I spent FOREVER on this battle, but it paid off in the end. Not killing all the enemies in the middle allowed me to just fly past them. Finding a Battle Order that worked to get everything required took way too long. However, it was the battle with the most saving - 49 seconds.

#24 - Colossus Battle

Went right instead of left, and saved an entire round. I tried this way back when, but without the speed ring, it never worked. A few runs back I got the speed ring, but never bothered to try again. Saved 45 seconds.

Battles with Mediocre savings (8+ seconds)

#1 The Gate of Guardiana

This battle improvement taught me not to open my big mouth about perfection. My "perfect" battle was slow by 8 seconds.

#13 Battling into Urbanatol

A different route for the birds results in less enemy movement and kills.

#22 Battle to the Ancient Tower

This is actually probably my favorite improved level. The last run, Balbaroy killed enemies, while Amon was bait to arrange enemies for Z (Max) to kill. This time, Balbaroy dual tasked as the bait and the enemy killer, leaving me the ability to kill off Amon earlier in battle 20. The fact that I was able to manipulate enemy movement and still put Balbaroy in places to kill enemies was monumental to m.

#24 The Battle with Chaos

While the actual battle is almost the exact same length, using Balbaroy to kill Chaos meant less swapping of the movement ring, which takes around 4 seconds of menu time outside of battle, and 2 in the next battle.

#26 Ramaldu's Creatures

Swapping the movement ring to Z instead of mushashi saves needing to equip it in 27, as well as 4 seconds of menu time. Additionally, Z kills 4 enemies instead of 1 in round 2, saving 1 second per enemy.

#29 Darksol's Final Stand

Looks like I never needed to kill anything but Darksol. Musashi walks around the enemies to kill Darksol this time around.

Lua

I ended up writing 15 scripts to do this run, and regularly had 7 script windows open, to execute the various tasks. I'm going to discuss a few of the scripts I wrote here, and talk generally about how much Lua kicks ass. This run would NOT have ever been completed without Lua. Additionally, all my code will be posted to the appropriate thread in the gens forum.
  • StartBattle - Generates the input to get the correct starting order for a battle.
  • BattleOrderExecute - Generates the input mid-battle to get the right next battle order
  • LevelModifier - Finds the characters level up, and then gives options that can be selected for the coming level. Checks to make sure the correct level up is found.
  • MoveChars - Inspired by XKeeper's moving mario script - moves characters around the battle field. Great for testing new strategies.
  • crits - Tells you the input required to get a critical,miss, double critical, etc.
  • gotarget - Tells the input required for a specific value of the RNG (defined in the script). This was used less, after I developed all the other scripts.
  • Spell - Brute forces a spell action scene. The RNG plays heavily into how fast these execute. I brute forced about 2-3K tries, and took the fastest one. Faster ones may be possible
  • dump - Dumps the current character positions into a text file. Good for matlab.
This may be the first run where a majority of the luck manipulation was done with a Lua. At least, it is the first where Lua's luck manipulation did not rely on brute-forcing, and instead on measurements and calculation. The first three scripts saved the most time. Generally speaking, using MATLAB or gotarget, takes about 5-10 minutes to get the next desired RNG value. This means that recreating a single battle with no changes takes a good 2 hours, and 3-5 if there are changes and tests. With those scripts, a battle reproduction could be done in about 30 minutes! Obviously, this means it was less cumbersome to check new strategies, try new ideas, and etc. Lua pretty much kicks ass, and has been the best addition to the TAS community since emulation itself.

Thanks

Thanks go to Nitsuja, Upthorn, and adelikat for their work on Gens - this run wouldn't have been possible without Lua for Gens. Also, thanks to Nitrodon for explaining uh... math, and how you can actually calculate things that use remainder operations. Still makes my head spin.

Watching -

I spent hours making sure that the cursor movements were totally optimized, and battle scenes occur as fast as possible, which is.... Extremely boring to the majority of TAS watchers. This script removes all cursor movements and battles from the TAS, shortening the watch time down to probably 2/3rds.
CHECK = savestate.create(); gui.register( function () if memory.readbyte(0xFFF009)==0 then savestate.save(CHECK); if (memory.readbyte(0xFF0FFD) == 16) then while (memory.readbyte(0xFF0FFD) == 16) do gens.emulateframefast(); end; else
  gens.emulateframeinvisible();	
  gens.emulateframeinvisible();	 
if (memory.readbyte(0xFF0002) < 12) then
for i = 1,85,1 do	
  gens.emulateframeinvisible();	
end; if (memory.readbytesigned(0XFF00F7) == -84) then savestate.load(CHECK); else while (memory.readbytesigned(0XFF00F7) ~= -84) do gens.emulateframeinvisible(); end; for i = 1,85,1 do gens.emulateframeinvisible(); end; end; else savestate.load(CHECK); end; end; end; end)
Will write more later...

adelikat: Accepting as an improvement to the published movie.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
Location: 127.0.0.1
This topic is for the purpose of discussing #2258: DarkKobold's Genesis Shining Force in 1:59:59.05
Former player
Joined: 6/25/2004
Posts: 607
Location: Maine
Holy crap, you did it. You definitely deserve a pat on the back just for getting it done in under two hours. Good job!
Skilled player (1514)
Joined: 4/28/2005
Posts: 240
Location: Finland
Fantastic! You just saved my day. If you'd do this to SF2 then I could die of happiness.
Projects: Warlock, Ren & Stimpy (impr) / Generations Lost (impr.)
Joined: 4/3/2005
Posts: 575
Location: Spain
Total run time looks like a ticking bomb stopped a second before detonation, heh! Will watch later.
No.
Joined: 2/26/2007
Posts: 1365
Location: Minnesota
O_O + :O = /me I am pumped as hell. Time to watch :3
adelikat wrote:
I very much agree with this post.
Bobmario511 wrote:
Forget party hats, Christmas tree hats all the way man.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
You've officially outsped my Jet.
Joined: 7/31/2007
Posts: 32
Location: Central Florida
Amazing, you finally did it. Will watch later and as soon as someone is willing to post how I'm supposed to enable the no cursor/battle script.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
By the way, someone upload this onto youtube, or that other site. Googles quality was invented by the devil himself, and curses this game. Otherwise I would upload it there. Bloody loved the circus battle by the way. IN YOUR FACE MARIONETTE! I think I orgasmed at Shade Abbey. An unfitting place, but dear god. That battle was BRILLIANT!
Joined: 9/29/2005
Posts: 46
Location: Denver, CO
An amazingly thorough run... and WOW did this game pay for every little kid it tormented with difficulty years ago... poor poor game... I almost feel sorry for it... but I would've done the same thing, if I was a script wizard! congrats, dude, on an obliteration that makes me say "Yeah, and we thought the LAST one was perfect!"
"If any man is not free, then I too, am a small pie made of chicken"
Joined: 4/30/2008
Posts: 39
DarkKobold, if not for you, who would lead the Shining Force? Well done. Thank you for proving that the most direct route is indeed a straight line, time and time again. especially in a game featuring things like the easiest RPG jail cell escape of all time. Myself, actually, was quite impressed even with the improvement in battle 1. It made me feel like I should have come up with that idea myself. ;-)
Joined: 8/10/2004
Posts: 173
Location: Bethel, VT
I fail at not desyncing. When I watch, Z fails to exit the town. Hopefully this will be encoded soon :)
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Itstoearly wrote:
I fail at not desyncing. When I watch, Z fails to exit the town. Hopefully this will be encoded soon :)
Are you using Gens11a? Are you sure that use clear SRAM is checked?
Aitamen wrote:
congrats, dude, on an obliteration that makes me say "Yeah, and we thought the LAST one was perfect!"
DarkKobold wrote:
The goal of re-doing this movie for a 3rd time was to see if the 2 hour barrier could be broken. The answer is a resounding No. Now, I am thoroughly convinced that this is not possible without a major bug found, or some massive strategy change I missed.
Yeah, the egg on my face is pretty bad. :)
Flygon wrote:
By the way, someone upload this onto youtube, or that other site. Googles quality was invented by the devil himself, and curses this game. Otherwise I would upload it there. Bloody loved the circus battle by the way. IN YOUR FACE MARIONETTE! I think I orgasmed at Shade Abbey. An unfitting place, but dear god. That battle was BRILLIANT!
Funny, I thought that Battle 22 was the only real stroke of genius I had for the run. The shade abbey battle was more a lucky discovery than any smarts on my part :) Also, I'd REALLY REALLY appreciate it, if someone with a Youtube director account could post it as a reply to this movie, since it is incomplete and way out dated. Also, Flygon, I can't bump the thread in SFC. Maybe you could? :)
Kofiman,Rick,mat0,Aitamen,Sticky,Flygon wrote:
General Congrats...
Thanks for watching, and letting me know you enjoyed it![/quote]
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I've watch the run and enjoy it. So, almost 75% of the game was from your lua script with brute force and other stuff? I would love have more detail about how this work.
Joined: 4/30/2008
Posts: 39
Check the game discussion thread.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
Can you please link me to that thread?
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Joined: 11/4/2007
Posts: 1772
Location: Australia, Victoria
Thanks a heap! Bumped. Anyway, uh, I have nothing else much to say. =P
Banned User
Joined: 8/2/2008
Posts: 420
Location: italy
Sticky wrote:
O_O + :O = /me
No. O_O + :O = Ö_Ö Seriously though, impressive improvement. Easy yes vote.
Gone.
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
BadPotato wrote:
I've watch the run and enjoy it. So, almost 75% of the game was from your lua script with brute force and other stuff? I would love have more detail about how this work.
Actually, the majority wasn't brute force- First off, MATLAB was still used in this run to determine which 'battle orders' to use. I plug everything relevant into matlab (Character Start/End Locations, Agility Changes, Rules, Kills (dead enemies don't get the cursor), and targets.) My matlab script cuts the 2^16 battle orders down to a subset that pass all the Rules, and then computes the amount of cursor movement. Then, it calculates which group of orders produce the smallest amount of cursor movement for a battle. MATLAB spits out a list like this
MATLAB wrote:
Round 1 Loc: 45125 Order: 0 4 5 3 6 7 9 11 14 16 2 8 10 12 15 17 1 13 Round 2 Loc: 4666 Order: 1 10 8 2 0 3 4 5 6 7 11 13 14 15 9 Round 3 Loc: 55105 Order: 11 10 1 2 0 3 4 5 6 7 8 9 Round 4 Loc: 12773 Order: 1 2 0 4 5 6 3 10 11 Round 5 Loc: 3219 Order: 1 2 0 4 6 3 5 Loc: 5346 Order: 1 2 0 4 6 3 5 Loc: 6158 Order: 1 2 0 4 6 3 5 Loc: 23726 Order: 1 2 0 4 6 3 5 Loc: 28160 Order: 1 2 0 4 6 3 5 Round 6 Loc: 4263 Order: 0 6 2 3 4 1 Loc: 8490 Order: 0 6 2 3 4 1 Loc: 57773 Order: 0 6 2 3 4 1 Loc: 60437 Order: 0 6 2 3 4 1 Battle Length: 196
I then get to move on to actual TASing. Let say we are at the end of Round 2, and its about to be 9's turn. To make my life easier, I simply put "target = 55105" in the BattleOrderExecute script, and press run - and the next Battle Order for round 3 is manipulated to be 55105. The way it works: First, the RNG is a 2^16 number, or 0 to 65535. Each frame, it can change by 0, -256, or a single or multiple RNG execution(s), if there is no controller input. The current state of the controller is a 0-255 number, that is added every frame. So, you can change the RNG per (non-execution) frame by either 0-255, or -1 to -256. The # of frames between where I start the script, and when the next order is determined by the game is locked. Additionally, how the RNG moves on those frames (sans controller) is also locked. Thus, the script makes 1 pass, and determines how the RNG is moving per frame, and saves that info. Then, based on that info, it makes a second pass, and figures out the input for the next frame that will move the RNG closer to the target value, and actually creates that per-frame input.
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Ambassador, Experienced player (710)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Absolutely badass! I highly applaud your commitment.
Emulator Coder
Joined: 1/12/2007
Posts: 95
In terms of a watchable TAS, I think this is a decent enough watch. Seeing enemies pass up tasty morsels of attacks on characters so ofter was pretty funny too. In terms of how much effort you put into turning out this movie, I'm a bit more shocked. Your way is definitely preferable to those who may come after you, seeing as you released the tools as well as the end result. Voted yes, but no need. It's faster, and the description of how it was made is among the more interesting I've read.
Joined: 4/3/2005
Posts: 575
Location: Spain
Finally had time to watch this from start to finish, wow! The last version was ridiculous, but this one is even more ridiculous!! You play the battles with even fewer party members and spare more monsters, and still manage to be faster on a run that was already optimized by writing a simulator of the game algorithms and calculating all possible round orders! This is boss sniping at its finest, yeah! I wonder how many monsters got spared this time and the relative party size, for comparison with the last run. Good job!
No.
Player (224)
Joined: 10/17/2005
Posts: 399
Oh, God! Congratulations for finally getting it under 2 hours! I'm so watching this. Just too bad you're done with this game, though. And probably no chance you'll work on SH2.
<adelikat> I've been quoted with worse
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [1312] Genesis Shining Force by DarkKobold in 1:59:59.05
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Ok, I miserably fail at making screenshots apparently. I've used PNGout to create an 8kb PNG.
In:   72758 bytes               SF1v3.bmp /c3     /d8
Out:    8275 bytes               SF1v3.png /c3 /f0 /d8, 120 colors
Chg:  -64483 bytes ( 11% of original)
But when I add it to the movie, it doesn't show on the site. Any suggestions?
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.