» box2d playground
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

box2d playground

demo
Credits: box2d.org and mr. vux for wrapping and help patches.

about

I would like to share with you my ongoing v4 learning project.
It turned out to grow into something like a little box2d sandbox.
It is not that sophisticated and many box2d features are
still missing, so I prefere to call it playground.

Features:
  • Drawing basic shapes in three flavours (Box, Circle, Triangle).
  • Dynamic/static shapes. Density, friction, restitution settings.
  • Mouse interaction with objects.
  • Chaining objects by distance or revolute joint.
  • Deleting objects.
  • Saving/Loading scenes.

There are still many places to improve and change,
but in the end I am pretty happy how it works for now
and hope you like it too and have some fun with it.

Changelog

Ver. 1.1

  • Subpatched all the mess. Should make more sense and be better readable now.
  • Triangles are now made with woei´s mesh join, so each is a subset.
  • Many small changes and optimizations in several places.
  • Added evaluation triggers for some parts that do not need to run all the time.
  • Added revolute joints to create hinge like connections.
  • Runs well in 45beta27.2 and AddOnPack

Ver 1.0

  • Initial release.
  • Runs well in 45beta25.1 and AddOnPack

download

box2d playground_v1.1.zip
18.06.12 [21:16 UTC] by tgd | 2677 downloads
Ver. 1.1
Show 1 older revisions

Older Revisions

box2d playground.zip
06.08.11 [18:13 UTC] by tgd | 1441 downloads
Ver. 1.0

u7angel 08/08/2011 - 12:21

its fun, tomek :)

sunep 08/08/2011 - 12:45

yes, really nice work!

tgd 08/08/2011 - 13:04

glad you like, herr angel.
learned a bunch of stuff again.. cheers
thanks for the kind words sunep

circuitb 08/08/2011 - 13:52

nice box2d demo bravo!

sapo 08/08/2011 - 15:24

great work and idea! not too far to a complete 2d phisics sandbox like phun (now algodoo). after triing it i was wondering about making the text example look like fluid.. some sort of 2d metaballs could do the job maybe? anyhow, nice stuff!

tgd 10/08/2011 - 12:25

thanks guys. I have tried to make fluid but run into few issues. Biggest one seems performance, at least on my PC is not so good. I have tried MetaballsSpreaded tiki-download_file.php?fileId=1609 with about 400 circles. With that much elements it begins to look kind of fluidish, but the framrate goes down quickly. It is not easy to find right settings of the Metaballs to look right too. Second issue is scaling the Metaballs to different aspect ratios of the screen. Have to dig it bit more. The circles do best when having zero friction and about 0,5 restitution. will post the fluidtest next days. seems doable somehow. cheers

title
philip 11/08/2011 - 09:57

looks great.

p.s added only one comment, one like. So nobody entertain suspicion ;)

bo27 20/08/2011 - 14:30

@tgd if have time please contact me. thanks

fibo 29/10/2011 - 21:29

Really nice box2d demo !!

robe 17/11/2011 - 20:20

This one ROCKS!

dannielmach 17/11/2011 - 21:13

fun...:)

tgd 18/06/2012 - 21:53

Updated to 1.1 :)

bo27 19/06/2012 - 00:26

very nice update!

Pi 17/02/2016 - 18:27

Hey there,

I want to use box2D in a project with vvvv_45beta34.2_x86.
I know that the playground contribution is optimized for beta27.2.

Is there any newer version of the contribution?

pechart 13/07/2016 - 11:07

Also looking for a working version. I always have a red R -- world bodies.

tgd 13/07/2016 - 16:22

Just to clarify: This thing relies solely on the awesome box2d nodes provided by vux in the vvvv addonpack. Due to changes in the vvvv core these are unfortunately out of order in the recent vvvv versions. Please see box2d-in-beta34.2-broken. Lets hope there is a chance vux can make them work again sometime.

matka 09/09/2016 - 13:27

+1

anonymous user login

Shoutbox

~6d ago

joreg: END OF SHOUTBOX! As this page has is now legacy, it will no longer feature new content. For latest news, see: blog

~27d ago

joreg: vvvvTv S0204 is out: Custom Widgets with Dear ImGui: https://youtube.com/live/nrXfpn5V9h0

~27d ago

joreg: New user registration is currently disabled as we're moving to a new login provider: https://visualprogramming.net/blog/2024/reclaiming-vvvv.org/

~1mth ago

joreg: vvvvTv S02E03 is out: Logging: https://youtube.com/live/OpUrJjTXBxM

~1mth ago

~1mth ago

joreg: Follow TobyK on his Advent of Code: https://www.twitch.tv/tobyklight

~1mth ago

joreg: vvvvTv S02E02 is out: Saving & Loading UI State: https://www.youtube.com/live/GJQGVxA1pIQ

~1mth ago

joreg: We now have a presence on LinkedIn: https://www.linkedin.com/company/vvvv-group

~2mth ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~2mth ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/