Code Monkey home page Code Monkey logo

shoot-them's Introduction

ShootThem!

Quick overview

This is a very simple shooting game I made many years ago. It is written in C++ with Irrlicht game engine and IrrKlang library for sounds. All level models are hand-made, other assets are taken from the Internet.

The version on the master branch has been significantly changed in 2020 for the sake of curiosity.

2006:

back in 2006 game level editor was an FPS camera and one had to press magic keys on a keyboard to place targets on a level, it was very limited in functionality and it does not make any sense whatsoever to even put screenshots here, since it would simply look like a mesh viewer

Screenshot from 2006 Yet another screenshot from 2006

Video on YouTube

2020:

The game now has main menu, end-game screen (although very crude, just a text for the moment being), a proper HUD with images and a more mind-bending post-processing for the "drunken" state of the main character:

Game screenshot from 2020

Game editor now has a proper UI and is generally way more useful, allowing one to move both the objects on the levels, update and remove objects from the level, add lights to the level, save and load different levels from/to files, etc.

Editor screenshot from 2020 Yet another editor screenshot from 2020

Video on YouTube

Build

Use CMake:

  1. (optional) clean the build directory:
cmake --build build --target clean
  1. configure the build files:
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_HOME/scripts/buildsystems/vcpkg.cmake
  1. build the editor and the game:
cmake --build build --config Release

Updating the dependencies

After making changes to the dependencies, make sure to update the builtin-baseline in the vcpkg.json file so that vcpkg does not install wrong versions of the dependencies. This could be done with vcpkg x-update-baseline.

TODO

Game

  • remove implicit namespace imports
  • replace explicit colors with named constants
  • replace raw pointers with smart pointers
  • fix wobbling effect
  • record a video (https://youtu.be/m65z9kvWdYA)
  • fix timer speed
  • display endgame screen with high scores ¯\_(ツ)_/¯
  • import each scene from a scene file rather than DAT files with questionable undocumented format
  • load game settings from a separate file rather than being hard-coded vector population code O_o
  • add splash screen
  • encapsulate logic in classes
  • ResourceManager is redundant
  • clean up the design - InputHandler (aka dispatcher) is probably redundant, GameState (aka state) should be read-only, maybe extract event / action queue to a separate class
  • rework the abuse of std::shared_ptr and raw pointers (according to https://www.internalpointers.com/post/move-smart-pointers-and-out-functions-modern-c and https://www.modernescpp.com/index.php/c-core-guidelines-passing-smart-pointer)
  • two targets on 3rd level are indestructable
  • when the time runs out the next level is not loaded
  • add end level menu
  • replace existing 3D models with the new artwork (TBD)
  • change the default GUI theme
  • do not use exceptions (https://google.github.io/styleguide/cppguide.html#Exceptions)
  • new game in the middle of the game should reset everything
  • properly copy resources to the directory with the binary
  • copy the DLLs to the directory with the binary
  • replace status text with some sane HUD
  • add settings menu
  • write settings to file
  • read settings from file
  • bring the sound back
  • replace level meshes with OBJ
  • replace level meshes with Collada
  • update font in menu
  • load UI from file
  • use shader for the post-processing ("drunk" effect)
  • clamp the rendered picture so there are no artifacts (mb zoom the quad a bit)
  • fix collision detection - potentially the ray overlaps the rendering quad first and hence no collisions with targets are detected (either hide the quad or start ray a bit further from the camera)
  • add hints for controls to the first level

Editor

  • add UI
  • manage targets with UI elements, not keyboard and mouse click
  • display the structure of a level in UI
  • add multiple levels in one run
  • allow for level removal
  • remove targets
  • change target position
  • place target in front of camera instead of in place of camera
  • replace FPS camera with mouse-controlled one
  • add helpful help in UI
  • update the default low-res font with something more readable
  • make button icons use transparency
  • prevent game manager window from closing
  • save file dialog does not pick up non-existent files
  • use mesh filename when adding game manager tree node
  • store level mesh in level object
  • load level mesh when switching levels in manager
  • camera can not be controlled with keyboard
  • when loading levels file, load models from the same directory
  • create custom camera animator to control camera with both keyboard and mouse in a reasonable way
  • create custom file dialog to allow saving files
  • manage lights
  • refactor Light and Target on level to Entity
  • add & manage properties for level entities (?)
  • render AABB around selected entity
  • draw axes to allow for translation of entities
  • set ambient light so that levels are not pitch black
  • do not hide scene nodes - drop them; but first figure out why that causes runtime exception
  • replace mouse wheel for moving camera back/forth with Shift + Mouse Right Button + Mouse Move
  • camera translation does not work in current camera plane, but rather in initial
  • moving selected entity relies on the absolute offset, whilst it should rely on relative offset instead
  • load UI from file

Miscellanious

  • extract level reader & writer into separate library
  • update Irrlicht
  • replace Irrlicht with Ogre (?)
  • add github releases
  • document progress
  • add screenshots to github page

shoot-them's People

Contributors

shybovycha avatar

Watchers

 avatar  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.