Earlier quoted context omitted.
This code uses zero canvas / javascript specific functions. It is using basic trigonometric functions and is using canvas only to write RGB pixels. Canvas are much more powerful and high level than that, but this is not a good example as Notch just needed to set pixels.
Having watched Notch write Prelude of the Chambered (which I then ported to JRuby) it seems he really loves this direct pixel manipulation style - as do I! The sad part, though, is it doesn't particularly scale well with canvas (yet) and using sprites, shape primitives, or even WebGL is way to get full speed at a regular resolution. (Imagine a 640x480 pixel field of randomized colors, you can get hundreds of FPS for…
Notch trying jsFiddle
81–90 of 143 posts
Re: Notch trying jsFiddle
#82Re: Notch trying jsFiddle
#83While this is cool, isn't this exactly what WebGL is for? I know drivers/support is an issue, but Chrome also ships with a multicore software renderer (SwiftShader) which can probably get a lot further than a JS putImageData engine.
Re: Notch trying jsFiddle
#84Re: Notch trying jsFiddle
#85Re: Notch trying jsFiddle
#86Re: Notch trying jsFiddle
#87Earlier quoted context omitted.
This "responsive programming environment" you speak of has been around for a really long time. Don't expect sliders and colorpickers to do cool stuff, but this should be a good jumping off point for you to start learning from: http://stackoverflow.com/questions/3305164/how-to-modify-mem...
Thanks, I'm plenty aware of gdb and debuggers:) (ex-google software engineer, etc etc) Go watch the video. Bret presents a very cogent vision for a dramatic improvement on most of today's standard engineering/design tools.
for ( var i = 1; i
If this was a first introduction to programming it would scare off many people.My interpretation of Bret's idea is that it would be better to have the ability to highlight the section of the texture being written by each section of the loop. It's not the sliders & live editing that are most important it's about linking abstract control into meaning within the learner.
Re: Notch trying jsFiddle
#88I've recorded a screencast that digs into how the programmatic texture generation works in this code: https://www.youtube.com/watch?v=WaZvDCmlERc
Re: Notch trying jsFiddle
#89Re: Notch trying jsFiddle
#90Earlier quoted context omitted.
I totally agree. You probably meant "code operates at such a _high_ level" :) low level = close to hardware, high level = high abstraction, like JS
No I really mean low level :-) Javascript is high level, but here notch is using it as a low level framebuffer.
But he's actually using Javascript arrays which can get passed around inside a javascript VM, and do not have a set size. Not very "low level".
I spent a moment and changed the arrays to Float32Arrays which have set sizes and sit in memory without being fucked with by the VM and sped the demo up dramatically.