Code Monkey home page Code Monkey logo

platform041's Introduction

Platform041

A singleplayer 2D platform game. Inspired by many 2D platformers like Mario, the player controls a stickman which needs to make their way to the finish as fast as possible (with as many points as possible).

To move the player, use the arrow keys. To select an option in the menu and to shoot, use the spacebar.

Build requirements

  • CMake 3.21 or newer
  • C++ compiler (recommended: gcc)

This project uses the CMake tool to compile all of the necessary libraries and source code. To compile, just run the CMake tool via CLI. It is also possible to run the included scripts - build.cmd for Windows (with MinGW installed) or build.sh for Linux. After building, the executable is located in the build folder. Just run build/Platform041.exe or the respective equivalent for other operating systems.

Warning (Linux users): CMake compiles the SFML and JSON library from scratch. For that, you may need to download packages listed in this article. Although on most systems these packages are already present and available, you may need to download them manually i.e. via

sudo apt-get install libpthread-stubs0-dev libgl1-mesa-dev libx11-dev libxrandr-dev libfreetype6-dev libglew-dev libjpeg8-dev libsndfile1-dev libopenal-dev libxcursor-dev libudev-dev libflac-dev libvorbis-dev

Game overview

  • simple 2D platform game written in C++
  • uses SFML library for 2D graphics and nlohmann_json library for parsing JSON configuration files
  • contains multiple levels
  • a level consists of a world (defined in a JSON configuration file) containing some obstacles, collectibles and enemies
  • player's goal is to move the character to the end of the level without dying to enemies and killing obstacles
  • player may collect coins which will define the end score, they are not required to collect them though
  • each level contains a timer which may be either a time limit, or simply a part of their own personal statistics
  • future optional extensions: personal statistics, level statistics, new levels, new types of enemies, ...

For more details, see the docs folder.

platform041's People

Contributors

luk27official avatar

Watchers

 avatar

platform041's Issues

Weird collision detection when jumping

Kdyz se priblizim co nejbliz to jde k prekazce a skocim, tak panacek zustane potom na prekazce, coz nedava moc smysl "fyzikalne". Mel by zase spadnou dolu

Status window + lose window

Similar as you do for winning, I would like to see this windows maybe after every failure. Also, after finishing a level? Also, can you add stats window (at the beginning, you can have a menu -> [levels, stats] or something like that where you can see all the overall stats with names etc...

Cannot compile

Cannot compile under Windows WSL
Error:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindX11.cmake:457 (find_package_handle_standard_args)
  build/_deps/sfml-src/cmake/Macros.cmake:391 (find_package)
  build/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:294 (sfml_find_package)

Please specify all the required libraries in the documentation, I can download if need. Or include into the script

Cmake output: CMakeOutput.log

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.