Skip to content

Instantly share code, notes, and snippets.

Avatar
🗿

Nguyen Dac Nam namkazt

🗿
View GitHub Profile
View smods.ru.js
// ==UserScript==
// @name SkyMods downloader for steam
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Download mod via skymods.ru directly from steam workshop
// @author Namkazt ( nam.kazt.91@gmail.com )
// @match https://steamcommunity.com/sharedfiles/filedetails/*
// @match https://steamcommunity.com/workshop/filedetails/*
// @match https://steamcommunity.com/workshop/browse/?appid=255710*
// @match https://steamcommunity.com/workshop/browse/?appid=289070*
@namkazt
namkazt / Bus.cs
Last active Jan 26, 2020
Event Bus for unity with UniRx
View Bus.cs
// Create by: Nam kazt
// Email: nam.kazt.91@gmail.com
// Event Bus for unity with UniRx
/* How to use:
*
// 1, NormalEventCall
//------------------------------------------------------
// create test passing data
View Procjam-WFC-tutorial.md

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

@namkazt
namkazt / NBus.swift
Last active Nov 1, 2018
A simple event bus using RxSwift that make it as short as possible
View NBus.swift
//
// NEvent.swift
// dailycalcium
//
// Created by Nam Nguyen on 10/26/18.
// Copyright © 2018 Impala Intech Limited. All rights reserved.
// NOTE: check comment for usage
//
@namkazt
namkazt / MainLightNode.cs
Created Oct 9, 2018 — forked from ciro-unity/MainLightNode.cs
A custom node for Unity's ShaderGraph to capture lighting and use it into the shader. Works as of July 2018, but the APIs might change!
View MainLightNode.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor.ShaderGraph;
using System.Reflection;
[Title("Custom", "Main Light")]
public class MainLightNode : CodeFunctionNode
{
public override bool hasPreview {get {return false;}}
@namkazt
namkazt / mutex
Created Aug 16, 2018
mutex concept
View mutex
Mutex::Mutex()
{
g_isLocked = false;
svcCreateMutex(&g_mutexHandle, g_isLocked);
}
Mutex::~Mutex()
{
@namkazt
namkazt / Makefile
Created Aug 15, 2018
build 3ds portlibs with ffmpeg 4.0
View Makefile
BZIP2 := bzip2
BZIP2_VERSION := $(BZIP2)-1.0.6
BZIP2_SRC := $(BZIP2_VERSION).tar.gz
BZIP2_DOWNLOAD := "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
FREETYPE := freetype
FREETYPE_VERSION := $(FREETYPE)-2.6.2
FREETYPE_SRC := $(FREETYPE_VERSION).tar.bz2
FREETYPE_DOWNLOAD := http://download.savannah.gnu.org/releases/freetype/freetype-2.6.2.tar.bz2
View ClippedSprite.as
package starling.extensions
{
import flash.display3D.Context3D;
import flash.geom.Point;
import flash.geom.Rectangle;
import starling.core.RenderSupport;
import starling.core.Starling;
import starling.display.DisplayObject;
import starling.display.Sprite;
View ClippedSprite.as
package starling.extensions
{
import flash.display3D.Context3D;
import flash.geom.Point;
import flash.geom.Rectangle;
import starling.core.RenderSupport;
import starling.core.Starling;
import starling.display.DisplayObject;
import starling.display.Sprite;
View ClippedSprite.as
package starling.extensions
{
import flash.display3D.Context3D;
import flash.geom.Point;
import flash.geom.Rectangle;
import starling.core.RenderSupport;
import starling.core.Starling;
import starling.display.DisplayObject;
import starling.display.Sprite;