

WebGL Sonic the Hedgehog Game Engine - brianshumate
http://forums.sonicretro.org/index.php?showtopic=24965

======
TheCoreh
Hey guys. I'm the original author of the engine. (I go by "MarkTheEchidna" on
Sonic Retro) I'm really surprised to see this popular here on Hacker News. :-)

I'm having problems opening the forum thread on Retro right now. If that's
also happening to you, you can grab/fork the source code here:

<https://github.com/coreh/WebSonic>

It's MIT licensed. The art is under Creative Commons. The code is kinda messy,
since this was done just for fun/learning WebGL.

As lewispb pointed out, you can play it at:

<http://achene.co/WebSonic/>

~~~
rasur
"<http://achene.co/WebSonic/>

Aren't you missing the top-level domain there? (i.e. it doesn't resolve for
me, and googling only gives me .co, which won't resolve)

------
TamDenholm
Tried it on both FF4 and Chromium 10 on ubuntu and both got this error:

    
    
      Error: Nonexistent or unused uniform in the description of shader shader/sky.jsonshader: u_normalCameraViewError: Nonexistent or unused uniform in the description of shader shader/sky.jsonshader: u_normalCameraView at http://achene.co/WebSonic/js/GraphicsEngine.js:96:11 at Array.forEach (native) at new (http://achene.co/WebSonic/js/GraphicsEngine.js:93:23) at Object.success (http://achene.co/WebSonic/js/ResourceManager.js:80:20) at success (http://achene.co/WebSonic/lib/jquery.js:5267:15) at XMLHttpRequest. (http://achene.co/WebSonic/lib/jquery.js:5207:7)

~~~
viraptor
In FF4 you can try setting webgl.shader_validator = false. Sometimes it helps
to get "something" rendered when things would fail completely otherwise.

------
MatthewPhillips
This is really impressive. I wasn't expecting WebGL to come on this strong,
this quickly (game engines using Canvas have taken much longer to reach this
level of maturity). I'm not sure I see the advantage of NaCl now. This runs
flawlessly in Chrome.

~~~
icefox
I would have to agree. Pushing the canvas to the edge you can only do so much,
but it looks like you could do much more with webgl. Does anyone know of any
tech demos of 2d games backed by webgl?

------
emehrkay
Simply amazing. It is so smooth in chrome 10 on win7.

Too bad that we have to worry about MS and IE not supporting it. Maybe there
will be a plugin, but that defeats the purpose.

~~~
dstein

      Too bad that we have to worry about MS and IE not supporting it.
    

It is long past the time for the web development community to abandon this
mentality. Look at how fast the web has progressed without Microsoft. Once
WebGL is available in tablets (and I guarantee you they will), then you'll
have a huge audience capable of playing these games.

~~~
JoelSutherland
Additionally it doesn't make sense in the case of games. What is the
alternative here? Make it a downloadable exe? If they can download a game,
they can download Chrome.

The attitude only makes sense in the case of content, when a less stylish
webpage is a viable alternative.

~~~
MatthewPhillips
Or you can just add a few lines of javascript and have Chrome Frame install in
IE. Users will think they're installing the game itself.

------
lewispb
Incredible, playable here:

<http://achene.co/WebSonic/>

------
tybris
Damn, I guess we can expect to see some pretty serious games in the browser.

------
nicetryguy
blast this in a background tab
[http://www.youtube.com/watch?v=sxImkPH2G40&feature=relat...](http://www.youtube.com/watch?v=sxImkPH2G40&feature=related&fmt=18)

------
asadotzler
This works flawlessly (and sooo smooth, even in fullscreen mode at 1920x1200)
in my Firefox 4 on Windows XP. And Microsoft said XP couldn't do the modern
Web.

