Jump to content

Panda 2 development


Recommended Posts

Hi @enpu


That's awesome and works flawlessly - thank you :)


I've notice a couple more issues with CocoonJS / Canvas+


1. The scale mode doesn't seem to be working properly on Android and Canvas+

It's working fine on iOS and on Android with Webview. On Android with Canvas+ the game is pushed to one side.


2. I seem to be getting a warning - "Not found getElementById: canvas"


***EDIT*** Just double checked this and the scaling seems to be off on IOS as well (when using Canvas+)

Link to comment
Share on other sites

Hi Guys


I haven't used physics until now, but now that I need them, I'm having real trouble getting anything to work in 2.0.


I've looked at the cheatsheet and some of "Simple Physics" examples on Fiddler, but can't seem to get them running within my game.


1. Any chance, anybody has some Simple Physics code snippets/links?


2. Any way to get collision detection with only the pixels of an image and not the alpha channel (as a workaround to physics)?


3. I've tried using the P2 physics plugin, but can't seem to get that working either.


I'm really wanting to learn how to implement physics, but have no idea where to start :(


Thank you very much in advance!

Link to comment
Share on other sites

Hi @enpu


Awesome, thank you heaps for that!


Just a couple of questions -


1. With basic physics, can you only use 'rectangle' shapes or is 'circle' allowed also?


2. Can rectangles be rotated?


3. How would you test for a collision between 2 different objects?


Thanks heaps again, Panda 2.0 is amazing!


PS. More physics examples would be AWESOME :)

Link to comment
Share on other sites

1. Both rectangle and circle shapes are allowed, though there is no hit response for rectangle vs. circle collision (so you have to write that on your own).


2. No. Only AABB collision is supported, use P2 for more advanced physics (i have not yet tested it with Panda 2.0).


3. collide function has parameter for the body that you are colliding with, take a look at documentation of Body and World classes:




Just added debug drawing for circle shapes and added new example on playground:


(includes body damping, random velocity, custom hit response on circle vs rectangle etc)

Link to comment
Share on other sites

Playground is broken :/

Could be cool to be able to set .z position of an object ;)

I thought the playground was broken too, but actually one of the links that enpu put on the previous page doesn't work: http://ekelokorpi.github.io/panda-site/engine/playground/


The working link is almost identical: http://ekelokorpi.github.io/panda.js-site/engine/playground/ . I added in bold the difference. 


Hope that works!

Link to comment
Share on other sites

Hi guys


On iOS Safari, if I turn my phone to landscape, my game goes 'fullscreen'.


Is there anyway, I can prevent the game from re-sizing when I touch the top of the screen and the url bar appears?


I would like to keep the game the same size as when it was fullscreen, with the url bar appearing over it.


Here is a game, that does exactly what I'm trying to do ...




Thank you in advance!

Link to comment
Share on other sites

Hi @enpu


Thanks for looking into it. Also, Skewing - awesome!!


PS. I've noticed you have added some particle examples, which is very cool.


Do you think, (if you have some time) you'd be able to add a couple of examples on particle 'Bursts' (just a single burst instead of a steady stream)?


Thanks heaps again!

Link to comment
Share on other sites

  • enpu unpinned this topic

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.

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.


  • Recently Browsing   0 members

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