https://github.com/senior-sigan/why_cpp
Simple Game Engine in C++ to create Retro games.
https://github.com/senior-sigan/why_cpp
cpp emscripten fantasy-console game-engine gamedev gamedev-framework sdl2 whycpp
Last synced: 3 days ago
JSON representation
Simple Game Engine in C++ to create Retro games.
- Host: GitHub
- URL: https://github.com/senior-sigan/why_cpp
- Owner: senior-sigan
- License: mit
- Created: 2019-01-08T16:45:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-04T15:24:48.000Z (over 5 years ago)
- Last Synced: 2025-03-29T08:32:56.425Z (24 days ago)
- Topics: cpp, emscripten, fantasy-console, game-engine, gamedev, gamedev-framework, sdl2, whycpp
- Language: C
- Homepage: https://senior-sigan.github.io/WHY_CPP/
- Size: 1.44 MB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/senior-sigan/WHY_CPP)
# About
**WHYCPP** is a simple, fantacy-console inspired, library to create pixel-art games.
The main idea behind WHYCPP is to have fun by coding entire game,
without all these fancy features a typical framework offers.# Featues
You can:
- create games in C++, C, JavaScript;
- draw EACH pixel on the screen manually;
- draw primitive shapes;
- load and draw png textures;
- play wav sounds;
- handle keyboard and mouse;
- compile game into Web Page using emscripten.# Requirements
## Windows
On Windows you can only develop using MSYS2 and MinGW.
When you have MSYS2 installed, run these commands to install necessary tools:
```shell script
pacman -S mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_mixer
```## Linux
For Debian-based Linux run these commands:
```shell script
sudo apt install cmake make g++ libsdl2-dev libsdl2-mixer-dev
```## Mac OS
I suppose you have Homebrew installed.
Run these commands:
```shell script
brew install sdl2 sdl2_mixer
```You may need to activate developer tools: `xcode-select --install`
# How to create game?
## For C++
1. Fork template project [WHY_CPP_template](https://github.com/senior-sigan/WHY_CPP_template)
2. Write your code in `src` dir.
3. Just run `make` in the terminal to compile and run. Template is preconfigured to automatically download the latest release of WHYCPP.Or
1. Fork this repository.
2. Create a new dir, for example `game`, with content like we have for `example`
3. Add line to the `CMakeLists.txt`: `add_subdirectory(game)`.
4. If you need, you can add to the `Makefile` new tasks like `example-compile` and `example-run`