The Daily Click ::. Forums ::. Klik Coding Help ::. Moving platforms with PMO object
 

Post Reply  Post Oekaki 
 

Posted By Message

JetpackLover



Registered
  01/03/2007
Points
  212
31st October, 2009 at 10:43:17 -

I've always wanted to know how to do this so...

How do you make Platform Movement object work with moving platforms?

For my platforms I am using the bouncing ball movement made by clickteam and for my characters movement I'm using PMO(but you knew that)

Also I modified the PMO to work like an 8 directional movement, so there is 0 gravity and I move up by -150 y velocity and down by +150 velocity.


 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Jess Bowers

Cake > Pie

Registered
  09/01/2009
Points
  310

Has Donated, Thank You!GOTM FEB - 2010 - WINNER!GOTW Winner!
2nd November, 2009 at 20:46:24 -

http://jessandmichelle.com/files/plokey/PlatformMovement-PMO-AssaultAndy.mfa

Coding by Assault Andy. Graphics by me.

 

JetpackLover



Registered
  01/03/2007
Points
  212
3rd November, 2009 at 14:05:18 -

Thanks Jess!!

This is awesome! I love open source!

It also helped me out with my problem.

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


nim



Registered
  17/05/2002
Points
  7233
3rd November, 2009 at 16:28:58 -

Actually I've always wondered - what's the reason for using "virtual" frame size?

Nice example and great graphics, by the way

 
//

JetpackLover



Registered
  01/03/2007
Points
  212
3rd November, 2009 at 16:33:37 -

I've tried changing it and noticed no change. At first I thought it was the amount of gray you get but as far as I can tell that's not it...could be wrong though.

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
3rd November, 2009 at 20:31:35 -


Originally Posted by nim
Actually I've always wondered - what's the reason for using "virtual" frame size?

Nice example and great graphics, by the way


Virtual frame size determines the area in which the camera will scroll. If the virtual frame size is larger than the actual frame size it will scroll into what in the frame editor is the gray area i.e. outside the frame. I could only think of using it to utilize the fact that it will go into areas where events take place as "outside the frame". Things like "Deactivate object when too far from frame" and "Destroy object if too far from playfield" or whatever would still take place in this area. Maybe you could use the frame size for the inside of a building and the outside as a grassy area entrance. It'd make it easier to change things based on if you're inside or outside.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

nim



Registered
  17/05/2002
Points
  7233
4th November, 2009 at 01:54:03 -


Originally Posted by Jon Lambert

Originally Posted by nim
Actually I've always wondered - what's the reason for using "virtual" frame size?

Nice example and great graphics, by the way


Virtual frame size determines the area in which the camera will scroll. If the virtual frame size is larger than the actual frame size it will scroll into what in the frame editor is the gray area i.e. outside the frame. I could only think of using it to utilize the fact that it will go into areas where events take place as "outside the frame". Things like "Deactivate object when too far from frame" and "Destroy object if too far from playfield" or whatever would still take place in this area. Maybe you could use the frame size for the inside of a building and the outside as a grassy area entrance. It'd make it easier to change things based on if you're inside or outside.



That's very useful - thanks. MMF1.5 and TGF used to have a "Play" button that would allow the game to be viewed in the editor window. This was very used for checking what's going on outside of the viewable window. I wonder why it wasn't included in MMF2.

So I now understand what virtual frame width/height is used for. That being said, I'm still struggling to figure out why it's used in the platform engine above. Something to do with resizing scrolling levels to fit the window or something?

 
//

Jess Bowers

Cake > Pie

Registered
  09/01/2009
Points
  310

Has Donated, Thank You!GOTM FEB - 2010 - WINNER!GOTW Winner!
4th November, 2009 at 03:44:58 -


Originally Posted by nim
...I'm still struggling to figure out why it's used in the platform engine above. Something to do with resizing scrolling levels to fit the window or something?



Exactly! I tend to set the Virtual Frame Size in order to resize the frame and keep the ability to scroll. I think there is an extension to accomplish this but this is the poor man's way of getting the job done.

The method is this:
Application
--> Size - 800x600
--> Resize display to fill screen - CHECKED
Frame
--> Size - 400x300
--> Virtual Width/Height - 2000x300

So, the 400x300 viewable frame is resized to 800x600 (keeping its proportions) and the sprite is allowed to explore and scroll through the entire 2000x300 level. I do this because I LOVE LOVE LOVE pixel graphics and want to see them displayed in big, bold proportions. Can I get an AMEN from all you pixel lovers out there!


Edited by Jess Bowers

 

nim



Registered
  17/05/2002
Points
  7233
4th November, 2009 at 05:27:48 -


Originally Posted by Jess Bowers
Exactly! I tend to set the Virtual Frame Size in order to resize the frame and keep the ability to scroll. I think there is an extension to accomplish this but this is the poor man's way of getting the job done.

The method is this:
Application
--> Size - 800x600
--> Resize display to fill screen - CHECKED
Frame
--> Size - 400x300
--> Virtual Width/Height - 2000x300

So, the 400x300 viewable frame is resized to 800x600 (keeping its proportions) and the sprite is allowed to explore and scroll through the entire 2000x300 level. I do this because I LOVE LOVE LOVE pixel graphics and want to see them displayed in big, bold proportions. Can I get an AMEN from all you pixel lovers out there!



That's a nice trick, thanks. The Window Control Object can do this but it's a bit funny (you have to add a little to allow for the window frame etc). In one of my games (falafel) I drew everything in the sprite editor at twice the size. I guess that would be the very poor man's way of doing it..

Also,

Image

 
//

Jess Bowers

Cake > Pie

Registered
  09/01/2009
Points
  310

Has Donated, Thank You!GOTM FEB - 2010 - WINNER!GOTW Winner!
4th November, 2009 at 18:22:18 -

Haha! That's a great "amen".

Also, if anyone decides to use this method for enlarging the screen, you'll need to be aware of a bug in MMF2. To see the bug, do this:

1. Open my MFA above.
2. Open the "Sample" frame in the Frame Editor.
3. Open the Layers Toobar (CTRL+K)
4. Select the layer numbered "1". This is the layer on the bottom. It should have a red lock next to it and be completely empty of objects.
5. Delete that layer! At this point, you should still have all of the objects in the top layer.
6. Run the application (F8 ).
7. Walk the sprite to RIGHT and see what happens.

As you can see, without that second "empty" layer the sprite falls right through the backdrop obstacles. It would appear that without the second layer, the backdrop obstacles are no longer recognized outside of the 400x300 window.

After you do the above, do this:

1. Change the Application size from 800x600 to 400x300.
2. Change the Frame size from 400x300 to 2000x300 (to match the Virtual Width/Height)
3. Run the application (F8 )
7. Walk the sprite to RIGHT and see what happens.

This time the sprite is able to walk on the backdrop without falling through. Pretty strange, eh?

Edited by Jess Bowers

 
   

Post Reply



 



Advertisement

Worth A Click