Skip to content

Rotating Canvas Games

Menu
  • Games
    • Balloon Shooter
    • Choozak
    • Polar
    • Tap Shoot Zombie!
    • Speedboat Santa
    • Rapid Car Rush
    • Turtle Leap
    • Crossword
  • HTML5 Games
    • Speedboat Santa HTML5
    • Choozak HTML5
  • Blog
  • Tutorials Index
  • About Us
  • Contact Us
  • Privacy Policy & Terms and Conditions
    • Privacy Policy
    • Terms and Conditions
    • Copyright Notice
    • Disclaimer
Menu

Tag: Box2d

Calculate closest point of box2d body in libgdx

Posted on June 8, 2019December 4, 2023 by Rahul Srivastava

In this tutorial we will calculate closest point of a contact of a body from another point in box2d in libgdx. In last two tutorials, one using BoundingBox and other using Raycast we queried box2d to get list of nearby bodies. This was used to imitate explosion effect in libgdx. In bounding box we got…

  • Tweet
Read more

Add Explosion in Box2D using Raycast in libgdx

Posted on June 2, 2019December 4, 2023 by Rahul Srivastava

In the previous tutorial, we added an option to get list of bodies around the player using QueryAABB method present in box2d in libgdx. This method gives list of all bodies in a bounding box. So it is helpful in giving details of bodies in blast radius. Though the issue is that the bounding box…

  • Tweet
Read more

Add Explosion in Box2D using BoundingBox in libgdx

Posted on June 2, 2019December 4, 2023 by Rahul Srivastava

In the previous tutorial we added a rotating shield to our player. The shield object would move in uniform circular speed around the player object. The shield was a kinematic body so that we can set velocity every frame to control its movement. In this tutorial, we will learn how to add an explosion using…

  • Tweet
Read more

Move Box2d Body In Circular Path in Libgdx

Posted on May 21, 2019December 4, 2023 by Rahul Srivastava

Recently there was a need to have a body rotate around another moving body, sort of like a shield. To achieve this functionality, initially we thought of using a revolute joint, available in box2d in libgdx. For revolute joint we would need a base or pivot body around which another body can rotate at a…

  • Tweet
Read more

Edge Shape in Box2d

Posted on March 21, 2013December 4, 2023 by Rahul Srivastava

Hi, We have been working on a new 2d libgdx platformer game for sometime now and it is coming along nicely. While working on it we found the need to add an edge shape rather a rectangle for our platforms. And we found out edge shapes are quite easy to add in box2d. At the…

  • Tweet
Read more

Box2d Revolute Joint Example

Posted on February 15, 2013December 4, 2023 by Rahul Srivastava

Hi, In our upcoming android game we are adding some box2d joints and in this post we would be creating a revolute joint. We are using Libgdx engine to make the game. Below is a screenshot of what  it looks like in game. At the end of the post, you can find the source files…

  • Tweet
Read more

Using Box2d Debug Renderer in Libgdx

Posted on October 8, 2012December 4, 2023 by Rahul Srivastava

This is an update to the older example (“using Box2d in Libgdx”) we put in the post here. We added box2d debug renderer to the code which is very simple to add and useful in seeing how box2d objects look like. In all of our example the objects we create in Box2d are scaled down…

  • Tweet
Read more

Moving Platforms in Box2d in a Specified Path

Posted on May 22, 2012December 4, 2023 by Rahul Srivastava

Hi, In one of the previous post we moved a platform from a point A to point B and then back to point A and so on. In this post we would expand on it and move it in specific path which has more than 2 points which we find in many platformers like mario…

  • Tweet
Read more

Box2d/Libgdx Example Code

Posted on May 8, 2012December 4, 2023 by Rahul Srivastava

Hi, We are uploading source code of a simple box2d-libgdx example. Here is the File In the attachment you would find three projects :- BoxLibgdxExample BoxLibgdxExample-desktop BoxLibgdxExample-android UPDATE :- The example now contains box2d debug renderer also which can be used to render box2d objects. Copy them in your eclipse workspace and import the projects in…

  • Tweet
Read more

Moving Platforms in box2d

Posted on April 30, 2012December 4, 2023 by Rahul Srivastava

Hi, In this post we would me making moving platforms in box2d. In most of the games especially platformers we have these moving objects which would go on a specific direction for a fixed distance and come back. A Static Rectangular Platform: First we will make a simple platform which would be static and can…

  • Tweet
Read more

Posts navigation

  • 1
  • 2
  • Next
©2025 Rotating Canvas Games | Built using WordPress and Responsive Blogily theme by Superb