Jerome Etienne.js Blog

Around JavaScript, node.js, WebGL and cool HTML5 game stuff

Webgl London Meeting

Yesterday, the first london webgl meeting happened! people interested in webgl all in a same place and time, it was nice. see reports here and here.

I talked about pacmaze experiment, here are the slides i used.

A nice picture from @tbx. I love the packy checking on me while im presenting him to audience :) reccursive gamification ftw!

Jerome Etienne showing pacmaze.com

Pacmaze V2 - Event More WebGL in Pacman

Pacmaze v2 is the second version of pacmaze in the pacmaze experiment announced here.

Compared to pacmaze v1, it provides much nicer 3D effects with lot of camera moves. Use pageUp/pageDown or C/V keys to change the camera positions. It is a little easier on the user too. In case you dont have WebGL, you may watch a screencast… better than the original with a alert(), couch :) Show, dont tell, here is the screencast

Other improvements were done this week, but they were either not yet ready or not visible on the screen… According to pacmaze experiment schedule, i should release a new game every 2 weeks, so another game is due next wednesday. Pacmaze v2 is just an improvement of last week release.

tl;dr;

Pacmaze is a pacman in WebGL. You are a pacman trapped in a maze. You need to eat all the pills to get out, and avoid the ghosts in the process. Well… you known pacman. You can find it as standalone webapp or in chrome web store.

Wget Thinks github.com Is a Threat

This is just a little post on a oddity. As a coder, i use github and wget everyday or close. When i do, i see this message.

$ wget https://github.com/jeromeetienne/nmod/raw/master/nmod
...
ERROR: certificate common name `*.github.com' doesn't match requested
host name `github.com'.
To connect to github.com insecurely, use `--no-check-certificate'.

This message puzzles me quite a bit… wget thinks github is a threat … and requires an explicit action from you (adding --no-check-certificate) to be sure you are willing to take this risk . The risk of downloading files from github… ok lets admit it, this is ridiculous. wget distrusting github is like … ls distrusting cd :)

According to github, this is actually a wget bug which has been reported and fixed but not release , and point to a bug from 2007!!!! Dunno if this is true, or who is at the best place to fix the issue… and the purpose of this post is not to do finger pointing.

Lets note that everybody is from open source world here. wget is from gnu, not only under gpl, but even got his copyright assigned to fsf. What to say about github and opensource ? well they got millions of repositories and most of them are open source software.

This post is not meant to be a rant. More to put the light on an oddity. something that i see as a symptom of communication issue in the opensource community.

Let do better! :)

jquery.acewidget - a jQuery Plugin to Easily Embed Ace

AceWidget jQuery Plugin

jquery.acewidget.js is a jQuery plugin for acewidget. AceWidget is a widget which make ace /bespin trivial to embed in your pages. The Vision is to be super simple to embed and have no server to setup. It provides the whole official embeded api. The code is available on github under MIT license. That’s it. No fuss no muss.

Show dont tell, a demo of acewidget and a example of jquery.acewidget

How to use it

First you include the plugin itself in a usual script

<script type="text/javascript" src='jquery.acewidget.js'></script> 

Then create a DOM element which gonna contains ace widget, say a div

<div id="editor"></div>

Then you create the ace widget in this container by

var acewidget = jQuery('#editor').acewidget();

Pacmaze V1 - a Pacman in WebGL

tl;dr;

Pacmaze v1 is a pacman in WebGL. You are a pacman trapped in a maze. You need to eat all the pills to get out, and avoid the ghosts in the process. Well… you known pacman. You can find it as standalone webapp or in chrome web store. Pacmaze v1 is the first game of the pacmaze experiment. Show, dont tell, here is a screencast

Pacmaze Experiment

What is it ? The pacmaze experiment is the fancy name for my trip discovering gamedev field. It is an experiment i wish to try. The rule is simple. During 4 months, i am commited to work in a publish early, publish often mode. Twice a month, i will publish a new game, or a significant improvement of a previous one, on the second and the fourth wednesday of each month. Pacmaze V1 being the first of the serie.

This is the current plan… I know the schedule is tight, but this is part of the challenge. We will see how it goes along the road.

jquery.qrcode - Jquery Plugin for Pure Browser Qrcode Generation

jquery.qrcode.js is jquery plugin for a pure browser qrcode generation. It allow you to easily add qrcode to your webpages. It is standalone, less than 4k after minify+gzip, no image download. It doesnt rely on external services which go on and off, or add latency while loading. It is based on a library which build qrcode in various language. jquery.qrcode.js wraps it to make it easy to include in your own code.

Show, dont tell, here is a example

MicroEvent.js - Micro Event Emitter in 20 Lines

MicroEvent.js is a event emitter library which provides the observer pattern to javascript objects. It works on node.js and browser. It is a single .js file containing a 20 lines class for a total of 321-bytes after minification+gzip.

How to Use It

You need a single file microevent.js. Include it in a webpage via the usual script tag.

1
<script src="microevent.js"></script>

To include it in a nodejs code isnt much harder

1
var MicroEvent = require('./microevent.js')

Now suppose you got a class Foobar, and you wish it to support the observer partern. do

1
MicroEvent.mixin(Foobar)