Mayhem, the classic Amiga game, ported to the Raspberry Pi
C++ C Makefile Shell
Latest commit 34399d0 Dec 30, 2016 @martinohanlon committed on GitHub Merge pull request #30 from martinohanlon/dev
Merge allegro5 port into master
Permalink
Failed to load latest commit information.
assets allegro 5 port Dec 4, 2016
.gitignore new thrust power up + bug fix May 31, 2016
LICENSE updates + license Apr 10, 2016
Makefile allegro 5 port Dec 4, 2016
Makefilestatic compile static linking Dec 6, 2016
Mayhem2.cpp allegro 5 port Dec 4, 2016
README.md double buffer config & compile changes Dec 6, 2016
allegro_compatibility.cpp allegro 5 port Dec 4, 2016
allegro_compatibility.h allegro 5 port Dec 4, 2016
battle_sequence.cpp allegro 5 port Dec 4, 2016
battle_sequence.h allegro 5 port Dec 4, 2016
collision.cpp allegro 5 port Dec 4, 2016
collision.h allegro 5 port Dec 4, 2016
command.cpp allegro 5 port Dec 4, 2016
command.h allegro 5 port Dec 4, 2016
compile_allegro5 double buffer change Dec 30, 2016
game_mgr.cpp double buffer change Dec 30, 2016
game_mgr.h allegro 5 port Dec 4, 2016
intro_sequence.cpp double buffer change Dec 30, 2016
intro_sequence.h double buffer change Dec 30, 2016
keyboard_input.cpp Initial ci Nov 3, 2011
keyboard_input.h Initial ci Nov 3, 2011
mapping_joy.cpp allegro 5 port Dec 4, 2016
mapping_joy.h allegro 5 port Dec 4, 2016
mapping_key.cpp allegro 5 port Dec 4, 2016
mapping_key.h allegro 5 port Dec 4, 2016
mayhem.jpg New screenshot Nov 7, 2011
mayhem2-pi double buffer change Dec 30, 2016
mayhem2.jpg v0.11 - screen rendering, timing, bugs Aug 21, 2016
menuhandler.cpp allegro 5 port Dec 4, 2016
menuhandler.h allegro 5 port Dec 4, 2016
netgame.cpp allegro 5 port Dec 4, 2016
netgame.h allegro 5 port Dec 4, 2016
option.cpp allegro 5 port Dec 4, 2016
option.h allegro 5 port Dec 4, 2016
physics.cpp allegro 5 port Dec 4, 2016
physics.h allegro 5 port Dec 4, 2016
platform_data.cpp allegro 5 port Dec 4, 2016
platform_data.h allegro 5 port Dec 4, 2016
player_info.cpp allegro 5 port Dec 4, 2016
player_info.h allegro 5 port Dec 4, 2016
player_input.cpp allegro 5 port Dec 4, 2016
player_input.h allegro 5 port Dec 4, 2016
player_view.cpp allegro 5 port Dec 4, 2016
player_view.h allegro 5 port Dec 4, 2016
soundfx.cpp allegro 5 port Dec 4, 2016
soundfx.h allegro 5 port Dec 4, 2016
start.sh updated start script Dec 8, 2016
ticktimer.cpp allegro 5 port Dec 4, 2016
ticktimer.h allegro 5 port Dec 4, 2016
utils.cpp allegro 5 port Dec 4, 2016
utils.h allegro 5 port Dec 4, 2016
vaisseau_data.cpp allegro 5 port Dec 4, 2016
vaisseau_data.h allegro 5 port Dec 4, 2016
vaisseau_gfx.cpp allegro 5 port Dec 4, 2016
vaisseau_gfx.h allegro 5 port Dec 4, 2016
xc.cpp allegro 5 port Dec 4, 2016
xc.h allegro 5 port Dec 4, 2016

README.md

Mayhem 2 - Raspberry Pi

Martin O'Hanlon (martin@ohanlonweb.com)

http://www.stuffaboutcode.com

Description

Mayhem 2 is a multiplayer (2 - 4) flight shooter with a really simple objective - destroy your opponents before they destroy you.

Mayhem game image

Mayhem was originally released as Public Domain / Shareware on the Amiga. It was ported to the PC in 2002 by devpack and released onto github in 2011 github.com/devpack/mayhem.

Video of the original amiga game.

Video of Mayhem 2

Martin O'Hanlon picked it up from code.google.com/p/mayhem (New BSD License) and with the help of Lee Taylor added new levels and features. Jonas Karlsson migrated Mayhem 2 to allegro 5.

Video of a new level in Mayhem 2

This is the Raspberry Pi port of the game, you can find the Windows PC fork at github.com/martinohanlon/mayhem.

Blog post

Gameplay

Destroy your opponents by shooting them, you win when all other players have run out of lives.

Your ship has limited fuel which will run down when you boost, if you run out you will be unable to control your ship, to refuel, land on any flat surface.

You can protect yourself from attack using your shields which will stop all bullets, be careful though your shields run down quickly and you wont be able to boost while your shields are on.

Powerups are dropped (sometimes) when a player is destroyed (by either crashing or being shot) and when collected will give you a temporary boost.

Options

Levels 1-3 are the original game levels, all other levels are new to Mayhem 2.

DCA are anti spaceship guns which will fire at the player if they get too close.

Wall collision can be turned off for new players to get used to the controls and playing the game.

Controls

Joysticks

Default joystick controls, assume an "xbox / ps like" joystick:

Control Action
Stick 1 Left / Right
Button 1 (A) Thrust
Button 2 (B) Shield
Button 6 (RB) Fire

Joystick controls can changed using the menu.

Keys

If joysticks are connected, they are used as the players controls, if there are less than 4 joysticks connected, keys are used for the rest of the players in order:

Key Left Right Shield Thrust Fire
1 z x c v g
2 left right pad del pad 0 pad enter
3 b n , m l
4 y u o i 0

Setup

Mayhem 2 needs at least 96MB of RAM dedicated to the GPU, you can set this using raspi-config

sudo raspi-config

Advanced Options > Memory Split > change value to 96

Install

You will need to download the game and install libdumb1 dependency

sudo apt-get install libdumb1
git clone -b allegro5 https://github.com/martinohanlon/mayhem-pi

Run

cd mayhem-pi
./start.sh

Compile

Compiling Mayhem2 will need allegro 5 to be compiled and installed - this will take a while, particularly on a Pi 0/1.

cd mayhem-pi
./compile_allegro5

To compile Mayhem2.

make

To compile Mayhem2 to distribute, including static linking to the allegro libraries. Modify compile_allegro to include the additional flags, recompile and use Makefilestatic.

make clean
make -f Makefilestatic

RetroPie

To install Mayhem to the 'ports' section of RetroPie:

cd /home/pi/RetroPie/roms/ports
sudo apt-get install libdumb1
git clone -b allegro5 https://github.com/martinohanlon/mayhem-pi

Version history

  • beta - compiles, runs, ongoing mods
  • 0.1 - added new levels and features
  • 0.2 - seamless warping across map edges
  • 0.4 - menu changes + new 'option' (powerup) changes
  • 0.5 - timing and powerups are now dropped when players explode
  • 0.6 - new thrust powerup + bug fix
  • 0.7 - level structure changes
  • 0.8 - joystick control
  • 0.9 - new powerup icons
  • 0.10 - screen resolution & perf improvements
  • 0.11 - screen rendering, timing changes, bug fix
  • 0.12 - allegro5 migration

Contributors

Anthony Prieur

Martin O'Hanlon

Lee Taylor

Jonas Karlsson