FP + Nape tutorial


(Elias) #1

Hey guys, so i learned a lot by using FP and i want to move on by learning Nape. Anyone combined FP with Nape or should i learn a bit of pure Actionscript to achieve this? Is it bad that i cant program in Flash Develop without FP? Should i start learning to use Actionscript by itself? I would like a honest advice, thanks.


(Stefan Langeder) #2

I don’t think there is a tutorial for this, but you can easily combine FP with any other engine like FP.


(Willard Torres) #3

It would be useful to first read the Nape manual, posted here: http://napephys.com/help/manual.html
And what do you mean by “pure Actionscript”? If by that you mean using Actionscript classes such as Sprite or event listeners, then I don’t think so. You would primarily have to know the different components of Nape.

I can’t really create a full tutorial, but here are some reminders:

  1. Each Entity subclass you want to be controlled by physics should have a Body and a Shape member. They should also have access to a Space member owned by the current World.
  2. You should update the x and y positions of an Entity with the correct x and y positions of the Body

Keep in mind that this is how I use Flashpunk with Nape (so far, at least), and there might be a different way to incorporate the engine.


(Ultima2876) #4

You’ll also want to make sure you apply the Nape Body’s angle to the graphic of your entity.


(Elias) #5

I am not really familiar with Actionscript classes as you said, i just wanted to know if would be good to learn something from them not only because i want to use Nape but maybe i can learn something new or usefull. Anyway, you gave me the basic idea, because i didnt know how to combine an Entity with a body. Thanks for the tips :smile:


(Ultima2876) #6

Good idea!

I moved 4 posts to a new topic: The Flash API, What to learn


(Elias) #7

Well played Ultima! :smiley:


(Zouhair Elamrani Abou Elassad) #8

… Great game man , was just wondering if i can have more info about the not included assets, size, sprites and so on … that would be helpful