Public | Automated Build

Last pushed: 3 months ago
Short Description
Build environment for CUGL.
Full Description

Laser Penguins

Note: on iOS the join button on the join screen must be pressed repeatedly with fairly high frequency to actually join a game. We are unclear as to why this is the case.



On Linux, we support Ubuntu 16.04. Run the following command to obtain the required packages.

apt-get install cmake make g++ libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libglew-dev libvorbis-dev

Next, you can build by cd-ing into the repository root directory, and running the following commands.

mkdir build
cd build
cmake ..


On Mac, the project can be built with both the Xcode and make generators using the standard Cmake build process. Make sure to have SDL2, SDL2_image, SDL2_mixer, SDL2_tff, and GLEW installed on the system, such as though Homebrew.


To build for iOS, first make sure that Xcode and cmake are installed on the system, and the additional build files are installed in build-scripts/apple/external (please contact the repository maintainer to download these files). Next, cd into the project folder and run mkdir build-ios and cd build-ios. Next, run cmake in interactive mode with ccmake .. -G Xcode, and run one configure by pressing c. Next, turn on the BUILD\_IOS flag by highlighting it and hitting enter, and delete the CMAKE_OSX_SYSROOT, _dnssd_INCLUDE_DIR, and _dnssd_LIBRARY by highlighting each value and hitting d. Finally, configure twice by hitting c twice, and generate the project files by hitting g. Now the Xcode project files have been generated.

To build the Xcode project, first open the project with open server.xcodeproj. In the server project, open up the server project, and select the example target, and select General. Under identity, change the bundle identifier to be unique for the specific developer (such as com.cuglbuddies.laser-penguins.developer-name). Next under Signing, enable automatic signing and then select a development team. Now, the project is ready to be built by selecting the example target for a specific development device.


To build for android, first download this zip and extract it into the directory build-scripts/android. This should create a new directory called external. From here, you should be able to use the contents of that directory as a normal android gradle project, and either import it into android studio (untested), or build/install on the command line as follows.

./gradlew build
./gradlew installDebug


Running the demo requires you to first run the server on a desktop and then run two clients, either on desktop or mobile.

Running the server on desktop merely requires running the appropriate executable. For example, on Linux, cd into the build directory and run:


Run the client on desktop by starting the example executable, and passing in two command line parameters: The client's outgoing port (must be unique if running multiple clients on the same machine), and the server ip address. For example, you might run:

./example 7001

Once the demo is running, tap the red start square to connect to the server.

To run the demo on mobile, tap the red start square, enter the IP address of the server at the prompt, and press enter to connect to the server.

Once both players have connected to the server, the game session will begin.

At the moment, we recommend that you run the server and two clients on the same LAN. Configurations with NAT are not yet supported.

Docker Pull Command
Source Repository

Comments (0)