bestander / duke3d-matrix

LED matrix that runs Duke Nukem 3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duke3d LED Matrix: picture frame

Runs Duke Nukem 3D on a LED matricx as a wall frame connected to a Raspberry Pi. The work is based on Doom Matrix (which itself is a fork of @twstokes's project) that started as a question "But can you run Duke on it?".

playback

Features

  • Preconfigured to run on 2 64x32 LED panels
  • Gamepad support: full gameplay
  • Sleep timer when gamepad is not active
  • Displays current time and weather forecast at the unused bottom line of the screen

Made possible thanks to these libraries:

Hardware

Setup tooling and libraries

  1. Install C and C++ compilers + make for your OS
  2. Fetch the dependency submodules with git submodule update --init --recursive --depth=1
  3. Run ./compile-all.sh, if it succeeds it will create a binary

You most likely will need the following libraries installed in RPI

sudo apt-get install libasound2-dev libflac-dev libvpx-dev fluid-soundfont-gm freepats timidity fluidsynth libjsoncpp-dev libcurl4-openssl-dev

Audio

Audio should be decently turn-key, but can take a little more work. It's not recommended to use the on-board audio on the Pi while driving the matrix for performance reasons, so it's best to disable it on boot. However I used headphone jack (a speaker)on Raspberry Pi 3 without problems.

Note:

  • It can take a while to compile these on a Pi! You can also consider cross-compiling from a faster machine.
  • If your distro has SDL packages you can install them instead.
  • Even if running eduke32 as root, you'll probably need to add your user to the appropriate audio group.

Building the project

make

Cleaning

make clean

Running

The binary accepts arguments for both rpi-rgb-led-matrix and eduke32, all the necessary params to run it on a double LED matrix on a Raspberry Pi3 are in script run.sh.

If you want for the board to also show temperature forecast from Meteosource you need to register on the website (free) and generate an API token and pass it to the run.sh script:

./run.sh --metsource_key=<my-api-key> --metsource_location=nocatee-7315235 --refresh_weather_timer_sec=3600

If you don't want the game to play nonstop you can pass the following parameter to pause it if there is no gamepad activity. It will automatically wake up on any gamepad button click and when weather is refreshed.

./run.sh --sleep_timeout_sec=300

Controls

eduje32.cfg is included in this repo and is already configured for a SEGA style 8bit-do gamepad.

Gamepad

Note the Random_Level and Get_Stuff commands bound to buttons 8 and 9, those are not standard for eduke and a part of the fork.

About

LED matrix that runs Duke Nukem 3d

License:MIT License


Languages

Language:Makefile 68.0%Language:C++ 29.5%Language:Shell 2.5%