Giter Club home page Giter Club logo

maze-project's Introduction

MAZE PROJECT

The Maze is a 3D Maze game that uses ray casting to render a 2D map unto a 3D navigable world!

The Maze was written in C using the SDL2 library. Deveploment was performed using Ubuntu 14.04 LTS - gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

About SDL2

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

Background Context

The goal of this project is to create a game in 3D using the raycasting as the development concept.

Tasks

  1. Walls !
    • In this first part, you’ll have to:
    • Create a window with SDL2
    • Use raycasting to draw walls on your window !
    • You don't need to be able to rotate the camera during the execution in this part, but you must provide a way to change the angle of the camera in your code to see if it works after recompiling it
    • The color of the walls must be different from the color of the ground/ceiling
    • The map doesn’t need to be parsed from a file, but you must provide a way to modify it in your code to see if it works after recompiling it. (e.g. using an array of arrays of integers or characters)
  2. Orientation
      In this part, you must draw a different color depending on the orientation of the walls.
    • You must at least draw walls facing NORTH and SOUTH in a different color from walls facing EAST and WEST
  3. Rotation
      You must provide a way to rotate the camera during the execution.
    • For example, you can rotate the camera when the left,right arrows are pressed on the keyboard
    • Or you can rotate the camera when the mouse moves, just like a FPS game !
  4. Move You must provide a way to move the camera during the execution.
    • For example, you can move the camera when the w,a,s,d keys are pressed on the keyboard
  5. Ouch ! In this part, you must handle the collisions of the player (yes, let’s call the camera player now, it’s getting serious) with the walls.
    • The player must not be able to enter walls
    • You can make the player slide on the walls instead of just stop it
  6. Parser In this part you must implement a parser to get the map from a file.
    • You are free to define the standards of your map (The character for a wall, the character for nothing, the extension of the file if you want, …)
    • Your program will need a parameter to run which will be the path to the map file
  7. Draw the map In this part, you must draw the map on the window.
    • You’re free to draw the map where you want, with the color you want, …
    • You must provide a way to enable/disable it during the execution
    • Include the player’s line of sight in the map
  8. Coding style + Documentation
    • Check if your code fits the Holberton School coding style
    • Check if your code is well documented and respect the Holberton School documentation format
    • You can check all of this by yourself, just follow the instructions on this repository.
  9. Be careful
    • The check will be done on each file present on your turn in repository. Even the files that was not required. So don’t forget to always keep your turn in directory clean.
  10. Textures
    • In this part you have to add textures on your walls !
  11. Multi task !
    • Add a way to move on several directions and rotate in the same time. Basically in this part you’ll have to handle multiple events on the same frame.
    • For example, if the keys to move are w,a,s,d:
    • If the keys w and s are pressed in the same time, the player shouldn’t move,
    • If the keys w and d are pressed in the same time, the player should move forward and right in the same time…
  12. Ground textures
    • In this part you have to add textures on the ground and/or on the ceiling !
  13. Weapons
    • Add weapons textures !
  14. Enemies
    • Add some enemies !
  15. Make it rain
    • Add rain and a possibility to stop / start the rain with a key.
  16. Extra option
    • Shadows, special lightning, etc… get creative!

Instalation

- $ git clone https://github.com/OLLIERANT/Maze-Project.git

Usage & How to Play

- Execute ./maze or type make run
- Use up and down arrow keys to move forward and backward (keys w and s serve the same function)
- Use right and left arrow keys to turn the camera arround (keys d and a serve the same function)

Compilation

- $ gcc -Wall -Werror -Wextra -pedantic ./src/*.c -lm -o maze `sdl2-config --cflags` `sdl2-config --libs`;

Flowchart

Demo

maze-project's People

Contributors

ollierant avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.