Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have made games with box2dflash, but how much ever i have wanted to try out the test bed, the resources on the net don't help me. I have a folder called Testbed and various Test???.as files inside it. It would be a great help if somebody could just jot down how the testing of a box2dflash game is done. Thank you

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted
        package TestBed{

            //Do your imports   

            public class TestEmptyTest extends Test{

                public function TestEmptyTest(){
                    //Initialise your objects here
                }

                override public function Update():void {

                    //This is called for you by the Test class
                    //But you call this manually, to keep it syncing
                    super.Update();
                }

            } //TestEmptyTest

        } //TestBed

So, this is JUST the basic test class. If you throw this into the source path of your project, you should have a fully functional testbed test ready to use. If you want to see WHERE the test is added to the testbed itself, see the Main.as file in the root of the examples folder. This powers the TestBed application. More Notably, Look for the following on line 97 :

        var tests:Array = [

You can add your test by class name (TestEmptyTest), and it will show up in their list.

What makes it work?

1) Make sure you have the class path able to see the testbed folder

2) import TestBed.*; will bring the class into the Main.as already

3) creating a new instance of your class. Their framework does this for you, as long as you add it to their array.

Hope that helps!

More importantly, you gave almost no information. Some things you might want to include :

Version of Flex/Flash (And IDE)

Version of box2dflash

Code snippet of what it is that isn't working.

share|improve this answer
    
HEYY...thanks a lott i've been looking for this since months !! –  Vishnu Dec 10 '10 at 9:24
    
Glad to have helped. –  underscorediscovery Dec 23 '10 at 1:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.