Profile

Cover photo
Si Robertson
Lives in London
410 followers|291,147 views
AboutPosts
People
Have them in circles
410 people
Yannick Comte's profile photo
Yuta Yamamoto's profile photo
Mike Jones (FlashGen)'s profile photo
Tom Payne II's profile photo
Phil Soper's profile photo
Christophe BECKER's profile photo
Cory  Kobe's profile photo
Ryan Adams's profile photo
Mark Dooney (Desmarkie)'s profile photo
Work
Occupation
Freelance Creative Monkey
Skills
!!1
Basic Information
Other names
RetroModular
Story
Introduction
I have worked on a number of AAA console and desktop games for major game development studios, won a BAFTA (as a member of a five man team) for technical innovation, and have had some of my music aired on MTV. I'm currently rolling through life freely as a freelance creative monkey (mostly programming).
Bragging rights
I'm still alive.
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
London

Stream

Si Robertson

Shared publicly  - 
 
Occlusion culling. Never fails to provide a good programming challenge.
1
Add a comment...

Si Robertson

Shared publicly  - 
 
Currently attempting to generate and compress textures (DXT1) at runtime in a JavaScript worker, for use with WebGL.

I probably don't need to do this but if I can compress procedurally generated textures before throwing them at the GPU then it will obviously be beneficial for the rendering performance.
1
Add a comment...

Si Robertson

Shared publicly  - 
 
My PRNG.2 code wrapped in an ES6 class.

I haven't encountered any problems with it so far, and it's no slower than Math.random(), so I'm calling this mission complete :-)

https://gist.github.com/si-robertson/6ff59f5a5bb8bd82a368
1
Add a comment...

Si Robertson

Shared publicly  - 
 
Improved my PRNG code ...
https://gist.github.com/si-robertson/948149f545572fbd8754

It's still generating noisy noise as expected, and I still have no idea how long the number sequence is but it's clearly long enough to be a non issue.
1
Sam MacPherson's profile photoSi Robertson's profile photo
5 comments
 
Tweaked the code a bit more, it's the final iteration.
Add a comment...

Si Robertson

Shared publicly  - 
 
Various noisy thingies generated in JavaScript.

The prototype code is here ...
https://gist.github.com/si-robertson/429e11f7612eab56fecb
1
Add a comment...

Si Robertson

Shared publicly  - 
 
I created a simple pseudo random number generator (JavaScript) that seems to work well even with a small seed. The attached image is generated from a 4-byte seed (string) and there is no obvious repeating pattern :-)

https://gist.github.com/si-robertson/1d8a897d2ab11698f6e9

The image generation code ...

var image = new ImageData(512, 512);
var i = 0;

for (var y = 0; y < 512; y ++) {
    for (var x = 0; x < 512; x ++) {
        rand();

        image.data[i++] = value;
        image.data[i++] = value;
        image.data[i++] = value;
        image.data[i++] = 255;
    }
}

Any repeating sequence from rand() would be clearly visible in the image.
2
Add a comment...
Have them in circles
410 people
Yannick Comte's profile photo
Yuta Yamamoto's profile photo
Mike Jones (FlashGen)'s profile photo
Tom Payne II's profile photo
Phil Soper's profile photo
Christophe BECKER's profile photo
Cory  Kobe's profile photo
Ryan Adams's profile photo
Mark Dooney (Desmarkie)'s profile photo

Si Robertson

Shared publicly  - 
 
If you want to play around with the ES6 rest operator in Chrome, it's enabled in Canary with the #enable-javascript-harmony flag.

    function foo(...things) {
        console.debug(things); // [1, 2, 3]
    }

    foo(1, 2, 3);

    function doo(a, b, c) {
        console.debug(a, b, c); // 4 5 6
    }

    doo(...[4, 5, 6]);

Still no sign of ES6 module support yet but it's getting close, I'm keeping an eye on the progress reports :-)
1
Add a comment...

Si Robertson

Shared publicly  - 
 
Lesson learnt while playing around with procedural generation: When generating anything that must be consistent, i.e. anything that must be replicated from a given seed, avoid using APIs that you have no control over.

For example, moving my noisy-cloud generation over to canvases in JavaScript wasn't a smart move because the algorithms used for image scaling (behind the scenes) aren't spec'd, which means different implementations may produce different results. Even if the differences are incredibly subtle they can ripple and cause massive changes in the procedurally generated output.

In a nutshell, create procedurally generated assets with your own code :-)
2
Add a comment...

Si Robertson

Shared publicly  - 
 
Hmm... the mega-slowest of "let" in JavaScript (Chrome) has now been fixed (Canary 44.0.2384.4) but they can still be ~2 times slower than "var".

I imagine the speed difference is going to be norm, more stack/register allocation etc is probably required for the "let" keyword due to its nature. So, avoiding them in code that needs to be fast might be a smart move.
1
Add a comment...

Si Robertson

Shared publicly  - 
 
Quantize the noise and you get something you could probably use as the initial building blocks of a procedurally generated game level :-)
3
Add a comment...

Si Robertson

Shared publicly  - 
 
Getting better. Moved the noise generation over to canvases, to take advantage of the blend modes and antialiasing, and I also hooked-up my PRNG. So, given the same seed, these noise patterns will always be generated.
1
Add a comment...

Si Robertson

Shared publicly  - 
 
Yep, I'm happy with my random number generator. Seed "Neo", 4096 x 4096 image, still looking uniformly random to me even with a 3-byte seed.
1
Sam MacPherson's profile photoSi Robertson's profile photo
3 comments
 
I have no idea, I just sat down and threw together the code. Someone has probably done something similar at some point tho.

In case you missed this link ...
https://gist.github.com/si-robertson/1d8a897d2ab11698f6e9 :-)
Add a comment...