Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Saturday, April 18, 2020

Open Link in New Tab


All major browsers use popup blockers to prevent sites from opening new tabs. Popup blockers works in slightly different ways and block popups in different contexts.

First chapter gives short overview of popup blockers. The rest of article shows multiple ways how to open new tab and how to work around browsers limitations.

Saturday, December 12, 2015

Speedwriting

Speedwriting is simple fast paced typing game with a twist - reading is not always easy. Read and write letters you see as quickly as possible anyway. The game can be played on newgrounds or on Github.


All my games can be found Games & Stuff page.

Monday, January 26, 2015

Testing Grunt Plugin From Grunt

Writing tests for grunt plugin turned out to be less straightforward then expected. I needed to run multiple task configurations and wanted to invoke them all by typing grunt test in main directory.

Grunt normally exits after first task failure. That makes it impossible to store multiple failure scenarios inside the main project gruntfile. Running them from there would require the --force option, but grunt then ignores all warnings which is not optimal.

Cleaner solution is to have a bunch of gruntfiles in separate directory and invoke them all from the main project gruntfile. This post explains how to do that.

Monday, September 1, 2014

Mud River Game

Mud River is small game I made three months ago. Your goal is to splash as much mud as possible within a short time limit. It was done under a week and can be played on Github.


Thursday, March 13, 2014

Falling Ball Game

I released simple html5 game called Falling Ball. The player uses arrows to move the ball left, right and to make it jump. You get one point for every hit platform and if the ball touches screen border, any of them, then the ball dies.

Thursday, June 20, 2013

Building JavaScript Library with Grunt.js

New release of typical non trivial JavaScript project needs to run unit tests, concatenate all source files into one and minify the result. Some of them also use code generators, coding style validators or other build time tools.

Grunt.js is an open source tool able to perform all above steps. It is pluginable and was written in JavaScript, so anyone working on JavaScript library or project should be able to extend it as he needs.

Wednesday, August 1, 2012

Wro4j, Page Load Optimization and Less.js

Wro4j is primary a JavaScript and CSS merge and minimization library. Its original purpose was to speed up the page load. However, its final design made it easy to add integration with LESS, CoffeScript and few other technologies.

Less was introduced in previous article. In short, it is CSS with object oriented inheritance, variables and few other additional features. It is compiled into regular style sheets and served to the browser. Less was written in JavaScript and usually runs in the browser. If you want to run it on the server side, you have to use wro4j or some other integration library.

The post is mostly wro4j tutorial with focus on Less integration. It explains how wro4j works and how to configure it. There is very little about Less and almost everything is about wro4j.

Friday, January 6, 2012

JavaScript Testing with JSTestDriver

Js-test-driver is an open source JavaScript unit tests runner written in Java. The project was started at Google and is under active development. It is available under Apache License 2.0 license.

Js-test-driver is able to run from command line and reports results to the standard output. As a result, it is possible to fully automate JavaScript tests and run them on a continuous integration server.

Additionally, js-test-driver comes with IntelliJ IDEA plugin and Eclipse plugin. Of course, Eclipse plugin is compatible with Aptana Studio. If you use one of these IDEs, you can run tests directly from IDE and see progress and results in a view. It is very similar to java jUnit plugin.

Thursday, November 10, 2011

Project Report - JSSokoban

I have never worked on bigger JavaScript project and I have never worked with 3D. And I never wrote a game. Better late than never, I will create 3D game in JavaScript. The whole project is less ambitious than it sounds, I will create a Sokoban clone.

Sokoban is a turn-based puzzle with simple rules and graphics. The player navigates a little robot through a warehouse. The warehouse contains walls, wooden boxes and destinations.
Click to Play. Works in Firefox, Opera and Chrome. It is somewhat faster in Chrome.