Games articles

Building A Cross-Platform WebGL Game With Babylon.js


  

Here’s a challenge for you: what about building a 3D game over the weekend? Babylon.js is a JavaScript framework for building 3D games with HTML5, WebGL and Web Audio, built by yours truly and the Babylon.js team. To celebrate the new version 2.3 of the library, we decided to build a new demo “Sponza” to highlight what can be done with the WebGL engine and HTML5 today when it comes to building great games.

Sponza Demo, built with Babylon.js and WebGL

The idea was to create a consistent, similar, if not identical, experience on all WebGL supported platforms and to try to reach native apps’ features. In this article, I’ll then explain how it all works together, along with the various challenges we’ve faced and the lessons we’ve learned when building it.

The post Building A Cross-Platform WebGL Game With Babylon.js appeared first on Smashing Magazine.

JavaScript AI For An HTML Sliding Tiles Puzzle


  

Sam Loyd (1841–1911), American chess player and puzzle maker, created the sliding tiles puzzle in the 1870s. The puzzle is represented by an m×n grid, where m is number of columns and n is number of rows, and each cell can be any imaginable value (number, letter, image, and so on.)

JavaScript AI For An HTML Sliding Tiles Puzzle

The purpose of the puzzle is to rearrange the initial configuration of the tiles to match another configuration known as the goal configuration. The rearrangement task is achieved by swapping the empty tile with some other tile in all possible directions (up, down, left, and right).

The post JavaScript AI For An HTML Sliding Tiles Puzzle appeared first on Smashing Magazine.

Top