Skip to content

vldr/Cubic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cubic


A multiplayer WebGL voxel sandbox game written in C++, inspired by the classic version of Minecraft.

Try it out

Web

You can play the game from the web — cubic.vldr.org

Desktop

Alternatively, you can play the game by downloading the precompiled binaries for your platform:

  • Windows

    Download and unzip all files, then run the Cubic.exe executable.

  • Linux (Ubuntu/Debian)

    Download and unzip all files, then in a terminal, run:

    • sudo apt update
    • sudo apt install libgl-dev libglew-dev libsdl2-dev
    • chmod +x cubic
    • ./cubic
  • MacOS

    Download and unzip all files, then:

    • Move Cubic.app to the Applications folder.
    • Run the Cubic.app application.
    • Go to Apple menu > System Settings > Privacy & Security and allow Cubic.app to run.
  • Android

    Download and unzip all files, then install the Cubic.apk package:

Controls

W and S to move forward and backward.
A and D to move left and right.
V toggles fly-mode.
E or B opens the build menu.

Building

Web

  1. Open a terminal.
  2. Install Emscripten and Make.
  3. Navigate to the build/web/ directory.
  4. Run make -j

After the build process completes, the output HTML, JS, and WASM files will be located in the build/web/output/ directory.

Windows

Note: The included compiled SDL2 and GLEW dynamic link binaries are built for x86_64 machines only.

  1. Install Visual Studio.
  2. Open build/windows/Cubic.sln in Visual Studio.
  3. Optionally, if needed, upgrade the project's platform toolset to your Visual Studio's available platform toolset.
  4. Select either Debug or Release from the build dropdown menu (top-center).
  5. Press F7 or click Build > Build Solution to build the project.

After the build process completes, the output executable will be located either in build/windows/x64/Debug or build/windows/x64/Release depending if you've compiled a debug or release build.

Linux

  1. Open a terminal.
  2. Install clang and Make.
  • On Ubuntu/Debian, run sudo apt install clang build-essential
  1. Install SDL2 and GLEW
  • On Ubuntu/Debian, run sudo apt install libgl-dev libglew-dev libsdl2-dev
  1. Navigate to the build/linux/ directory.
  2. Run make -j

After the build process completes, the output executable will be located in the build/linux/output/ directory.

MacOS

Note: The included compiled SDL2 and GLEW dynamic link binaries are built for x86_64 and arm64 machines only.

  1. Install Xcode Command Line Tools.
  2. Open Terminal.
  3. Navigate to the build/macos/ directory.
  4. Run make -j

After the build process completes, the output executable will be located in the build/macos/output/ directory.

Android

  1. Install Android Studio.
  2. Open the build/android/ directory in Android Studio.
  3. Click Build > Generate Signed Bundle / APK from the top menu.
  4. Select APK and press Next.
  5. For the Key store path entry, select the debug.keystore file located in the build/android/ directory.
  6. For the Key store password entry, enter android.
  7. For the Key alias entry, enter androiddebugkey.
  8. For the Key password entry, enter android and press Next.
  9. Select either release or debug as the variant and press Create.

After the build process completes, the output executable will be located either in build/android/app/debug/ or build/android/app/release/ depending if you've selected a debug or release variant.