You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Jamie Munro c72f1df021 Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
res Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Asteroid0.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Asteroid1.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Asteroid2.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Bomb.pde Added scrolling story if idle on title page. Implemented projectile and bomb. Added 3 different types of asteroid to shoot. Added shield on spawn and after taking damage. 2 years ago
Boss.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Camera.pde Nice background and rotational controls 2 years ago
Configuration.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Controller.pde Refined sprites 2 years ago
DefaultHashMap.pde Ported over to processing 2 years ago
DisplayDimensions.pde Added scrolling story if idle on title page. Implemented projectile and bomb. Added 3 different types of asteroid to shoot. Added shield on spawn and after taking damage. 2 years ago
Enemy.pde Added jellyfish and gun platform enemies 2 years ago
Game.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
GunPlatform.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Jellyfish.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Level.pde Added scrolling story if idle on title page. Implemented projectile and bomb. Added 3 different types of asteroid to shoot. Added shield on spawn and after taking damage. 2 years ago
MicrobitController.pde Nice background and rotational controls 2 years ago
Player.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Projectile.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
README.md Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Saucer.pde Implemented boss and tweaked spawning mechanism and scale factors 2 years ago
Tile.pde Ported over to processing 2 years ago
TileProperties.pde Ported over to processing 2 years ago
config.properties Implemented boss and tweaked spawning mechanism and scale factors 2 years ago

README.md

INTO THE BREACH

CS5041 Interactive Hardware and Software P1

Originally based on my Tile engine but converted to run exclusively within the Processing IDE. All artwork my own unless otherwise stated.

Micro:bit controller code here

Setup Instructions

  1. Download controller.py and receiver.py from https://git.jbm.fyi/jbm/CS5041_P1_Microbit (also included in zip) - don't worry about the microbit folder, this just provides IntelliSense for VSCode.
  2. Using your preferred micro:bit python flashing tool (I reccomend uflash) flash controller.py onto the first micro:bit.
  3. Unplug the first micro:bit, plug the second in and flash receiver.py onto it. Leave this micro:bit connected to your machine.
  4. Connect a battery pack to the "controller" micro:bit.
  5. Determine (using device manage or terminal) which serial port (index) your "receiver" micro:bit is connected to (this is usually 0 for linux and 1 for windows).
  6. Open config.properties in a text editor and set the serialDevice parameter (under CONTROLLER PARAMETERS) to the serial port index determined in step 5. Ensure there are no spaces or other characters after the parameter.
  7. Open Game.pde in processing and hit the play button.

Gameplay instructions

Story

Equipt with the latest starfighter, you have returned to Earth to find nothing but an asteroid field. The planet has been destroyed. You don't have much fuel left and have no choice but to spend the final hours of your life fighting the aliens that destroyed your homeworld and avenging your people. Initially the aliens don't pay you much attention and you will encounter nothing but asteroids (Earth fragments) for the first 1.5 minutes. However, after 1.5 minutes, the aliens begin to take notice and will continue to send stronger forces every 30 seconds. Try to earn as many points as possible and give Earth the funeral it deserves. Into the breach....

Controls

  • Tip forwards: Accelerate
  • Tip backwards: Decelerate/Reverse
  • Rotate: Steer
  • A: Shoot
  • B: Bomb
  • C (micro:bit logo): Pause (and reset steering neutral zone)*
  • ESC: exit the game

* Note: steering uses the micro:bit compass to determine which way the controller is pointed. In order to do this it needs to know what you consider the "middle" to be. The "steering neutral zone" (where the craft won't rotate) consists of an area headingThreshold degrees (5 degrees by default) either side of the "middle". The "middle" is set when you first start the game, but can be reset by pausing and resuming the game at any time.

Gameplay

Fly around the map avoiding enemies and racking up points. Gain points by destroying enemies using your laser, or by dropping bombs. You only have a limited number of bombs, shown by the icons in the bottom right corner of the screen. Your score is shown in the top right corner. You have 3 lives, shown in the top left corner of the screen. You will take damage if you hit an enemy or an enemy projectile. If you take damage, but still have lives remaining, your sheild will be activated for 5 seconds, during which time you are invulnerable, but you can't use bombs. Your sheild will also be activated for the first 5 seconds of the game. Once you run out of lives, it's game over. You will earn an additional bomb every 25,000 points (but you can have no more then 5) and an extra life every 50,000 points (you can have more then 3). Try to survive as long as you can!

Troubleshooting

  • Game settings have been optimised for 1080p monitor, you should select and alternative viewport dimensions according to the method decribed in config.properties for different monitor sizes (or set resolution to 1080p).
  • If the controller and reciever are communicating, the yellow LED next to the USB port on the receiver will flash when the game is open. If it is not flashing this indicates a connection issue.
  • Connection issues can usually be resolved by resetting (using the reset button) first the controller and failing this the receiver as well.
  • If this still does not resolve the issue, try disconnecting and reconnecting the battery pack on the controller (this seems to be required alot in windows for some reason).
  • If this still does not resolve the issue, try disconnecting the receiver from the machine and then reconnecting it. You will also need to restart the game.
  • If the craft won't stop rotating and your sure the connection isn't the problem, pause the game to reset the steering neutral zone.
  • If the game pauses repeatedly, this is usually becauase of a connection issue, or because the micro:bit logo has accumulated grime. If the connection is fine, try wiping down the logo with a tissue (often a quick wipe with a finger is enough).
  • Sounds do not work in linux, this is because the required sound libraries are not included in the processing JDK. This issue is described here but I was not able to get it working on my linux machine. The sounds work fine on Windows.
  • Performance seems generally better on windows (you probably need quite a beefy PC at this point to run this game)

Credits

  • Coded in Processing
  • Artwork drawn or modified with pinta
  • Credits for tile engine code here
  • "Bomb" sprite adapted from andreasisnes's Elitekollektivet.Minesweeper.Sprites repo and originally by TCRF's Minesweeper (winmine31) on Windows NTF4/2000. Spritesheet here
  • Player death, asteroid explosion, forward/reverse/rotation engine, sheild and shoot sounds effects from kenney's Sci-fi sounds pack
  • Pause and Resume sounds from kenney's Interface sounds pack
  • Music tracks - Cold Moon, Cyber REM, Dystopic Factory, Escape from the Insane Machines, Light Years, Retro Sci-fi Planet, Sector Off Limits, Terraforming Begins and Trouble on Mercury and bomb sound effect by Eric Matyas
  • "Boss" sprite inspired by Taito/Midway/Tomohiro Nishikado's Space Invaders crab (1978)

Licence

Copyright 2022 Jamie Munro, All Rights Reserved.