Skip to content

Instantly share code, notes, and snippets.

View insthync's full-sized avatar

Ittipon Teerapruettikulchai insthync

  • Chiang Mai, Thailand
View GitHub Profile
@insthync
insthync / Linux or Mac arguments
Created November 28, 2018 02:31
MMORPG KIT - MMO Getting Started
$ ./Game.app -startMapSpawnServer -spawnExePath "Path of your execution file such as /Game/Game.app" -startCentralServer -startChatServer
@insthync
insthync / Full arguments
Created November 28, 2018 02:30
MMORPG KIT - MMO Getting Started
D:\MMO\MMO.exe -startMapSpawnServer -spawnExePath "D:\MMO\MMO.exe" -startCentralServer -startChatServer -machineAddress "192.168.1.102"
@insthync
insthync / Machine address arguments
Created November 28, 2018 02:29
MMORPG KIT - MMO Getting Started
-machineAddress "Address to your machine"
@insthync
insthync / Start, Spawn Map arguments
Created November 28, 2018 02:28
MMORPG KIT - MMO Getting Started
-startMapSpawnServer
-spawnExePath "Path of your execution file such as C:\Game\Game.exe"
-startCentralServer
-startChatServer
@insthync
insthync / Turnbase RPG - Add currency (LiteDB)
Last active November 28, 2018 02:33
Turnbase RPG - Add currency (LiteDB)
// Add soft currency (coin)
var increaseSoftCurrency = 100; // Adding 100 coins
var softCurrency = GetCurrency(playerId, GameInstance.GameDatabase.softCurrency.id);
softCurrency.Amount += increaseSoftCurrency;
colPlayerCurrency.Update(softCurrency);
// Add hard currency (gem)
var increaseHardCurrency = 50; // Adding 50 gems
var hardCurrency = GetCurrency(playerId, GameInstance.GameDatabase.hardCurrency.id);
hardCurrency.Amount += increaseHardCurrency;
@insthync
insthync / Dev Extension Sample
Last active November 28, 2018 02:33
Dev Extension Sample
using LiteNetLibManager;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MultiplayerARPG
{
public partial class PlayerCharacterEntity
{
[DevExtMethods("Start")]
@insthync
insthync / gist:5bada28c9568bd99a929ed91e23fa03f
Created September 29, 2018 16:06
Test bitwise shift (javascript)
var sum = 0;
for (var i = 0; i < 16; ++i)
{
console.log(1 << i);
sum += (1 << i);
}
console.log("sum : " + sum);
@insthync
insthync / gist:71ae162aa6ae8e1dfd63dbb4149204d0
Last active August 18, 2018 01:39
MMORPG KIT - ./config/serverConfig.json
{
"centralAddress" : "localhost",
"centralPort" : 6000,
"centralMaxConnections" : 1100,
"machineAddress" : "yourdomain.com",
"mapSpawnPort" : 6001,
"mapSpawnMaxConnections" : 2,
"spawnExePath" : "./Build.exe",
"notSpawnInBatchMode" : false,
@insthync
insthync / gist:5d4e0d18030c8beff04b087a003ea9d2
Created August 18, 2018 01:15
MMORPG KIT - ./config/mySqlConfig.json
{
"mySqlAddress" : "localhost",
"mySqlPort" : 3306,
"mySqlUsername" : "root",
"mySqlPassword" : "",
"mySqlDbName" : "mmorpgtemplate"
}
@insthync
insthync / gist:1d5dca0882413cfddfce3cdfaeceef60
Created August 18, 2018 01:09
MMORPG KIT - ./config/sqliteConfig.json
{
"sqliteDbPath" : "./mmorpgtemplate.sqlite3"
}