Author Topic: how to go to next level? scrolling platformer?  (Read 2008 times)

moscoworbust

  • Guest
I downloaded the script for ez platformer and have had fun adapting it, but...

i can't get it to play a different level when the first is done?

Also, any tips on a scrolling platformer?

DelishusCake

  • délicieux gâteau
  • Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: how to go to next level? scrolling platformer?
« Reply #1 on: Fri, Jul 23, 2010 »
Well, for the first part idk, but scrolling is easy. Just FlxG.follow(Player).

NateTheGreatt

  • Member
  • **
  • Posts: 83
  • Karma: +0/-0
  • smell the sound
    • View Profile
    • n8bit
Re: how to go to next level? scrolling platformer?
« Reply #2 on: Fri, Jul 23, 2010 »
http://flixel.org/forums/index.php?topic=2012.0

also: Where is this EZ platformer setup you speak of?
"A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away."
-Antoine de Saint-Exupery

DelishusCake

  • délicieux gâteau
  • Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: how to go to next level? scrolling platformer?
« Reply #3 on: Fri, Jul 23, 2010 »
http://flixel.org/forums/index.php?topic=2012.0

also: Where is this EZ platformer setup you speak of?

http://github.com/AdamAtomic/ezplatformer/
Its Adam's open-source example platform game.

moscoworbust

  • Guest
Re: how to go to next level? scrolling platformer?
« Reply #4 on: Sat, Jul 24, 2010 »
Hi, thanks for asdvice.

EZPLATFORMER is from adam atomic.

The scroll function. FlexG.follow, that just makes the camera follow the character and you make the level bigger that the size of the screen?


Hectate

  • Active Member
  • ***
  • Posts: 192
  • Karma: +0/-0
    • View Profile
Re: how to go to next level? scrolling platformer?
« Reply #5 on: Sat, Jul 24, 2010 »
Pretty much! Here's an example.

http://www.netlate.com/swf/jumpman.htm
Patience is a Virtue,
But Haste is my Life.

DelishusCake

  • délicieux gâteau
  • Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: how to go to next level? scrolling platformer?
« Reply #6 on: Sat, Jul 24, 2010 »
You need to MAKE the level larger than the screen. Just play with the level code a little bit, add onto it and such. It's not that hard. To restrain the camra to view on the the map, add this:
Code: [Select]
map.follow(0)

zez

  • Active Member
  • ***
  • Posts: 203
  • Karma: +0/-0
    • View Profile
    • Devlog
Re: how to go to next level? scrolling platformer?
« Reply #7 on: Sat, Jul 24, 2010 »
flxg.state = new yournext level.
If you want to be awesome, just restart the playstate, and have the playstate contain multiple levels that get loaded based on a variable. I recommend using flxG.level as the variable, seeing as thats what its there for.

goyourside

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
    • sheepskin boots
Re: how to go to next level? scrolling platformer?
« Reply #8 on: Sat, Jul 24, 2010 »
Thanks for this site very helpful.