Home

Awesome

ClassiCube is a custom Minecraft Classic compatible client written in C from scratch.<br>

[!IMPORTANT] ClassiCube is not affiliated with (or supported by) Mojang AB, Minecraft, or Microsoft in any way. <br><br> ClassiCube is not trying to replicate modern Minecraft.<br> It will never support survival, Minecraft accounts, or modern Minecraft servers.

What ClassiCube is

ClassiCube aims to replicate the 2009 Minecraft Classic client while offering optional enhancements to improve gameplay. ClassiCube can run on many systems, including desktop, web, mobile, and even some consoles.

<details> <summary><b>Features (click to expand)</b></summary> </details>

You can download ClassiCube here and the very latest builds here.

classic

enhanced

We need your help

ClassiCube strives to replicate the original Minecraft Classic experience by strictly adhering to clean room reverse engineering approach.

If you're interested in documenting or verifying the behaviour of the original Minecraft Classic, please get in contact on the ClassiCube Discord

How to play

Initially, you will need to run ClassiCube.exe to download the required assets from minecraft.net and classicube.net.<br> Just click 'OK' to the dialog menu that appears when you start the launcher.

Note: When running from within VirtualBox, disable Mouse Integration, otherwise the in-game camera won't work properly.

Singleplayer mode Run ClassiCube.exe, then click Singleplayer at the main menu.

Multiplayer mode Run ClassiCube.exe. You can connect to LAN/locally hosted servers, and classicube.net servers if you have a ClassiCube account.

Stuck on OpenGL 1.1?

The most common reason for being stuck on OpenGL 1.1 is non-working GPU drivers - so if possible, you should try either installing or updating the drivers for your GPU.

Otherwise:

Supported systems

ClassiCube runs on:

And also runs on:

Compiling

Note: The instructions below automatically compile ClassiCube with the recommended defaults for the platform. <br> If you (not recommended) want to override the defaults (e.g. to compile OpenGL build on Windows), see here for details.

Compiling - Windows

Using Visual Studio
  1. Open ClassiCube.sln (File -> Open -> Project/Solution)
  2. Compile/Build it (Build -> Build Solution).

If you get a The Windows SDK version 5.1 was not found compilation error, see here for how to fix

Using Visual Studio (command line)
  1. Use 'Developer Tools for Visual Studio' from Start Menu
  2. Navigate to the directory with ClassiCube's source code
  3. Run cl.exe *.c /link user32.lib gdi32.lib winmm.lib dbghelp.lib shell32.lib comdlg32.lib /out:ClassiCube.exe
Using MinGW-w64

Assuming that you used the installer from https://sourceforge.net/projects/mingw-w64/ :

  1. Install MinGW-W64
  2. Use either Run Terminal from Start Menu or run mingw-w64.bat in the installation folder
  3. Navigate to the directory with ClassiCube's source code
  4. Run gcc -fno-math-errno *.c -o ClassiCube.exe -mwindows -lwinmm
Using MinGW

Assuming that you used the installer from https://osdn.net/projects/mingw/ :

  1. Install MinGW. You need mingw32-base-bin and msys-base-bin packages.
  2. Run msys.bat in the C:\MinGW\msys\1.0 folder.
  3. Navigate to the directory with ClassiCube's source code
  4. Run gcc -fno-math-errno *.c -o ClassiCube.exe -mwindows -lwinmm
Using TCC (Tiny C Compiler)

Setting up TCC:

  1. Download and extract tcc-0.9.27-win64-bin.zip from https://bellard.org/tcc/
  2. Download winapi-full-for-0.9.27.zip from https://bellard.org/tcc/
  3. Copy winapi folder and _mingw_dxhelper.h from winapi-full-for-0.9.27.zip into TCC's include folder

Compiling with TCC:

  1. Navigate to the directory with ClassiCube's source code
  2. In ExtMath.c, change fabsf to fabs and sqrtf to sqrt
  3. Run tcc.exe -o ClassiCube.exe *.c -lwinmm -lgdi32 -luser32 -lcomdlg32 -lshell32<br> (Note: You may need to specify the full path to tcc.exe instead of just tcc.exe)

