Skip to content

Instantly share code, notes, and snippets.

View tobiasvl's full-sized avatar
🦀
Learning Rust

Tobias V. Langhoff tobiasvl

🦀
Learning Rust
View GitHub Profile
@tobiasvl
tobiasvl / fried_eggs.p8
Last active November 15, 2018 10:47 — forked from nucleartide/fried_eggs.p8
You thought you liked breakfast...
u=64
x,y=u,u
es={}c=circfill
f=abs
p=cos
o=sin::_::
if(btn(0))x-=1
if(btn(1))x+=1
if(btn(2))y-=1
if(btn(3))y+=1
@tobiasvl
tobiasvl / move_demo.p8
Created May 22, 2018 20:14 — forked from shaneriley/move_demo.p8
PICO-8 Movement Demo
pico-8 cartridge // http://www.pico-8.com
version 4
__lua__
player = {}
player.x = 5
player.y = 5
player.sprite = 0
player.speed = 2
function move()
@tobiasvl
tobiasvl / to_c_or_not_to_c.md
Last active February 22, 2023 14:24 — forked from ISSOtm/to_c_or_not_to_c.md
Writeup discussing when to use RGBDS or GBDK.

In the past few years, it seems that, as retro gaming has grown in popularity, programming for older platforms has also gained traction. A popular platform is the Game Boy, both for its nostalgia and (relative) ease to program for.

When someone wants to make their own game, one of the first problems they will encounter is picking the tools they will use. There are two main options: either use GBDK (Game Boy Development Kit) and the language C, or RGBDS (Rednex Game Boy Development System) and the Game Boy's assembly language.

The purpose of this document is to provide my insights and experience, and help you make the better choice if you're starting a new project. I will also provide some "good practice" tips, both for C and ASM, if you have already made up your mind or are already using one of these.

Overview

@tobiasvl
tobiasvl / 0main.md
Created July 4, 2016 12:41 — forked from canton7/0main.md
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

@tobiasvl
tobiasvl / multiple_blocks.rb
Last active August 29, 2015 14:26 — forked from 0x0dea/silly?.rb
Hack to execute one block after another based on a boolean value
def true.-(a, &b) a[] end
def false.-(a, &b) b[] end
(1 == 1).--> { :ok } { fail Math }
require 'parslet'
require 'parslet/convenience'
require 'awesome_print'
require 'byebug'
class LocationParser < Parslet::Parser
# literals
rule(:space) { str(' ') }
rule(:spaces) { space.repeat(0) }