Posts for TheAxeMan

Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Interesting idea about using this to increase speed. But there are two problems. First, I am pretty sure that the effect is hardcoded to push you south. Second, you have to pause every 15 frames so it makes you way slower in realtime. But the decrement is also tied to this so I think I can get that effect if I really want. Spawning also happens on those 0 frames so I should check if this has an effect. Usually I want enemies to spawn, but there might be cases where I don't. Most important things spawn on entering a room though and this wouldn't affect that. The counter is used for randomness, so pauses could be used to manipulate enemies. But the pause takes so long that it's unlikely to be helpful. And as far as bypassing more game requirements, I'll think about this but I don't think it will help. Triggers in this game are based on going somewhere or talking to someone. Barriers come in several varieties; People can be bypassed with the waterfall glitch. Water can be crossed with flight, normal or ghetto. There are also the sword-charge barriers that can be dealt with using the sword charge glitch. With respect to normal walls, the engine seems to be pretty robust. If you could increase your velocity enough I think you could pass clean through a wall, but there's no way to get that much speed. It would be neat if I could execute ghetto flight without the dolphin, but I'm not extremely hopeful about it.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Ok, you asked for it. I discovered a new glitch that lets me climb the sliding slopes no matter how tall they are. Now I need to rethink the path through Mt Sabre to take advantage of this. Also, I'm trying to think of other places this could be useful. Any ideas? The technical details go like this: There's a counter at $0660 that tracks how hard the slope pushes you down. It increments every 16 frames when the almighty global counter at $0008 has low four bits of 0. The trick is that when you pause and unpause the global counter gets incremented while other logic, including this, is skipped. So if you keep pausing and unpausing at the right time you can continue walking right up on the frames in between. The increment is also skipped if you are in the air from jumping with the rabbit boots. However, it increments when you land regardless of the global counter state. Pausing can't prevent this. The same pause/unpause trick can be used to prevent damage in the swamp without the gas mask. But it would require so many pauses that it would take way more time than getting the gas mask. There may be other applications as well.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
About the walls blowing up, you are pretty much right. In a straight corridor it doesn't matter when you blow up the wall since the screen stops moving when the shot hits it. But if there's a way to move around then it would help to do that. Then you have to consider lag and in lag in this game is generally worse when you keep moving as other things are going on. That means it's best to hit the wall later in a straight corridor. This also influences some of my other tactics, by the way. When I stop, it's to spawn the enemy, not just manipulate it. Enemies don't spawn onscreen so at a certain point I just need to stop and wait. Spawning is tied to a counter at $0008 that counts down every non-lag frame. For this pass I just killed as many enemies as I could walking around. In my final version I'll try to be smarter about it. In general though it does usually pay off to get these enemies enroute and cut down on grinding. Hehe, I finally figured out Stom, ending one of the biggest issues in this thread. I'll have to post a screenshot of the hitboxes because it's very revealing. In order to hit him without being hit back it requires a precision of 2 or 3 pixels which comes down to one frame of movement. I was pretty proud of discovering that grinding pattern, it required a lot of insight in to the game's engine. There will be changes on some level to most of the grinding sequences. By far the most interesting change will replace the guards in front of Goa. Some other sequences will probably change less and I don't know if I'll be able to make them interesting.
Post subject: iup.matrix - slow and unstable
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
I've implemented lots of different things now in my Crystalis script. But the only thing that really slows things down and leads to crashes is when I display an iup matrix. I've tweaked my script so that it only makes the update calls when the data changes, but it's still pretty slow. Also, I have menu options that can add and remove rows and columns from the table so I only display what I need. Using those seems to generally work for a while, but after doing it I get random crashes. Has anyone else experimented with this?
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
http://dehacked.2y.net/microstorage.php/info/238732292/Crystalis-test1.fm2 I've been making steady progress, developing new methods and scripts and figuring out some new tricks. Here's my current progress on a test run, I plan to start over on the final version as some parts can be improved. Still, after only playing 7 minutes I am about 2 minutes ahead of tmont's published version. There are several surprises here, but I promise there are many more to come! By the way, most of my major insights have come from hacking into the hit detection engine on a broad level and displaying really anything that looks like a hitbox. I found that the coins dropped by enemies occupy a slot in the same table as the enemies themselves. The slot picked seems almost random. Each enemy that spawns in a certain location will always occupy the same slot in that table. If a coin is in that slot, he won't spawn. Coins won't replace enemies that are already spawned, even if offscreen, so there are ways to manipulate which coins spawn in which slot. Of course my script can tell me what slot the coin is in and I can use that to know whether or not I need to pick it up. Also, by changing the order or timing of when I kill enemies, I can affect the slot of their coin. All this knowledge is important when hunting spawning enemies for xp. Hitbox visualization was also key to my strategy on Stom. The method used can be done on a console but requires a lot of precision.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Excellent, congratulations on finishing this through. I suspect that it may be faster to do more grinding rather than take an extra trip through Nockmaar. But it's close at best and more entertaining this way.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Why not use some healing spells before the battle to set up the right amount? Then start off with G.Dragon.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
There's definitely some components there that should be added to the repository. I'll talk with Adelikat when I get further along. Because of how this game works, cut-and-paste style hex editing simply doesn't work. There's too much dependency on global counters and lag can pop up unexpectedly at times. But the bot looks at these counters and adjusts as needed. Sometimes it uses the old brute force method, trying over and over again until it finds the optimal method. If it has a problem doing something (like because an enemy moved out of the way) then I'll do it manually. For this first part the enemies don't move much, but in other areas I'll have to have my programs adjust to enemy movement. I made a bot for the first grinding section and it worked very well. It gained about 250 frames on the published run. This is partly due to a slightly better method though. I'm doing the sealed cave right now and I've got about 11 seconds of overall improvement. I need to figure out more about enemy movement so I can manipulate that stupid vampire. tmont got him to behave very well and it will be hard to match his fight. After that I have a lot to test in the next area. I still haven't decided whether or not skipping ball of fire is a good idea. There's also the issue of whether or not to levelup before entering the swamp so I can fight some bugs while I run through it. Edit - Some more interesting information: At $000E there's a counter that's used as an offset into a table of "random" values. This is used to randomize enemy movement. But the global counter at $0008 is also used. A lot of enemies aren't random and don't use these though. Instead, they always come right after you. Anyway, this means there are some limited ways to manipulate enemies. For enemies that spawn immediately on entering an area, delaying entry will change the counter. The random seed is trickier but could be "groomed" by killing enemies either sooner or later and also by leaving areas sooner or later in some cases. Finally got Stom figured out. Stom's behavior is a combination of the random seed at $000E and a special "Stom Counter" at $657F. The Stom Counter starts out at 0 and increments as each duel starts. If you hex that you'll see that he becomes way easier. At 3 it seems he's always beatable. Note that this is in the battery area and is saved along with your savegame. However, it may be possible that at 1 or 2 it is possible for some seed values. Looks like a job for lua!
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Ok, I'm giving an update whether anyone cares or not. I've been busy overengineering some lua for this run. I've created tons of features: -Player and enemy hitboxes -Display enemy hp onscreen -Sword and sword shot hitboxes -Markers for spawn locations, countdown to when an enemy respawns and an indicator that tells me the screen is far enough away -Lots of things only happen every 2 or 4 frames based on the main counter at $0008 or some other one. So I get some things popping up on those frames for convenience. -Also, I get rewind! I would like to set up bots for some of the grinding sections. More so that I don't have to do the tedious work myself rather than getting any speed improvement. So far all I have are some macros that make fast diagonal movement and walking sword charge easier. But I need to do more complex things and make it smart enough to try and avoid lag. The macro/bot actions are also rewindable so I can do some part automatically and then redo part of it manually. Interesting things I've found in analysis: -Hit detection for your sword attacks only happens every other frame (based on main counter). But enemies can hit you any frame. -Sword charge meter goes up every 4th frame based on main counter. -When stabbing the sword, the attack hitbox extends out 3 pixels near the end of the attack, giving you some extra range. But since hit detection only happens every other frame you have to time your attack to take advantage of this.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
To prevent the error you need to add checks so it doesn't use gui.text with bad coords. Also, lua can't magically generate glitches. Unless you know something about how the glitches work, it's unlikely that a lua script would help you glitch through walls. Add this code to the script and change the gui.text lines to call this function:
function safeText(x,y,text)
  if x > 0 and x < 255 and y > 0 and y < 240 then
    gui.text(x,y,text)
  end;
