Jump to content

Can you help provide Test Suite examples?


Recommended Posts

After the success of getting the code documented I'd like to see if we can replicate this by filling out the Test Suite with lots more examples.


The current tests are all very small and finely honed examples that show off just one or two features of Phaser at a time. The code is clean, compact and mostly commented. A trait that needs to carry on in any new examples provided.


So if you think you can contribute then please post a message here. You can either upload your TS files to this thread or send me github pull requests.


You should try and use assets already provided in the assets folder where at all possible, but if that can't be done then make sure the assets you need to add are as copyright free as possible (I realise that's a bit ironic seeing some of the assets I have in there!)


As before with the documentation I'm happy to pay for any contributions that make it into the test suite. Right now I'm thinking $10 per test, but I'll increase that if they are particularly impressive :)


Any questions? Post 'em up here. If you like you can use the 096 branch in github to work from as quite a lot has changed in it.

Link to comment
Share on other sites

I made a game called Soul Harvester with Phaser. I put the code up here:


It doesn't conform to your specs for a few reasons:

  • Not well commented
  • Uses many assets that aren't already included


Also, it uses many classes that are all defined in the one file. There's got to be a much better way to do that, but I couldn't figure it out. To be honest, it's not the best "example" and I don't want any money for it, but I thought I'd throw it up in case it's useful.


Play it:





Link to comment
Share on other sites

I think anywhere there are lots of 'gaps'. For example there are barely any examples of how to use Groups, yet that's a really quite important feature.


I would say wait until I push 0.9.6 up, as so much has changed in there that most tests need re-writing anyway :)

Link to comment
Share on other sites

  • 4 weeks later...

Hi rich, I come to write tests finally  :P .

Here's a very simple try: https://github.com/pixelpicosean/phaser/blob/097/Tests/cameras/scrollfactor-compare.js

Is this kind of tests helpful?


I see lots of tests have been deleted and so much changes brought to the engine.

Do you need to rewrite tests for some specific features? 


PS. I'm trying to make all the jsdoc work since I prefer javascript to typescript.

Link to comment
Share on other sites

  • 1 month later...
Hi Rich, I've add about 46 tests and send a pull request.


Some tests do not work now since some features commentted such as CameraFX. And some tests should work but still not work because of small bugs. I'm going to try to fix them later both tests and bugs of Phaser.


Although there're 46 tests already done, a lot more parts have not been touched (like the physics and sound).


To everyone who has not tried Phaser I highly recommend it. The upcoming version 1.0 has bunch of powerful and easy to use features supported officially. Hope more developers can help contribute Phaser.
Link to comment
Share on other sites

Have you been creating these based off the 097 branch? (I assume so because I see you fork it whenever I push). If so, this is really exciting, thank you :)


I've been working my butt off getting a new client game ready, but it goes live today so I'll have some time free to finish off 1.0 and get it released into the wild. Then I will keep iterating on that fast, no more huge long waits between releases.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...