Skip to content

ioioioio/JeuSynthese

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjetSynthese

This was my final project for my associate degree in Computer Science (December 2017), marking the completion of my first sixteen months of programming experience. It was written over four months with very limited prior knowledge of C or C++ (or Git).

The project is a fully playable first-person shooter (FPS) where the player competes against simple bots on randomly generated maps.

My personal objective was to use a limited set of libraries to gain a deep understanding of how everything works. I used GLFW to manage the window and handle the keyboard, GLAD to load OpenGL's functions, GLM for basic matrix and vector calculus, stb_image to load the textures, and FreeType to display text. This project was heavily influenced by https://learnopengl.com/.

Some shortcuts were taken to deliver a fully playable FPS on time. For example, there is no lighting, the maps are a bit square, and the bots have complete knowledge of the map. However, the physics engine does not depend on the squareness of the maps.

I am not the author of the textures. The credits can be found in source.txt.

The Web Assembly port is an addition from 2024.

Play

Play in browser

Controls

  • A: Move left
  • D: Move right
  • W: Move forward
  • S: Move backward
  • C: Change view (switch between player and bots' views)
  • N: No Clip mode (pass through walls)
  • R: Reload (new game)
  • 1: First type of fire
  • 2: Second type of fire

Images

image1 image2 image3 image4 image5 image6

Building and running

WebAssembly

Dependencies

Emscripten has to be installed

Build

mkdir build
cd build
emcmake cmake ..
emmake make

Launch

  1. Serve the build folder ex: python -m http.server
  2. Open build/JeuSynthese.html with a browser

Linux

Dependencies

The following dependencies are required: dl, GL, glfw3, m, freetype, X11, Xcursor, Xi, Xinerama, Xrandr, Xxf86vm

On Ubuntu:

sudo apt-get install libgl1-mesa-dev libglfw3 libglfw3-dev libfreetype6-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev

Build

mkdir build
cd build
cmake ..
make

Launch

The game has to be launched from the root folder

./build/JeuSynthese

Windows

Dependencies: glfw3, opengl32, freetype271
Libraries: libs
Headers: include

The dll for freetype is included in libs.

The dll for glfw3.dll can be downloaded on http://www.glfw.org/. There is already one included for VisualStudio 2015 64 bit in libs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages