Skip to content

Instantly share code, notes, and snippets.

View godot wasm mono.txt
⛶Today at 2:45 PM
you need emsdk: https://emscripten.org/docs/getting_started/downloads.html
1.38.48 or greater do not seem to work with mono right now. we're using 1.38.47
i've had some issues with fastcomp, so i recommend upstream
example:
# Clone and update esmdk
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
View Autoload.cs
using Godot;
namespace Gamma.Core
{
public class Autoload : Node
{
private Node _scene;
public override void _Ready()
{
@exts
exts / GodotPathFinding.cs
Created Apr 27, 2019
Basic path finding in godot 3.1 using C# & Navigation2D node
View GodotPathFinding.cs
using System.Linq;
using Godot;
using Godot.Collections;
namespace Gamma.Core.Scripts
{
public class Arena : Node2D
{
private int Speed = 300;
private bool moveNode = false;
@exts
exts / imageResizer.cs
Created Apr 14, 2019
Nice little image resizer that's using nuget package ImageProcessor
View imageResizer.cs
using System;
using System.IO;
using System.Linq;
using System.Drawing;
using ImageProcessor;
using ImageProcessor.Imaging.Formats;
namespace CardResizer
{
internal class Program
@exts
exts / beta3-4
Created Feb 12, 2019
godot changes from beta3 to 4
View beta3-4
17809ca9a907b8d48bea2fd26ea42312a9eaaca4 Merge pull request #25764 from akien-mga/scons-relative-import
5892b122819091c026f546c1766cdbc06b6e87c8 Merge pull request #25763 from akien-mga/scons-decider
26a547f7fce022dd5565c95b90c79f412943c90f Merge pull request #25762 from akien-mga/tests-gdscript
644b266bae483c903d7c588b38002e4c0ad21054 SCons: Fix import clash between Godot and system modules
2be62587eecbcad855d2d864af13ea407596ed8b SCons: Make MD5-timestamp decider and implicit_cache debug-only
c3638574267b0af5ca086b923e1c1777d1dd131d Be explicit about usage of GDScript tests
f614f155063e43733c5e4c2572b4ea67b3bcc661 doc: Misc formatting fixes
ba0a4a942e9997f9238c4f6a0fb141702316788e i18n: Sync translation template with current source
dc239b47b3c09a0f2900151bcdaeca38ddcb7595 i18n: Sync translations with Weblate
74932b905e928015394aff68a0502a49994d47f7 doc: Sync classref with current source
@exts
exts / player.gd
Last active Jan 16, 2019
Godot Tilemap Collision (for detecting the exact colliding cell from the player position)
View player.gd
func _physics_process(delta):
var direction = Vector2()
# .. figure out the direction
var collision = move_and_collide(direction)
if collision:
handle_collision(collision)
func handle_collision(node):
var collider = get_collider()
@exts
exts / PckFileExposer.cs
Created Oct 5, 2018
Godot 3.1 C# Pck File Exposer
View PckFileExposer.cs
public class PckFileExposer : IDisposable
{
private byte[] _data;
private string _filename;
private string _tmpDataFilename;
private bool _disposed;
public PckFileExposer(string filename)
{
@exts
exts / deploy.php
Last active Jan 3, 2018
Deployer 6.0 - Symfony Flex (4.0) Basic Deploy script
View deploy.php
<?php
namespace Deployer;
require 'recipe/common.php';
//Project Name
set('application', 'app_name');
// Project repository
set('repository', 'git@bitbucket.org:USER/REPO.git');
@exts
exts / AuthenticatedSubscriber.php
Last active Dec 6, 2017
Symfony 4 (Flex) redirect event subscriber in replace of psr-7 middleware
View AuthenticatedSubscriber.php
<?php
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
@exts
exts / Kernel.php
Last active Dec 4, 2017
Symfony 4, Symfony Flex, Vagrant, Failed to remove directory (cache, de~, pools), Windows 10
View Kernel.php
<?php
class Kernel extends BaseKernel
{
use MicroKernelTrait;
const CONFIG_EXTS = '.{php,xml,yaml,yml}';
public function getCacheDir()
{
You can’t perform that action at this time.