Saturday, January 12, 2013

More stuff.

This is something I think we've all wanted to be able to do at some point.  This game is so much more fun to play when your movement isn't restricted by where the other characters are.  The "fix" I'm working on for this has its share of problems (for example, it flips the fuck out when you try to bring up a ring menu for someone offscreen), but I'd like to clean it up and include it as an automated fix... in fact, I think there's already a checkbox for it.

As for the ExHiRom patching, it's giving me an excuse to play through the game again (it's actually been a long time) to fix where it still crashes. I'm at Matango, as you may have guessed from the gif.  It's pretty stable so far and low on non-catastrophic glitches.  The only one I've noticed is some palleting issues with layer 3 (also visible in the gif) but I think this might just be a Snes9x issue.

11 comments:

RetroHelix said...

I first thought about using the function that is used when the party comes together for a jump with the whip, whenever the ringmenu is accessed. But its a bad idea when I think about the battles and casting magic.

Mop said...

I'm thinking about just not letting you open it.. ie add a check to the code that checks whether the character exists when you hit X before opening the menu.

Mop said...

I'll check what they do in SD3 or Secret of Evermore I guess, it's been a while since I've played either one.

Mop said...

Hmm.. well what Secret of Evermore does, apart from having much better pathfinding/prioritization, is if the dog is off screen, it shifts the screen over to him before the menu opens. This is probably going to be a pretty major change to make work for SOM. Looks like 7E00AC-F store the values for where the screen is scrolled to, but 1. changing these shifts the map display all around, and it doesn't recover until you walk way offscreen/change maps, and 2. changing it while the ring menu is open has no effect. These can both be worked around eventually, but I think for now blocking the menu from opening will be good enough.

RetroHelix said...

Blocking the ringmenu is totally fine imo. There would be no use for it anyway if the character is not onscreen. Are there any problems when you switch to a character that is off screen?

really? said...

hmm what about this,

just leave it as it is in the original game, but:

- port the better pathfinding algorithm from evermore. If they didn't edit the tile engine this could be easy. If they expanded the tile engine (eg with a "waypoints for better pathfinding"-feature) porting is nearly impossible.

- change the spots in the map (with your editor ;) ) so this stucking happens less.

I think cutting the rope between the chars causes more problems than it solves.
The ring menu is a problem, this can be solved by avoiding to open it (like you said). But what about other new problems. If you set your chars very aggresiv, the going to attack enemies offscreen and:
- you wait for it (eg if there is a strong enemy in front of you)
- you don't know why they don't come
- you can't help them
- they die
(ok you can switch chars, but this is anoing if you switch all the times to check what they are doing and most of the times, everything is ok)

and another problem with the ring menu:
what is if the chars are at the border of the screen. you think, they are in the screen and you want to open the menu but it's not working (the menu need a litte more space than a char)...this could piss people off. especially on boss fights it is really important that the chars stay together all the time and the ring menu has to work all the time on this fight.

for me this chain between chars was never been a problem. i know the spots where a problem could happen and i avoid them widely. (these are 3 or 4 spots in the whole game)
let's use your editor to clean this areas ;)

and: let's have a look at the evernote pathfinding algorithm or improve the som algorithm on your one.

if you ask me... i'm not going to use this "feature" ... please leave it optional ;)

good work...keep going!!!

(sry about my bad english)

really? said...

and i have an addition to my last post:

what about switching chars?

is this possible?
you say that shifting the map like in evermore for the ringmenu is hard to implement. what about switching to offscreen chars (select button)? you also have to avoid this, cause there you also need to implement a shifting feature.

Mop said...

Switching characters doesn't auto-scroll as you might hope. That's another problem with this that will have to be resolved. The "camera" stays fixed on your previous character or moves a little, meanwhile your player character is way off screen somewhere, and the scrolling breaks horribly (as you press down, it keeps scrolling down, even though your character is way above the screen, for example).

To make this work, playably, I think it will need to be a pretty major hack. I'll need to find the routine that is called when you walk that bumps the screen position over, and use that to move it (rather than setting it directly) since this causes the map to load correctly (whereas setting the value directly introduces BG1/2 graphical shifts). Not sure the restrictions on this loading; maybe I can use it to take one giant "step" all at once.. otherwise I'll need to set a flag and bump it over 16 pixels a frame or something.

Also, directions seem to break when a character is far enough off-screen.. if I walk off to the right, I'll come back and find they've walked all the way to the left to try to find me.

Every such hack/bugfix like this that is developed for the som editor will be optional and default to the original setting.

Mop said...

Hmm, as I sit here pondering, I'm trying to think if maybe there's an existing event or something that shifts the view significantly off the character... something I can reuse code from. The only thing I can come up with is the flammie drum - it shifts the camera way up before it summons him. I might be able to use this.

really? said...

...or the intro...i'm sure it is not prerendered ;)

there are also some "shifts"

and if a char is at a border of the screen and you open the ringmenu then the screen also shifts some pixel. this happens only at the top border, because there has to be some extra space for the info box.

maybe you can reuse the code, maybe not...all the shifts happen when there is noch fight or something is happening. if the "shift-code" sets the engine to a spezial "shife-mode" or something, then there could be more problems.

i'm sure you going to experience more problems...like the new direction bug. what if this is a limitation in the engine?
eg: the horizontal position is one byte. -127 to 128 tiles. if the char is 222 Tiles on the left of the main char the game thinkts the char is on the right. this could not be solved so easily.

don't understand me wrong...do what _you_ want...in my opinion there are some more important things to fix.

Mop said...

I found the code you were talking about, and with some modifications, it may work. It's a subroutine at 00BFA2 that finds the minimum character Y, compares it against the screen scroll, and for certain low differences, it will execute the two-frame subroutine that shifts the view frame up a little bit.

Right now it seems to only be capable of processing two frames, but with a little work it could probably be made to shift around for an arbitrary number.

It might be tricky to get it to be called if you switch ring menus a second time - shifting the screen around tends to have no effect until you close the menu.

I think I might be able to avoid the map layer shifting if I just move by a small amount every frame (they move by 15 pixels maximum).