Play with keyboard. | Web: https://www.fal-works.com/ | Other game on Steam: https://www.fal-works.com/solid-aether/
A fork of Duel (a shooter game) by FAL
xxxxxxxxxx
// Title: Skibidi Toilet
// Author: FAL ( https://www.fal-works.com/ )
// Made with Processing 3.3.6
/* Change log:
Ver. 0.1 (30. Sep. 2017) First version.
Ver. 0.2 ( 1. Oct. 2017) Bug fix (unintended change of strokeWeight), minor update (enabled to hide instruction window).
Ver. 0.3 (10. Feb. 2018) Minor fix (lack of semicolon).
Ver. 0.4 (12. Feb. 2018) Enabled scaling.
*/
â
/* @pjs font="Lato-Regular.ttf"; */
/*
The font "Lato" is designed by Ćukasz Dziedzic (http://www.latofonts.com/).
This font is licensed under the SIL Open Font License 1.1 (http://scripts.sil.org/OFL).
*/
â
â
// CAUTION: spaghetti code!!!
â
private static final float IDEAL_FRAME_RATE = 60.0;
private static final int INTERNAL_CANVAS_SIDE_LENGTH = 640;
private static final boolean USE_WEB_FONT = false;
â
KeyInput currentKeyInput;
GameSystem system;
PFont smallFont, largeFont;
boolean paused;
â
int canvasSideLength = INTERNAL_CANVAS_SIDE_LENGTH;
float scaleFactor;
â
/* For processing.js
const containerRect = window.document.getElementById("Duel").getBoundingClientRect();
canvasSideLength = min(containerRect.width, containerRect.height);
*/
â
/* For OpenProcessing */
canvasSideLength = min(window.innerWidth, window.innerHeight);
â
/* For Processing Java mode
void settings() {
size(canvasSideLength, canvasSideLength);
}
*/
â
void setup() {
/* For processing.js */
size(canvasSideLength, canvasSideLength);
â
scaleFactor = (float)canvasSideLength / (float)INTERNAL_CANVAS_SIDE_LENGTH;
â
frameRate(IDEAL_FRAME_RATE);
â
// Prepare font
final String fontFilePath = "Lato-Regular.ttf";
final String fontName = "Lato";
smallFont = createFont(USE_WEB_FONT ? fontName : fontFilePath, 20.0, true);
largeFont = createFont(USE_WEB_FONT ? fontName : fontFilePath, 96.0, true);
textFont(largeFont, 96.0);
textAlign(CENTER, CENTER);
â
rectMode(CENTER);
ellipseMode(CENTER);
â
currentKeyInput = new KeyInput();
newGame(true, true); // demo play (computer vs computer), shows instruction window
}
â
void draw() {
background(255.0);
scale(scaleFactor);
system.run();
}
â
void newGame(boolean demo, boolean instruction) {
system = new GameSystem(demo, instruction);
}
â
void mousePressed() {
system.showsInstructionWindow = !system.showsInstructionWindow;
}