end;
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Yes, there's no avoiding leveling in this game. But since you have to walk around more without wild warps, you kill some enemies on the way and so there's less time spent specifically to grind. I experimented in the swamp a bit. I couldn't find any way besides the mask to keep hp from going down and it goes down fast. However, it is possible to reach Oak if you start with full hp, full mp and at least 3 or 4 medical herbs and keep healing. You'd need to do the same to get the kid and you wouldn't be able to beat the bug. So I think getting the gas mask is less bothersome. You need to go shopping in Brynmaer anyway, so it's not much of a bother.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Short answer is that there will be as much grinding as necessary, but no more. Of course the ultimate goal is to finish as fast as possible. In general, less grinding will accomplish that better. Right now I can't say how much grinding time I can save over the current run, but it's going to be quite a bit. I've discovered some new spots that will be much faster. A non-ww run has a lower percentage of grinding to advancement, so just because of that the amount of grinding at least seems less.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
This is proceeding well. I am writing a lot of lua code for myself that is really going to help on the details. So I'm doing a test run to hammer out and test my script as well as try some things with the route. So far I'm just up to the windmill. I've gained about 250 fr on the recently published run just by tweaking movement and reducing lag-there aren't really any options in the route yet. There's certainly more improvement possible with aggressive optimization. My scripts already have several powers: -displaying player and enemy coords and hp -display some useful counters and indicators -movement macros for fast diagonals and charging the sword -player and enemy hitboxes -rewind. So I can run a macro and rewind part of it I plan on adding some more features: -smarter movement that avoids lag -grind-bots for repetitive tasks -lag-reducing bot Lag is a big deal in really tweaking a run at this game. I have a pretty good idea of what causes it (multiple enemies, sword shots, scrolling the screen both directions) and some ways to reduce it (manhattan movement). But building it into a program is tricky. If I can pull it off though, it's going to be sweet.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Pause is there and works fine. I just tried FCEU.unpause() and it fails. There's no unpause listed on qFox's page either.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Lua scripting rocks! I am building up a huge library for Crystalis. But it would be more convenient if there was an lua unpause command. My goal is to be able to have a collection of macros that are run from a central console. So playing this way I'll either do some manual input or run a macro, then pause. Now I want to run another macro. Right now I have to hit a button in my UI and hit unpause for it to run. I have to move the mouse to change focus and hit the pause button. It would be a little faster and easier if I hit the button and it just runs.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
I recommend moving to FCEUX so you can use all its cool features. For example, lua scripts like this:
--Simple Willow script by TheAxeMan

