Skip to content

An entry game for the Raylib 5k Game Jam written in C++ on top of Raylib.

License

Notifications You must be signed in to change notification settings

gulrak/lostcolonies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lost Colonies

An entry game for the raylib 5k gamejam written in 8 days (2022-01-21T19:00Z to 2022-01-29T19:00Z) on using C++ on top of Raylib.

The Story

In the year 2374 humanity has reached for the start and colonized many worlds. They believed to be alone in the universe but that year proved them wrong!

It was the year humanity crossed path with the alien group they named Cicadas, as science revealed they where dormant for a few thousand years but reappeared and claimed their area of space back.

Humanity fought hard, but failed, so they decided to evacuate those colonies and you are chosen to protect their retreat...

Controls

Currently the game only supports keyboard control:

  • SPACE - fire your weapon
  • LEFT or A - move to the left
  • RIGHT or D - move to the right
  • M - mute or unmute audio
  • P - pause the game

Technical Details

First of all, the code is a mess, this is a gamejam project written in 8 days using only One weekend and the evenings of six normal work days. The closer the deadline, the dirtier the hacks. But that was to be expected.

Lost Colonies was developed on macOS and tested as native application and compiled via emscripten on a few browsers. I see no reason it would not work on as native game on Windows and Linux too, but I didn't test during the gamejam crunch time.

Compiling from Source

Lost Colonies uses CMake as a build solution. To build it, checkout or download the source.

Linux / macOS

Open a terminal, enter the directory where the code was extracted and run:

cmake -S . -B build

to configure the project, and

cmake --build build

to compile it.

Build for Web

cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=<path-to-emsdk>/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
cmake --build build

Used Resources

  • raylib - the fun game programming library that inspired me to write this.
  • rFXGen - A sound effects generation tool, modified a bit for this event
  • raygui - A raylib companion library for ui widgets, used in generator tooling
  • dm_property_list.h - A helper header from the raygui examples, modified for some visual changes and issues compiling in under C++

Generated Sounds

From the start on I decided to try and generate my assets procedurally, I found Raylib last year and wanted to do something with it, and I liked the rFXGen tool that is a descendant of sfxr.

Procedural Sprites

The sprites (aliens, the aliens bom, the players ship and the colony ship) are all generated by an algorithm derived from the works of Zelimir Fedoran and David Bollinger extended and modified to allow varying dimensions and produce more colorful pixel graphic style alien sprites.

Sample Aliens

The hex codes above those sprites are the seed values for the generator to reproduce the alien underneath.

PRNG

The base of pseudo random numbers is an implementation of xoroshiro128++ seeded via splitmix64 based on public domain code from Sebastiano Vigna (vigna@acm.org) and David Blackman.

The Future of this Project

I sure need to catch up a bunch of hours of sleep and some days, maybe weeks distance to continue to work on this, but the game is missing several features and details I wanted to add and I plan to take my time to clean up the code, refactoring the cluttered game logic, write tests and hope to make it an actual helpful project, not only as a game.

Screenshots

Title Screen

Lost Colonies Title Screen

Colony to be Evacuaded

Lost Colonies Title Screen

Fighting the aliens

Lost Colonies Title Screen

About

An entry game for the Raylib 5k Game Jam written in C++ on top of Raylib.

Resources

License

Stars

Watchers

Forks

Packages

No packages published