Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
nddrylliog / 00_fun.c
Last active August 29, 2015 14:02
Leonard Ritter aka @paniq posted a fun code snippet on Twitter. Here's my breakdown.
#include <assert.h>
#include <stdio.h>
float takes_a_vec3(float *v) {
return v[0]+v[1]+v[2];
}
float takes_three_floats(float x, float y, float z) {
// look ma, no hands!
return takes_a_vec3(&z);
@nddrylliog
nddrylliog / 00-ogre3D-experiments.md
Last active August 7, 2017 11:56
Documenting my experiments with Ogre3D.

Reading the docs

Seems well-organized, wish I had read that years ago - things I found out about rendering by trial and lots of errors are clearly stated there. It probably helped for comprehension that I struggled with these for years but now things make sense.

Approach is clearly a scene-graph but more involved than libgdx's 3D framework: lots of built-in techniques (e.g. for Shadows), implementations of frequently-used algorithms (BSPs, Octrees), etc.

Own binary model format with pre-computed LODs / edge lists, exporter available from Blender: blender2ogre (supports Blender up to 2.66)

@bigsylvain
bigsylvain / Ludum Dare 29 Games.md
Last active March 27, 2020 19:33
Ludum Dare 29 Best games list

Perfect games

  • ScubaBear (HTML5) - perfectly polished, the game is fun to play, and I really like the music changes depending on diving depth, and also the health bar is very original! Amazing to see so much good content created in three days! ScubaBear

  • Asteroid Tycoon (HTML5) - Fun to play, graphics are awesome, some nice humour too! The interface is pretty and convenient. Asteroid Tycoon

  • A Glorious Escape for A Lich King (FLASH) - A very good Tower Defence game, with a good interpretation of the theme "Beneath the surface". Graphics are nice too! Lich King

@nddrylliog
nddrylliog / cool-ld29-entries.md
Last active August 29, 2015 14:00
Cool LD29 entries I had nothing to do with.

Cool LD29 entries I had nothing to do with

Thinking of rating my LD 29 entry? Don't! Instead, go play these cool entries:

(See also Sylvain's list!)

Game Description
Sprites.CSV by awppy . Basic 2D platformer at first, and you get to 'map' each object to a different sprite. It shouldn't be that much of a revelation to a game dev, but being able to swap them while playing as part of the game play is kind of magical.
Under Earth by illugion More of a prototype, but has the most satisfying jump/fire/dash/chain-explode-blocks animations in the history of things I played this last
@nddrylliog
nddrylliog / 00_rules.md
Last active August 29, 2015 13:57
FlappyParty AI project - play at http://www.flappyparty.com/

There's an IS_DEV global variable that'll give you access to Game. Don't use it.

Read canvas pixels instead, it's much funnier! This gist should contain all you need.

Keyboard shortcuts are blocked on the page, use right click -> instead to open the inspector.

@nddrylliog
nddrylliog / apple-darwin11-config.lua
Created February 19, 2014 20:31
luarocks configs for mingw + osx cross-compiles. Create empty folders for each and put those in etc/luarocks/config.lua
variables = {
CC = "i686-apple-darwin11-gcc",
LD = "i686-apple-darwin11-gcc -L/usr/i686-apple-darwin11/usr/lib -lluajit-5.1",
CFLAGS = "-I/usr/i686-apple-darwin11/usr/include/luajit-2.0"
}
arch = "osx-x86"
lib_extension = "dylib"
@nddrylliog
nddrylliog / minimal-cairo.md
Last active May 29, 2024 16:26
Minimal cairo build - for the humanoid who already has everything and just needs vector graphics

You need both pixman and cairo, which you can find here: http://cairographics.org/releases/

Pixman configure:

../pixman-0.32.4/configure --prefix=/root/prefix --disable-libpng --disable-gtk

Cairo configure:

PKG_CONFIG_PATH=/root/prefix/lib/pkgconfig ../cairo-1.12.16/configure --prefix=/root/prefix --enable-xlib=no --enable-xcb=no --enable-xcb-shm=no --enable-win32=no --enable-quartz=no --enable-script=no --enable-ft=no --enable-fc=no --enable-ps=no --enable-pdf=no --enable-svg=no --enable-gobject=no --enable-trace=no --enable-interpreter=no --enable-png=no

@nddrylliog
nddrylliog / cookieclicker.js
Created October 23, 2013 16:01
Dumb automation for CookieClicker
var t = setInterval(function() { $('#bigCookie').click() }, 1);
var t2 = setInterval(function() { Game.UpgradesInStore[0].buy() }, 20);
var t3 = setInterval(function() { $p = $('.product.enabled'); if ($p) { $p.click(); } }, 200);
var t4 = setInterval(function() { $p = $('#goldenCookie'); if ($p) { $p.click() }}, 200);
@nddrylliog
nddrylliog / geminstall.log
Created September 23, 2013 22:37
rubygems rubinius can't modify frozen object. rubinius 2.1.0.n266 (2.1.0 25638f94 2013-09-23 JI) [i686-linux-gnu]
$ rbx -S gem install json --verbose
HEAD https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://rubygems.org/quick/Marshal.4.8/json-1.1.5-x86-linux.gemspec.rz
all: register
register : register.c
gcc -save-temps -m32 -g -fno-pie -o $@ $^
dsymutil $@
clean:
rm -rf register register.dSYM