background preloader

Programming

Facebook Twitter

Python

What’s on My Code Review Checklist. Google code search. Google launched a new code search feature today. At least two sites already offer this functionality, but a great deal of attention follows Google wherever they go. Code search is a great resource for web developers and programmers, but like the making available of all previously unsearched bodies of information, it's given lots of flashlights to people interested in exploring dark corners.

Here are some things that people have uncovered already: Got any other Google code search goodies? Bountify | Crowdsource small coding tasks. HTML. Misc. Apache. Git. PeerTalk. Javascript Game Development - The Game Loop · nokarma.org. Javascript Game Development - The Game Loop One of the most important parts of a game engine is the so called “game loop”. It is the central piece of the game’s engine and is responsible for trying to balance running a game’s logic, and executing its drawing operations. A very basic game loop would look something like this in JavaScript (this does not work in Browsers!) : var Game = { }; Game.draw = function() { ... draw entities here ... };Game.update = function() { ... run game logic here ... }; while (! Game.stopped) { // While the game is running Game.update(); // Update Entities (e.g. Writing a game loop for execution in the browser is a tad more tricky than that.

So we’ll have to try “emulating” a real loop, while giving back control to the browser after every drawing operation to not lock-up the interface. setInterval to the rescue! Window.setInterval is exactly what we’re looking for. Game.fps = 50; Game.run = function() { Game.update(); Game.draw();}; // Start the game loopGame.

Ruby on Rails

Drupal. PHP.