Skip to content

Mrmayman/openkraft-cpp

Repository files navigation

OpenKraft

Deprecated

This project has been abandoned, because:

  • This code is very poorly written, buggy, unstable and slow. I was an absolute beginner when I wrote it.
  • C++ is an unsafe and error prone language. I am rewriting it in rust.

Feel free to laugh at my code or post it on twitter or whatever, I didn't know much when I made this.

I will not be updating this with anything major. I might come back for occasional fixes but nothing more as the code is fundamentally shit, and no amount of work can fix that.

Description

A basic Minecraft clone in C++ and OpenGL. This project is fully free and open source under the GPL3.

Features

Singleplayer

  • 3D Noise based world generation (only stone)
  • Movement (walking, looking, jumping)
  • Infinite terrain and chunk loading
  • 32x32x32 cubic chunks. (Infinite height limit)

Multiplayer

  • Supports joining Minecraft beta 1.7.3 servers
  • Chunk loading
  • Movement (walking, looking, jumping) (kinda glitchy)
  • Live block changes (If someone places/breaks a block, you will see it)

Disclaimer

This code is very poorly written as I was not experienced in programming when I wrote this. Expect horrible bugs. Currently some chunk packets aren't supported in multiplayer, so the game will randomly close. Just reopen the game when this happens, for the time being. I won't fix this as it's an abandoned project and a rust rewrite is underway.

Building and Support

  • If you're on linux, use one of these build scripts.
  • If you're on windows, I'm sure it will work but you're on your own (this is an abandoned project).

Build scripts

I am aware that a Makefile would have been better, but hey, I knew very little about programming when I made this.

  • compile.sh - Release build, maximum optimizations (linux, x86_64)
  • debug-compile.sh - Debug build, for use with gdb. Memory leak detection included (linux, x86_64)
  • llvm-clang-compile.sh - Release build, compiled with clang (linux, x86_64)
  • profiler-compile.sh - Profiler build. Once you close the game, a profile report profileReport.txt will be created. Useful for analysing the performance.

Just run these scripts, no arguments needed. The executable will be in ./bin/a.out

Required libraries

  • SDL2
  • OpenGL 2.1 (Graphics API) on user system
  • GLEW
  • GLU
  • zlib

About

(ABANDONED) A basic Minecraft clone in C++ and OpenGL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors