Skip to content

Instantly share code, notes, and snippets.

View mhilbrunner's full-sized avatar

Max Hilbrunner mhilbrunner

View GitHub Profile
@mhilbrunner
mhilbrunner / IOSLauncher.java
Created January 31, 2015 03:37
RoboVM: Foundation.log crash with certain strings (GC crash) (31.01.2015)
package org.robovm.RoboVMTest;
import org.robovm.apple.foundation.Foundation;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
import org.robovm.apple.uikit.UIApplicationDelegateAdapter;
import org.robovm.apple.uikit.UIApplicationLaunchOptions;
import org.robovm.apple.uikit.UIScreen;
import org.robovm.apple.uikit.UIWindow;
@mhilbrunner
mhilbrunner / gist:3f25ae918294480e249c
Created January 22, 2016 04:19
Java/libGDX barebones dialog text input and selection with simple validation, hacked together
import javax.swing.JOptionPane;
import javax.swing.UIManager;
public class GUI {
public static final String DEFAULT_CHOOSE_TITLE = "Selection";
public static final String DEFAULT_CHOOSE_MSG = "Please choose:";
public static final String DEFAULT_INPUT_TITLE = "Input";
public static final int PLAIN_MESSAGE = JOptionPane.PLAIN_MESSAGE;
@mhilbrunner
mhilbrunner / gist:cf94f6b80883871840e6
Created January 25, 2016 00:29
libGDX Scene2D TextField Copy Paste Clipboard Crash Stacktrace
Uncaught exception in thread LWJGL Application (ID9) caused by null
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeHi(TimSort.java:868)
at java.util.TimSort.mergeAt(TimSort.java:485)
at java.util.TimSort.mergeCollapse(TimSort.java:410)
at java.util.TimSort.sort(TimSort.java:214)
at java.util.TimSort.sort(TimSort.java:173)
at java.util.Arrays.sort(Arrays.java:659)
at sun.awt.datatransfer.DataTransferer.setToSortedDataFlavorArray(DataTransferer.java:2426)
at sun.awt.datatransfer.ClipboardTransferable.<init>(ClipboardTransferable.java:100)
@mhilbrunner
mhilbrunner / http_test.gd
Created December 12, 2017 18:30
Godot 3 HTTPClient video download test; execute with godot -s http_test.gd
extends SceneTree
func _init():
var bigVideo = true
var URL1 = "http://techslides.com"
var URL2 = "/demos/sample-videos/small.ogv"
var httpPort = 80
var httpSSL = false
#!/usr/bin/env python
Import('env')
Import('env_modules')
env_enet = env_modules.Clone()
# Thirdparty source files
if env['builtin_miniupnpc']:
extends Node2D
func _ready():
$Button/request.connect("request_completed", self, "_request_completed")
func _on_Button_pressed():
var fields = {"username" : "user", "password" : "pass"}
var queryString = HTTPClient.new().query_string_from_dict(fields)
print(queryString)
var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())]
@mhilbrunner
mhilbrunner / FXAA.tscn
Created April 22, 2019 16:52 — forked from cart/FXAA.tscn
Godot Nvidia FXAA 3.11 Port
[gd_scene load_steps=3 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
// Godot Nvidia FXAA 3.11 Port
// Usage: Drop this in to any 3D scene for FXAA! This is a port of the \"PC High Quality Preset 39\". However the medium quality
// parameters are also included. For medium quality, just comment out sections \"PS 6\" and above and uncomment the \"med 13\" variables.
@mhilbrunner
mhilbrunner / godot4multiplayergist.md
Last active August 29, 2023 00:54
Unofficial Godot 4.0 Pre-Alpha Multiplayer Changes Overview
@mhilbrunner
mhilbrunner / redirects-2022-01-18.txt
Created January 18, 2022 04:57
Godot Docs Redirects
/en/3.4/tutorials/legal/complying_with_licenses -> /en/3.4/about/complying_with_licenses
/en/3.4/classes/class_bulletphysicsserver -> /en/3.4/classes/class_gltfdocument
/en/3.4/tutorials/assetlib/index -> /en/3.4/community/asset_library/index
/en/3.4/tutorials/assetlib/uploading_to_assetlib -> /en/3.4/community/asset_library/uploading_to_assetlib
/en/3.4/tutorials/assetlib/using_assetlib -> /en/3.4/community/asset_library/using_assetlib
/en/3.4/tutorials/assetlib/what_is_assetlib -> /en/3.4/community/asset_library/what_is_assetlib
/en/3.4/getting_started/step_by_step/godot_design_philosophy -> /en/3.4/getting_started/introduction/godot_design_philosophy
/en/3.4/tutorials/content/procedural_geometry/arraymesh -> /en/3.4/tutorials/3d/procedural_geometry/arraymesh
/en/3.4/tutorials/content/procedural_geometry/immediategeometry -> /en/3.4/tutorials/3d/procedural_geometry/immediategeometry
/en/3.4/tutorials/content/procedural_geometry/index -> /en/3.4/tutorials/3d/procedural_geometry/index