Jump to content

maho125

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by maho125

  1. maho125

    Box2D

    @empu great job. Box2d is a classic
  2. Integrated physics engine in Panda supports only basic shapes like rectangle, circle and line. If you need more complex shapes you need use some plugin like p2.js physics or box2d. Check panda plugin section http://www.html5gamedevs.com/forum/21-plugins/
  3. Some examples with physics and collisions you can find here: http://www.demos.tomasmahrik.com/physicsdemo1/ http://www.demos.tomasmahrik.com/physicsdemo2/
  4. @pinkpanther You're welcome. But if you want better physics in your game I recommend you use p2 physics. @empu made a plugin for p2 physics. More info you can find here http://www.html5gamedevs.com/topic/4591-p2js-physics/
  5. Try modify update functions like this: Enemy //this.body.position.x += this.speed * this.acceleration;this.body.velocity.x = this.speed * this.acceleration;Projectile //this.body.position.y += this.speed * this.acceleration;this.body.velocity.y = this.speed * this.acceleration;
  6. Pls post here update function for both bodies. Projectile it's quite small so for testing purposes set his width to more pixels (for example 10px). And try to add to your project URL this parameter ?debugdrawIt helps you to check if movement of your bodies is updating because I suspect that you update only position of sprite. And where you define indexes for collision groups (friend,enemy)? Test if indexes of collision groups are not null.
  7. At first in init method define some shape for body. var width = 100;var height = 50;this.shape = new game.Rectangle(width,height);this.body.addShape(this.shape); And also you need to add body to world. game.scene.world.addBody(this.body);If you want also visual representation of body you have to add sprite to scene and in update method assign to sprite current position and rotation of body. Easy example of collision detection in Panda.js you can find here: http://www.demos.tomasmahrik.com/physicsdemo1/
  8. 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 panda http://www.html5gamedevs.com/topic/4591-p2js-physics/ and doucmentation for p2.js http://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.html http://www.pandajs.net/docs/classes/game.Sprite.html http://www.pandajs.net/docs/classes/game.Scene.html#property_backgroundColor
  9. @enpu Thanks. It's quite easy to make games with great engine:)
  10. @enpu great work! I'll try new features ASAP
  11. @boostk Thanks for your feedback, I'm planning some changes in gameplay and some optimization for mobile devices so I'll send some post about game update soon.
  12. @fuzzee Thanks for screenshots I'm planning to fix it. Also I have some ideas to make gameplay more fun and challenging so I have to find some free time for changes.
  13. Hi suntemple, there isn't any allowed area where the blocks can be put next to each other. So it's bug I will check it. And yes there is difference in bricks they have different mass value. But I plan to change to bigger value because now it seems that there isn't any difference . Thank you for feedback.
  14. @Zef Thanks @Totor which iOS device did you use? I tested it only on Desktop, iPad2 and iPad4 and it works ok. On phones with small resolutions can be problems with size of textures because game is not optimalized for phones only for tablets/desktop. But if I will have some free time I will make optimalization also for phones.
  15. Hi, I'm newbie in development of games in HTML5. During this weekend I made my first HTML5 game with Panda game engine. It's quite simple, your goal is to build the tallest tower from various bricks and let building stands as long as possible. Game using p2.js plugin for physics. You can play it here: http://crazybricks.clay.io Thanks to @enpu for great work around Panda engine.
  16. Hi, during this weekend I made my first HTML5 game with Panda game engine. It's quite simple, your goal is to build the tallest tower from various bricks and let building stands as long as possible. Game using p2.js plugin for physics. You can play it here: http://crazybricks.clay.io Thanks to @enpu for great work around Panda engine.
  17. @anglekom I'm using tap/click and also mousemove events on scene object and it works for me. I'm using version 1.4.0 of Panda engine. Try to use this structure: Scene = game.Scene.extends({init : function(){ //your code},click: function(mouseData){ //your code},tap: function(touchData){ //your code},mousemove: function(mouseData){ //your code},mousedown: function(mouseData){ //your code},mouseup: function(mouseData){ //your code}});
  18. @i3Designer check my game prototype which I made with panda. I'm using there keyboard events for moving of main character so maybe it helps you as a starting point Here is game: http://www.demos.tomasmahrik.com/physicsdemo2/ Source code is here: https://github.com/maho125/JumpingDragon
  19. Hi @airpower58, look at this. Maybe it helps you http://www.demos.tomasmahrik.com/physicsdemo1/
  20. Try this if(this.body.position.y>750){ this.sprite.setTexture('caida');}
  21. @enpu I know. I had same problem as described above @rexternberg so I made some exploration in engine code and found reason where is the problem. I'm new in HTML5 gaming so now I'm trying some HTML5 engines and I have to say that your engine is my favourite for now. Very understandable code and nice examples. Great job!
  22. I think that in engine is now missing solution of hitResponse for case when collide circle with rectangle. If you will look in physics module and you focus on class game.CollisionSolver (exactly hitResponse method on line 258) you will see that there is code for collision between two rectangle bodies and two circle bodies but missing for combination of rectangle and circle body and also for line body. So probably there is your problem I think.
×
×
  • Create New...