FollowCharacter

Started by Kinoko, Wed 15/02/2006 11:59:22

Previous topic - Next topic

Bernie

You'd have to disable antiglide and set the frame rate so low (10-15 frames?) that it will look like before, then it would technically work.

That would be a little extreme, though. ;)

Kinoko

Hmm :/ Yes. Unfortunately, a little too extreme for me. Turning anti-glide off is bad enough.

In that case, and it's a real pity because I LOVE your code so much, I may have to consider ditching it and going back to square one with the follow problem.

Pumaman

This is an unfortunate side-effect of anti-glide mode in scrolling rooms; you could control the room scrolling manually with SetViewport, but it would have to be cleverly done to eliminate the problem.

Bernie

Aye, it's a toughie. I can't really think of a good way to do this... I've tried to eliminate this in a few older projects already, but all the things I came up with would still look messy for Kinoko's game, especially since the main character would always have to be in focus in a top-down RPG.

Kinoko, you could get your game's movement to look just like in your old demo with a very low frame rate and anti-glide off (I've done it before in Cedric a. t. R., but ditched it because it also affected the mouse cursor), but it would interfere with a lot, like the progressive text code and all the animations you've made so far. Keypresses would probably also be less responsive. It's the only solution I can think of for now. I'm all out of ideas. -_-

A�rendyll (formerly Yurina)

I'll surely try this out, maybe it works with my game.

One question: If I have characters of which all walkframes are at the same height, does it matter or I turn of anti-glide mode? I do this by default, but does it really matter?

Maybe I can think of a way behind all the following trouble this way.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Bernie

Anti-glide mode does only one thing: Update a character's position only when a new frame of it is shown. When anti-glide is off, it will update the position every game loop. The character height shouldn't matter either way. ;)

A�rendyll (formerly Yurina)

So the character will move...?

*has unnoticed n00b sign on her back*
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Bernie

Yep, it will move. The module uses the normal MoveCharacter command (non-blocking c.Walk() in new scripting thingie) command. You just need to make the character settings of the following character (walking speed and so on) the same as for the main character (or whatever will look good), then it should be fine. Let me know if you have any problems with setting it up. PM is fine, too. :)

Pumaman

Yes, the reason for the anti-glide mode is that without it, characters appear to just "glide" across the screen since they are not visually animating when they are moving.

Kinoko

If I turn it off, my characters just fly around the screen like they're running the 100m in the Olympics.

Bernie

That's because your game speed is so high. :)

I made a quick demo using a gamespeed of 12 with anti-glide off:
http://www.origamihero.com/files/app.zip

It looks fine overall but has one small issue: The following character stops for one game loop when a new MoveCharacter command is issued, making him fall behind all the time. That would be reason enough for me not to use it. Looks like yet another idea didn't work out...

A�rendyll (formerly Yurina)

It's really annoying how hard this is.

Isn't it possible to create a code that make the screen in a scrolling room only scroll if the player stands on the edge or something?
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Bernie

Well, I could do Zelda (NES) style scrolling, but that may not be suitable for Kinoko's or your game.

A�rendyll (formerly Yurina)

That's exactly what I was aiming at, Bernie.

My RPG is turn-based, with a different room for the fights. I highly doubt or it matters in my game, but for Kinoko's it would be better to have normal scrolling.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk