Skip to content

Instantly share code, notes, and snippets.

@Powersaurus
Powersaurus / MainActivity.java
Last active October 1, 2015 23:21
Procedural hills with parallax scrolling
package com.powersaurus.landscape;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.content.pm.*;
import android.util.*;
import android.content.*;
import android.graphics.*;
leveltime=0
width=256
sealevel=20
screenshake=0
--slug
px=64
py=20
pdx=0
pdy=0
pflip=false
pico-8 cartridge // http://www.pico-8.com
version 8
__lua__
grid={}
picks={}
timer=0
level_timer=1800
reveal_timer=-1
function _init()
@Powersaurus
Powersaurus / rayzzz.p8
Created August 14, 2017 22:47
Pico-8 Raycaster demo
pico-8 cartridge // http://www.pico-8.com
version 8
__lua__
-- raycaster demo
-- by @powersaurus
-- based heavily on http://lodev.org/cgtutor/raycasting.html
-- and http://lodev.org/cgtutor/raycasting2.html
-- and inspired by the work of @matthughson
-- thanks for advice from @kometbomb and @doyousketch2
@Powersaurus
Powersaurus / rayzzz-0.2.p8
Created August 26, 2017 15:21
Pico-8 raycaster version 0.2
pico-8 cartridge // http://www.pico-8.com
version 8
__lua__
-- raycaster demo
-- by @powersaurus
-- based heavily on http://lodev.org/cgtutor/raycasting.html
-- and http://lodev.org/cgtutor/raycasting2.html
-- and inspired by the work of @matthughson
-- thanks for advice from @kometbomb and @doyousketch2 and @krajzeg
--
@Powersaurus
Powersaurus / Main.hs
Created August 7, 2018 08:29
Haskell Terrain Generator WIP
module Main(main) where
-- http://alpmestan.com/posts/2013-04-02-gloss-juicy-0-dot-1-load-juicypixels-images-in-your-gloss-applications.html
import Codec.Picture
import Graphics.Gloss
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Juicy
import System.Random
@Powersaurus
Powersaurus / rayzzz-2.p8
Created August 13, 2018 21:40
PICO-8 ray caster demo with loads of flip() calls
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- raycaster demo
-- by @powersaurus
-- based heavily on http://lodev.org/cgtutor/raycasting.html
-- and http://lodev.org/cgtutor/raycasting2.html
-- and inspired by the work of @matthughson
-- thanks for advice from @kometbomb and @doyousketch2
@Powersaurus
Powersaurus / rayzzz-0.3.p8
Created April 19, 2019 21:59
Pico-8 raycaster
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- raycaster demo
-- by @powersaurus
-- based heavily on http://lodev.org/cgtutor/raycasting.html
-- and http://lodev.org/cgtutor/raycasting2.html
-- and inspired by the work of @matthughson
-- thanks for advice from @kometbomb and @doyousketch2
@Powersaurus
Powersaurus / raycaster-doors-demo.p8
Created May 3, 2019 14:20
PICO-8 Raycaster Doors demo
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- by @powersaurus, based on
-- https://lodev.org/cgtutor/raycasting.html
m_width=10
m_height=10
world={
@Powersaurus
Powersaurus / rayzzz-0.4.p8
Created September 9, 2019 22:06
Ray caster demo in PICO-8, now with fancier walls
pico-8 cartridge // http://www.pico-8.com
version 18
__lua__
-- raycaster demo
-- by @powersaurus
-- based heavily on http://lodev.org/cgtutor/raycasting.html
-- and http://lodev.org/cgtutor/raycasting2.html
-- and inspired by the work of @matthughson
-- thanks for advice from @kometbomb and @doyousketch2