||1 year ago|
|res||1 year ago|
|Asteroid0.pde||1 year ago|
|Asteroid1.pde||1 year ago|
|Asteroid2.pde||1 year ago|
|Bomb.pde||1 year ago|
|Boss.pde||1 year ago|
|Camera.pde||1 year ago|
|Configuration.pde||1 year ago|
|Controller.pde||1 year ago|
|DefaultHashMap.pde||1 year ago|
|DisplayDimensions.pde||1 year ago|
|Enemy.pde||1 year ago|
|Game.pde||1 year ago|
|GunPlatform.pde||1 year ago|
|Jellyfish.pde||1 year ago|
|Level.pde||1 year ago|
|MicrobitController.pde||1 year ago|
|Player.pde||1 year ago|
|Projectile.pde||1 year ago|
|README.md||1 year ago|
|Saucer.pde||1 year ago|
|Tile.pde||1 year ago|
|TileProperties.pde||1 year ago|
|config.properties||1 year ago|
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
- Download controller.py and receiver.py from https://git.jbm.fyi/jbm/CS5041_P1_Microbit (also included in zip).
- Using your preferred micro:bit python flashing tool (I recommend uflash) flash controller.py onto the first micro:bit.
- Unplug the first micro:bit, plug the second in and flash receiver.py onto it. Leave this micro:bit connected to your machine.
- Connect a battery pack to the "controller" micro:bit.
- 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).
- 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.
- Open Game.pde in processing and install the Serial and Minim libraries in the library manager.
- Hit play!
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....
- 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.
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 shield will be activated for 5 seconds, during which time you are invulnerable, but you can't use bombs. Your shield 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!
- Game settings have been optimised for 1080p monitor, you should select alternative viewport dimensions according to the method described in config.properties for different monitor sizes (or set resolution to 1080p).
- Game controller often misbehaves when battery is low
- 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. Untested on Mac.
- Performance seems generally better on windows
- If the controller and receiver 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 a lot 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 because 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).
- 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, shield 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)
- Font used is Andale Mono by Steve Matteson
Copyright 2022 Jamie Munro, All Rights Reserved.