O'Reilly logo

Lua Game Development Cookbook by Mário Kašuba

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Box2D with Lua

The Box2D library is a physical simulation engine developed in the C++ language. Fortunately, there's a binding to the Lua language called LuaBox2D. This recipe shows you how to prepare the LuaBox2D library for use in case there's no binary package available for your platform.

Getting ready

The LuaBox2D library uses the CMake building system to accommodate different platform needs. This also makes the preparation process almost painless and automatic. However, there are certain requirements to make this possible.

You'll will need the following:

  • A C++11 standard compliant C++ compiler
  • The CMake build system
  • The Git versioning system
  • The Lua 5.1 development package with header files and linkable libraries

After these requirements are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required