TravorLZH / GLUTCraft

A 3D Minecraft-Like Game developed in C with Freeglut

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GLUTCraft - A 3D Game written in C with Freeglut

preview

This game is inspired by Minecraft, so you can discover some similarities. Just like TravorOS, it is still implementing basic features. Now you can browse the world using the same keys in Minecraft.

Table of Contents

Features

I would like to list my features in this game. The feature list is basically the Work Plan of this game.

Implemented

  • Resize Support The display won't stretch if you stretch the window

  • Moving Camera You can use W, A, S, D to move forward, left, backward, and right

  • Turning Head You can use: , , , and to turn your head to different directions

  • Debug Screen You can press F3 to display data in the display.

  • Turning moving directions The direction of head will decide the direction to move.

  • Crosshair in the center of screen You can see a crosshair similar to Minecraft's in the screen.

Developing

  • Turning head using mouse Your mouse is always centered after pressing M because I am attempting to implement this features.

Installation Guide

To build this game, you need to install the following packages first:

  • FreeGLUT It's necessary because all my code relies on it. Make sure the option FREEGLUT_BUILD_SHARED_LIBS is set to ON. To install it on Debian Linux, you may use the following command.
# apt-get update
# apt-get install freeglut3-dev
  • CMake The building system I use because it supports building on different platforms.

Windows with MinGW

If you are using MinGW, you need to have mingw32-make installed. So type the following to build:

cmake . -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%PREFIX%
mingw32-make
mingw32-make install

Linux

asciinema

You must have build-essential installed. Then type:

cmake . -DCMAKE_INSTALL_PREFIX=$PREFIX
make
make install

About

A 3D Minecraft-Like Game developed in C with Freeglut

License:GNU General Public License v3.0


Languages

Language:C 88.2%Language:CMake 11.8%