shrujan Posted June 17, 2014 Share Posted June 17, 2014 Hi All, I am currently experimenting with your game Flying Dog and had some issues with it. 1: Is it possible to change the image of the barrier in the game with the one attached with this post and change the way the collision is detected so as to ignore the transparent area in the image rather than finish the game as soon as the flying dog collides with the image? 2: Is it possible to change the background color of the game with an image. Thanks in advance Quote Link to comment Share on other sites More sharing options...
maho125 Posted June 18, 2014 Share Posted June 18, 2014 1. If you want to use complex shapes like shape attached in post above you have to use p2.js physics engine instead of physics engine which is part of Panda framework. Panda physics supports only bodies with basic shapes like rectangle and circle. And also only basic body collisions. Here is thread about p2.js physics plugin for pandahttp://www.html5gamedevs.com/topic/4591-p2js-physics/ and doucmentation for p2.jshttp://schteppe.github.io/p2.js/docs/classes/Shape.html 2. Yes, you can add image background as Sprite or TillingSprite and extend it with parallax effect if you want. But if you have only one colour background is better set scene property backgroundColor to some colour. http://www.pandajs.net/docs/classes/game.TilingSprite.htmlhttp://www.pandajs.net/docs/classes/game.Sprite.htmlhttp://www.pandajs.net/docs/classes/game.Scene.html#property_backgroundColor 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.