Skip to content

Instantly share code, notes, and snippets.

@wuuff
wuuff / ArduboyAssistant.ino
Created May 3, 2018 11:59
A modified version of crait's Arduboy Assistant that has some changes to how EEPROM is saved and restored
//Arduboy Assistant
// Version 1.1, Aug 29, 2016
// By Jonathan Holmes (crait)
//
// Website: http://www.crait.net/
// Twitter: @crait
//
//Arduboy Assistant is a program that allows you to manage an Arduboy's EEPROM as well as test several
//hardware and software components. You can view raw EEPROM data, back it up through the Arduino IDE's
//serial monitor, restore EEPROM data the same way, and even clear the entirety of the EEPROM data.
@wuuff
wuuff / binarymapconverter.py
Created November 4, 2017 06:30
simple python script to convert map data from json to a binary format
import sys,struct,json
if len(sys.argv) != 2:
print "No! One argument, the json map, come on"
exit()
with open(sys.argv[1]) as f:
map = json.load(f)
mapdata = map['layers'][0]['data']
for item in mapdata:
@wuuff
wuuff / large_test_map.json
Created November 4, 2017 06:29
simple 128x128 test map
{ "height":128,
"layers":[
{
"data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@wuuff
wuuff / mapgen.c
Last active June 12, 2017 05:33
Simple random map generator (WIP)
#include <stdio.h>
#include <stdlib.h>
#define MAPSIZE 64
void mapinit(char map[][MAPSIZE], int width, int height);
void mapgen(char map[][MAPSIZE], int mapwidth, int mapheight, int startx, int starty, int endx, int endy);
void mapprint(char map[][MAPSIZE], int width, int height);
void mapinit(char map[][MAPSIZE], int width, int height){
@wuuff
wuuff / Hello.cpp
Created May 31, 2017 06:57
CHIP-8 interpreter for Pokitto (WIP)
#include "pokitto.h"
Pokitto::Core game;
//#define SCREEN_W 110
//#define SCREEN_H 88
extern "C" {
#include "chip8.h"
void chip8_initialize(C8* CH8);