Skip to content

Instantly share code, notes, and snippets.

View tvolodimir's full-sized avatar

Volodymyr tvolodimir

View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 4, 2024 23:05
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

@strothj
strothj / LICENSE
Last active March 30, 2024 11:35
ResizeObserver TypeScript definition
Copyright 2020 Jason Strothmann
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@izy521
izy521 / objectdeepcopy.js
Created July 30, 2016 17:28
`JSON.parse( JSON.stringify( obj) )` has been regarded as the fastest method for deep copying Objects, but is it? This is mainly just to test. Obviously Functions aren't allowed in JSON.
var Types = new Map();
Types.set(Array, function(v) {
var l = v.length; i = 0, a = Array(l);
for (i; i<l; i++) {
a[i] = v[i];
}
return a;
});
Types.set(Number, function(v) {
return v * 1;
@paulirish
paulirish / what-forces-layout.md
Last active May 6, 2024 07:54
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
anonymous
anonymous / Eliminate Interlocked CompareExchange for add_ and remove_ methods for Unity3D
Created December 22, 2012 10:45
Replace event add_/remove_ methods with versions that do not use Interlocked.CompareExchange<T>. Instead they use Delegate.Combine/Remove in a way that lacks thread safety. Needed for AOT compilation on Unity3D
// CAUTION: This can irreversibly change your DLLs.
// Reference: Mono.Cecil (DLL version 0.9.4.0, from package Cecil 2.10.9)
using System;
using Mono.Cecil;
using Mono.Cecil.Cil;
using System.Linq;
using System.IO;
using System.Collections.Generic;
@pete-otaqui
pete-otaqui / css-onload.js
Created October 18, 2012 14:42
Load External Domain CSS, and get a Callback in IE7, IE8, IE9, FF, Chrome & Safari
function cssLoad(url, callback) {
var promise,
resolutions = [],
rejections = [],
resolved = false,
rejected = false,
count, id;
@tonyduke
tonyduke / btree.js
Created March 20, 2012 15:06 — forked from minikomi/btree.js
Javascript:B-tree
var btree = function(arr){
var tree = {
val : arr[0],
name: "Base"
l : {},
r : {}
};
var add_node = function (node, leaf, name){
if (node.val === undefined){
node.l = {};
@minikomi
minikomi / btree.js
Created March 5, 2012 08:06
B-Tree muck around
var btree = function(arr){
var tree = {
val : arr[0],
name: "Base"
l : {},
r : {}
};
var add_node = function (node, leaf, name){
if (node.val === undefined){
node.l = {};
@cowboy
cowboy / bad-bad-bad.js
Created October 15, 2011 14:44
Shitty destructors for JavaScript!
function Thing(context, name) {
this.context = context;
this.name = name;
this.init();
this.startTheWorstGarbageCollectorEver();
}
Thing.prototype.startTheWorstGarbageCollectorEver = function() {
var id = setInterval(function() {
if (!this.context[this.name]) {