Skip to content

Instantly share code, notes, and snippets.

View jtoy's full-sized avatar

jtoy

View GitHub Profile
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 23, 2024 13:41
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

@muralikg
muralikg / background.js
Last active June 8, 2023 09:19
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {
@gilbert
gilbert / DefaultKeyBinding.dict
Last active February 27, 2018 11:30
Add missing keyboard shortcuts on OS X
/*
Create this as a file ~/Library/KeyBindings/DefaultKeyBinding.dict
Then restart your computer.
NOTE: ~ means alt/option
^ means ctrl
*/
{
"~f"="moveWordForward:";
"~b"="moveWordBackward:";
"~<"="moveToBeginningOfDocument:";
WEBGL // p5 WEBGL rendering mode.
createCanvas(w, h, renderer) // Creates a 3D canvas (if renderer is WEBGL).
// Primitives
plane(width, height) // Creates a plane in 3D space. Equivalent to rect() in the default rendering mode.
plane(width, height, detailX, detailY) // Creates a plane in 3D space with the number of triangle subdivisions specified.
box(width) // Creates a cube in 3D space.
box(width, height, depth) // Creates a cuboid in 3D space.
box(width, height, depth, detailX, detailY) // Creates a cuboid in 3D space with triangle subdivisions.
sphere(radius) // Creates a sphere in 3D space.
@kkweon
kkweon / DQN_PyTorch.py
Created June 8, 2017 22:18
PyTorch DQN implementation
"""
DQN in PyTorch
"""
import argparse
import torch
import torch.nn
import numpy as np
import random
import gym
@DrustZ
DrustZ / pvanet.py
Last active January 20, 2018 07:59
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
def debug(debug_open, x, layername):
if debug_open:
print x.size(), 'after', layername
class PVANet(nn.Module):
@martinraison
martinraison / demo.py
Last active October 21, 2018 18:26
sparse pytorch embedding demo
import argparse
from collections import Counter
import csv
import os
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.optim as optim
import torch.utils.data as data
import tarfile
@t-vi
t-vi / validation_set_split.py
Last active August 18, 2017 16:08
Torch validation set split (MNIST example)
import torch.utils.data
from torchvision import datasets, transforms
class PartialDataset(torch.utils.data.Dataset):
def __init__(self, parent_ds, offset, length):
self.parent_ds = parent_ds
self.offset = offset
self.length = length
assert len(parent_ds)>=offset+length, Exception("Parent Dataset not long enough")
super(PartialDataset, self).__init__()
@baku89
baku89 / export_video_inceptionism.py
Created October 30, 2016 01:03
My first video deep-dream
from batcountry import BatCountry
import numpy as np
from PIL import Image
from glob import glob
import os
import random
CAFFE_ROOT = '../caffe'
INPUT_PATH = 'input.jpg'