Git Product home page Git Product logo

cursor-custodian-wii's Introduction

Cursor Custodian

Cursor Custodian is a game created in 48 hours for the 2020 GMTK Game Jam using C++ and SDL2. It can be played in your web browser here.

Screenshots

Background

Cursor Custodian is a simple endless platformer where you use your cursor to guide the player away from obstacles. The player moves away from your cursor and will jump if you click the left mouse button near him. More information on how to play is available on the game's itch.io page.

Compiling

Windows

After installing Mingw64, SDL2, SDL_Image, SDL_TTF, and SDL_Mixer, execute the following command in the project's root directory:

g++ -c src/*.cpp -std=c++14 -O3 -Wall -m64 -I include -I C:/SDL2-w64/include && g++ *.o -o bin/release/main -s -L C:/SDL2-w64/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer && start bin/release/main

The compiled .exe is located in ./bin. For it to run, you must copy the ./res folder as well as all .dll files from your SDL installation to its directory.

Linux

After installing the dev packages of SDL2 for your distribution, execute the following command in the project's root directory:

g++ -c src/*.cpp -std=c++14 -O3 -Wall -m64 -I include && mkdir -p bin/release && g++ *.o -o bin/release/main -s -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer

The compiled binary main is located in ./bin. For it to run, you must copy the ./res folder to its directory.

Web

Install emscripten and execute the following command in the project's root directory:

emcc src/main.cpp src/entity.cpp src/renderwindow.cpp src/player.cpp src/ground.cpp src/groundtile.cpp -I include -O2 -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s \"SDL2_IMAGE_FORMATS=['png']\" -s USE_SDL_TTF=2 -s USE_SDL_MIXER=2 --preload-file res -o index.html

The compiled .js, .wasm, .data, and .html files are located in the project's root.

Contributing

Pull requests are welcome! For major refactors, please open an issue first to discuss what you would like to improve. Feel free to create a fork of this repository or use the code for any other noncommercial purposes.

cursor-custodian-wii's People

Contributors

polymarsdev avatar tuxinal avatar derchr 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.