Skip to content
/ Cubic Public

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

Notifications You must be signed in to change notification settings

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 (x64)
    Windows (ARM64)

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

  • 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.
  • 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
  • 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

  1. Install Visual Studio with the "Desktop development with C++" component.
  2. Open build/windows/Cubic.sln in Visual Studio.
  3. If needed, upgrade the project's platform toolset to your Visual Studio's available platform toolset.
  4. Select either x64 or ARM64 from the build architecture dropdown menu (top-center).
  5. Select either Debug or Release from the build type dropdown menu (top-center).
  6. 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 for x64 debug/release builds, and build/windows/ARM64/Debug or build/windows/ARM64/Release for ARM64 debug/release builds.

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

  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.