M4KC

Grass block icon

Minecraft 4K - C Rewrite

For those who don't know, Minecraft 4K was a stripped down version of Minecraft submitted by Notch to the Java 4K Game Programming Contest, where each submission had to be under 4 kilobytes in size. Its wiki page can be found here.

Being so small, the game proved somewhat easy to de-compile and edit. Multiple people have given this a go, including me.

This project is an attempt to translate the game into C in order to increase its performance, and to provide a platform upon which to add new features.

Bug list

  • "Sticky" block collision - this behavior is present in the original version and I have been trying to work out ways to fix it for a while.
  • Block outline cuts off at mouse x position.

Goals for this project

  • Maintaining the original look and feel as closely as possible.
  • Keeping the final executable under 10 KB (on Linux, with the system I have set up in the makefile)
  • More blocks
  • Perlin noise terrain generation (water, caves, etc)
  • Infinite worlds, possibly vertically too
  • Mobs and multiplayer (this would require changing the rendering engine to some degree)
  • Day/night??? I don't know whether or not this would change the look or feel too much.

Dependencies

Bare minimum to make this code run

  • SDL2
  • A C compiler

To get it down to a small size, you need

  • gcc (have not tried the flags with other compilers)
  • gzexe

Places

There is a forum thread for this project here

I will be uploading binaries here

Description
Port of M4KC game for KolibriOS: https://github.com/sashakoshka/m4kc/
Readme 6.7 MiB
Languages
C 98.5%
Objective-C 0.5%
M4 0.4%
Shell 0.3%
CMake 0.1%