chanojuano Posted February 24, 2014 Share Posted February 24, 2014 Hola amigos one last question and i wont badder you for a while hopefully i need to know 4 things to make a game, 1 sprites, 2 variables, 3 animation and 4 and most imortant collision detection: in enchant is and very efficient: sprite1.intersect(sprite2);alert("collision"); or sprite1.within(sprite2);alert("collision'); I am sure theres something like it here. in the example file for sprites they all are reference as sprite and then put properties with "this" i dont see an identifier for each thanks a lot for the help and insight Quote Link to comment Share on other sites More sharing options...
enpu Posted February 24, 2014 Share Posted February 24, 2014 Hi, take a look at the simple physics example:http://www.pandajs.net/tutorials/example-3/ Quote Link to comment Share on other sites More sharing options...
chanojuano Posted February 24, 2014 Author Share Posted February 24, 2014 tyvm i miss it, i was just looking at the code in the demos Quote Link to comment Share on other sites More sharing options...
chanojuano Posted February 24, 2014 Author Share Posted February 24, 2014 I dint notice it too Enpu because is about gravity, i am not too advance programer, i like to do more arcade games where i just put .x += speed more simple, i am shure this si simple example for good programers but you are simulating gravity wich is too advance for me, i just thinking about just a little car sprite coliding with another and remove child, so if someone or you has a simple example like this for and old man i will thank you a lot, good night all Quote Link to comment Share on other sites More sharing options...
enpu Posted February 24, 2014 Share Posted February 24, 2014 You can make physics world without gravity like this:this.world = new game.World(0, 0); Quote Link to comment Share on other sites More sharing options...
fuzzee Posted February 25, 2014 Share Posted February 25, 2014 If you don't want to use the physics collision detection directly, you can always borrow this method and implement it yourself.It's very easy to follow what it's doing. :-) https://github.com/ekelokorpi/panda.js/blob/master/src/engine/physics.js#L145 Quote Link to comment Share on other sites More sharing options...
chanojuano Posted February 25, 2014 Author Share Posted February 25, 2014 ty very much, is dooable, but i am gonna stick to enchantjs while theres better documentation i allreaddy put a year on it thank you a lot 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.