Coder Social home page Coder Social logo

kibotrel / 42-doom Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 3.0 102.8 MB

In continuity of 42-Wolf3D, advanced 2.5D graphics and 3D physics engine.

License: MIT License

Makefile 5.03% C++ 1.49% C 93.48%
c sdl2 sdl2-ttf libao libsndfile graphics physics multithreading game level-editor audio-playback audio-mixer

42-doom's Introduction

42-Doom

CodeFactor

Header

This project was made to learn about graphics and physics engine techniques along with audio play-back and mixing using SDL2, libsndfile and libao.

Install

Works on macOS Mojave 10.14.6 and Ubuntu Bionic Beaver 18.04.4, not sure about portability on other operating systems. This project contains several submodules that you must initialize beforehand :

$> git clone --recurse-submodules https://github.com/kibotrel/42-Doom.git
$> cd 42-Doom && make

If you are running under macOS, you'll need brew installed to compile the project since some dependencies are installed via this package manager.

Usage

Run the program

Once the program is compiled, run it with the following command line :

$> ./doom-nukem

If you don't pass any argument to the program, it will allow you to play in an hard-coded map used as a tutorial that explains some of the mechanics implemented in the engine. You can play any well formatted map by passing it as argument like :

$> ./doom-nukem map.data

Features

This program contains a three different sub-menus accessible through the main one :

  • Game Test-play either the tutorial or any map.
  • Editor Build levels and tweak parameters in real-time.
  • Settings Update game-rules and modify engine's behaviors.

For more information, click on each sub-menu to be redirected on its wiki or here for the main wiki page.

Error management

Whenever one error occurs during the process, it leads to a complete memory free before exit() with an error code and the correct error message displayed on the standard output. You can retrieve the code by running :

$> echo $?

More information available in the Error management wiki page of this project.

Screenshots

Screen2

Screen4

Screen0

Screen1

Screen3

Credits

Ressources

Helpful links

Colaborators

  • @nde-jesu - Editor menu and map generation.
  • @reda-con - Map parsing and user interactions.
  • @lojesu - Texture mapping and settings menu.

42-doom's People

Contributors

kibotrel avatar lojesu avatar nde-jesu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

42-doom's Issues

Incorrect Fall damage

When the player is below altitude 0, jumps at normal height, velocity and gravity will end up causing fall damage anyway.

To-do:

  • Investigate on this behaviour and modify the fall damage algorithm

Document the project

Add details to the Readme and a wiki to explain how to interact with the program.

To-do:

  • Finish README.md with Install process, usage, features, credits and screenshots
  • Build a wiki page for each sub-menu in the program and for error management

Floating point exception in fall-damage calculation

When sector gravity is less than 0.1, a division by 0 occurs due to the fact we multiply this value by 10 and cast it for further calculations.

To-do :

  • Replace gravity variable type by double (previously int)

Remove useless Error-codes

Editor error codes are only replacing the E_MALLOC one so since the triggering behaviour is the same.

TO-DO :

  • Replace E_EDIT_ENTITY, E_EDIT_PORTAL, E_EDIT_SECTOR, E_EDIT_SECT_PORTAL, E_EDIT_TEXT and E_EDIT_VERTEX by E_MALLOC in clean() calls.
  • Put each related message macro to "DEPRECATED".

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.