Skip to content

Instantly share code, notes, and snippets.

View kevzettler's full-sized avatar

kev zettler kevzettler

View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 11, 2024 14:34
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@Jellonator
Jellonator / godot_mode7_shader.shader
Created January 2, 2020 22:42
Mode 7 shader for Godot
shader_type canvas_item;
uniform mat4 TRANSFORM;
uniform vec2 DEPTH;
uniform bool REPEAT_X;
uniform bool REPEAT_Y;
uniform bool FLIP;
void fragment() {
// Create the matrix. A workaround is used to modify the matrix's W column
@ralt
ralt / eshell.org
Last active January 19, 2022 19:18
my eshell config

Eshell

eshell is the shell I’ve tried using over time, and in the end just never stick with it. Let’s try one more time with a couple of tricks. The first tricks are mostly documentation:

  • M-& in a tramp-aware session means you run commands in a new buffer, without a TTY. Great for things like tailf.
  • for ncurses-like applications, “visual commands” is the missing context. Applications like top are in the default list by default,
@luruke
luruke / bunny.js
Created October 27, 2018 07:51
draw bunny on terminal
const drawille = require('drawille')
const bunny = require('bunny')
const glmatrix = require('gl-matrix')
const width = 200
const height = 200
const canvas = new drawille(width, height)
const mat4 = glmatrix.mat4
const vec3 = glmatrix.vec3
let points = []
const util = require('util');
const Transform = require('stream').Transform;
function Slicer (options) {
if (!(this instanceof Slicer)) {
return new Slicer(options);
}
Transform.call(this, options);
}
@bryzettler
bryzettler / firstArgSelector.js
Created September 18, 2017 20:35
First Arg Reselect
/* eslint-disable import/prefer-default-export */
// @flow
import { createSelectorCreator } from 'reselect';
const defaultEqualityCheck = (a, b) => (a === b);
/**
* A selector that will only change the output if the first argument has changed.
*/
export const firstArgSelector = createSelectorCreator(
@ManasJayanth
ManasJayanth / canvas-immediate.js
Created April 19, 2017 05:50
Canvas Immediate mode rendering using React
import type { HostConfig, Reconciler } from 'react-fiber-types';
import type { ReactNodeList } from 'react-fiber-types/ReactTypes';
import DOMPropertyOperations from './DOMPropertyOperations';
import type {
Props,
Container,
Instance,
TextInstance,
OpaqueHandle,
@blainekasten
blainekasten / connect-context.js
Last active June 2, 2020 15:52
Use Redux Connect, with context in your map* methods!
import React from 'react';
import { connect as reduxConnect } from 'react-redux';
function wrapWithContext(mapStateToProps, mapDispatchToProps, contextTypes, component) {
return class ConnectedComponent extends React.Component {
constructor(props, context) {
super(props, context);
/*
* This is the magic right here!
@twolfson
twolfson / README.md
Created February 2, 2017 03:20
Proof of concept for splitting UUID ranges

We are processing items in bulk and want to have multiple jobs running for them without double sending emails or the like. We can't use offset without potentially having that problem so we are considering splitting UUID ranges.

It should work like:

  • Count total amount of items present
  • Calculate how many batches we'll need for items present
  • Divide UUID range (i.e. 0000... to FFFF...) into potential values
    • For 2 batches, this would be (0000... - 7777...F and 8888... - FFFF...)
  • Kick off jobs with these given ranges so they can process in parallel without potential collision

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh