Success!!!! Classic RPG movement using MoveIt
using only the MoveIt object and 4 detectors, classic SNES RPG movement like Zelda and Tales of Phantasia is possible.
It is important that the Player Token object (which is what my animated character follows around) is positioned correctly on the 16x16 grid when the frame starts, otherwise collisions go all wrong. (For example X=16n, Y=16m where n,m= any integer number)
enjoy!
here
(PS: something weird, and I'm not sure how to fix it: in fact you have to place Player Token at X:16n-1 , Y:16m I don't know why it needs to be one pixel to the left but there it is)
Re: Success!!!! Classic RPG movement using MoveIt
Edit: You've corrected the url :)
Re: Success!!!! Classic RPG movement using MoveIt
Maybe I'm missing something, but isn't it easier just to move the character a set amount of pixels each direction? Also the characters "space" is rather large and means she can't walk vertically up to a wall, she stops a few spaces early.
If the reason for this was to sort out the height of the wall tiles (as in going infront and behind them), you could simply set them as active objects and then compare the y coordinate of the player compared to them, to see if she should be above or below them. That's always worked for me.
Apart from that it is a rather lovely and smooth movement :)
Re: Success!!!! Classic RPG movement using MoveIt
i downloaded the demo. and my opinion is almost the same of Nick.
isn't easier set "8 moviment direction" and set up to only 4 positions. u will also be able to change the speed of the character.
Re: Success!!!! Classic RPG movement using MoveIt
hi Nick.
Um, is it easier? I don't know. How would you do it? For example the 8 direction movement doesn't 'click' the character into 16x16 pixel distances, it allows her to occupy ANY pixels in between. We don't want that.
Yes the reason is to sort out the height of the wall tiles, and I already asked the forums and was given to understand active objects will consume more resources than just backdrops on a different layer..
And thank you!
Re: Success!!!! Classic RPG movement using MoveIt
no, 8-directional movement with only 4 directions selected doesn't work. We don't want her to be able to move pixel by pixel. Instead, we want her to 'jump' smoothly to the next 16x16 tile.
Re: Success!!!! Classic RPG movement using MoveIt
I didn't actually mean the set "8 direction movement", I meant, in a short example:
When player presses right:
-set variable to 8
When variable greater than 0
-sub 1 from variable
-set player x to player x+1
That would move the player 8 pixels right. Obviously it would have to be a little more refined.
Re: Success!!!! Classic RPG movement using MoveIt
and this gives the same results? Um... wow.
Did I make things complicated!! Could you try it out and tell me?
Re: Success!!!! Classic RPG movement using MoveIt
It does achieve the same results, i was just saying you over complicated it by using an extension that wasn't really needed. I just spent two minutes changing it to show you what i meant if you didnt understand. In my opinion it's just a little neater.
http://www.nicandreb.f2s.com/forumtemppics/rpg_movement2_different.mfa
Obviously with this approach you will have to make active objects to see whether they should be above or below the character.
Re: Success!!!! Classic RPG movement using MoveIt
now i got it. u want a moviment like rpgmaker does.
im doing a point and click rpg (like diablo, where u move your character as long as u keep the mouse button pressed), and forgot of the 16x16 moves :)
Re: Success!!!! Classic RPG movement using MoveIt
Nick, thanks so very much. I did overcomplicate things.
Although, when I tried your example with a step-value of 16 instead of 8 and "SetPosition to PlayerToken -2" instead of -1, it all went wrong.
The result is faulty collisions again :(
My brain is mush right now and I can't figure out the reason. You're such a sweetheart for giving it a try though!
(Note, the reason I changed the numbers was to change the character's speed. Maybe there's another way I could have done that, in your code? By using the MoveIt object I only have to change a value, to change the speed of each step).
Re: Success!!!! Classic RPG movement using MoveIt
Hmm, i just did what you said and it seems fine... here is what i did but it seems the same as what you did really...
http://www.nicandreb.f2s.com/forumtemppics/rpg_movement2_different2.mfa
I also added in the front/back walls to show you how they can be made "3d".
Bare in mind the way you did it in the first place was fine, I'm just showing an alternative :)
Re: Success!!!! Classic RPG movement using MoveIt
Yep it looks cool!
Also, I tend to agree on the active object, but only when it's like that little wall over there, the rest is easily handled by backdrop collision. I'm trying to be conservative with cpu usage, in case I want to add a million special effects later on :)
Also, I know you're not being critical of my method. You should be, though, becuz your way is better and more neat!
kisses and thanks a lot!!!
c
Re: Success!!!! Classic RPG movement using MoveIt
I haven't tried you're examples, but i remember Circy made an RPG example that used fastloops and no detectors.
http://www.klikacademy.com/circy/examples.php
Re: Success!!!! Classic RPG movement using MoveIt
Thanks MrMan! Circy's example turns out to be like Nick's above. It turned out to be less complicated than my solution..
Re: Success!!!! Classic RPG movement using MoveIt
Umm Nick, do you too get the bug where if Player Token is exactly placed upon the grid (instead of 1 pixel to the left) the character cannot move down when her right detector is overlapping an obstacle? What weirdness is this?
Re: Success!!!! Classic RPG movement using MoveIt
No, sorry :(
Either i don't understand or it doesn't do that to me.
If i put the token one pixel left, it still works as well as if it's directly on the grid.
Re: Success!!!! Classic RPG movement using MoveIt
ah! I just figured it out. The green "stoppers" are perceived by the game as being one pixel to the left, when they are right ON the grid.
I don't know why that happens, but moving those one pixel to the right solves the problem
Re: Success!!!! Classic RPG movement using MoveIt
lol I was just about to link to my example... but then I suddenly saw MrMans post ;)
Re: Success!!!! Classic RPG movement using MoveIt
Thanks ChrisStreet :) Your examples are amazing by the way
Re: Success!!!! Classic RPG movement using MoveIt
lol, thanks... I wouldn't go as far to say "amazing" though... they work, and do the job... thats the main thing ;)
There's probably better examples out there.