Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

platform game code

Participant ,
Dec 30, 2010 Dec 30, 2010

Hi guys - Been playing super mario bros with the kids (for them of course). I'm a amateur coder but pretty clued up on AS3 - just not with gaming concepts.

I would like like to create a platform game - character jumps, climbs etc... onto platforms over objects etc...

Most coding is quite easy BUT the jumping onto the platform - has anybody got a tut out there. Been googling but fed up with so many bad tuts.

Just a bit of code for hero to land on platform.

Suppose I would just hittest and equte the x coordinates of each etc... But how do I get the hero to stand on the platform not.

Would I just stop the hero falling ie: where the hittest occurs is where the hero will stand. Would that code sit on the hero or on the platforms.

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jan 09, 2011 Jan 09, 2011

it will not cost you much time to learn box2d, specially with WCK.

Translate
Guide ,
Dec 30, 2010 Dec 30, 2010

Best would be you taking a look at box2d:

Alchemy Port of the Original BOX2D: http://www.sideroller.com/wck/

Original port of BOX2D AS3: http://box2dflash.sourceforge.net/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 08, 2011 Jan 08, 2011

Hi - this is too difficult for me as I am an amateur coder.

I would have preferred advice along the lines of x and y positions ie: hitTest on their coordinates and produce an event which seems pretty easy. Don't see why I would need to learn a whole new engine like box2d. I am only looking to knock up a simple platform game - not even scalable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 09, 2011 Jan 09, 2011

it will not cost you much time to learn box2d, specially with WCK.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 09, 2011 Jan 09, 2011
LATEST

OK thanks, I'll try that and I suppose I will learn a lot more.

Cheers

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines