/STM32-Footsies

A FreeRTOS fighting game for the STM32F103C8T6 "Blue Pill" Board

Primary LanguageC

About

This repository contains a bootleg version of the game Footsies developed by HiFight.

The objective of this bootleg game is to hit your opponent with a heavy kick. Tapping attack once will execute a light kick, which can stun your opponent. Pressing attack once more during the recovery of a light kick will execute the heavy kick.

Heavy kicks take very long to recover and can be blocked by holding back, leaving you vulnerable in the event it missed or was blocked by the opponent.

Players can dash forwards and backwards by tapping the desired direction twice.

Images

pic1 pic2

This game is for the STM32F103C8T6 ("Bluepill" Schematic) microcontroller using the NOKIA5110 LCD Display. It is either singleplayer or noplayers, introducing a very silly A.I. Bot fight mode.

The hardware requirements are:

  • 1 STM32F103C8T6 ("Bluepill" Schematic) microcontroller
  • 1 NOKIA5110 LCD display
  • 1 Analog Joystick
  • 1 Pushbutton
  • 5V source.

The pinout for the Bluepill board is:

pinout

Notes

The analog joystick is powered with 5V and goes into the A0 (ADC1) pin. It may need tweaking and recompiling in the code since the joystick I used was wack and read values a bit off. Simply tweak this function for the ADC levels for Right and Left, respectively.

This game can easily be tweaked for two players, however I didn't do it because my USB source could not draw enough current to power the whole system. This is why you can see ADC2 enabled.

This software was developed with STM32CubeMX and is implemented using FreeRTOS. There are 8 state machines which control the menu, player input, player view and player state, besides the bots.