Skip to content

Instantly share code, notes, and snippets.

View niedzielski's full-sized avatar
🥨

stephen niedzielski

🥨
View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 3, 2024 10:01
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

@polishdeveloper
polishdeveloper / PagePreviewsBucketerForAnon.js
Last active April 17, 2018 13:07
Bucket yourself as anonymous user who can see PagePreviews on Wikipedia
var sessId = 0,
bucket = 'off';
weightedBoolean = function getUserBucket( experiments, experimentGroupSize, sessionId ) {
const control = experimentGroupSize / 2;
if ( !experimentGroupSize ) {
return 'on';
}
return experiments.getBucket( {
name: 'ext.Popups.visibility',
@joakin
joakin / static-marvin.sh
Created November 24, 2017 10:19
Static Marvin build
#!/bin/bash
git clone https://github.com/wikimedia/marvin.git
cd marvin/
npm i
npm run build
# Run node server to get the HTML
node dist/server/index.js &
# Save the HTML to dist/
curl http://localhost:3000/ > dist/index.html

3 Gripes With React

I started using React 3.5 years ago, and I still love it. It was such a well-designed solution that not much has changed since then, only superficial stuff like naming. What I learned then is still wholly applicable today because it's such a good idea (although now you can choose from many other libraries). On top of that, we now benefit from an entirely new architecture (fiber) without changing much.

@jdlrobson
jdlrobson / CustomElement.html
Created August 18, 2017 17:44
CustomElement.html - autocomplete
<!DOCTYPE HTML>
<html>
<head>
<title>Custom element autocomplete</title>
</head>
<body>
<h1>CustomElement AutoComplete</h1>
<p>
Upgrades a standard select element to work like an autocomplete by using CustomElements.
It will degrade on older browsers that do not support elements to a select dropdown.
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@joakin
joakin / README.md
Last active January 14, 2019 18:55
Collapse repeated unread notifications in phabricator
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
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
@telekosmos
telekosmos / uniq.js
Last active November 15, 2022 17:13
Remove duplicates from js array (ES5/ES6)
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var uniqEs6 = (arrArg) => {
return arrArg.filter((elem, pos, arr) => {
return arr.indexOf(elem) == pos;
});
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )