Added mono font and copyright notice

master
Jamie Munro 2 years ago
parent c72f1df021
commit 1d498f5cb5
  1. 4
      Configuration.pde
  2. 15
      Game.pde
  3. 7
      README.md
  4. 9
      config.properties
  5. BIN
      res/fonts/andalemo.ttf

@ -35,6 +35,7 @@ class Configuration {
public final String spritePath;
public final String soundPath;
public final String musicPath;
public final String fontPath;
public final String levelExtension;
public final String tileDeliminator;
@ -52,6 +53,7 @@ class Configuration {
public final String storyCrawl;
public final String gameOverMsg;
public final String credits;
public final String copyright;
public final int storyWaitTime;
public final int scrollSpeed;
@ -124,6 +126,7 @@ class Configuration {
this.spritePath = prop.getProperty("spritePath");
this.musicPath = prop.getProperty("musicPath");
this.soundPath = prop.getProperty("soundPath");
this.fontPath = prop.getProperty("fontPath");
this.levelExtension = prop.getProperty("levelExtension");
this.tileDeliminator = prop.getProperty("tileDeliminator");
@ -141,6 +144,7 @@ class Configuration {
this.storyCrawl = prop.getProperty("storyCrawl");
this.gameOverMsg = prop.getProperty("gameOverMsg");
this.credits = prop.getProperty("credits");
this.copyright = prop.getProperty("copyright");
this.storyWaitTime = Integer.parseInt(prop.getProperty("storyWaitTime"));
this.scrollSpeed = Integer.parseInt(prop.getProperty("scrollSpeed"));

@ -132,6 +132,10 @@ void setup() {
//sounds
minim = new Minim(this);
//fonts
PFont mono = createFont(sketchPath() + System.getProperty("file.separator") + conf.fontPath + System.getProperty("file.separator") + "andalemo.ttf", 128);
textFont(mono);
//perform loading
thread("loadResources");
}
@ -211,7 +215,9 @@ void game() {
renderBomb();
detectBombCollision();
if (shouldDelete) bomb = null;
if (shouldDelete) {
bomb = null;
}
}
//update and display enemies
@ -900,7 +906,7 @@ void titleScreen() {
text(conf.title, x, y);
textSize(dimensions.adjustedWidth / 20);
textSize(dimensions.adjustedWidth / 25);
y = dimensions.heightOffset + dimensions.adjustedHeight / 2 + (dimensions.adjustedHeight / 23);
@ -908,6 +914,11 @@ void titleScreen() {
showControls();
textSize(dimensions.adjustedWidth / 50);
x = dimensions.widthOffset + dimensions.adjustedWidth - dimensions.adjustedWidth/15;
y = dimensions.heightOffset + dimensions.adjustedHeight - dimensions.adjustedHeight/45;
text(conf.copyright, x, y);
if (storyCounter >= conf.storyWaitTime * conf.framerate) {
titleScreen = false;
story = true;

@ -6,7 +6,7 @@ Originally based on my [Tile engine](https://git.jbm.fyi/jbm/processing_tile_eng
Micro:bit controller code [here](https://git.jbm.fyi/jbm/CS5041_P1_Microbit)
## Setup Instructions
1. Download controller.py and receiver.py from [https://git.jbm.fyi/jbm/CS5041_P1_Microbit](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.
1. Download controller.py and receiver.py from [https://git.jbm.fyi/jbm/CS5041_P1_Microbit](https://git.jbm.fyi/jbm/CS5041_P1_Microbit) (also included in zip).
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.
@ -34,14 +34,15 @@ Fly around the map avoiding enemies and racking up points. Gain points by destro
## 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).
- 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](https://github.com/processing/processing/issues/968) 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 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](https://github.com/processing/processing/issues/968) 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](https://processing.org/)

@ -69,9 +69,12 @@ spritePath=res/sprites
#filepath for music folder
musicPath=res/music
#soundpath for music folder
#filepath for music folder
soundPath=res/sounds
#filepath for fonts folder
fontPath=res/fonts
###################################################################################################
# RESOURCE PARAMETERS #
###################################################################################################
@ -122,7 +125,9 @@ storyCrawl=INTO THE BREACH\n\nHow did it come to this?\n\nFirst there were the w
gameOverMsg=GAME OVER
#Credits
credits=Credits:\n2022 Jamie Munro, All rights reserved\nGame Design, Progamming and Graphics by Jamie Munro\nMusic by Eric Matyas\nSound effects by Kenny.nl\nBomb icon inspired by TCRF's Minesweeper\n"Boss" sprite inspired by Taito/Midway/Tomohiro Nishikado's Space Invaders crab
credits=Credits:\n\u00a9 Jamie Munro 2022, All rights reserved\nGame Design, Progamming and Graphics by Jamie Munro\nMusic by Eric Matyas\nSound effects by Kenny.nl\nBomb icon inspired by TCRF's Minesweeper\n"Boss" sprite inspired by Taito/Midway/Tomohiro Nishikado's Space Invaders crab
copyright=\u00a9 Jamie Munro 2022
###################################################################################################
# CONTROLLER PARAMETERS #

Binary file not shown.
Loading…
Cancel
Save