Forums

ForumsProgramming Forum

Making a faked physics engine in As2?

Posted Jul 13, '13 at 9:20pm

mightybob

mightybob

351 posts

Thanks i'll try it out.

 

Posted Jul 26, '13 at 3:11pm

mightybob

mightybob

351 posts

Can't get it to work right... Oh well, if my indiegogo campaign is successful I'll just hire a programmer to make all the loop stuff.

 

Posted Jul 26, '13 at 4:10pm

weirdlike

weirdlike

476 posts

Knight

giving up doesn't lead to success. Also you are working on a platform game which has it's own set of difficulties and are shooting for FPA which uses impressive coding in itself

re-posting
Flade
Pixel Perfect Collision Detection

I suggest you save your money and shift to as3. Flex is available and is free

as3 links
Box2D
CDK
APE

 

Posted Aug 2, '13 at 3:00pm

mightybob

mightybob

351 posts

I'd be happy to use flade if you could show me a way to make new objects in it without setting X Y coordinates, size, shape, color, all in the code.

I'd like to be able to make objects on the stage and have flade use those, but if that's not possible then flade / ape won't work fir me... also, does Box2d let you use curved terrain, or only boxes?

 

Posted Aug 2, '13 at 3:02pm

mightybob

mightybob

351 posts

sorry, *won't work for me

 

Posted Aug 6, '13 at 11:46am

weirdlike

weirdlike

476 posts

Knight

I don't normally code with as2 so I am unfamiliar with how flade and PPCD work

mightybob
I'd like to be able to make objects on the stage and have flade use those, but if that's not possible then flade / ape won't work fir me... also, does Box2d let you use curved terrain, or only boxes?

as for as3 I would recommend using CDK, it fits the bill of exactly what you are saying, when you add the MovieClips to CDK it returns the angle of approach then you can make the appropriate calculations. HERE is Oneil's post as an example of how to use CDK. On top of the examples from code.google

joeybetz
I code in AS3 as part of my career, but I've dabbled in few other languages over the years. I use FlashDevelop as my go to programming IDE for AS3. It's free (but you should totally donate) and it's awesome.

Good luck and happy coding though. :D

taken from Betz on Reddit IAmA

FlashDevelop

I hate to sound pushy, but in my opinion as2 is outdated

 

Posted Aug 6, '13 at 2:59pm

mightybob

mightybob

351 posts

Using As3 now, but ran into problems with loading external swfs.

Here's my code:

var loader:Loader=new Loader();

this.addChild(loader);
loader.load(new URLRequest("myfile.swf"));

But that just loads my swf over-top of my current one, but I need it to stop the current swf, and replace it with the newly loaded one. Kinda like loadMovie in As2.

 

Posted Aug 6, '13 at 3:21pm

weirdlike

weirdlike

476 posts

Knight

maybe this...

oldLoader.unloadAndStop();

this.removeChild(oldLoader);

var loader:Loader=new Loader();

this.addChild(loader);
loader.load(new URLRequest("myfile.swf"));

 

Posted Aug 6, '13 at 6:56pm

mightybob

mightybob

351 posts

Thanks, but that's not really what I'm looking for.

I need it to not really load it, but go to the swf... loadMovie pretty much did that, but apparently it's not that easy in As3 :l

 

Posted Aug 6, '13 at 9:14pm

weirdlike

weirdlike

476 posts

Knight

If I am understanding correctly...

//CREATE MOVIE CLIP
var clip:MovieClip=new MovieClip();

//CENTER IT TO STAGE
clip.x=stage.stageWidth/2;
clip.y = stage.stageHeight/2;

//LOAD THE SWF
var loader:Loader=new Loader();
//ADD LOADER TO MOVIECLIP
clip.addChild(loader);
//THIS TOO...
loader.load(new URLRequest("myfile.swf"));

//ADD MOVIECLIP
addChild(clip);

 
Reply to Making a faked physics engine in As2?

You must be logged in to post a reply!