Post subject: Dungeon Magic - Sword of the Elements
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
About the game Some dark overlord named Darces returns, and of course, only one person can drive him away. You need to travel around the world to unite the five elements, Earth, Water, Fire, Wind, and Faerie, so you can defeat Darces and save the world. Or something to that effect. Do I do any of that? No way, man! I "unite" only one element, fly straight to some sky dungeon, get the required item, and then run into the final dungeon, only to skip by Darces without even touching him and pay the king a visit to end the game. Oh, kingly guy, you love to exaggerate! As far as gameplay goes, it's a little odd. Movement is done merely by tapping in a direction. Left/right turns you, and up/down moves you. If you attack, it takes a little time for it to hit, and you can only strike whatever is right in front of you. All the spells are made using runes, and since there is no MP in this game, casting spells eats up your HP. Also, vision is rather limited, and it's very easy to get lost without using the right spells. EDIT2: Complete run v2 I guess all that's left is check a few last things before submitting it. In particular, what should I do about the record count? Other than that, nothing else to say right now. I'll leave in some of the older texts in place: Old run is here. EDIT: I have submitted this run now! I just didn't feel comfortable submitting it before putting it up for discussion. Although it does say 431 records, I have two other runs, a test run at 440 records and my first real attempt at 178 records. The total count before I got the final run is 1049 records. I suppose a question of mine is how to present the count. Given that it's as optimal as I can make it, and the fact this is the game where I first tried the tools on, that should say something about the simplicity of the game. Before getting into this run, I had a pretty thorough knowledge of this game. What spells do what, what route I should take, and where to get a few things. Some of the more tricky stuff involved how to completely stop enemy attacks, how to get damage underflow, and primarily what the game bases its luck off of. Don't worry, I didn't know everything ahead of time, like precisely how many enemies I needed to kill in the route, the 8-frame rule of the doors, and how to manipulate enemy movement. If I'm told to submit now, I'll do so. Else, I'll submit it on my own time, probably in a week, unless there's an overflow of posts telling me not to. If nothing else, I want to say "this game is now TASed, and exists in the database of games that has been attempted."
Joined: 12/10/2007
Posts: 260
Location: Oregon
Only 400 rerecords for a 17 minute run?
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
Hold on... 17 minutes? Where are you getting that number? My run should be a fraction under 1 minute 15 seconds... Something happened. I want to know what.
Joined: 5/17/2008
Posts: 212
Location: Virginia
4494 frames, looks like. 1 minute 14.9 seconds. I haven't watched the run yet.
adelikat wrote:
It started off fairly tame, but as more balls entered the picture it sure got a lot more entertaining.
Joined: 12/10/2007
Posts: 260
Location: Oregon
Nevermind, I thought that it said the final run was 1049 seconds not records. Sorry about that. Well since its such a short game I'd say that it should be at about 400 rerecords.
Joined: 5/29/2004
Posts: 757
O.O?!!? What the $%^$% hell just happened?! I mean $#^%#^@!!!! That's not a movie, that almost resembles the Rockman glitchfest.. things in a blur from excessive speed, confusing moments of clarity... Can we please get an explanation?! Mr. Kelly R. Flewin
Mr. Kelly R. Flewin Just another random gamer ---- <OmnipotentEntity> How do you people get bored in the span of 10 seconds? Worst ADD ever.
Joined: 2/26/2007
Posts: 1360
Location: Minnesota
If only more "n00bs" (no offense :]) put up their runs for discussion BEFORE submitting...
adelikat wrote:
I very much agree with this post.
Bobmario511 wrote:
Forget party hats, Christmas tree hats all the way man.
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
Mr. Kelly R. Flewin wrote:
What the $%^$% hell just happened?! I mean $#^%#^@!!!! That's not a movie, that almost resembles the Rockman glitchfest.. things in a blur from excessive speed, confusing moments of clarity... Can we please get an explanation?!
Even if someone knew this game pretty well, I expect to hear this type of question. There's two main factors to this: Visibility and speed. It should already be obvious, even in a TAS, that this is supposed to be first-person perspective. You see everything through the eyes of your character. Now, the main problem here is the fact the character should be legally blind due to the fact he can only see like two squares ahead. There are map spells I can cast, but they freeze the game for a few seconds while displaying the area, then the map disappears and gameplay is back to normal. If I could move while showing the map, I would have done so. But since it even stops doors from opening, I can't show the maps without losing time. As for the speed, the game accepts movement every frame. When you tap up, you instantly move one square, unless there's a wall or something else in the way. Then the game waits for you to release up before accepting the next up input. So, of course I hit, release, hit, release, at 30 Hz. Needless to say, 30 squares per second should be a blur in itself. Then there's a lesser factor: The game updates the wall display every four or so frames. It's also a little behind on the display, so of course even with frame-by-frame, you can't even tell what's up ahead, or even what you're seeing relates to what paths you saw before. Combine these factors, and you have a wonderful blur the whole time I'm not faced with countless doors, talking to three people, or destroying two of the monsters. As for the two moments where you actually see me attack something, I'm using a damage underflow glitch. If I didn't mess around with my spells even before the attack spells hit, you would have seen them go through their normal animation and deal one damage. For some reason, attempting to cast a different spell while an attack spell is still going through its animation causes the spell to transform, taking on the parameters of the new spell. If you were attempting to cast an attack spell as the second spell, you are not charged any extra HP for it. For a normal run, this is typically useful for firing a monstrous 54 HP-cost killer attack spell while spending only 2 HP. But this isn't a normal run, is it? If you try to cast a non-attack spell while the attack spell is still going through its animation, the effect of the non-attack goes through (HP cost included) AND the attack spell also changes. The base attack power of a spell transformed this way is -1, and with luck, deals at most 6 damage (before you take into account the enemy magic defense). A bit of luck manipulation later, and I hit that -1 every time! Since the game treats the negative as though it were unsigned, I nail maximum damage every time. Too bad it's cropped to 255, then further reduced by their defense... Hopefully, that counts as a good enough explanation. My impression of my own run is that it will find a home in Gruefood if I submit it. But at least then it will be in a list of submissions, if someone wants to bother looking for it. That is what I get from watching my own run. I want to hear more thoughts before I decide to submit away, though.
Joined: 7/2/2007
Posts: 3960
I still haven't watched it, but from what I've heard, this is the kind of run that gets accepted just because it takes so little time to run; it's on a similar scale as the Harmony of Darkness runs with Maxim. It doesn't take much effort to watch (an encoding, anyway) and the sense of WTF is fun, so people tend to enjoy these types of runs.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Joined: 5/9/2008
Posts: 35
Location: USA
It sounds like a pretty cool run to me. I love runs that make me wonder wtf just happened.
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
In that case, I guess I'll submit the run shortly. If WTF-level runs are appreciated, then all I can say is "what am I waiting for?" Now to think up what to put in the submission texts... Should I suggest a shot of seeing the final boss while at 1 HP?
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
So far, I already reduced the time by 685 frames, bringing it to a length of 3809 frames. A good portion of it is because I skip the shop entirely now. I think I can still go just a little faster. EDIT: Make that 3784 frames now. Go ahead and look! Don't mind the excessively low record count, 64. I started from a new movie file and re-input a lot of things. The only thing that didn't change much is the run through the final dungeon, which I just copied over (and a mild adjustment to avoid a flank attack). How should I represent the count upon submission? The current potion route gets two of the northern potions in the cloud realm and I get the third from deep within Tores Sanctuary. The previous 3809 frame run picked up a potion to the west of the starting town, instead of the one in the sanctuary. I guess the edit makes the following text unneeded, so I'll just shrink it down. I'm going to look over a few other potion-gathering routes, especially the potion in the bottom floor of Tores' Sanctuary (should cost only 2 frames to pick up, but that's enough to push it over the 8-frame rule), before I submit a new run. Using a jar as an attack spell substitute is a possibility, but the nearest one I could find so far is about 16 steps out of the way. I'll look a little more then create and submit my final run. I'll look over a few final things before I finally submit. I will calculate whether it is worth picking up an attack jar. Thank TaoTao for posting some possible improvements I could have done in the discussion of my submission, and now I've made those improvements. Some useful memory addresses for the (U) version I've been using keeping track of:
0000 Frame counter -- Most luck and timers seem based off this.
008A Position -- A must for when you can't even see where you're going.
008B Direction -- In case I need a reminder where I'm headed
007B Pause -- Sometimes I forget if I hit start or not.
00DB Foe's HP -- Useful to know if I ended up missing the needed damage
00DC Your HP -- I like to know the instant I hit 0.
00D4 Spell timer -- 0x99=spell hit, 0x9D=fire the next spell!
00AB Door knocks
009B Door timer
00CE Selects which foe gets to move. Increments in 4-frame ticks
00CF Used for determining how foe moves. Increments when 00CE goes from 15 to 1.

