Nifflas' Support Forum

Being Creative => Nifflas' Sources => Topic started by: AClockworkLemon on February 20, 2010, 01:30:41

Title: Juni's Movement mechanics
Post by: AClockworkLemon on February 20, 2010, 01:30:41
Hiya, I need someone who has Game Maker 8 to help me get juni's movements correct.
Please PM me or post here. Help ASAP would be appreciated! (plus credits for you!)

Oh yeah, I have basically got left/right sorted out, it's the jumping that's giving me trouble.
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on February 20, 2010, 01:47:55
PMO.

[mod]replaced tiny text tag with a more fitting abbr tag. :|[/mod]
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on February 20, 2010, 01:59:57
I realized that, but how can that be translated into a movement engine for game maker?
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on February 20, 2010, 02:07:25
I don't know much about how MMF reads units, or for that matter, that extension, so I couldn't tell you.
Title: Re: Juni's Movement mechanics
Post by: Looki on February 21, 2010, 22:38:34
Oh come on.

180 Max X velocity walking
350 Max X velocity running, 260 with umbrella
700 Max Y velocity
100 X acceleration
50 X deceleration
45 Gravity
500 Jump strength
5 Jump hold strength without hi-jump
22 Jump hold strength with hi-jump
2 Max step up (in whole pixels)
6 Downhill slope correction (in whole pixels)

Measuring in 1/100th of a pixel per game frame (50)
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on February 21, 2010, 22:52:03
Measuring in 1/100th of a pixel per game frame (50)
Well, how was I supposed to know that?
Title: Re: Juni's Movement mechanics
Post by: Looki on February 21, 2010, 23:50:54
It says so in the setup dialog, right below where you input the values.  XD
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on February 22, 2010, 01:17:31
It says so in the setup dialog, right below where you input the values.  XD
Oh, I knew that. :P
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on February 22, 2010, 06:33:46
Wow, thanks. one question, whats velocity in terms of pixels per frame?
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on February 23, 2010, 02:00:16
Going at 180, in terms of 1/100 pixels per frame means you're going 180*1/100 pixels every time the screen reloads, which is about 50 times a second.
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on February 23, 2010, 06:37:47
Now where did I put that calculator......
Thanks!
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on April 03, 2010, 23:43:11
I bring zis thread back from ze dead muhahahahahah! C)p

Ok, I've finally got most of the left/right perfect, and I've got jumping working as well, I just need someone to translate the jumping mechanics mentioned above into something that can be inputted into gamemaker. as in, what does 'jump strangth' mean, etc, etc, etc

Oh, yeah, and how does 45 gravity transfer into game maker? if i set gravity in GM to 45 it makes everything stick to the floor like you've never seen
Title: Re: Juni's Movement mechanics
Post by: LB on April 04, 2010, 04:01:13
*cough* Program a custom movement? *cough*
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on April 04, 2010, 04:27:45
Oh, yeah, and how does 45 gravity transfer into game maker? if i set gravity in GM to 45 it makes everything stick to the floor like you've never seen
GM probably interprets the term 'gravity' differently than the platform movement object does. If it sticks to the floor, the gravity is probably greater than the jump strength in whatever way Game Maker reads them.
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on April 04, 2010, 04:59:56
*cough* Program a custom movement? *cough*

I realize that, and that is what I have been doing. I just need to know how the mechanics translate so that I can set the variables in the ini to replicate KS

in the ini you set multiple variables
walk & run - edit the x-speed of the charachter
jump speed - sets the vspeed (vertical speed) of the charachter when they jump
max jump - sets the max vspeed whilst jumping

plus additional powerups
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on April 04, 2010, 07:41:06
Well, I believe 45 gravity means the character's acceleration is .45 pixels/frame/sec * 50 frames/sec = 22.5 pixels/sec2
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on April 04, 2010, 08:14:37
Well, I believe 45 gravity means the character's acceleration is .45 pixels/frame/sec * 50 frames/sec = 22.5 pixels/sec2
assuming you mean .45 pixels per frame, that makes sense, but where does the 2 come in? (I cant seem to think mathematically ATM)

Also, is it a constant force, or acceleration? I would try to figure this out myself but I don't have MMF2.
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on April 04, 2010, 09:12:56
Acceleration is measured in units/time/time. The frame rate plays a key role in calculation, and that's measured in frames/sec. Now, I had to cancel out the frames, so I put in pixels/frame. I knew there had to be an additional time unit somewhere, so I.. wait. It should actually be:

.45 pixels per (frame)2, where 50 frames = second. Therefore it is:
   .45 pixels/frame2 * (50 frames/sec)2
= 2500*.45 pixels/sec2
= 1125 pixels/sec/sec
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on April 04, 2010, 12:10:43
still not sure what the square is for :P2 And so it IS acceleration?

the way i see it ATM is:
.45 pixels per frame * 50 frames a second = 22.5 pixels per second acceleration
22.5 pixels per second / 30 (Game Maker) frames per second = 0.75 pixels per frame gravitational acceleration using G's inbuilt gravity function.

I don't currently have GameMaker on hand, I will test this theorem tomorrow.
Title: Re: Juni's Movement mechanics
Post by: Dataflashsabot on April 04, 2010, 13:33:00
Sorry for hijacking this thread, but I'm trying to make a platform custom object that has to 'fall' at the same speed as Juni. Can someone spell out for dumbass little me how many pixels per frame this platform should move down per frame, and what I should set as animspeed? Thanks in advance :)
Title: Re: Juni's Movement mechanics
Post by: Purple Pineapple on April 05, 2010, 00:33:45
still not sure what the square is for :P2 And so it IS acceleration?
Have you taken any calc classes yet? Acceleration is a measure of change in velocity. Velocity is measured in units per time. Because acceleration is how much velocity changes over time, it's units per time per time.
Further explanation: http://en.wikipedia.org/wiki/Metre_per_second_squared
Title: Re: Juni's Movement mechanics
Post by: AClockworkLemon on April 05, 2010, 00:52:37
Ok, now i get you. The gravity expressed as .75 in GM's functions seems to work (the correction due to the change in framerates), however if i set the jump strength to the equivalent, it reproduces a high jump, not a normal jump...

And no, I haven't done Calculus  at school yet, we've been focusing on surds, binominal theorem and the various equations of a straight line