Jump to content

Can you help provide Test Suite examples?


rich
 Share

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:

http://initialsgames.com/soul/index.php?f=haunting.js&d=haunting

 

Code:

https://github.com/initials/Haunting

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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