Skip to content

Bern4rdR/mini-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

mini-project

A potentiometer game on the ChipKIT Uno32 board

Table of Contents

  • Description
  • Tutorial
  • Installation
  • Usage
  • Contributing
  • License

Description

This is a simple maze runner game using ray tracing to display from 2D to 3D and a potentiometer to rotate the player POV.

Tutorial

There are four buttons on the ChipKIT. However this project only uses/needs three buttons, button 4 (BTN4), button 3 (BTN3) and button 2 (BTN2). BTN4 is used to select the currently selected option. BTN3 is responsible for moving forward in the players direction. BTN2 is the exit button while in a game, in case you get lost and want to try again.

It also utilizes one of the ChipKIT switches, more specifically switch four (SW4). SW4 is used to indicate which of the two maps to choice.

The potientiometer can be used to rotate the players field of view, i.e what the player can see which is also what is displayed on the screen. The potientiometer uses the relative rotation since it can only rotate about 270 degress (3/2 PI radians) while the player is supposed to be able to rotate 360 degress (2 PI). So if it rotates a third of its rotation to the left then the players field of view will also be rotated a third of its rotation to the left.

Installation

  1. Clone this repository.
  2. Open a terminal with the path for the cloned repository.
  3. Enter to the mcb32 terminal
. /opt/mcb32tools/environment 
  1. Install the repository to the ChipKit.
make
make install
  1. Follow the instructions on the screen and enjoy.

For more detailed installations instructions regarding cloning of the repository, we recommend Github Docs.

For further installation instructions regarding the mcb32 toolchain, we recommend the mcb32tools installation guide, the ChipKit manual as well as the provided guides, FAQ's and other help provided by the KTH course IS1500.

Usage

  • SW4: map selctor indicator.
  • BTN2: exit game to main menu.
  • BTN3: go forward.
  • BTN4: select current option.
  • Potentiometer: rotate to rotate player FOV in inputed rotational direction.

Contributing

This is a school project which means no contributions are allowed.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspiration for this project came from the game Wolfenstein 3D.
  • Some of the functions used to interact with the ChipKIT were taken from the KTH course IS1200 GitHub repository and the labs in the course IS1500 HT23.
    • They were written by Axel Isaksson, F Lundevall and Ture Teknolog.

About

a gyroscopic game on the ChipKIT Uno32 board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published