MouseLock & PointerLock for GameMaker

(click for web demo)

I made a small GameMaker: Studio extension that provides a unified API for "mouselock" between desktop and web (HTML5).

The way this works is by utilizing built-in mouse snapping functions on desktop targets, and using Pointer Lock API on HTML5. It bridges between the two, and you get simple functions like mouse_lock(), mouse_unlock(), and mouse_delta_x & mouse_delta_y for getting the mouse movement offset while mouse is locked.

So, if you ever wanted to make some web-based first-person shooters (or just games with mouselook) with GameMaker: Studio, now you can.

The extension is free and can be downloaded from or GameMaker: Marketplace.

Hosting HTML5 games on Google Drive

Hosting HTML5 games on Google Drive for free

Being able to quickly upload a HTML5 game to the web is important.

It's not just a more comfortable format for sharing, but sometimes a requirement, since games created with GameMaker: Studio, Construct 2, Haxe+OpenFL and many other tools may not necessarily fully function when launched locally due to browsers laying restrictions over local file access (meaning that sending a ZIP with game files may not quite work).

While it used to be possible to host HTML5 games on Dropbox for free (or, rather, it still is possible, but only if you have enabled the public folder before the late 2013, else it'll cost you some), you can still host HTML5 games freely on Google Drive.

And this article explains the process of hosting your games on Google Drive in detail.

Continue reading

BitFive: Now with multitouch

This is only a small thing out of everything I need to make/finish/release in next months, but...
So there is now multi-touch support in openfl-bitfive, which is an alternative OpenFL HTML5 backend with focus on blitting and compatibility across platforms.
Usage is identical to Flash/AIR - you add an according event listener to your desired DisplayObject, and handle the TouchEvent objects it catches:

stage.addEventListener(TouchEvent.TOUCH_BEGIN, function(e) {
	trace("Touched at (" + e.stageX + ", " + e.stageY + ")");

And, same as it goes for mouse events, the rest is handled behind the scenes - events are routed automatically, and you don't need to worry about browsers and devices with partial or glitchy support.
You can even have your mouse events converted into touch events for ease of testing if you want (see bitfive_mouseTouches flag).

Addition is already live at both repository and haxelib, there's a demo available (probably want to view it from mobile device), and this post contains some extra details on what it took.
Also, if you needed this for some time, you can pretty much thank Ozdy (which is also the largest supporter of backend) for suggesting the feature.

Continue reading

On “You can’t make good HTML5 games in Haxe”

You can't make good HTML5 games in Haxe

- A phrase usually popping up when it comes to a discussion about HTML5 and Haxe. Which is complete nonsense. Not just that it is nonsense, but it's also a good measure of how little (read: none) research the author of phrase has made on the topic. I'm quite tired explaining to people, why their opinion about this is incorrect, so I've decided to group key points into a post,

Continue reading

Inserting video into Tululoo game (HTML5 Canvas)

Video credit: 'asdfmovie song by LilBruceWayne'

As you may know, HTML5 standard includes <video> tag support.
This adds some crazy interesting possibilities that can be used in games as well.

A common wish is to have a video playing as part of game or as its background overall.
Here I'm going to explain methods of doing this in Tululoo.
(implementations in languages and frameworks that allow 'low-level' access to javascript would be pretty similar too)

Continue reading