AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Demolition physics games12/21/2023 actor_set_angular_velocity (b2_box, deg2rad ( math.random ( 10, 120 ) ) ) actor_set_linear_velocity (b2_box, 0, - 5 ) Sim_time = 0 end if (can_run_simulation = 1 ) then - Reset the position of all dynamic actors - if (reset_simulation = 1 ) then World_y_offset = - 200 - Run a simulatiuon every 1/60 second (sim_dt = 1/60). get_elapsed_time ( ) local dt = gh_utils. Now the physics simulation and Box2D / GeeXLab synchronization. Gh_box2d.actor_set_sleeping_allowed(b2_box, 0) Gh_box2d.actor_set_angular_velocity(b2_box, deg2rad(0.0)) "dynamic", density, friction, restitution) "static", density, friction, restitution)ī2_box = gh_box2d.world_create_actor_box(b2_world, 0, 10, Gh_box2d.world_set_gravity(b2_world, 0, -10)ī2_ground = gh_box2d.world_create_actor_box(b2_world, actor_set_angular_velocity (b2_box, deg2rad ( 0.0 ) ) - Sleeping is not allowed here!!!! y / 2, "dynamic", density, friction, restitution ) world_create_actor_box (b2_world, 0, 10 ,īox_size. y / 2, "static", density, friction, restitution ) - A dynamic box -ī2_box = gh_box2d. world_create_actor_box (b2_world, 0, -ground_size. Ground_size = local density = 0.0 local friction = 0.6 local restitution = 0.1ī2_ground = gh_box2d. world_set_gravity (b2_world, 0, - 10 ) - A static ground. world_init ( ) - Sets the world gravity. init ( ) - Creates a scene (a world in Box2D) -ī2_world = gh_box2d. This demo is equivalent to the Hello World project available with Box2D.Īll Box2D functions are available in the gh_box2d library in Lua and Python. Here is a code snippet of the first Box2D demo (d56-box2d/01/) that shows the basic steps to create a 2D physics world with a ground and a falling box like on this screenshot: To play with Box2D, I prepared two demos, available in the OpenGL 2.1 demopack: Before going further with Box2D, I wanted to see how this physics engine worked and I must say, it works rather fine. This first version of the Box2D plugin is more a prototype than a full featured plugin. Features like convex polygon shaped actors or joints will be added later. Box2D has a simple and neat API and creating the Box2D plugin for GeeXLab took me only few hours including the GeeXLab demo (50% of the time)!Ĭurrently, the Box2D plugin supports only very basic functions: it can create 2D box and disc shaped objects (I called them actors like in PhysX and Bullet plugins), can run a simulation step and properties like density, friction, damping, velocity can be set. Main features of Demolition Physics Editor:The new GeeXLab 0.36.0 comes with the support of Box2D, a 2D physics engine for games. ► Increased damage radius and power of an atomic explosion. ► Change of gravity in a scene in real time. What's New in Version 3.0 ► Demolition Physics Editor with a full user guide. ► An example of creating a custom level for beginners. ► Selection of a background color for the Editor. ► Conversion of mass to kilograms-pounds. ► Convenient control of the scene using 7 cameras. ► Cloning of objects with all parameters. ► Special features of the Editor, which help you to create custom levels. ► The main types of objects can be easily transformed into others. ► Simplified editing of Ragdoll: you can edit it as a simple object. ► Configuration of the physical properties of objects - mass, air resistance, torque, enabling/disabling of gravity, and physics’ disabling for any object. ► Convenient control of objects - move, size, rotation. ► Main features of Demolition Physics Editor: ► Demolition Physics Editor - built-in Editor to create custom levels. At any moment you can save/edit/load created by you levels.Įxperiment with the settings of the physical properties: you can change the settings of gravity, air resistance, mass (weight) of objects, and much more! Special features of the Editor and user-friendly interface will allow you to easily create your own unique levels. Each explosion has its own distinctive features and different impacts on the destruction.ĭemolition Physics Editor is a built-in editor, which allows you to create your own levels quickly and easily. It has complete control over the physical world and the objects it contains, built-in level editor, which allows you to create easily your own game levels! 10 types of explosions: from the fiery trail to the atomic explosion. Demolition Physics is a three-dimensional Simulator with physics of destruction.
0 Comments
Read More
Leave a Reply. |