Ninjadoodle Posted May 27, 2015 Share Posted May 27, 2015 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+) Quote Link to comment Share on other sites More sharing options...
enpu Posted May 27, 2015 Author Share Posted May 27, 2015 1. Seems to be working fine here, except on WebGL. Do you have it enabled? 2. You can ignore that warning Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted May 27, 2015 Share Posted May 27, 2015 Hi @enpu 1. Yup WebGL was causing it 2. Cool Thank you! Quote Link to comment Share on other sites More sharing options...
enpu Posted May 27, 2015 Author Share Posted May 27, 2015 Great, will add issue for that. Does your touch events work correctly on Cocoon Canvas+? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted May 27, 2015 Share Posted May 27, 2015 They seem to work correctly with Canvas+ and WebGL disabled. With WebGL enabled they don't register sometimes (or maybe the positions are off?). Thanks! Quote Link to comment Share on other sites More sharing options...
goide Posted May 30, 2015 Share Posted May 30, 2015 @enpu Panda Engine playground 2.0 develop version. currently not working. Quote Link to comment Share on other sites More sharing options...
enpu Posted May 30, 2015 Author Share Posted May 30, 2015 @goide http://ekelokorpi.github.io/panda-site/engine/playground/ Quote Link to comment Share on other sites More sharing options...
goide Posted May 31, 2015 Share Posted May 31, 2015 @enpu thanks, bro Quote Link to comment Share on other sites More sharing options...
enpu Posted June 2, 2015 Author Share Posted June 2, 2015 Added swap method to Container.Easily swap rendering order of two sprites:var sprite1 = new game.Sprite('panda.png');sprite1.addTo(this.stage);var sprite2 = new game.Sprite('panda.png');sprite2.position.set(50, 50);sprite2.addTo(this.stage);sprite1.swap(sprite2); Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 2, 2015 Share Posted June 2, 2015 Hi @enpu I've been hoping for something like this! This is really useful Thank you! Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 5, 2015 Share Posted June 5, 2015 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! Quote Link to comment Share on other sites More sharing options...
oranjoose Posted June 7, 2015 Share Posted June 7, 2015 Playground appears to be broken again<eom> Quote Link to comment Share on other sites More sharing options...
enpu Posted June 8, 2015 Author Share Posted June 8, 2015 @Ninjadoodle I have changed some default values on physics to make it more clear.Also added basic physics example on playground:http://ekelokorpi.github.io/panda.js-site/engine/playground/#physics_basic Just pull new version from develop branch and try it out. Let me know if that helps you out. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 8, 2015 Share Posted June 8, 2015 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 Quote Link to comment Share on other sites More sharing options...
enpu Posted June 8, 2015 Author Share Posted June 8, 2015 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:http://ekelokorpi.github.io/panda.js-site/engine/docs/classes/Body.htmlhttp://ekelokorpi.github.io/panda.js-site/engine/docs/classes/World.html Just added debug drawing for circle shapes and added new example on playground:http://ekelokorpi.github.io/panda.js-site/engine/playground/#physics_circle(includes body damping, random velocity, custom hit response on circle vs rectangle etc) Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 8, 2015 Share Posted June 8, 2015 Wicked! This helps a lot Thank you again!!! Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 8, 2015 Share Posted June 8, 2015 Hi guys Does anyone know how to get the mouse x and y coordinates inside the scenes 'update' function? Thank you heaps in advance! Quote Link to comment Share on other sites More sharing options...
SkyzohKey Posted June 9, 2015 Share Posted June 9, 2015 Playground is broken :/Could be cool to be able to set .z position of an object Quote Link to comment Share on other sites More sharing options...
oranjoose Posted June 9, 2015 Share Posted June 9, 2015 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! Quote Link to comment Share on other sites More sharing options...
enpu Posted June 9, 2015 Author Share Posted June 9, 2015 Does anyone know how to get the mouse x and y coordinates inside the scenes 'update' function? Save your mouse coordinates from mousedown/mousemove function and then read it from update function? Ninjadoodle 1 Quote Link to comment Share on other sites More sharing options...
enpu Posted June 9, 2015 Author Share Posted June 9, 2015 Playground is broken :/Could be cool to be able to set .z position of an object http://www.html5gamedevs.com/topic/3590-depth-system-in-pixi/ Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 10, 2015 Share Posted June 10, 2015 Thanks @enpu Seems obvious now, haha Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 10, 2015 Share Posted June 10, 2015 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 ... https://td2tl.com/license-html5-games/tower-loot/ Thank you in advance! Quote Link to comment Share on other sites More sharing options...
enpu Posted June 10, 2015 Author Share Posted June 10, 2015 @Ninjadoodle i will take a look at that issue asap. Skewing is now implemented on 2.0 Example on playground:http://ekelokorpi.github.io/panda.js-site/engine/playground/#sprite_skew Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 10, 2015 Share Posted June 10, 2015 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.