Angular rotation is rotation of one angle (normally a numeric value) towards other angle. This can be considered interpolation and has many applications ranging from gradual rotation towards angle to turrets, homing missiles, and procedural bone animations.
This post is about how these internally work and implementation.
GameMaker: Compacting Studio project files
If you have ever inspected directories of newly created projects for GameMaker: Studio, you may have noticed that even the seemingly empty project does "weight" a bit. 4 megabytes, to be precise (or 2 and half if zipped). Now you could say that it's not a lot nowadays, but it does stack, and those extra megabytes now and then could have came useful somewhere else (especially if keeping multiple backups of same project or periodically sending it over to someone). And, overall, it's a bit more than you'd logically expect from something that doesn't do anything (yet).
Reason of this is that upon creation your project looks roughly like this:
That is, most of space is occupied by Configs folder. It, in turn, mostly contains data and placeholder images for entire variety of platforms that GameMaker: Studio supports.
A thing is that far not many of those are actually needed in most situations, since splash screens and icons are commonly replaced with game-specific ones, and items left unmodified are commonly not used at all.
This post goes a bit into "optimizing" GameMaker: Studio projects a bit to reduce filesize drastically.
Minecraft: A small large bug in Lockette and LWC
Lockette. What a wonderful server-side plugin for Minecraft' Bukkit servers. Being a plugin that allows players to protect their chests from being opened by other players, it is often the heart of survival-oriented servers, and the primary protection method for players. Unlike some other Bukkit protection plugins, it doesn't give you up if your database goes down or something else breaks. So it would seem that it would mostly prevent players from stealing items from each other...
Well, currently it does not.
Nor do some other plugins. This post explains how and why.
GameMaker: Window sliding effects
This post is about creating window sliding effect such as seen in my old program called GMConveter. Program itself was a bit of joke actually, since at the moment of it's publication the only actual difference between GM80 and GM81 formats was a version byte in file header, which GMConverter would change, making files compatible again. Not too bad of functional part for something that was downloaded over 4 thousand times over course of two years, right?
Apart from inner simplicity, it also had nice visuals, including a nice window sliding effect used on start and end of program. And that's what this article is about.
CraftStudio: Physics-based platformer
This is an example, screenshot of which I've posted on Twitter some time ago but was a bit busy to make illustrated guide and post for. It's about creating a 3d platformer game in CraftStudio via recently introduced physics functions.
Continue readingHaxe: migrating For-loops
If you are migrating to Haxe (or just porting an existing application) from another C-like language, such as JavaScript or ActionScript, you may have already noticed that for-loops in Haxe differ a bit from standard format that you would expect to see in languages of this type. To be precise, they lack common 3-statement format support. This article is dedicated to different methods of "migrating" your for-loops without rewriting contents entirely.
Continue readingHaxe: Replacing NME/Browser (Jeash)
If you are working with HaxeNME, you might have noticed that compiled JS/HTML5 applications do not necessary work same as other platforms. Or don't work at all. Or don't compile because of some uncommon unimplemented method that you've used.
Reasons of such behaviour are even somewhat understandable - process of recreating Flash API on JavaScript+HTML5 isn't exactly an easy task, especially since multiple features do not exist in both of two in the same way or do not exist in second at all, meaning that implementation may require a trick or two to work.
And as code base is accumulating "tricks" by multiple contributors, it does not necessarily remain entirely stable.
For example, if you've decided to clear your BitmapData-based 640x480 buffer via BitmapData.fillRect, you are making a huge mistake - the function is not just doing this pixel-by-pixel, but also via ImageData API.
Overall, this article is dedicated to substituting Browser/Jeash part of NME by your own library in JS compilation.
“live-reloading” web pages via AutoIt
So I've been recently looking for something to help with micro-debugging (mostly verifying output) of my JavaScript+HTML applications via automatically reloading test page on source change, and found a variety of solutions,
- Some rely on fetching file information.
- Some allow you to use a browser extension.
- Some only work on Mac.
- Some only work in single browser (when they do at all).
A bit of a trouble, isn't it? For most purposes, it'd suffice to check for file time change and refresh the page in the browser. So might as well do that with help of AutoIt.
Continue readingGameMaker: Troubleshooting strange outlines on images
With the glitch (left) and without (right)
If you've ever tried to scale imagery (sprites / backgrounds) up while having texture (/pixel) interpolation turned on, you might have encountered some drawing artifacts. These normally look like the left part of above image, being either random black/white dots or a whole semi-transparent outline around the image. This article goes a bit in-depth about why these occur and how to fix them.
Continue readingVector: GameMaker: Studio logo in Windows 8 style
This vector icon was originally drawn by me as illustration for one of discussions I was participating in at end of April, which rolled from discussing GameMaker: Studio functionality to discussing it's current logo to making guesses how it could be made better and particularly if Windows 8 - like style would have worked for it. I'm not sure whether this is a good logo generally, but I think it could be useful at times when current 3d-looking Studio logo does not quite fit aesthetically.
To maximize ease of adaptation, scalable vector source file (SVG) is also included here.
Download SVG Download PNG Download HD PNG
(note: as of 2014 or so, GameMaker no longer uses this particular icon, but you can still use this I guess)
Also I've made a GameMaker: Studio HTML5' loading bar extension out of this logo, which looks like this:
Continue reading