Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 3.04 KB

README.md

File metadata and controls

75 lines (55 loc) · 3.04 KB

ELECTRIFIER MAZE

gif cut from game

Table of Content

Introduction

Electrifier Maze is a simple game built using the Raycasting technique. It was built to serve as my portfolio project. I chose this project to because of my curiosity to explore game development. The goal of the game is to find your way from one end of the map (where the player was initially spawned with black walls) to the other end of the map (with white walls).

Prerequisites

  • Debian/Ubuntu or Fedora OS
  • A Bash terminal
  • A user with superuser privilege
  • git - Click this link and follow the instructions to install git on your machine.

This game was built to be compiled and ran on a linux machine only.

Installation

Using a Bash terminal, run the commands after the $ sign below.

  • Clone the repository

     user@user-pc:~/$ git clone https://https://github.com/0xElectrifier/alx-maze_project
     Cloning into 'alx-maze_project'...
     ...
  • Install SDL2 library on your respective machine

     user@user-pc:~/$ ./install_sdl2.sh
     Reading package lists... Done
     Building dependency tree... Done
     Reading state information... Done
     ...
  • Compile the game files

     user@user-pc:~/$ cd alx-maze_project/
     user@user-pc:~/alx-maze_project/$ ./build.sh

Game controls

Used this keys to navigate your way around the game.

Keys Function
w or up arrow Move forward
s or down arrow Move backward
a or left arrown Turn left
d or right arrow Turn right

Tools Used

As part of the project requirement, the game was built using the SDL2 library and Raycasting Technique.

  • ChatGPT: ChatGPT is a language model developed by OpenAI. It generates human-like text responses to text inputs. ChatGPT was used for researching to better understand the Raycasting technique and SDL2 library. It also suggested better ways to implement some designs, like the game map and so on.

  • Raycasting: Raycasting is a rendering technique that creates 3D perspective from a 2D map. The 2D map used in this game is stored in a file, which is then extracted by a function that reads the file line by line and stores each character in a 2D array representing the length and breadth of the map. For more information about Raycasting, click here.

  • SDL2: SDL (The Simple DirectMedia Layer) is a cross-platform development library, designed to allow low level access to audio, video, mouse, keyboard and graphics hardware via OpenGL and Direct3D. SDL2 is the second version of the SDL library. For more information about SDL2, click here.

Contributors