Compiling - Linux

Using gcc/clang
  1. Install X11, XInput2, and OpenGL development libraries if necessary. <br> For Ubuntu, these are the libx11-dev, libxi-dev and libgl1-mesa-dev packages
  2. Run either:
    • make linux or
    • cc -fno-math-errno src/*.c -o ClassiCube -rdynamic -lpthread -lX11 -lXi -lGL -ldl
Cross compiling for Windows (32 bit):
  1. Install MinGW-w64 if necessary. (Ubuntu: gcc-mingw-w64 package)
  2. Run i686-w64-mingw32-gcc -fno-math-errno src/*.c -o ClassiCube.exe -mwindows -lwinmm
Cross compiling for Windows (64 bit):
  1. Install MinGW-w64 if necessary. (Ubuntu: gcc-mingw-w64 package)
  2. Run x86_64-w64-mingw32-gcc -fno-math-errno src/*.c -o ClassiCube.exe -mwindows -lwinmm
Raspberry Pi

Although the regular linux compiliation flags will work fine, to take full advantage of the hardware:

gcc -fno-math-errno src/*.c -o ClassiCube -DCC_BUILD_RPI -rdynamic -lpthread -lX11 -lXi -lEGL -lGLESv2 -ldl

Compiling - macOS

  1. Install a C compiler if necessary. The easiest way of obtaining one is by installing Xcode.
  2. Run either:
    • make darwin or
    • cc -fno-math-errno src/*.c src/*.m -o ClassiCube -framework Cocoa -framework OpenGL -framework IOKit -lobjc
Using Xcode GUI
  1. Open the misc/macOS/CCMAC.xcodeproj project in Xcode
  2. Compile the project

Compiling - for Android

NOTE: If you are distributing a modified version, please change the package ID from com.classicube.android.client to something else - otherwise Android users won't be able to have both ClassiCube and your modified version installed at the same time on their Android device

Using Android Studio GUI

Open android folder in Android Studio (TODO explain more detailed)

Using command line (gradle)

Run gradlew in android folder (TODO explain more detailed)

Compiling - for iOS

iOS version will have issues as it's incomplete and only tested in iOS Simulator

NOTE: If you are distributing a modified version, please change the bundle ID from com.classicube.ios.client to something else - otherwise iOS users won't be able to have both ClassiCube and your modified version installed at the same time on their iOS device

Using Xcode GUI
  1. Open the misc/ios/CCIOS.xcodeproj project in Xcode
  2. Compile the project
Using command line (Xcode)

xcodebuild -sdk iphoneos -configuration Debug (TODO explain more detailed)

Compiling - webclient

  1. Install emscripten if necessary.
  2. Run either:
    • make web or
    • emcc src/*.c -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_STACK=1Mb --js-library interop_web.js

The generated javascript file has some issues. See here for how to fix

For details on how to integrate the webclient into a website, see here

<details> <summary><h2>Compiling - consoles</h2></summary>

All console ports need assistance from someone experienced with homebrew development - if you're interested, please get in contact on the ClassiCube Discord.

<details> <summary><h3>Nintendo consoles (click to expand)</h3></summary>

Switch

Run make switch. You'll need libnx and mesa

NOTE: It is highly recommended that you install the precompiled devkitpro packages from here - you need the switch-dev group and the switch-mesa switch-glm packages)

Wii U

Run make wiiu. You'll need wut

NOTE: It is highly recommended that you install the precompiled devkitpro packages from here - you need the wiiu-dev group)

3DS

Run make 3ds. You'll need libctru

NOTE: It is highly recommended that you install the precompiled devkitpro packages from here - you need the 3ds-dev group)

Wii

Run make wii. You'll need libogc

NOTE: It is highly recommended that you install the precompiled devkitpro packages from here - you need the wii-dev group)

GameCube

Run make gamecube. You'll need libogc

NOTE: It is highly recommended that you install the precompiled devkitpro packages from here - you need the gamecube-dev group)

Nintendo DS/DSi

Run make ds. You'll need BlocksDS

Nintendo 64

Run make n64. You'll need the opengl branch of libdragon

</details> <details> <summary><h3>Sony consoles (click to expand)</h3></summary>

PlayStation Vita

Run make vita. You'll need vitasdk

PlayStation Portable

Run make psp. You'll need pspsdk

NOTE: It is recommended that you install the precompiled pspsdk version from here

PlayStation 3

Run make ps3. You'll need PSL1GHT

PlayStation 2

Run make ps2. You'll need ps2sdk

PlayStation 1

Run make ps1. You'll need PSn00bSDK

</details> <details> <summary><h3>Microsoft consoles (click to expand)</h3></summary>

Xbox 360

Run make 360. You'll need libxenon

Xbox (original)

Run make xbox. You'll need nxdk

</details> <details> <summary><h3>SEGA consoles (click to expand)</h3></summary>

SEGA consoles

Dreamcast

Run make dreamcast. You'll need KallistiOS

Saturn

Run make saturn. You'll need libyaul

</details> </details> <details> <summary><h2>Compiling - other platforms (click to expand)</h2></summary>

FreeBSD

  1. Install libxi, libexecinfo, curl and openal-soft packages if needed
  2. Run either:
    • make freebsd or
    • cc src/*.c -o ClassiCube -I /usr/local/include -L /usr/local/lib -lm -lpthread -lX11 -lXi -lGL -lexecinfo

OpenBSD

  1. Install libexecinfo, curl and openal packages if needed
  2. Run either:
    • make opensd or
    • cc src/*.c -o ClassiCube -I /usr/X11R6/include -I /usr/local/include -L /usr/X11R6/lib -L /usr/local/lib -lm -lpthread -lX11 -lXi -lGL -lexecinfo

NetBSD

  1. Install libexecinfo, curl and openal-soft packages if needed
  2. Run either:
    • make netbsd or
    • cc src/*.c -o ClassiCube -I /usr/X11R7/include -I /usr/pkg/include -L /usr/X11R7/lib -L /usr/pkg/lib -lpthread -lX11 -lXi -lGL -lexecinfo

DragonflyBSD

  1. Install libxi, libexecinfo, curl and openal-soft packages if needed
  2. Run either:
    • make dragonfly or
    • cc src/*.c -o ClassiCube -I /usr/local/include -L /usr/local/lib -lm -lpthread -lX11 -lXi -lGL -lexecinfo

Solaris

  1. Install required packages if needed
  2. Run either:
    • make sunos or
    • gcc -fno-math-errno src/*.c -o ClassiCube -lsocket -lX11 -lXi -lGL

Haiku

  1. Install gcc, haiku_devel, openal_devel packages if needed
  2. Run either:
    • make haiku or
    • cc -fno-math-errno src/*.c interop_BeOS.cpp -o ClassiCube -lGL -lnetwork -lstdc++ -lbe -lgame -ltracker

BeOS

  1. Install a C compiler
  2. Run either:
    • make beos or
    • cc -fno-math-errno src/*.c interop_BeOS.cpp -o ClassiCube -lGL -lbe -lgame -ltracker

IRIX

  1. Install required packages if needed
  2. Run either:
    • make irix or
    • gcc -fno-math-errno src/*.c -o ClassiCube -lGL -lX11 -lXi -lpthread -ldl`

SerenityOS

  1. Install SDL2 port if needed
  2. Run either:
    • make serenityos or
    • cc src/*.c -o ClassiCube -lgl -lSDL2

Classic Mac OS

  1. Install Retro68
  2. Run either
    • make macclassic_68k (For a M68k build)
    • make macclassic_ppc (For a PPC build)

The PowerPC build will usually perform much better

Other systems

You'll have to write the necessary code. You should read portability.md in doc folder.

</details>

Documentation

Functions and variables in .h files are mostly documented.

Further information (e.g. style) for ClassiCube's source code can be found in the doc and misc folders.

Known compilation errors

Fixes for compilation errors when using musl or old glibc for C standard library

Tips

<details> <summary><h2>Open source technologies (click to expand)</h2></summary> </details>

Sound Credits

ClassiCube uses sounds from Freesound.org<br> Full credits are listed in doc/sound-credits.md