76E0 B1F Tores enemy 0; Must not be 0x5B
76E1 B1F Tores enemy 1; Must remain at 0x68. This I kill.
76E2 B1F Tores enemy 2; Must remain at 0x7A
7705 B2F Tores enemy 5; Must stay in 0x?0
7707 B2F Tores enemy 7; Should move to 0xC2. This I also kill.
7720 B3F Tores enemy 0; Must move to 0x2C
7721 B3F Tores enemy 1
7722 B3F Tores enemy 2; These four enemies are in the room
7723 B3F Tores enemy 3; just before Tores Sword
7724 B3F Tores enemy 4
75E0 Final Dungeon; Must not be 0xB1
75E1 Final Dungeon; Must not be 0xB5
75E4 Final Dungeon; Must move east
75EC Final Dungeon; Must move south and out of that hall!
75ED Final Dungeon; One of the final monsters by that hall.
75EE Final Dungeon; Another one of the final monsters by that hall.
Banned User
Joined: 12/23/2004
Posts: 1850
I can try to make a Lua script that shows some stats onscreen, if you have any particular ideas.
Perma-banned
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
It's a bit late for a lua script now, at least for my TASing needs. I've just now made a few edits to my posts about this run. However, I might have a few ideas for casual playing, if you feel like it. Such as calculating your attack and defense, the power of your selected spells, and projected damage against the current target. And actually seeing your max HP would be nice, too. As far as I know, the hero's attack and defense doesn't exist in memory -- they are calculated on the fly. I should dig up a few more addresses and see what I can find to allow those calculations, as well as polish off the formulas I do have. Though, if you don't want to, that's okay. If you do want to take the time to do that, then I'll get to work on my formulas, and what I would like to see. I still haven't pinned down physical attack power yet...
Experienced player (866)
Joined: 9/18/2008
Posts: 148
Location: Japan
I watched your run v2 several times. It's really cool! I was surprised because I had not thought such significant improvement could be done. I think this run is almost perfect. Unless we discover some new glitch, it will be very hard to improve it more significantly. I considered the potion route, and I thought about the route which we get a red potion on the west of the starting town instead of a blue elixir in the cloud realm. But it seems we can't get to the red potion from north without any loss, because a snake stands in our way. So, I think your route is probably optimal. I'm looking forward to your submission. I'm a newbie and not sure what to do about re-record count, but I think there is no problem to display the same count as one of the movie file. If necessary, how about explain about it in the comments of your submission?
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
Well, I made an attempt at skipping the blue elixir in the Cloud Realm in favor of an attack jar. However, upon reaching the first stairs, I get exactly the same time. I've come across a few problems: - Using an attack jar clears away my set-up spell. However, I don't need to wait for the previous spell to finish after it hits. - I have 4 wasted frames on the first spell, to hit max damage - I have 4 more wasted frames on the second spell, to hit max damage - I will have 4 wasted frames on the next monster, again for damage I was hoping I do not need to set the non-damage spell, which takes 9 frames to set and cast, but using the attack jar gets rid of the set up, and trying to cast a blank spell does not affect damage. The fact that I save 5 frames by using it to interrupt the previous spell is enough to maintain the time. (EDIT2: My apologies, I keep thinking about it. I thought it was 5, then 4 which isn't enough, then now I'm back to confirming 5.) Normally, I have 6 frames to do whatever I want after I transform the first spell. Previously, I've used 5 of them to make an attack spell and wasted only 1 frame. This time, the change is not needed, since it's wasted anyway. So now I move the cursor over to the items, which takes 2 frames, and I don't know what I can do with the 4 spare frames I have after that. For the second spell, this one is from a jar instead of a spell. As I said previously, I was really hoping I don't have to set the non-attack spell up again, but using the jar erases the spell for some reason. After setting up the non-attack spell again, I'm left with 4 frames to throw away. Problem is, I can't use those 4 frames on anything. Setting up a new attack spell ahead of time uses 5 frames, which pushes me over the 8-frame rule. While I do use a healing potion ahead of time, saving 4 frames when I reach the next monster, it's not enough to get ahead of that 8-frame rule. I need to be faster by 8 frames in order to get around that 8-frame rule, as the updated attempt has no frames to spare after using a potion and casting the spell. If I can set up the attack spell ahead of time, that would save another 5 frames, and would save one frame-rule unit, but I don't see how I can. It looks as though every attempt I make, I am stopped so close to my goal. I have 12 spare frames, but they are in different frame-rule units, and that slows me down exactly enough to match the updated attempt.
Experienced player (866)
Joined: 9/18/2008
Posts: 148
Location: Japan
Hmm, I watched your alternate run. It may be good idea to use an attack jar. And I might find a solution for the problem. In the run, you input <A> for 2 frames from frame 1659. I wonder it is input mistake. By fixing this, I could use the attack jar 1 frame earlier, and I could maintain the time to set up a new attack spell. I made a movie. In this movie, when we reach the first stairs, we have 12 HP and a new attack spell set up without any loss. How about it?
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
Finding that mistake helped. I was getting a bit tired, and would have looked later, but you picked up where I left off and found the solution quickly. The change is enough for that next monster, and now the run is faster by another 8 frames. Through our efforts, here's a new run with 3776 frames. Again, most of the later stuff got copied over, with the usual adjustment to avoid that flank attack. Now it should be quite tough to find further improvements. One attack jar, two healing potions, making use of every last HP, and enough manipulation of enemy movements to keep ahead of everything. And for fun, going down to 1 HP three times! Hopefully, this is it. I can't see any better route for picking up potions, and all of the movement and fighting is pretty optimal. I consider it highly unlikely that anyone will find a way to beat this game faster. Hopefully someone else will come by and prove me wrong again, just like what you did on my submission. Good job, we've done a lot. I look forward to making a new submission with this new run.
Post subject: I exist. No AH progress. Still on my mind, though.
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
No noted Some potential improvement I can think of. One thought was the fact walking off a field edge while on the overworld affects address 0x0095 by -4 (north), +1 (east), +4 (south), or -1 (west). This requires an open path to the field edge, which typically is walled off in dungeons. Air magic has a "warp back 1 floor" spell that preserves your current X,Y position, leading to some interesting areas, but I can't theorize a useful area to do this in. Regardless, the bottom floor of the final area has a value of 0x8B, with the floor before it being 0x8A. Though I doubt we can abuse a map edge even with warp magic handy, it would be nice if we found a detour around the king & queen without need of picking up that sword. Just some potential improvement I might look into eventually. It's about time I produced a script that shows a basic map. Now you can see exactly where I'm running around instead of seeing this silly blur. Feel free to view the published run using it. Wasn't sure where to put the map. I don't think anyone cares about seeing the character's face anyway. Download DM.lua
Language: lua

