I might as well post what I found for this game here knowing I'll probably find some large improvement, demotivating me as a result.
First, the lua script for displaying x/y
memory.usememorydomain("Combined WRAM")
local Player = {ptr = 0x00F678, x = 0x000000, y = 0x000000, speedx = 0x000000, speedy = 0x000000, attention = 0x000000}
function update(name)
if (name == "Player") then
local char = memory.read_s32_le(Player.ptr) - 0x02000000
Player.x = char + 0xE4
Player.y = char + 0xE8
Player.speedx = char + 0xEC
Player.speedy = char + 0xF0
Player.attention = char + 0x706
end
end
while true do
local Player_ptr = memory.read_s32_le(Player.ptr)
if (Player_ptr ~= Player.x-0xE4+0x02000000 and Player_ptr ~= 0) then --this will happen if changed rooms or just started script
update("Player") --placing this here as to not lag my computer :P
end
if (Player.x ~= 0x0) then
gui.text(0,300,"Player:"..string.format('%.6f',memory.read_u32_le(Player.x)/65536.0)..","..string.format('%.6f',memory.read_u32_le(Player.y)/65536.0)..","..memory.read_s32_le(Player.speedx)..","..memory.read_s32_le(Player.speedy))
gui.text(0,60,"Meter:"..memory.read_s16_le(Player.attention))
end
--[[
gui.text(0,75,"Room ID: 0x"..bizstring.hex(memory.readbyte(0x005A94)))
]]--
gui.text(0,90,"Pointer (Player): 0x"..bizstring.hex(memory.read_s32_le(Player.ptr))) --debug--
gui.text(0,105,"Pointer (Player): 0x"..bizstring.hex(Player.attention)) --debug--
emu.frameadvance()
end
I'm aware it's not perfect; namely, the meter on the upper left's address depends on both the pointer + current room. It doesn't change however, unless you reload a room, which annoyingly happens rather often.
Tricks:
1. NoClip state - Rapid fire "A" when you get stunned by Janitors/Black Sheep/Paintballs/Thugs/Footballers/Fans cause you to immediately unstun, without unflagging said state. This has 2 consequences:
a. You can walk through doors, checkpoints, NPCs, and certain objects
b. Since checkpoints and objects like switches won't trigger, you need to lose the state to progress
You can lose it by either restarting the room, or getting hit by lasers, janitors, or fans. You can still get sighted by NPCs, despite them not noticing you if you walk into their cone of vision.
2. End camera movement earlier - Once you hit a switch and the camera moves to the door, as soon as the door opens you can open and close it to immediately gain control again. This is only worth it if the camera moves far away however.
3. Skip dialogue - Press start 2 frames before the screen fades to black; this causes the dialogue to get skipped. Note: This should not be done at the end, since it may make the game stuck.
4. Grabbing items quicker - The items required for 100% are counted as obtained even after getting caught or resetting the room, so if something is far away, it may be better to restart.
5. Ending foodfight early - While the goal is to avoid having 5 people reach the exit, they failed to actually check if that occurred, so as soon as 5 people/sheep reaches the end, you "win" regardless.
6. Messing with the item counter - Using the clipping glitch, you can grab the 100% items from later parts of the stage. It will count as the current one, but if say, 2 unlockables require 15 items (30 total) and you obtained 30/15, the 2nd unlockable is lost forever.
7. Minor movement trick - Moving diagonally makes you move at 204 rather than 272 speed. So if you want for example to move a bit up/down, it is sometimes better to autofire up/down while moving horizontally, since this makes the speed change from 272 to 204 every frame. This is occasionally slower however.
I already have a route for both any% and 100%
http://tasvideos.org/userfiles/info/32497915734308465
http://tasvideos.org/userfiles/info/32505686992981034
But it's not perfect, and likely improvable (the route, not the details). In case anyone wonders, both runs use the clipping glitch, since initial playthroughs seems to indicate not using it would make the run at least 30 minutes longer.
Edit: So uh....
You can clip into the wall here. While it may look useless, turns out if you were to grab 10 picks over here, then use this trick to retrigger the food fight, not only will it count as obtaining 100% on the next guitar, but also resets all of the red picks you've obtained. So, given how incredibly out of way some of the later stages are for 100%, this may actually save time. :)
Edit2: Seems to save ~3,000 frames over doing it normally. :)