• Stars
    star
    1,884
  • Rank 24,614 (Top 0.5 %)
  • Language
    C++
  • License
    Do What The F*ck ...
  • Created almost 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

486 lines of C++: old-school FPS in a weekend

Project based learning: build your own 3D shooter in a weekend

Check the wiki for the detailed description of what is under the hood. Screw the source code, read the wiki.

If you are interested by this project, you might want to check my other tiny* repositories, they were fun for me to make, I hope it will be fun for you to read.


This video shows what lies in this repository: TinyRayCaster

At the time I write this text, the repository contains mere 486 lines of code:

haqreu@daffodil:~/tinyraycaster$ cat *.cpp *.h | wc -l
486

Few things tinyraycaster is NOT:

  • it is NOT a game, it is a mere stub;
  • it is NOT even a 3d engine;
  • it is NOT a place for design patterns lectures;
  • it is NOT a competitor for id Software products. People, please, I am not John Carmack and neither my students are. Focus on the word "initiation".

Few things tinyraycaster IS:

  • it IS fun;
  • it IS a blank you can start from;
  • it IS created in one day, check the commit history. I broke my leg, so I wrote some code instead of walking!
  • it IS a project you can participate to, pull requests are welcome, and anyone can edit the wiki;
  • it IS full of bugs. Bugreports are welcome!

As an example, here are the sources for the game made by my students Salih Nascimento and Stephane Hulot, also check the following youtube video for a preview:

Thanksgiving party

Compilation

sudo apt install -y libsdl2-dev git
git clone https://github.com/ssloy/tinyraycaster.git
cd tinyraycaster
mkdir build
cd build
cmake ..
make

You can open the project in Gitpod, a free online dev environment for GitHub:

Open in Gitpod

On open, the editor will compile & run the program as well as open the resulting image in the editor's preview. Just change the code in the editor and rerun the script (use the terminal's history) to see updated images. Note how awesome Gitpod is, it allows to run SDL2 games directly in the browser!

More Repositories

1

tinyrenderer

A brief computer graphics / rendering course
C++
20,126
star
2

tinyraytracer

A brief computer graphics / rendering course
C++
4,978
star
3

tinykaboom

A brief computer graphics / rendering course
C++
2,345
star
4

triador

Ternary computer emulator
C++
227
star
5

glsltuto

GLSL shaders tutorial
C++
217
star
6

least-squares-course

By a programmer for programmers
TeX
189
star
7

tinycompiler

Writing a compiler in a week-end
Python
96
star
8

hellOGL

Yet another (but better) modern OpenGL hello world
C
82
star
9

sdl2-demo

sdl2 platformer game blank repository
C++
48
star
10

ultimaille

The ultimate mesh handling library
C
47
star
11

tutorials

C++
44
star
12

penny

3 servos, 10 dollars hexapod
HTML
31
star
13

invertible-maps

C++
25
star
14

stlbfgs

C++ L-BFGS implementation using plain STL
C++
24
star
15

neato-xv11-lidar

Protocol description and linux implementation
C++
23
star
16

instantangle

2D mesh deformation interactive demo
C
20
star
17

tinyrenderer-java

Just a java implementation of https://github.com/ssloy/tinyrenderer/wiki
Java
14
star
18

fast-and-tiny

A very basic raytracer in python
Python
10
star
19

QIS

Quasi-isometric stiffening C++ implementation
C++
9
star
20

quadruped

TRIK + dynamixel ax-12a
C++
7
star
21

harlequin

ZX spectrum 48k Harlequin Superfo clone
7
star
22

mathfun

C
6
star
23

winslow2d

Winslow elliptic smoothing for 2d unstructured triangular meshes
C++
6
star
24

ENSG

Support c++ code for lectures on numerical geology
Python
3
star
25

stroll

code example for bachelor programming class
C++
2
star
26

pentominos

L2 programmation avancΓ©e support
C++
1
star
27

ternary

triador hardware
C
1
star
28

NuPogodi

C++
1
star
29

ifs

iterated function systems small programs
C++
1
star
30

jfig2020

rendering contest entries
1
star