Skip to content

Instantly share code, notes, and snippets.

View namkazt's full-sized avatar
🗿

Nguyen Dac Nam namkazt

🗿
View GitHub Profile
// ==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 October 9, 2023 10:03
Event Bus for unity with UniRx
// 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

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 November 1, 2018 15:57
A simple event bus using RxSwift that make it as short as possible
//
// 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 October 9, 2018 07:16 — 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!
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 August 16, 2018 11:16
mutex concept
Mutex::Mutex()
{
g_isLocked = false;
svcCreateMutex(&g_mutexHandle, g_isLocked);
}
Mutex::~Mutex()
{
@namkazt
namkazt / Makefile
Created August 15, 2018 17:30
build 3ds portlibs with ffmpeg 4.0
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
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;
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;
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;