Showing posts with label Box2D. Show all posts
Showing posts with label Box2D. Show all posts

Thursday, September 3, 2015

Marble GP - multiplayer game prototype + source code



Playing with Android, I recently completed a prototype of a simple game involving multiplayer mechanisms.

But before diving into technical details, I suggest you to watch a short demo:


Written in Java using the Android SDK, Marble GP  features:
- physics managed by JBox2D
- a home-made simple 2D Open GL ES 2.0 renderer
- a home-made TCP socket multiplayer system
- a home-made parser for levels importing in SVG format

The Open GL renderer is a direct port of the C++ Open GL ES 2.0 renderer Toto2DEngine I have written for the Raspberry PI. It is primarily a sprite batch renderer working with an atlas texture. It is quite simple to use and you could even build your own high-level graphical 2D API from it.

The client-server system is quite original because the socket server is designed to be run directly by one the devices involved in the game. So the game is self-reliant  in the sense that it doesn't need a central big and expensive distant game server. In other words, the game is local wifi multiplayer.

Finally, I was looking for a very simple way to biuld levels. I didn't want to hardcode my levels by hand, because it is tedious and it rarely gives interesting results. But because it is a prototype, I didn't have the time to code a level builder tool. So I choosed to write a simple SVG parser, generating Box2D primitives from SVG XML files. Always in the way to keep things simple, I have drawn my levels with SVG-edit.


Sources

If you are curious, you can find the sources of my 2D Open GL renderer as well as my core client-server socket classes. They are part of a my new framework Simple-Android.

Tuesday, November 25, 2014

61 Cygni - Game prototype

I hope you will enjoy this new prototype.

Some screen captures:






I built it in 2 months. I used Box2D for physics. I used musics from Super Metroid and sounds from Doom PS1.

I used Daedalus Lib to triangulate automatically the entire level. It made things fast and easy for pathfinding, fast bullet collision detection and fog of war. A great save of time allowing me to focus deeply on gameplay.

I would love to continue the production of that game. If you are producer or publisher, feel free to contact me. We could target Steam as well as mobile platform.

Click below to play the game (fullscreen mode)

Monday, August 11, 2014

Box2D to Daedalus bridge

Things become interesting. Now Daedalus is equiped with 2 new components to cooperate closely with Box2D.

The first is a simple Box2D-body to Daedalus- object converter. It makes things very easy when you want to generate and update a constrained Delaunay triangulation as a mirror of a Box2D world.

The second is more complex. We can see it as a Box2D body object "drived" by the Daedalus pathfinder. It applies Box2D forces to the object to ensure it closely follows a path and reach a destination. This is the first attempt and many other "driver" must be created now according to the nature of the entities we want to simulate (a pedestrian, a car, a spaceship, a robot...).

I hope you will enjoy the demo: