Broken Mug Engine

Tell us about your game or application that uses Box2D.
AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Broken Mug Engine

Postby AntonioR » Sun Jul 20, 2014 7:11 am

Hi !

Last October I stumbled upon thecplusplusguy's Box2D tutorials on Youtube, played a bit with the code examples and decided to try to plug it into my older project, which was a 2D demake of Quake 2 made using a heavily modified engine from the book Advanced 2D engine development by J.S. Harbour. Here is a gameplay video from that old project:


http://www.youtube.com/watch?v=9k-N49P5N1I

Image


One thing lead to another and I have written my own OpenGL engine from scratch in C++ with Box2D physics, FMOD sound library, map and 2D model editors and what not.
It's still WIP, but I wanted to share it with you and thank Erin Catto, thecplusplusguy and iforce2D for their great work which made all this possible.


Image


You can check out my engine in this video:http://www.youtube.com/watch?&v=FxEjS5NhZsY

I have also made a blog, so you can check it out:http://antonior-software.blogspot.com/


Image

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Wed Jul 23, 2014 10:42 am

Ragdoll physics:

Image

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Tue Aug 05, 2014 2:51 pm

Using poly2tri to triangulate complex polygons, then using the triangles to form Box2D bodies with multiple fixtures (triangle=>fixture). This way I can have concave polygons too.

Image

http://antonior-software.blogspot.com

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Thu Aug 21, 2014 7:24 am

I made a little demonstration of Worms like destructible terrain made using Box2D chain loops and polygon clipping library called Clipper.

You can download it or read how it's done here:
http://antonior-software.blogspot.com/p/destructible-terrain-worms.html
It's the first public test of my engine, so if you encounter any problems let me know.

Image

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Sat Dec 20, 2014 7:21 am

I uploaded a video showing five scenes with 2D ragdoll physics and some other fun stuff that can be made using Box2D and my editor.

http://www.youtube.com/watch?v=RCBEOd0Frp0

- skeleton flipping/scaling, joint limits
- custom gravity for maps, mouse joint
- skeleton animation to ragdoll transition
- player controlled vehicles (event-action)
- removing bodies and joints in realtime - railgun
- adding joints in realtime - stakegun

You can download it if you want. There are some rendering glitches, that luckily aren't appearing in the video.
http://antonior-software.blogspot.com/2014/12/broken-mug-engine-2d-ragdoll-physics.html

Image
Image
Image

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Thu Mar 05, 2015 1:42 pm

I updated my sensor class (based on Box2D sensors) that keeps track of all the bodies(or fixtures) that are colliding with it. I can override its update method to do stuff with the bodies inside it. I'm using it as a player feet sensor, line of sight, dynamic light and as shown here to apply a force/impulse.

Image

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Wed Mar 18, 2015 2:10 pm

I'm trying to remake a 2d-ish Quake 3 arena map in my Broken Mug engine http://www.youtube.com/watch?v=cNkiVTTVtGI

I made the map:

Image

I'm using poly2tri to triangulate complex polygons, though sharp edges cause the player to get stuck, so I will have to make some changes.

Image

I also made "replay" bots for target practicing...and vice versa:

Image

I just save my input commands in a file, and during the game another player entity reads the file and uses it to control/move itself. Only aiming is "real time". It's good enough to test stuff, and I already discovered a huge physics bug with it. Hopefully it all works now.

Here are some highlights. It's usually me who gets his ass kicked, because bots are always aware of players position. Still need to add explosions and bullet impulse on hit.

Image

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Thu Apr 23, 2015 7:10 am

I finished the prototype, you can check out the video http://www.youtube.com/watch?v=I5iACJYq9qI

More info and download link on my blog: http://antonior-software.blogspot.com/2015/04/sdl-networking-and-multiplayer-test.html

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Tue Aug 25, 2015 3:48 am

I added iforce2d's buoyancy physics to my engine. I use Clipper library to find intersection areas between the fixtures, and I made a class which keeps track of all the fixtures inside the water.

There are some problems when you throw objects into water with great speed. They can start spinning rapidly or even fly out of the water. This happens when lift is turned on. Maybe problem is in force parameters which I haven't tweaked properly ?

https://www.youtube.com/watch?v=-2CzcHcjdSo

AntonioR
Posts: 12
Joined: Sun Jul 20, 2014 6:38 am
Location: Croatia
Contact:

Re: Broken Mug Engine

Postby AntonioR » Sun Oct 02, 2016 4:48 pm

Since the last post I found some other uses for Box2D.

I used it for navigation meshes. The mesh is triangulated and every vertex of a triangle is a node. Every triangle is a Box2D body, so to calculate the path I first check in which triangle/body is my character and the end point, and use the nodes in those triangles as the start/end point for the A* algorithm to calculate the path:

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

I used Box2D for dynamic lights to detect which objects are inside the light area:

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

I also made a particle system that can attach a Box2D body to individual particles:

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


Return to “Games and Applications”



Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest