Skip to content

Instantly share code, notes, and snippets.

View selfsame's full-sized avatar

Joseph Parker selfsame

  • Clover Food Lab
View GitHub Profile
// method line 5890
.method public hidebysig
instance default class Godot.Node GetNode (class Godot.NodePath path) cil managed
{
.custom instance void class Godot.GodotMethodAttribute::'.ctor'(string) = (01 00 08 67 65 74 5F 6E 6F 64 65 00 00 ) // ...get_node..
// Method begins at RVA 0xbae4
// Code size 24 (0x18)
.maxstack 8
IL_0000: ldarg.0
"dungeon-planet" by Joseph Parker
Chapter 1 - Rules
Section 1(a) - Substance

Generating Procedural Game Worlds with Wave Function Collapse

Wave Function Collapse (WFC) by @exutumno is a new algorithm that can generate procedural patterns from a sample image. It's especially exciting for game designers, letting us draw our ideas instead of hand coding them. We'll take a look at the kinds of output WFC can produce and the meaning of the algorithm's parameters. Then we'll walk through setting up WFC in javascript and the Unity game engine.

sprites

The traditional approach to this sort of output is to hand code algorithms that generate features, and combine them to alter your game map. For example you could sprinkle some trees at random coordinates, draw roads with a brownian motion, and add rooms with a Binary Space Partition. This is powerful but time consuming, and your original vision can someti

//single file version of https://github.com/kchapelier/wavefunctioncollapse
function randomIndice (array, r) {
var sum = 0,
i,
x;
for (i = 0; i < array.length; i++) {
sum += array[i];
}
var get_json = function(url, cb){
var xmlhttp = new XMLHttpRequest()
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var res = JSON.parse(this.responseText)
cb(res)}}
xmlhttp.open("GET", url, true)
xmlhttp.send()}
var make_element = function(tag, opts){

issues with signing latest api

  • seems to work if you use apksigner instead

/opt/android-sdk/build-tools/25.0.2/apksigner sign --ks --out joe.apk ~/unity/selfsame.keystore vanilla.apk-originalt joe.apk

@selfsame
selfsame / arcadia-magic.md
Created August 2, 2017 01:40
Setting up MAGIC in Arcadia
System.ArgumentNullException: Argument cannot be null.
Parameter name: address
at System.Net.WebClient.DownloadString (string) <IL 0x00010, 0x000a2>
at (wrapper remoting-invoke-with-check) System.Net.WebClient.DownloadString (string) <IL 0x00033, 0x00136>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object) <IL 0x00048, 0x00299>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object) <IL 0x00137, 0x0096d>
at arcadia/packages$download_string__39738.__interop_DownloadString39740 (object,object) <IL 0x0000f, 0x00089>
at arcadia/packages$download_string__39738.invokeStatic (object) <IL 0x00008, 0x000e0>
at arcadia/packages$download_string__39738.invoke (object) <IL 0x00006, 0x00085>
at arcadia/packages$dependencies__39849.invokeStatic (object) <IL 0x00112, 0x00e19>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<canvas id="target" width="640" height="480"></canvas>
</body>
<script type="text/javascript">
(ns server.telnet
(import
[java.net ServerSocket Socket SocketException]
[java.io InputStreamReader OutputStreamWriter BufferedWriter]
[clojure.lang LineNumberingPushbackReader]))
(def T_IAC "\u00ff");255
(def T_WILL "\u00fb");251
(def T_WONT "\u00fc");252