Navigation Menu

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)

diff --git a/gdx/src/com/badlogic/gdx/graphics/g3d/particles/values/MeshSpawnShapeValue.java b/gdx/src/com/badlogic/gdx/graphics/g3d/particles/values/MeshSpawnShapeValue.java
index 7d7cb2c..bc5f297 100644
--- a/gdx/src/com/badlogic/gdx/graphics/g3d/particles/values/MeshSpawnShapeValue.java
+++ b/gdx/src/com/badlogic/gdx/graphics/g3d/particles/values/MeshSpawnShapeValue.java
@@ -87,7 +87,7 @@ public abstract class MeshSpawnShapeValue extends SpawnShapeValue {
SaveData saveData = data.getSaveData();
AssetDescriptor descriptor = saveData.loadAsset();
if(descriptor!=null){
- Model model = manager.get(descriptor);
+ Model model = (Model) manager.get(descriptor);
@nddrylliog
nddrylliog / index.html
Last active August 29, 2015 14:00
mw-embed-naive
<html>
<body>
<h2>Some memoways content is under here</h2>
<iframe src="http://staging2.memoways.com/hub/beams/e3847c84-4314-462e-b208-4bd6eb497a9c/grid" width="100%" height=480 frameBorder=0></iframe>
<p>And that oughta be enough.</p>
</body>
</html>
@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

Keybase proof

I hereby claim:

  • I am nddrylliog on github.
  • I am nddrylliog (https://keybase.io/nddrylliog) on keybase.
  • I have a public key whose fingerprint is 6AA2 4357 2CE4 F308 D8F5 AFF3 1B46 8353 5C9E 794C

To claim this, I am signing this object:

PANIC: unprotected error in call to Lua API ([string "assets/lua/lestac/editor/bounds.moon"]:11: attempt to compare nil with number)
stack traceback:
[C]: in function 'require'
[string "assets/lua/lestac/scenes/playground.moon"]:5: in main chunk
[C]: in function 'require'
[string "assets/lua/lestac/app.moon"]:8: in main chunk
[C]: in function 'require'
assets/lua/init.lua:27: in main chunk
@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.