Posts for qFox


1 2
8 9 10
24 25
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Lol, they also list the last few commits as "changes".
qfox.nl
Post subject: RAM mapper
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Ok, I've been mapping a few games to use the LuaBot and have been annoyed with the way of doing so. It's a tedious job (although quite fun, as it's just a giant moving puzzle :p) because I find myself being distracted by moving registers I don't care about or checking out values I already knew. So I'm going to create a new hex editor, with ram mapping in mind. It should contain some of the folling: Start out with the hex editor as it exists now (in terms of updating the RAM). The next apply to addresses, ranges and blocks. Allow labeling of ... Allow coloring of ... Allow hiding and showing .... Allow freezing to a certain number or reset to a certain number once it hits a certain number Automatically hide all addresses that conform to a certain rule (lesser/more then, or whatever). Crop all hidden addresses (so you can easily keep an eye on the ones that are still visible). Create a clear notification (like flash the screen red) when an address changes (something that catches your eye so you dont have to keep checking the editor yourself). In some future I also want to create an online database with people's maps. Any other suggestions? BTW, does anyone have any rammaps? Other then data crystals....
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
CtrlAltDestroy: You can actually create as many savestates as you wish using Lua. You create a savestate OBJECT by
local state = savestate.create()
And then you can save that state by calling
savestate.save(state)
and subsequently load by
savestate.load(state)
You can also load and save the predefined savestates by supplying the number as an argument to create (NOT to load or save, they require a savestate object):
savestate.create(1)
I know it's (probably) not exactly what you requested, but it's not impossible.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Then you would be surprised. I'm trying to write a small memory watch tool right now that has a dynamic number of fields. Of course, even though Lua is quite simple, one can make it as complicated as desired.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Phil: Lua is an easy enough language to get into. It was designed that way. It's also used for WoW, for instance.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Script it :)
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
It's a bit further away from the old menu item, but I think people will get used to it :) The downside compared to the old bot is that you now have to code in Lua (which can also be a plus, since that also allows you to code other stuff yourself). I believe that the pro's of this bot outweight the cons of it :)
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Yeah, we're working on putting them in the luapack :) And there is no getting around programming for the bot. I took care of the logic behind a bot, but there's no way of actually creating a all-game-generic bot, except perhaps random-button-mashing bot...
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
The memory viewer is now called "Hex editor" and is listed under Debug in the menu.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I think anything that moves seems to have a hitbox. Platforms have hitboxes too you know. Solid objects have implicit hitboxes (or not implicit, as the level is clearly drawn in memory). As for the fireball barriers, I gather it was easier to do the math internally then keep track of a hitbox due to diagonal lines and the math involved. There is only space for so many hitboxes and there can be many more individual fireballs on screen (three or four barriers will easily reach that).
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Oh I can tell you where. The enemy types are located at 0x0015 or 25. I think it was something like 0x5C, no common enemy (they're in the 0x00-0x30 range).
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
That's basically the case yeah. As poor of a job as the hitboxes might do, they'll still kill you :) It just becomes glitchy when there are many hitbox-objects on screen because the game then starts to alternate between who gets the hitbox.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Actually, it seems that killed piranha's stay on screen, just hidden in the pipe. You can see their hitboxes when you kill them...
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Yeah I have been wondering about that myself. It shows up as an enemy on the next screen, but I can't figure out what it is. It's not moving with the flag either.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Well, that seems to be the case, but as mentioned the Lua drawing is one frame behind, so that's probably not the case.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Well, it turns out there are only 9 hammer hitboxes. On top of that, they share hitboxes with coins and powerups too (although that's probably a pretty safe bet).
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Alright. New vid (I edited first post as well). http://youtube.com/watch?v=eDaYK1cOCmw The box might be off by one or two pixels, but if that is the case, they ALL are, so it doesn't really matter. I took real special care this time, I changed the script, it's now drawing EVERY hitbox the memory has. This includes 1 mario, 3 coins, 5 enemies, 2 (mario) fireballs, 1 (!) powerup and 9 hammers. (Bowser and (his) fireballs are considered regular enemies in this system). I also figured out the system of showing points (like when you hit an enemy) and the "explosion" of bricks, but I didn't draw those, because, well, who gives a damn :) It's a funny thing that you can have only one powerup. If you get the star in 1.1 and then open up the flower, the star disappears. But that's probably well known. So andrewg, there's your hammer hitboxes :p Have fun with them. I'm going to bed.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Ok. Ummm. Yeah. It seems that drawing on screen was not done with the precision I anticipated. To be more accurate, due to scanlines and NTSC and whatever... drawing was vertically off by 8 pixels :( I'm fixing stuff now.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Sure, except that the hitbox for the moving platform would no longer make sense. I think. But you are right, the offset is not important. This is just how they are found in memory... I doubt _they_ are subtracting 8 pixels before putting them there :)
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I have a feeling that being in an uncontrollable state (there's a switch) also makes you invulnerable.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I doubt that. The green box coordinates are directly read from memory and plotted to screen. It's actually the solid hitbox that don't seem to have actual hitbox coordinates (although I'm still convinced I simply can't find them. Enemies should have these boxes as well...). As for the enemy hitbox being lower, yeah I don't know. It doesn't really matter whether they are as long as every object's offset is equal... Possibly it makes more sense elsewhere.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I haven't investigated where those coordinates are stored, but I guess they're using more coordinate-addresses then regular enemies. Perhaps they use the same hitbox addresses as reserved for powerups and fireballs?
qfox.nl
Post subject: Super Mario Bros. 1 Hitboxes Exposed
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
It seems to me there's hardly any information about hitboxes. Time to clear that up. I've downloaded the current SMB run and hooked up a script to show hitboxes. And no, that's not wrong, that's simply how they work. It becomes somewhat more obvious with moving platforms, which have a hitbox underneath as well (and you only stand on them when your hitbox lies on them). Bowser fireballs have a tiny hitbox and the hammers from bowser or hammer bros hardly show any hitboxes (but they have them, my script simply isn't taking them into account since it only tracks enemies). Occasionally you also see a hitbox for fireballs and powerups. Not sure why that's so sporadic, but whatever. Fun fact: there's a piranha at the entrance pipe of the water level in castle 8.4. The enemy is invisible but will kill you. The hitbox clearly shows up in the movie :0 Youtube: http://youtube.com/watch?v=eDaYK1cOCmw Lua Script v1: http://lua.pastey.net/92636 Lua Script v2: http://lua.pastey.net/92707 (shows hammers and coins!) You can check for yourself, nowhere in the run do the green hitboxes collide, unless the game shows they did (always one frame after they collide). Can you believe how close those calls were in 8.3 and 8.4? PS. if anyone objects to using this run as an example I'll take it off and create some random walking. This just seemed like a better example as it shows the entire game.
qfox.nl
Experienced Forum User
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
And here's the final script I'll make for this game. It turns out enemy prediction is a whole heap of metric functions and patterns I'm not willing to research. An example of the Lua script in action can be found here: http://youtube.com/watch?v=L9xZ8b3wg-I Script: http://lua.pastey.net/92634 RAM-map: http://www.datacrystal.org/wiki/3-D_Battles_of_World_Runner%2C_The:RAM_map Still an impressive game.
qfox.nl
1 2
8 9 10
24 25