lastx = 0
lasty = 0
relx = 0
rely = 0

function showWillowCoords()
  relx = memory.readbyte(0x00cb)
  rely = memory.readbyte(0x00ca)
  gui.text(relx-20,rely,relx..","..rely)

  xmove = math.abs(relx-lastx)
  ymove = math.abs(rely-lasty)
  gui.text(relx-20,rely-10,xmove..","..ymove)
end;

gui.register(showWillowCoords)

while (true) do
  lastx = relx
  lasty = rely
  FCEU.frameadvance()
end;
This prints Willow's coordinates by him and also shows how many pixels you moved in the last frame. Walking straight the pattern seems to be 1,2,1,1,2. Diagonally it always seems to be 1 in both dirs. If you walk diagonally against a wall then you get 1 every time, slowing you down. I was trying to figure out the pattern when switching between straight and diagonal because this can be exploited in some games. But it seems to use a counter that only counts when moving straight.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Ok, I finally got around to trying this out. Here's how to beat Muzh without a shield. From this it should be clear that you even could do it without getting hit it you had to. I won't argue with hitting level 5 though. This crude demo is about 350 frames slower than your fight. That's already well enough to make up for gold shield, but with a little optimization it should be much faster. Also, I think the battle is more entertaining this way.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
I'd also consider other items. You could acquire a rod and gold pretty easily and then catch the Maniro near WitchTwr. He sells attack items that could replace Bleu and at an earlier point too.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
I doubt that time saved from damage boosts will even cover the time taken to cast the healing spell.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Here's my breakdown: -Beating the bug takes about 40-45 seconds -Each time you use the death glitch it takes about 14 seconds -The bug gives 50xp. At this point it takes about 14 seconds of grinding to replace this. -Since you can't switch swords on Mt Hydra you can't kill some enemies enroute. This means more time spent grinding. This is hard to quantify but it probably makes up the remaining time easily - at least 5-10 sec. The guards on Mt Hydra North are worth a lot of xp and you have to walk by quite a few of them. Ok, so it's not 100% clear that it loses time. But I think it's at least very close. I should have said "may not save time". Of course there's some issues with the route. If you skip the bug you can warp straight to Brynmaer and go to Mt Hydra. But if you reach level 4 before entering the swamp then you can fight the swamp enemies as you go about your business there. So there's some more stuff to figure out. Definitely something I am looking at in my research phase.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
In the description, I don't think "far better optimized" is a good choice of words. As far as general combat and movement, this is a step backwards. For example, the tower area is about 100 frames slower. Several of the grinding spots are suboptimal compared to previous run as well. Perhaps it might be better to say something like "this run has some tricks not seen in the previous movie". Specifically, there are three glitches that aren't in the ww run. -The death glitch (even though it doesn't save time) -Ghetto flight (wasn't useful in the ww run.) -Walk through stone people (this one is pretty nice.)
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Resurrecting this thread on account of the publication of tmont's run. I've been inspired to at least do a little planning and research. So I'm posting to see if anyone else had the same idea. Ok, I'm willing to accept the site ruling against wild warp. A normal run should still be pretty interesting. Anyway, as tmont admitted earlier, a lot of his choices are suboptimal. In many cases he could pick some better spots to grind and grind more optimally. Because of lag and the richness of this game's control, there's always room for tweaks. So I've gone through and made some notes and some plans. For one thing, I suspect that using death glitch to skip the fire orb is more bother than it's worth. My guess is that a couple minutes could be shaved easily with even more possible after some work. I tried to look for more memory addresses. I couldn't find absolute x and y coordinates for your current position. But I could find screen-relative coords and coords for the screen. This revealed an interesting possibility for movement tweaking. Non-diagonal movement is at 2 pixels/frame. Diagonal movement alternates between 1 frames and 2 frames in both directions. So you can alternate between manhattan and diagonal to move faster with an overall angle of 26.5 degrees.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
By the way, it sounds like the frame reduction summary goes like this: 2-1 - 6 frames by handling the seahorse better 3-2 - 1 frame from getting the second mushroom instead 4-1 - 2 frames from less lag 4-2 - 2 frames: 1 from lag, one from movement on the last falling platform 4-3 - 40 frames by using ABAB to fire faster on the bosses That's 51 total which means the remaining 23 come from transition timing. In order to reduce the overall time, 1-1 and possibly other levels had some frames added. Luck manipulation for the bonus rounds also changed, so it's hard to figure out exactly where the remaining frames come from. But mostly on 2-3 and 3-3.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Awesome! I think you've cleared up all known issues with this game and found a few bonus frames as well. That ABAB trick was a surprise. Plus I think you've kept the entertainment value intact. Only major loss is not getting four fish in a row on 2-1 and that was necessary for the speedup. mklip2001, the reason why you have to hold your fire is because fireballs slow you down. You have to hold the B button to run, but it's also the button to shoot a fireball. So in order to fire you have to release it for a frame and that slows you down by one frame. If you could kill an enemy and cut two frames of lag then this would help, but there's not that much lag. The fireball also adds lag when there are too many enemies which is why it's often fired right before reaching the enemy.
Ambassador, Experienced Forum User, Published Author, Experienced player (698)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Very good. Looks like on 2-1 you still have to wait a little bit for that seahorse but not as much. Too bad that kills the fish-jumping streak. It looks like you have this down pretty well.