Skip to content

T2SU/cub3d_42

Repository files navigation

cub3d - My first RayCaster with miniLibX

Summary

  • You have to draw a realistic 3D using RayCaster.
  • My cub3D was developed using Metal via mlx, and is only compatible with macOS.
  • Subject

Build & Run

  • To build and run this, you will need a macOS system. (Apple Silicon or Intel)
  1. Clone the repository
git clone https://github.com/T2SU/cub3d_42.git
  1. Navigate to the cloned repository directory and build it. This will create the bonus subject output.
make bonus
  1. Run the game with the bonus map.
./cub3D ./maps/map_bonus.cub

Controls

Function Input
Move W, A, S, D
Aim Mouse move, Keyboard ←→
Fire Mouse left click, Left ctrl
Interact Space
WeaponSwitch 1 ~ 3 (Kick, Pistol, Shotgun)

Cheats

Function Input
Toggle God mode F1
Toggle Infinity ammo F2
Toggle transcendence mode
(Enemy doesn't shoot at the player)
F3
Toggle one shot mode F4

Result

  • Final mark: (115/100)
  • Complete Bonus List: (15/18)
    • Wall collisions.
    • A skybox.
    • Floor and/or ceiling texture.
    • An HUD.
    • Ability to look up and down.
    • Jump or crouch.
    • A distance related shadow effect.
    • Life bar.
    • More items in the maze.
    • Object collisions.
    • Earning points and/or losing life by picking up objects/traps.
    • Doors which can open and close.
    • Secret doors.
    • Animations of a gun shot or animated sprite.
    • Several levels.
    • Sounds and music.
    • Rotate the point of view with the mouse.
    • Weapons and bad guys to fight!

Screenshot

Screenshot1 Screenshot2 Screenshot3

Playthrough Video

Useful links

CREDIT for Library/Utilities/Resources

  • All rights belong to proper right holder.

LIBRARY

MiniLibX by Charlie Root

  • ver. Apple Metal (minilibx_mms_20200219_beta) by Olivier Crouzet ol@42.fr

MIDImyAPP - play/stop utility

SOUND

Music ::

SFX ::

  • Doom - id Software (from doom2.wad)
  • Quake II - id Software
  • Half-life - Valve Software

SPRITE

Burning Drum, Candles, Hud Images, Ammo, Medikit ::

Weapon ::

Money ::

Crosshair ::

Health Bar ::

TEXTURE

Brick (Mandatory Part) ::

Floor, Wall ::

Skybox ::

Door ::

FONT

Modern Society

Nanum Gothic (NHN NAVER Corp.)

About

cub3D raycaster engine for 42 schools subject

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published