Skip to content

Now bearriver also has an arcade! Games I made while learning haskell gamedev using Bearriver/Yampa, SDL and more.

Notifications You must be signed in to change notification settings

walseb/The_Bearriver_Arcade

Repository files navigation

The Bearriver Arcade

A few simple games and a game engine (maybe less of an engine and more like a bunch of scattered systems) with features such as game state saving and loading (the game is saved on quit, this can be used for pseudo code hot-swapping), collision detection, a input manager, frame rate targets, SDL rendering wrappers and more. I also have more games I’m working on that will probably appear here in time.

I have tried cleaning the code up a bit with everything I have learned since starting this but it might be a bit rough in a few places. Comments are scarce because I didn’t think of releasing this while writing it but the code should be pretty straight forward hopefully.

The games

Lunar lander

Scroll to zoom

Arrow keys to rotate the ship and fly forward

This is a lunar lander clone, with a few visual issues, most probably caused by relying on SDL for rendering. Or maybe it’s my fault I’m not entirely sure and haven’t bother finding out because I’m trying to transition to use Vulkan for future projects.

LunarLander.png

This game also has a few other secret games in it! This was the repository where it all begun, so if you look back through the commits you can find (hopefully) working builds of simpler games made using reflex, reactive banana and even a traditional game loop.

Simple game 1

Arrow keys to move

This is just the one of simplest games you can make SimpleGame1.png

Simple game 2

Arrow keys to move

This game is pretty interesting. If you go slow the player is pretty much a square: SimpleGame2-1.png

But the faster you go the thinner the player gets: SimpleGame2-2.png

Simple game 3

Arrow keys to move

This game is a lot like the last game, but with some new gameplay mechanics. It’s not polished code-wise or gameplay-wise

Installation

This project contains git submodules. Clone it with git clone --recurse-submodules https://github.com/walseb/The_Bearriver_Arcade

Run project

  1. Enter a directory for a game like FRPLunarLander
  2. Run nix-shell
  3. Run cabal run

If you don’t want to run this under nix, just get the dependencies listed in the shell.nix file. For lunar lander that would be:

pkg-config
cabal-install
ghc
SDL2
SDL2_image
SDL2_ttf

Bugs

Supported resolutions

Right now only 1080p monitors are correctly centered on the player. This is because I haven’t bothered looking into the resolution change events SDL probably emits.

About

Now bearriver also has an arcade! Games I made while learning haskell gamedev using Bearriver/Yampa, SDL and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published