Box2D physics (revisited)

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ClipArtGuy
Posts: 268
Joined: Wed Aug 19, 2015 4:29 pm

Box2D physics (revisited)

Post by ClipArtGuy »

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: Box2D physics (revisited)

Post by bn »

The video in youtube looks very impressive. Thank you.

Kind regards
Bernd
ClipArtGuy
Posts: 268
Joined: Wed Aug 19, 2015 4:29 pm

Re: Box2D physics (revisited)

Post by ClipArtGuy »

You're welcome. Here's a side-scrolling platformer demo using this extension and library kit and some of kenney.nl's excellent spritesheets,

https://youtu.be/lEPcKremrXU
ClipArtGuy
Posts: 268
Joined: Wed Aug 19, 2015 4:29 pm

Re: Box2D physics (revisited)

Post by ClipArtGuy »

One last demo before I have to slow down. Here is the current state of the platformer demo on youtube:

https://www.youtube.com/watch?v=un8ZZ2mwJQM

It has come quite far. The LCB and libraries have changed since the original links above, so here is the v2 release:

https://github.com/SethMorrowSoftware/B ... ha-Demo-v2

Or you can just download from the repo:

https://github.com/SethMorrowSoftware/Box2Dxt

LCB is in the SRC directory as well as the accompanying xTalk "Kit" (all demos have this baked in)

Libraries will depend on platform and are in the prebuilt directory.

This has almost as much functionality as possible from Box2D via the library/shim and there are many helpful handlers in the kit. This can handle spritesheets, PNG Images, GIFs, LC controls (fields, buttons, etc cannot be rotated, but can fall, bounce, etc)
speedbump1981
Posts: 22
Joined: Fri Aug 08, 2014 7:24 am

Re: Box2D physics (revisited)

Post by speedbump1981 »

This is very cool, nice work!! :-)
ClipArtGuy
Posts: 268
Joined: Wed Aug 19, 2015 4:29 pm

Re: Box2D physics (revisited)

Post by ClipArtGuy »

speedbump1981 wrote: Wed Jun 17, 2026 6:31 am This is very cool, nice work!! :-)
Thanks! Here is a video of the latest revision of the platformer showing off some of what Box2Dxt can do (Running in LIveCode Community 9.6.3). It's got multiple animated sprites, parallax effect, and many other features of the extension and accompanying library across (currently) six distinct levels.


https://www.youtube.com/watch?v=UuVjTJugyxg
Emily-Elizabeth
Posts: 209
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: Box2D physics (revisited)

Post by Emily-Elizabeth »

Video looks good.
ClipArtGuy
Posts: 268
Joined: Wed Aug 19, 2015 4:29 pm

Re: Box2D physics (revisited)

Post by ClipArtGuy »

Emily-Elizabeth wrote: Thu Jun 18, 2026 9:39 pm Video looks good.
Thanks! I haven't had time to check out HXT yet, but if there is a windows and/or linux binary you could point me to, I'd be happy to add it to my testing. Currently I am testing in LCC 9.6.3 and OXT Lite.

All you need to test it yourself is the SRC folder, spritesheets, and platformer demo from the github - build/install the LCB, the correct native lib should be chosen from the code directory for your OS, and then you can paste the platformer demo script from the example directory into a new stack script and send it an opencard in the message box. The stack will ask for the folder containing the spritesheets, which are available in the spritesheets folder in the repo. It will take a minute to build the stack, but once the coins start spinning and the player falls to the ground, it is ready. The current iteration of this demo has a level picker as well, so you can skip ahead to any levels you want. This is very much a WIP, but it has come further and is more responsive that I previously thought possible within an xTalk engine.
Emily-Elizabeth
Posts: 209
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: Box2D physics (revisited)

Post by Emily-Elizabeth »

ClipArtGuy wrote: Fri Jun 19, 2026 12:18 am Thanks! I haven't had time to check out HXT yet, but if there is a windows and/or linux binary you could point me to, I'd be happy to add it to my testing. Currently I am testing in LCC 9.6.3 and OXT Lite.
https://hyperxtalk.com/

We have a sprite engine available too, not sure if you've seen the videos of it or not, but my sample stack is pretty rough compared to what you have.
ClipArtGuy
Posts: 268
Joined: Wed Aug 19, 2015 4:29 pm

Re: Box2D physics (revisited)

Post by ClipArtGuy »

Emily-Elizabeth wrote: Fri Jun 19, 2026 1:52 am https://hyperxtalk.com/

We have a sprite engine available too, not sure if you've seen the videos of it or not, but my sample stack is pretty rough compared to what you have.
Just tested this on windows. For some reason HXT gives errors when building the extension...

Code: Select all

11:36 AM: Compiling module C:/Users/sethc/Desktop/Box2Dxt-main/Box2Dxt-main/src/box2dxt.lcb
11:36 AM: Error: The system cannot find the path specified.

11:36 AM: Error: failed to compile module
11:36 AM: Error: Could not compile module C:/Users/sethc/Desktop/Box2Dxt-main/Box2Dxt-main/src
This works in LCC 9.6.3 and OXT Lite, but throws this error on HXT. Is there something I need to do to package it differently?
Emily-Elizabeth
Posts: 209
Joined: Mon Jan 03, 2022 7:10 pm
Contact:

Re: Box2D physics (revisited)

Post by Emily-Elizabeth »

ClipArtGuy wrote: Fri Jun 19, 2026 4:38 pm Just tested this on windows. For some reason HXT gives errors when building the extension...
This works in LCC 9.6.3 and OXT Lite, but throws this error on HXT. Is there something I need to do to package it differently?
Not too certain. We haven't changed anything with the builder, it's a straight Community Edition version.
Post Reply