I discovered something interesting in C#'s event delegate system when combined with coroutines.
First, I started with a simple event delegate example:
using UnityEngine;
using System.Collections;
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"] | |
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"] | |
content_margin_left = 10.5 | |
content_margin_top = 8.75 | |
content_margin_right = 10.5 | |
content_margin_bottom = 8.75 | |
bg_color = Color(0.117647, 0.117647, 0.117647, 1) | |
draw_center = false | |
border_color = Color(1, 1, 1, 0.137255) |
cmake_minimum_required(VERSION 3.14) | |
set(CMAKE_C_STANDARD 11) | |
set(ENVSDK $ENV{PLAYDATE_SDK_PATH}) | |
if (NOT ${ENVSDK} STREQUAL "") | |
# Convert path from Windows | |
file(TO_CMAKE_PATH ${ENVSDK} SDK) | |
else() | |
execute_process( |
Here are some simple ways to make your PICO-8 code fit in 140 280 characters (as in the #tweetjam #tweetcart craze). I did not invent these, I merely observed and collected them from the tweetjam thread.
x=.1
and x=.023
, not x=0.1
or x=0.023
x=1/3
is shorter than x=.3333
circ(x,y,1)pset(z,q,7)
works just as well<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>PICO-8 Cartridge</title> | |
<meta name="description" content=""> | |
<STYLE TYPE="text/css"> | |
<!-- |
Unity has built-in support for hotswapping, which is a huge productivity booster. This feature works not only with graphics assets like bitmaps and meshes, but also with code: if you edit the source and save it, the editor will save the state of the running game, compile and load the new code, then load the saved state and continue where it left off. Unfortunately, this feature is very easy to break, and most available 3rd party plugins have little regard for it.
It looks like there’s a lot of confusion about hotswapping in Unity, and many developers are not even aware of its existence – which is no wonder if their only experience is seeing lots of errors on the console when they forget to stop the game before recompiling... This document is an attempt to clear up some of this confusion.
Nota bene, I’m not a Unity developer, so everything below is based on blog posts and experimentation. Corrections are most welcome!