local R1u= memory.readbyte local Li= gui.line local Px= gui.pixel local And= bit.band --***************************************************************************** local function Fn() --***************************************************************************** gui.box(14,129,96,211,"black","black") for x= 0, 15 do local L= 15 + 5*x for y= 0, 15 do local T= 130 + 5*y local B= R1u(0x0600 + x + y*16) if And(B,0x0F) == 0x0F then Px(L+2,T+2,"white") end if And(B,0x11) == 0x11 then Li(L ,T ,L+4,T ,"green") elseif And(B,0x01) ~= 0 then Li(L ,T ,L+4,T ,"white") end if And(B,0x22) == 0x22 then Li(L+4,T ,L+4,T+4,"green") elseif And(B,0x02) ~= 0 then Li(L+4,T ,L+4,T+4,"white") end if And(B,0x44) == 0x44 then Li(L ,T+4,L+4,T+4,"green") elseif And(B,0x04) ~= 0 then Li(L ,T+4,L+4,T+4,"white") end if And(B,0x88) == 0x88 then Li(L ,T ,L ,T+4,"green") elseif And(B,0x08) ~= 0 then Li(L ,T ,L ,T+4,"white") end B= R1u(0x0700 + x + y*16) if B ~= 0 then local C= "red" if B == 0x10 then C= "green" elseif B == 0x80 then C= 0x0080FFFF end gui.box(L+1,T+1,L+3,T+3,C,C) end end end end gui.register(Fn)
Post subject: No improvements to Dungeon Magic, it seems.
Editor, Skilled player (1157)
Joined: 9/27/2008
Posts: 1084
Failed. I decided to warp on top of some exit in this dungeon, and noted that I could step south. I also noted that, on the first floor of this low-level dungeon, there is a nifty exit on the south edge of the map. Finally, the value of 0095 was 0x86. Increment by 4, and I'm at the castle. If walking onto the south border of any field did what I expected (increment 0095 by 4), then I would have found a neat detour around the whole errand with that sword. However, it didn't do what I had hoped. Instead of finding myself on Y 0 of a different field, I somehow moved one tile north instead. I am definitely facing south, and I definitely stepped forward. But some programmer decided that the game should react differently in this case, and well... This attempt is a failure. Ah, well. Now I won't have a nagging question about this game, at least.