- Mandatory pre-requisites
- New Unity project
- Absolutely must add this to your packages:
com.unity.nuget.newtonsoft-json
- Otherwise, calling .ToString() on JSON objects will return
NewsonSoft.Something.Something
, and your API calls will return HTTP 400s for bad requests
- Otherwise, calling .ToString() on JSON objects will return
- Must have Linux dedicated server modules installed (including the Mono and IL2CPP modules)
- Ensure you are switched over to Linux dedicated server build once modules are installed. You may need to restart your editor to accomplish this
- Open the HashGrid_Demo scene, and make sure this scene is included in Build Settings, not the default Sample Scene
- You shouldn’t need to do this, but in case you see complaints about Spawnable Prefabs being null, in the HashGrid_Demo scene, ensure NetworkManager has its Spawnable Prefabs set to Default Prefab Objects
- Install Docker Engine so that you can build Docker containers
- Step 1: Build our dedicated server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'optimist' | |
require 'plist' | |
def run(path, source_path) | |
process(path, source_path, '**/*.app', true) | |
process(path, source_path, '**/*.dylib', false) | |
end | |
def process(path, source_path, search_pattern, is_app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optimist' | |
require 'plist' | |
# Setups of source path mapping for the framework at framework_path, | |
# which has a dsym at dsym_path. It maps the source paths to the | |
# source_path root. Implementation borrowed from https://medium.com/@maxraskin/background-1b4b6a9c65be | |
def setup_dsym_source_mapping(framework_path, dsym_path, source_path) | |
binary_uuids = get_uuids_of_dwarf(framework_path) | |
dsym_uuids = get_uuids_of_dwarf(dsym_path) | |
verify_uuids(binary_uuids, dsym_uuids) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EnemyModel | |
{ | |
public ReactiveProperty<long> CurrentHp { get; private set; } | |
public ReactiveProperty<bool> IsDed { get; private set; } | |
public EnemyModel(int initialHp) | |
{ | |
CurrentHp = new ReactiveProperty<long>(initialHp); | |
IsDead = CurrentHp.Select(x => x <= 0).ToReactiveProperty(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rrectfill(x0, y0, x1, y1, col, corners) | |
local tl = corners and corners.tl | |
local tr = corners and corners.tr | |
local bl = corners and corners.bl | |
local br = corners and corners.br | |
local new_x0 = x0 + max(tl, bl) | |
local new_y0 = y0 + max(tl, tr) | |
local new_x1 = x1 - max(tr, br) | |
local new_y1 = y1 - max(bl, br) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function weighted_choice(choices) | |
local total_weight = 0 | |
local thresholds = {} | |
for choice, weight in pairs(choices) do | |
add(thresholds, {total_weight, choice}) | |
total_weight += weight | |
end | |
local selection = rnd(total_weight) | |
for i=1,#thresholds-1 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const verbs = [ | |
'move horizontally', | |
'raise sword', | |
'lower sword', | |
'thrust sword', | |
] | |
const objects = [ | |
'fencer with sword', | |
'piste', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pico-8 cartridge // http://www.pico-8.com | |
version 16 | |
__lua__ | |
-- here's a simple player class: | |
function player(o) | |
return { | |
x=64, | |
y=64, | |
on_input=o.on_input, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- [ ] swing | |
- [ ] blow | |
- [ ] shake whipped cream / screenshake | |
- [ ] wash dishes | |
- [ ] cut / chop | |
- [ ] roll | |
- [ ] punch | |
- [ ] blow up | |
- [ ] cook (by breathing fire) | |
- [ ] jump |
NewerOlder