3D labyrinth game written for university project in mbed's environment for N5110 display and generic joystick. Contains porting to terminal display, for use on *NIX and Windows systems.
This repository has been archived on 2022-07-05. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
Ensar Sarajčić 8da95d97c9
Create README.md for ncurses implementation
2018-05-20 15:55:17 +02:00
3D Labyrinth Console Create README.md for Windows CMD implementation 2018-05-20 15:52:52 +02:00
ncurses-implementation Create README.md for ncurses implementation 2018-05-20 15:55:17 +02:00
.gitignore Clean up and add gitignore 2017-12-20 17:59:46 +01:00
.hg_archival.txt Import original code from mbed repo 2017-08-15 13:26:53 +02:00
LICENSE Create LICENSE 2017-12-26 19:28:06 +01:00
N5110.lib Import original code from mbed repo 2017-08-15 13:26:53 +02:00
README.md Add a simple ncurses implementation of the display 2017-12-20 17:56:53 +01:00
main.cpp Import original code from mbed repo 2017-08-15 13:26:53 +02:00
mbed.bld Import original code from mbed repo 2017-08-15 13:26:53 +02:00

README.md

3D Labyrinth game for embedded system

Introduction

3D labyrinth game written for university project.
Originally built on mbed compiler with my colleague Dino Dizdarević. (Link to original mbed repository)
Game used Nokia 5110 LCD display and generic joystick for controls.
Check out the demo video: https://www.youtube.com/watch?v=8I6GM97ciso

Requirements

Originally compiled for LPC1114FN28 platform, but it should be runnable on anything that can support the LCD display and generic joystick (with minor code modifications due to pins being hardcoded). Besides the platform, only Nokia 5110 LCD display and generic joystick is required.

Pin setup

The following image shows the pins of used platform. LPC1114FN28 pins

Used pins:

  • dp1 used as digital input - used as a switch to start playing the game
  • dp10 and dp11 used as analog inputs for joystick, dp10 for y axis and dp11 for x axis
  • dp4, dp24, dp23, dp25, dp2, dp6, dp18 used for Nokiad 5110 LCD (in this order)

Controls

For all controls, only joystick is used and the switch included on platform (if it is not, it should be used connected to a digital input pin). Before switching the game on, simple looping animation is displayed, switching between different images that are used to draw all possible combinations of visible walls in the game. Once the switch is pressed the game starts. To move forward, simply move the joystick up. Holding it up will cause that action to repeat. Walking into walls will just return the player to the same position. Moving joystick left and right will make the player turn in place. Moving joystick down opens up the map, which will display player as an arrow.

Code blocks explanation

Before explaining the code, I know there are many things that should have been done differently and there are many bad coding practices, but I wanted to leave the code in its original state. At that point we were satisfied with it just working.

TODO - Cleaning up the repository

  • Upload to GitHub from mbed
  • Add windows console adaptation
  • Add unix console adaptation
  • Translate parts of code not written in english
  • Add a more detailed documentation with images
  • Explain codes of block