Skip to content

Instantly share code, notes, and snippets.

View jerrygreen's full-sized avatar

Jerry Green jerrygreen

View GitHub Profile
@jerrygreen
jerrygreen / fib.js
Created July 2, 2021 15:20 — forked from beastaugh/fib.js
Calculate Fibonacci numbers in JavaScript
/**
* The Fibonacci numbers in JavaScript.
*
* A cached solution with O(1) lookup for previously-calculated terms and O(N)
* lookup for uncalculated ones.
*
* Because numbers in JavaScript are 64bit, the largest available number is
* 1.7976931348623157e+308. The 1476th term is the last that can be calculated.
* If a later term is requested, the function will return Infinity.
*

Procedural World Generation

Recently, I wanted to learn to make generators that are able to create some small seamless worlds for a game. Long time ago I would think: how on earth people do that? Here's what I came up with now...

map_static@x2

Making Custom Game Engine

In my previous article I covered what's ECS in overall, and what's ECSY, some other tools and potential bottlenecks.

In this article I'll cover some in-depth benchmarks of what I built and play around it a bit.

Beginning Game Development with TypeScript and ECS

I recently started developing a game, while not using any huge game engines like Unity of Unreal Engine, nor even smaller ones like Heaps or PhaserJS or Cocos2D game frameworks. Here's what I came up with…

git update-index --chmod=+x your_script.sh
@jerrygreen
jerrygreen / install-pre-commit.sh
Last active August 1, 2017 06:50
Rails QA automation
#!/bin/bash
git config --unset core.hooksPath
ln -s -f ../../.pre-commit.sh .git/hooks/pre-commit