Skip to content

Instantly share code, notes, and snippets.

View shalomfriss's full-sized avatar

Shalom Friss shalomfriss

View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 26, 2024 11:50
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

@lattner
lattner / TaskConcurrencyManifesto.md
Last active April 25, 2024 18:22
Swift Concurrency Manifesto
@jay18001
jay18001 / Matrix4.swift
Created February 24, 2017 02:57
Swift version of helper class from Ray Wenderlich: Metal Tutorial with Swift 3 Part 2
import UIKit
import GLKit
extension Float {
var radians: Float {
return GLKMathDegreesToRadians(self)
}
}
class Matrix4 {
@neonichu
neonichu / serve.swift
Last active April 21, 2022 17:09
Tiny HTTP server example in Swift.
#!/usr/bin/env swift
#if os(Linux)
import Glibc
let sin_zero = (UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0))
let sock_stream = Int32(SOCK_STREAM.rawValue)
#else
import Darwin.C
@lambdamusic
lambdamusic / define.py
Last active February 15, 2023 14:52
Access osx dictionary in python
#!/usr/bin/env python
"""
# Version
2021-08-31
# Tested on
Python 3.9
@JeOam
JeOam / Animation.md
Last active February 18, 2024 21:18
iOS Core Animation: Advanced Techniques, Part 1: The Layer Beneath

Author: https://www.cyanhall.com/

1. The Layer Tree

Core Animation's original name is Layer Kit

Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.

In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer. The only major feature of UIView that isn’t handled by CALayer is user interaction.

There are four hierarchies, each performing a different role:

@nishantmodak
nishantmodak / nginx.conf.default
Last active February 29, 2024 13:48
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@shayonj
shayonj / DraggableView.swift
Last active March 21, 2017 17:45
Swift implementation of https://github.com/cwRichardKim/TinderSimpleSwipeCards . Note: Code still requires a lot of improvements, especially Object Oriented Design changes. (Started out with iOS a few weeks backs, so still learning :) (It wont work with the new release of Xcode / Swift beta 2.0 (Still a WIP))
//
// DraggableView.swift
// Swipe
//
// Created by Shayon Mukherjee on 11/5/14.
// Copyright (c) 2014 Swipe. All rights reserved.
//
import Foundation
import UIKit
@wojciak
wojciak / pixiRetinaResize.js
Created July 3, 2014 20:04
A base implementation of properly handling viewport resize and rotation in PIXI.js (including retina support).
/**
* The width and height to which our graphic assets are designed for
* Keep in mind retina resolutions and remember to provide 2xWidth 2xHeight assets for them
*/
var targetWidth = 1024;
var targetHeight = 768;
/**
* The main (root) container on the stage
* You should always have a master container on your stage
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 30, 2024 06:01
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);