Skip to content

Instantly share code, notes, and snippets.

View Kattoor's full-sized avatar

Jasper Catthoor Kattoor

View GitHub Profile
@Kattoor
Kattoor / terrainGeneration.html
Created November 16, 2017 10:54
Terrain Generation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dag Randy</title>
<style>
body {
margin: 0;
overflow: hidden;
}

This is a quick tutorial following a post about transport belts I made earlier this week.

Disclaimer: I'm fairly new with working with GameMaker so I might not be following the best practices, sorry for that! Some parts of this might be refactored, but I wrote them this way for the (in my opinion) best readability for this tutorial. Also, English is not my native language.

The way we'll be implementing the transport belts is like a linked list data structure.

In computer science, a linked list is a linear collection of data elements, whose order is not given by their physical placement in memory. Instead, each element points to the next. --- Wikipedia

In other words: each belt object points to the next belt object in line.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import fr.delthas.javamp3.Sound;
import javax.imageio.ImageIO;
import javax.sound.sampled.*;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@Kattoor
Kattoor / package.json
Created May 22, 2021 16:32
rs-gains-chart
{
"name": "rs-gains-chart",
"version": "1.0.0",
"description": "",
"author": "Jasper Catthoor",
"dependencies": {
"axios": "^0.21.1",
"chart.js": "^3.2.0",
"chartjs-adapter-moment": "^1.0.0",
"chartjs-node-canvas": "^3.2.0",
@Kattoor
Kattoor / datasheetformat.js
Created August 9, 2021 09:20
datasheetformat.js
const fs = require('fs');
const data = fs.readFileSync('javelindata_areadefinitions.datasheet');
const amountOfColumnsOffset = 0x44;
const amountOfRowsOffset = 0x48;
const headersOffset = 0x5c;
const amountOfBytesInHeader = 12;
const amountOfBytesInCell = 8;
import {globby} from 'globby';
import workerpool from 'workerpool';
import {dirname} from 'path';
import {fileURLToPath} from 'url';
import {open} from 'yauzl';
import fs from 'fs';
const start = Date.now();
const yellow = "\x1b[33m%s\x1b[0m";
const cyan = "\x1b[36m%s\x1b[0m"
import {globby} from 'globby';
import fs from 'fs';
import {execSync} from 'child_process';
const path = 'C:\\Users\\jaspe\\out\\\\';
const filePaths = (await globby('**/*.dds', {cwd: path})).map((pathSuffix) => path + pathSuffix.replace(/\//g, '\\'));
let count = 0;
@Kattoor
Kattoor / gist:1f720c1803bc9872308b2e171eaf8459
Created May 2, 2024 08:44
Arcanists 2 sandbox commands
In sandbox, type TAB to enter a command
1. Cast a spell
Just type the spell name and press ENTER (e.g. shock bomb, mud ball, fissure, ...)
The spell is thrown at the direction of your cursor
https://gyazo.com/8ee5fc524b78413dac157f8c1481a6e1
2. Throwing power
You can set the power with which you throw a spell using the command `power.NUMBER` where NUMBER is a number between 50 and 2000
Every spell that you cast after setting a specific power, will be thrown at that power.