Skip to content

Instantly share code, notes, and snippets.

NGF24 Jam Notes

  • Browser-first. Game must work on Itch. Figure out Itch-particulars such as the default res and a fullscreen button.
  • We don't know the browser they'll use, so perhaps test against the most common ones: Edge (priority), Chrome and Firefox.
  • Unknown hardware, so assume it's a potato. This rules out high def 3D and heavy engines.
  • Unknown display, but an office quality 16:9 TFT is a safe bet. Be careful about poor contrast, pixel ghosting if 2D pixel art.
  • What happens when the display is set to each of 100%, 125% and 150% scales? Sometimes 1080p displays are set to 125% per Windows recommendation.
  • Unknown audio situation. Make sure not to rely on audio. Prioritise fullscreen flash bangs over SFX.
  • Unknown keyboard, so assume office quality non-NKRO keyboard with UK mapping. Limited simultanious key presses.
  • People of all ages will be playing. Consider humour which works for all generations.
@spdp-dev
spdp-dev / Rotate.cs
Created May 8, 2023 17:40
A very simple script for rotating a game object on the Y axis
using UnityEngine;
public class Rotator : MonoBehaviour
{
[SerializeField] float rotateSpeed = .25f;
void Update()
{
RotateOnYAxis();
}
@spdp-dev
spdp-dev / FullscreenManager.cs
Last active May 8, 2023 17:32
A fullscreen manager for Unity projects. With Windows/Linux/macOS exports, I typically have them start in a 720p window so as to be streamer friendly. This script then allows the game to switch from 720p to the user's native resolution and back again. See the ToggleFullScreen method for valid key combos.
#if PLATFORM_STANDALONE
using UnityEngine;
public class FullscreenManager : MonoBehaviour
{
static FullscreenManager instance;
public static FullscreenManager Instance
{
get
{
@spdp-dev
spdp-dev / ScreenShotter.cs
Last active May 8, 2023 17:41
A screenshot taking tool for Unity. Drop this onto a "ScreenShotter" or similarily named empty object in your scene and configure as desired. The defaults are however pretty good with screenshots being dumped to the top of your project folder every three seconds. Don't forget to exclude this directory in your .gitignore!
#if UNITY_EDITOR
using System.IO;
using UnityEngine;
public class ScreenShotter : MonoBehaviour
{
static ScreenShotter instance;
public static ScreenShotter Instance
{
get
@spdp-dev
spdp-dev / compile-godot-2.1.4-raspberry-pi-400.md
Last active December 10, 2021 21:48
How to compile Godot 2.1.4 on a Raspberry Pi 400

Compile Godot 2.1.4 on a Raspberry Pi 400

You'll ideally be running an environment that defaults to Python 2. To make things easy, use the recently released Raspberry Pi OS (Legacy) with desktop, which is derived from Debian Buster.

  1. Install dependencies:
    sudo apt install build-essential clang libasound2-dev libgl1-mesa-dev libglu-dev libpulse-dev libssl-dev libssl1.0-dev libudev-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev pkg-config scons yasm

  2. Download the 2.1.4 source from Github, unpack and change into it:
    wget https://github.com/godotengine/godot/archive/refs/tags/2.1.4-stable.tar.gz
    tar xvf 2.1.4-stable.tar.gz

@spdp-dev
spdp-dev / exporting-godot-documentation.md
Created December 5, 2021 15:12
How to export and view Godot documentation at different points of it's history.

Exporting Godot Documentation

For this example, we're going to build a HTML archive of Godot's documentation at version 2.1.4.

Other versions can be looked up by checking out particular release branches or commits.

Tested on Ubuntu 21.10.

  1. Get sphinx and the readthedocs theme:
    sudo apt install python3-pip