• About
  • Contact
  • SensorTagIoT
  • TextKnit
  • Acoustic Locatisation
  • Bombardier
  • Spooky Keyboard
  • Scratch Extensions
  • Ultrasonic Sonar
  • Laser Layout
  • Fusion 360 add in (spur gear)
  • My First Paying Client
  • Clock
  • FPGA
  • Braille Creator
  • Voronoi 3d Fusion 360 Addin
  • CaveKingdom
  • StrangeOrbitz
  • About
  • Contact
  • SensorTagIoT
  • TextKnit
  • Acoustic Locatisation
  • Bombardier
  • Spooky Keyboard
  • Scratch Extensions
  • Ultrasonic Sonar
  • Laser Layout
  • Fusion 360 add in (spur gear)
  • My First Paying Client
  • Clock
  • FPGA
  • Braille Creator
  • Voronoi 3d Fusion 360 Addin
  • CaveKingdom
  • StrangeOrbitz

Bombardier

Computer game using LEAPmotion and Launchpad

Recently I won a LeapMotion device from www.hackster.io after submitting a proposal. After getting the device, one of the first things that came to mind was a computer game. But Hackster, being an electronics site, necessitated the use of electronics. So from a suggestion from my good wife (Liz), I created a power glove that vibrated when the LeapMotion sensor could not sense your hand. I found it easy to move my hand out of the sensor's envelope.  

You can see a video of the game on YouTube.

I've also put it on Steampowered as an experimental game. You can also download it here in itch.


So I spent about 8 days on the game, most of which I spent writing the game in UE4. I spent about a day doing the electronics and code for the LaunchPad. My circuit just level converted from the LaunchPad's 3.3V to the motor driver's 5V. I actually made 2 mistakes with my rather simple circuit (see below) - I connected the mosfet's gate to 5V instead of 3.3V and connected circuits 3.3V supply to 5V. Fortunately no damage was done :)

The UE4 stuff was written pretty much entirely in C++ code. Technically it was quite interesting. I used procedural generation (perlin noise) to generate the terrain, mesh instances for the trees, buildings (except for the lighthouse), land and water. I also used a search algorithm for ship navigation and its AI. Basically the ships would find the shortest route to random bits of your island and head there. When they got in range, they would fire at a random rate in the direction of a random piece of your island at a random trajectory (ie range). The search algorithm would regularly run again as the island got smaller. The integration to the Texas Instruments LaunchPad was in a separate DLL that connected to the WinUSB driver. Originally I was just going to have the aircraft fly around with ships just wandering, but my 9 yo daughter suggested trees and buildings. The actual goal of the game is to destroy the ships before the ships destroy your island. The game itself would last around 5 minutes or less.

All the LaunchPad is doing is receiving a simple message to set the vibration strength using PWM (pulse width modulation). I was actually going to vary the strength, but really I only turned it on and off. 

Liz created the graphics and Louka created the lighthouse.


Picture
Picture
Well I am pretty stoked, lots of great feedback and lots of people saying yes...
Picture
Powered by Create your own unique website with customizable templates.