Blog

A Little Update

Posted on February 16, 2014 in General

Well, it's been quite a while. As always, there's a lot I've been wanting to do but haven't, sometimes due to procrastination, other times actually being busy, and more than occasionally a cocktail of both. I've planned to do a comprehensive tutorial series on LÖVE itself for ages and I'd written the first one or two parts for it, but now I've just found out that 0.9.0's been released, so that sets it back even...

Read more...

Ludum Dare 27: Triad

Posted on August 29, 2013 in Projects

For pretty much all of this year I haven't really been doing any game development (nor posts). But I'm starting to get back into it now; a couple weeks ago I started working on my arena shooter again, and now I've participated in the 27th Ludum Dare. It would seem my period for "not participating in the main competition" was only eight months. :P The game I made is called Triad. You can download it...

Read more...

Ludum Dare 25

Posted on December 19, 2012 in Projects

Well, I participated once again in Ludum Dare and managed to succeed in creating a game (unlike last time). The game I created is called Amongst Shadows, and you can play it here on my website, or rate/comment on it at its Ludum Dare page. Anyway, on with the post-mortem. Theme The theme was "You are the Villain"; I had hoped it would be "End of the World", given the date and that I had...

Read more...

Ammo 1.0

Posted on December 13, 2012 in Projects

This is just a post announcing that Ammo 1.0 has been released (changelog). After a couple months in the 0.x range, I feel it's ready to be pushed up to 1.0. Hopefully soon I can create some tutorials for the library; the documentation is complete and up-to-date, but documentation isn't particularly good at conveying the big picture. Anyway, if you've got any feedback on the library, please let me know.

Read more...

Linked Lists in Lua

Posted on November 16, 2012 in Tutorials

As an example of creating custom data structures in Lua, I thought I'd give a little demonstration of a linked lists implementation. Note that this isn't going to be an in-depth tutorial or anything; for the most part I'll just be showing pieces of the code. Linked lists are wonderful data structures, perfect if you need to efficiently add, remove, and iterate through elements. The one trade off is that you can't find an element...

Read more...

Emotion Affecting Reason

Posted on November 10, 2012 in General

I've recently been musing about how emotion can affect a person's reason. You see it all the time, people following their passionate emotions without stopping to think and reason through a situation. In many cases however, it's more subtle than a hotblooded rage; the inner emotion twists a person's reason in an attempt to justify their thoughts and actions. You might also refer to this as bias. So I was thinking, how can one avoid...

Read more...

Ammo

Posted on October 15, 2012 in Projects

This announcement post is a bit overdue, but, better late than never. A short while ago, I released the first version (0.1) of Ammo, my organisational library for LÖVE. Its current version is 0.1.3. I plan to let the library stay in the 0.x range for a while as it's tested by me and any others who use it. Along with the core library, there's a number of extensions available. The one I'm most excited...

Read more...

Custom Cursors in Love2D

Posted on September 20, 2012 in Tutorials

When making a game in LÖVE, you'll probably end up needing to customise the mouse cursor. As I recently had to do just that, I thought I'd make a quick tutorial on it. If you want an example cursor, here's the crosshair I'm using in a game right now. Now, all of what we need is contained within the love.mouse module. The first step is to hide the mouse with love.mouse.setVisible. You'll probably want to...

Read more...

Lua for Programmers Part 4: Tips and Tricks

Posted on September 09, 2012 in Tutorials

If you haven't read the previous parts (one, two and three), then I'd highly recommend doing so. For reference, here's a list of the parts in this series: Part 1: Language Essentials, covers fundamental syntax and concepts such as operators, loops, and functions. Part 2: Data and Standard Libraries, covers Lua's built-in data types and some of the standard libraries. Part 3: More Advanced Concepts, deals with things like variable scope, advanced functions, and file...

Read more...

Lua for Programmers Part 3: More Advanced Concepts

Posted on September 07, 2012 in Tutorials

If you haven't read part one and two already, I'd highly recommend doing so. For reference, here's a list of the parts in this series: Part 1: Language Essentials, covers fundamental syntax and concepts such as operators, loops, and functions. Part 2: Data and Standard Libraries, covers Lua's built-in data types and some of the standard libraries. Part 3: More Advanced Concepts, the current part; deals with things like variable scope, advanced functions, and file...

Read more...

Lua for Programmers Part 2: Data and Standard Libraries

Posted on August 27, 2012 in Tutorials

If you haven't read part one already, I'd highly recommend doing so. For reference, here's a list of the parts in this series: Part 1: Language Essentials, covers fundamental syntax and concepts such as operators, loops, and functions. Part 2: Data and Standard Libraries, the current part; covers Lua's built-in data types and some of the standard libraries. Part 3: More Advanced Concepts, deals with things like variable scope, advanced functions, and file loading. Part...

Read more...

Lua for Programmers Part 1: Language Essentials

Posted on August 27, 2012 in Tutorials

In this series we'll be taking a look at most everything you should know to program in Lua. The series is targeted at people who already know how to program, and as such I'll aim to be brief in my explanations. Here's an overview of the four parts the compose the series: Part 1: Language Essentials, the current part; covers fundamental syntax and concepts such as operators, loops, and functions. Part 2: Data and Standard...

Read more...

A Status Update

Posted on June 28, 2012 in General

Well, I'm back, alive, almost entirely functioning, and trying to settle into a routine. I had a generally good time with some friends and family up in the Brisbane and Sydney areas. Some negative points were a couple minor colds, and some of the most aggravating kids I've ever had the bane of knowing. As usual, nothing has really happened in the realm of my projects while on the trip. If I wasn't talking, doing...

Read more...

Illusive Dreams: Test Build 5

Posted on May 29, 2012 in Projects

Well, it's been some time since I've released a test build for Illusive Dreams hasn't it? Work on it has been very slow lately; both I and Jeremiah haven't done all that much on it during the last few months. Nevertheless, a lot has happened to the game since the last test build, and I thought it best to release a new one before I go off to Brisbane. You can find the build here:...

Read more...

Four Weeks Away

Posted on May 28, 2012 in General

This is just a quick notice that I'm going to be away for around four weeks, starting in a couple days. For most of the trip I'll be in Brisbane catching up with friends and relatives. As usual, I probably won't have internet for most of the time while I'm away. Have fun, everyone!

Read more...

Getting More Ratings in Ludum Dare

Posted on May 02, 2012 in Tutorials

I thought I'd share a few quick tips on getting more ratings, which I've picked up in my experience with Ludum Dare. Please note, I'm not putting this down as fact or anything, but merely expressing my own opinion. Rating Games Yeah, this one's kind of obvious by now I'd say. Your "coolness level" increases by one per game you rate, and the cooler you are, the higher chance you have of getting rated. Games...

Read more...

Rock 'n' Slash: Ludum Dare 23 Postmortem

Posted on April 29, 2012 in Projects

Well, I think it's about time I made my Ludum Dare 23 postmortem. First of all, I blame not posting in a long time on my seemingly inherent laziness. Procrastination is an easy trap for me it seems, but that's another topic altogether. Back on subject, the latest Ludum Dare took place between April 21st and 24th, with the main competition ending on the 23rd. It just so happens that this event was Ludum Dare's...

Read more...

And I'm Back

Posted on January 17, 2012 in General

The holiday was great for the most part, and as always, it's good to be home again. But the main thing I want to talk about is the things I've been working on while away. First of all, I worked on Illusive Dreams a bit, adding levels 34 to 38. But the thing I got the most done on would be my library for LÖVE, Ammo. I'm not sure whether I've mentioned it on my...

Read more...

Away for Two Weeks

Posted on December 29, 2011 in General

Well, I'm going away on a holiday with the family for a couple weeks. I doubt I'll have internet access for most of the time I'm away, so there'll be no activity from me accordingly. Nevertheless, I'll probably be working on projects such as Illusive Dreams in my "spare time." Anyway, have a good time internet! :)

Read more...

Ludum Dare 22 Postmortem

Posted on December 20, 2011 in Projects

Last weekend was Ludum Dare 22, and of course, I participated. The game I created is entitled Uncorrupted; there's more information available at its page on my website and on Ludum Dare. You could also check out the time-lapse of my work on the game. Preparation Anyway, with that aside, here's my postmortem. As always, it's important to prepare beforehand, especially making sure that your toolchain works. I decided to use FlashPunk this time, firstly...

Read more...

Illusive Dreams: Test Build 4

Posted on December 16, 2011 in Projects

The fourth test build for Illusive Dreams has been released. Chapter two has been finished, with nine new levels, in-game text replacing cutscenes, and many other modifications and fixes. I haven't been able to do anything with the commonly reported "white screen" bug, as I'm not able to reproduce myself. Please let me know if it occurs in this build. If it hasn't disappeared, I'll have to put more effort towards hunting it down. Anyway,...

Read more...

Illusive Dreams: Test Build 3

Posted on November 24, 2011 in Projects

I've now released the third test build for Illusive Dreams, and as usual, it's bigger than the last one. There's eight new levels, re-arrangements of previous levels, another night time music track, and many modifications and fixes. Check it out and let me know what you think. Thanks!

Read more...

Illusive Dreams: Test Build 2

Posted on November 20, 2011 in Projects

I've just released the second test build for Illusive Dreams. This build has six new levels, two music tracks, chapters for level ordering (although there's only one at present), and a number of other modifications and fixes. Once again, I'd really appreciate any feedback or suggestions you might have, as it really helps to improve the game. Thanks!

Read more...

Illusive Dreams: Test Build and a Composer

Posted on November 17, 2011 in Projects

Quite a bit has happened (as usual) since the last update via my blog. I've created more levels, added a system for chapters, and many other changes and additions. But there are two main things which I'll cover in this post. First is the release of a test build of the game. I needed some people to test the game, to find problems and things that could be improved (the main thing of interest for...

Read more...

Another Update on Illusive Dreams

Posted on November 12, 2011 in Projects

It's about time for another update post on my platformer, Illusive Dreams. As you may guess, I've finally found a name for the game. The main thing I've been working on is the levels for the game, with the first seven already done and two others which I'll use later on. I don't think I'll be making a hell environment, as it seems to be too much work right now (this is a free game...

Read more...

Pixel Says: A Game with One Pixel

Posted on October 30, 2011 in Projects

A couple days ago I felt like doing a quick game for a little change from the game I've been working on for the last seven weeks. For some reason, I decided that limiting myself to only one pixel would be a cool idea. So last night, in an hour and a half, using FlashPunk, I put together a Simon Says remake called Pixel Says. Obviously, the only thing that I wasn't able to do...

Read more...

Progress on the Platformer

Posted on October 28, 2011 in Projects

Since last time I posted on my new platformer game, a lot as happened (as you would expect). Since then, I've released two new progress videos, so instead of me throwing a wall of text at you, I'll let them speak for themselves. Take note that, like last time, the videos are darker than the game itself (though the severity of this seems to have improved somewhat). Here's the latest one: And the one before...

Read more...

How It Works: The Thruster in Facilitated Escape

Posted on October 23, 2011 in Tutorials

In this post I'll be taking a look at how I programmed aspects of the ship's thruster in my game, Facilitated Escape. I'll most likely be making more posts like this in the future (as in, I intend to make a series of "How It Works" posts). Initially I had a lot of trouble getting the thruster to look right; you might be able to see some of my troubles in the Ludum Dare time-lapse....

Read more...

A New Game and Future Plans

Posted on October 06, 2011 in Projects

I've been working on a number of things lately (hence why I haven't posted for a month), one of those things being a new game, which I'll be talking about in this post. After completing Facilitated Escape, I spent a few days wondering what game I should create next. This is where I've got with my idea so far: As a warning, YouTube has darkened the video a great deal, the game is actually lighter....

Read more...

Mouse Dragging in Love2D

Posted on September 06, 2011 in Tutorials

In this tutorial, I'll be taking you through my method of enabling objects to dragged by the mouse (in LÖVE of course). You can view the completed code for this tutorial at gist #1196228. So, say you have an object with x/y coordinates, width, and height, and you want this object to be draggable by the mouse. For this tutorial, I'm just going to construct a table and put in the global, rect: function love.load()...

Read more...

Facilitated Escape 1.0

Posted on September 02, 2011 in Projects

This post is to announce the release of the first version of my game, Facilitated Escape (other than the one submitted to Ludum Dare). I've been working on it for nearly two weeks since I started work during Ludum Dare 21. The game revolves around escaping a collapsing facility in your rocket, dodging oncoming "blocks" that are in your path. It's got quite a retro feel to it, with pixel art and 8-bit music. Anyway,...

Read more...

Changing Filename Case in Git

Posted on August 31, 2011 in Tutorials

UPDATE: A much easier way is to use git mv -f readme.txt README.txt. Thanks to "Gurpartap Singh" for pointing that out in the comments section. I thought I'd share a quick little trick I've learned for changing the case of a filename in Git. Git is (unfortunately) case-insensitive with filenames. Therefore, if you make a change to a filename's case without using git mv, it won't be picked up. If you do try to use...

Read more...

Ludum Dare 21

Posted on August 22, 2011 in General

After my complete failure in the last Ludum Dare, I didn't plan to take part in the next one (the 21st), however I decided to give it another shot. I'd learnt a number of things from my failure last time: go with a concept that's really simple, and use simple art, like pixel art, at least if you're a programmer like me. I also decided not use my personal framework for LÖVE; the biggest reason...

Read more...

Mac OS X Lion: First Thoughts

Posted on July 22, 2011 in General

As you would all know, OS X Lion was released less than two days ago, gathering over a million downloads in the first day. I bought it a few hours after it came out, and so I thought I'd write down a few first impressions. Once downloaded, the upgrade process was very smooth and took a bit over thirty minutes. The first thing I noticed is that I no longer see the blue screen before...

Read more...

Style Changes

Posted on July 20, 2011 in General

I've beefed up the styling a fair bit on the website, especially regarding the menu. The colour scheme is now different; I've gone for more "modest", grey look. The text is now a little bluish, and the the links are darker. So anyway, that's about it for now. I'm hoping to have a bit more to say (or time to write it more like!) in the future.

Read more...

Glow Effect for Lined Shapes in Love2D

Posted on July 16, 2011 in Tutorials

Recently I experimented with an easy way to make lined shapes glow (using LÖVE of course). There are of course other ways of doing it, and there are many styles of glow that can be used, but this is the one I came up with. love.graphics.setColor(r, g, b, 15) for i = 7, 2, -1 do if i == 2 then i = 1 love.graphics.setColor(r, g, b, 255) end love.graphics.setLineWidth(i) -- draw lined shape here...

Read more...

Lua Metatables Tutorial

Posted on June 30, 2011 in Tutorials

In this tutorial I'll be covering a very important concept in Lua: metatables. Knowledge of how to use metatables will allow you to be much more powerful in your use of Lua. Every table can have a metatable attached to it. A metatable is a table which, with some certain keys set, can change the behaviour of the table it's attached to. Let's see an example. t = {} -- our normal table mt =...

Read more...

A Guide to Getting Started with Love2D

Posted on June 14, 2011 in Tutorials

In this post, I'll attempt to give you my personal guide on some good steps to getting started with the Love2D game engine (the proper name is LÖVE, which I'll be using from now on). It's not perfect, of course, but I hope you find it useful. If you have any feedback, I'd love to hear from you in the comments. What is LÖVE? I'm guessing you probably already know, but for those who don't,...

Read more...

The Inconsistencies of PHP

Posted on June 12, 2011 in General

Over the past few months I've come to love the Ruby programming language for many reasons. After using this language for a while and having a blast of a time, when I came back to PHP, I found it disgusting. I used to love the language; my tastes of syntax have definitely changed, but one thing that really bugged me as I examined PHP closer, is its inconsistencies. As you can tell by the title,...

Read more...

Music Page

Posted on June 10, 2011 in General

This is just a post to let everyone know about my new music page which you'll probably see up in the menu. I create music from time to time, and so I thought I'd create a page for people to get the songs I've made. Check it out and enjoy! (Also, as stated on the page, they're all licensed under the Creative Commons Attribution-NoDerivs 3.0 Unported License license, so you can use them for any...

Read more...

Making a 3D Button in CSS

Posted on June 05, 2011 in Tutorials

In this tutorial I'll be showing you how to create a 3D-looking button, made out of pure CSS. The button we'll be building is similar to the button I've used on my project pages. Take note that this uses a number of CSS3 properties, like border-radius and box-shadow. Anyway, let's get into it. The HTML The only HTML code we'll need is a div tag with the proper class: <div class="big-button">Your Text Here</div> If you...

Read more...

Moved to Jekyll

Posted on June 04, 2011 in General

For the last three weeks or so, I've been working on converting this site to Jekyll. I've been growing tired of WordPress for a while now, and for me, a programmer, Jekyll was the perfect fit. The big difference is that this site is now purely static, all the server has to deal with is HTML files, making load times much faster. But Jekyll generates the static site from lots of different pieces of information,...

Read more...

Design Flaw the Brickfilm

Posted on May 26, 2011 in General

I haven't posted for the last couple weeks, as I've been working on converting my website to Jekyll, and also on Launcher, both of which are taking a long time. Anyway, today my good friend Patrick Crawford released his independent film (or, brickfilm, as it's made in LEGO) entitled, "Design Flaw". This is from its description on YouTube: My independent film, slightly under two years in the making, is based upon the themes experimented on...

Read more...

ASCII Code Manipulation

Posted on May 12, 2011 in Tutorials

While inspecting the ASCII table a little while ago, I noticed some interesting patterns in it, which can be used for string manipulation. It's important to understand the ASCII table, because it's the base of most encodings. Note I'll be using C-like syntax in my examples, but I won't be taking advantage of C's characters, which convert stuff like 'a' into 97 (a's ASCII code). An Introduction For those who don't know what much about...

Read more...

Strong 1.0.2

Posted on May 10, 2011 in Projects

This morning I released strong 1.0.2, which adds three new methods to the mix: camelize, center, and underscore. center is the complement to ljust and rjust, and the others are from Rails' extensions to Ruby's String class. Take note, they aren't yet documented in the function reference. Anyway, go and grab 1.0.2 at its repo. Enjoy!

Read more...

Cameras in Love2D Part 3: Movement Bounds

Posted on May 09, 2011 in Tutorials

Because there was some interest in a part 3, of this series, I've written it, and in this part we'll cover creating bounds that the camera can't move beyond. Make sure you've read part 1 and part 2 before continuing. In case you're wondering what I mean by this, I mean restricting the movement of the camera to a "box", as in, having minimum and maximum x/y coordinates for the camera. This comes in handy...

Read more...

Draw Origins in Love2D

Posted on May 06, 2011 in Tutorials

In this post I'm going to be showing you origins when drawing stuff in Love2D. First of all, what are origins? They specify the offset for the origin of the object's x/y coordinates. In other words, if you specify the x origin to be 20, the object will be drawn 20 pixels to the left, as in x - 20. It's the same for the y origin: if we have a y origin of 20,...

Read more...

Strong 1.0.1

Posted on May 04, 2011 in Projects

Just posting a blog to let everyone know about the latest release for strong, which is 1.0.1. There's no API changes, just a few things that are better under-the-hood. For more details see the change log. Enjoy!

Read more...

Ludum Dare 20: My Experience

Posted on May 02, 2011 in General

From April 29 to May 2 Ludum Dare 20 has been going on. For those who don't know, the main competition involves making a game based on a certain theme in a 48 period; tough call. Hundreds of developers have a shot at this every four months, and I thought I'd give it a try. In this post, I'm going to write about my experience in it, and the lessons I learnt. I'll let you...

Read more...

Strong: Make Your Strings Stronger in Lua

Posted on April 29, 2011 in Projects

For the last few days I've been working on a library called "strong". It's a string enhancement library for Lua. Strong adds a few operators to strings, and many methods to Lua's string library. I've already written more information in the README and the wiki, which you can go to for more information. Here's the direct link to the GitHub repo by the way. After much testing and refinements, I've just released version 1.0 of...

Read more...

My Thoughts on Flash

Posted on April 25, 2011 in General

I used to do a lot in Flash. In fact, my first programming language was ActionScript 3. I hacked around for quite some time trying to get Flash to talk to PHP, and eventually figuring out AMFPHP, going on to create the Using AMFPHP tutorial series, and AMFPHP Toolbox. In this post, I'm going to share my current thoughts on Flash, and it's current place in my toolkit. As I said, I used to do...

Read more...

Cameras in Love2D Part 2: Parallax Scrolling

Posted on April 22, 2011 in Tutorials

In part 1 we constructed a basic camera. Now we're going to extend it by adding some parallax scrolling. Note that the method I'll use is probably not the prettiest, as I came up with it in half an hour. Nevertheless, this will be a starting point for you to develop your own system. What Is It? Now, for those who don't know, what is parallax scrolling? It's a way to get a pseudo-3D effect...

Read more...

Cameras in Love2D Part 1: The Basics

Posted on April 19, 2011 in Tutorials

This is the first of a couple of blogs on creating cameras in the LÖVE engine. This part will deal with the fundamentals of creating a camera. Part two will deal with parallax scrolling and creating layers. So, let's get to it! Update: I've actually ended up writing a part 3, which covers restricting camera movement. The Functions The functions we'll need are these: love.graphics.pop love.graphics.push love.graphics.translate love.graphics.rotate love.graphics.scale Love2D (I'll use this name from...

Read more...

Specifying Names in Lua Without Strings

Posted on April 18, 2011 in Tutorials

Lua is the most flexible language I've ever used, aside from its speed, this is probably the best thing about it. In this post, I'm going to show you how to specify names of things in function arguments, without strings. The method I'll use it a bit hackish, and isn't fit for normal operation; but hey, Lua allows us do it! For an example, say you had an OOP implementation that used a function called...

Read more...

Launcher - Camera Improvements and Music

Posted on April 17, 2011 in Projects

A little late, posting this, but oh well. I've improved the camera by limiting where it can go, and also by added shakes on explosions. I've added some very quickly put together music. Lastly, I've experimented with increasing the velocity of wall explosions. Enjoy!

Read more...

5 Generic Rules for Clean Code

Posted on April 17, 2011 in General

I've been mulling over a few generic rules for a clean code style, and I though I'd share. These are very generic, as in, they don't give any specifics like two-space indentation or something. These rules are the things I've learned in my time coding, and they help me a lot to keep my code looking clean. Clean code is like proper English with good formatting, when compared with sloppy English. Sloppy English is faster...

Read more...

Launcher - Sound and An Awesome Level

Posted on April 14, 2011 in Projects

Now this gameplay video I'm pretty proud of. I've now added some very rough sound, generated with CFXR. This is also the first time I get to display a much more awesome level; because I'm telling you, it takes a lot of skill to play this kind of level with a screen recorder running, with all the jerkiness in framerate. The screen recorder also caused a few physics problems a long the way. At two...

Read more...

Launcher - Exploding Walls

Posted on April 13, 2011 in Projects

I just posted a new gameplay video of Launcher. Most of the time on Launcher since last time has been fixing bugs; there were some pretty serious ones in there. But anyway, that's over now, and the main new feature is exploding walls. Enjoy!

Read more...

Code for Launcher Released

Posted on April 11, 2011 in Projects

I thought I'd release the code for "Launcher" in its current state for the public to muck around with. Note that, as expressed in LICENSE.txt (make sure you read that), that this only applies to its current state. Meaning that you have this code under the terms of the BSD license, but don't have any future code under its terms. I know this is obvious, but hey, we live in a confusing, wacky, legal world....

Read more...

Launcher

Posted on April 10, 2011 in Projects

I've been working on a little game (in the LÖVE game engine), which for now I'm calling "Launcher". The core gameplay mechanic is this: you are a circle, which can stick to certain surfaces, and then launch yourself at great speed off them in the direction of the mouse. It's completely controlled by the mouse, you aim with it, and the distance between the player and the mouse determines the speed of launch. On my...

Read more...

Grace is No Longer in Development

Posted on April 08, 2011 in Projects

My big project called Grace is no longer under development. The reason I started this project, is because I wanted organisation to back me, before I started making a game. That wish is totally valid, but I went too far. Instead of sticking with some simple organisation, and only implementing what I actually needed, I made this monolithic framework that eventually became a little hard for even me to comprehend. After some examination, I found...

Read more...

Implementing Proper Getter/Setters in Lua

Posted on April 04, 2011 in Tutorials

When I create a class in Lua, there are always times when I need to use a getter or setter on attributes, instead of raw access. The way I've always done this is to use methods with names like getFoo and setFoo. And then to keep my API consistent, I have to switch every single property to use these getter/setter methods. The pain about these type of methods is that: You have to switch everything,...

Read more...

Vault

Posted on April 03, 2011 in Projects

Well, this morning I created a little library for LÖVE called Vault. This library is about data storage (as in persistent data storage), and it allows you to store and retrieve data in native Lua data types. If you want to learn more have a read of the README over at its repo. I'll also be adding a project page for it sometime soon. Enjoy! EDIT: The new project page is over here: projects/lua/vault

Read more...

Some Uses for the Modulos Operator (%)

Posted on March 21, 2011 in Tutorials

I've been learning about a few of the awesome things you can do with the modulos operator lately. For those who don't know, the modulos operator (the percent symbol in code) gives the remainder of dividing two numbers. Therefore, 10 % 4 equals 2, because 4 goes into 10 two times, and what we have left is the number 2. Now let's get into what we can do (note, I'll be using Ruby code here,...

Read more...

Simulate Bitwise Shift Operators in Lua

Posted on March 21, 2011 in Tutorials

EDIT: Here's a couple functions which will do the shift operations that I've put in gist #938502. The fact that Lua doesn't have bitwise operators is a pain. There are pure Lua implementations out there, such as LuaBit, but I find these to be a little slow (I think LuaBit using tables or something like that). I've found a way to simulate both the left-shift and right-shift operator by using some simple mathematics. Left-Shift By...

Read more...

Unix Utils

Posted on March 18, 2011 in Projects

I've opened up a new repository on GitHub called unix-utils. This repository is to be host for the utility commands for the terminal I "have/might/will" make. Currently it only contains one, which is called strlen. Since I've already written about in the README, I'll point you over there for more information.

Read more...

ClosureClass

Posted on March 13, 2011 in Projects

I've recently created an experimental Lua object-orientation library using the closure approach to OOP. It's based largely on MiddleClass, sharing a lot of design features with it. I've already written a README, so go and visit the GitHub repo for more information.

Read more...

MiddleClass Extensions

Posted on March 11, 2011 in Projects

I've just recently opened up a new repository at GitHub called middleclass-extensions, which contains my personal hacks, extensions, extras, whatever you want to call them, to MiddleClass. It's a bit like middleclass-extras. So far the repo only contains one extensions, called Static, but this will grow over time. Static is about creating class only methods. When you create a method which you intend to be accessed only via the class, MiddleClass has no way to...

Read more...

Mixin Inheritance in MiddleClass

Posted on March 09, 2011 in Tutorials

The technique I'm about to present, may seem obvious, but I'll share it anyway. The way I would create mixins that inherit stuff from other mixins is this: Mixin = {} function Mixin:included(class) if not includes(ParentMixin, class) then class:include(ParentMixin) end end When the mixin is included, it will check whether the class includes the mixin, and if not, it will include it, therefore simulating inheritance. It's good to check if the class includes the parent...

Read more...

Sometimes WebKit Makes a Big Difference

Posted on March 08, 2011 in General

Due to all the awesome features that WebKit has to offer, if you're not using a WebKit browser, some pages can look very different and you don't even know. Take a look at the awesomely constructed under construction (I know, that sounds weird) page at ringshia.com. If you view it in a WebKit based browser (Chrome and Safari are the major ones) you'll see some nice looking text (using text shadows), a background gradient, and...

Read more...

Lua Performance Tests

Posted on March 08, 2011 in General

Just for some experimentation, I did some performance tests on a few operations in Lua. To time them I used the command, time lua test.lua, and took the "real" time. The test file was just a loop, which looped 20 million times: for i = 1, 20000000 do --[[ code here ]] end Alright, here's the results. Description Seconds Loop Code Variable/Function Definition Empty function call 1.249 f() function f() end Return function call 1.688...

Read more...

Singleton Class in MiddleClass (Lua)

Posted on March 07, 2011 in Tutorials

I thought I'd demonstrate a method for making a singleton class in MiddleClass. If you don't know, MiddleClass is an object-orientation library for Lua. So why would you want to make a class that only has one instance with MiddleClass? Couldn't you just use a table? Well, making it a class in MiddleClass allows you to take advantage of a number of other cool things that MiddleClass has on offer, like mixins, inheritance and so...

Read more...

Ruby - My Favorite Programming Language

Posted on February 24, 2011 in General

Ruby is my new favorite programming language. After about one or two weeks with it, I was sure this was my new favorite. Ruby is a wonderful language, with so many advantages, so I thought I'd write a blog post about it. Before I found Ruby, I was in a dilema about which programming language was my favorite. I had recently found Lua, and immediately loved syntax, but Lua is nowhere near powerful enough in...

Read more...

Generating a Joomla Password (for reseting)

Posted on February 23, 2011 in Tutorials

I recently found myself in the awkward situation of having only a Super Admin user in the Joomla installation, and neither I nor my client knew the password. I had to the fix the problem, and I decided to do so by generating a Joomla user password (which required a lot of searching through code, mind you). Here's the PHP code I used: <?php // JUserHelper class from libraries/joomla/user/helper.php $pwd = 'my_new_password'; $instance = new...

Read more...

Website Redo!

Posted on February 23, 2011 in General

My website hasn't been that active at all lately, due to me being busy (as always). I decided to give the website some attention this month, but instead of posting updates or anything, I've been working on a complete overhaul. This site now runs on WordPress, which is much better, more dynamic, and easier to use than my custom made CodeIgniter slap-together. The blog and website are now merged into one, as in, they run...

Read more...

Making a Dynamic Copyright With PHP

Posted on February 23, 2011 in Tutorials

I though I'd just write a quick tutorial on how I make a dynamic copyright for my websites. If you don't know what a function does in the code, look it up on the PHP manual. <?php echo strftime('%Y', time()); ?> That's the year generating code. It's just grabbing the year from the current timestamp. So we could do something like this in the copyright: &copy; <?php echo strftime('%Y', time()); ?> Legion of Weirdos. You...

Read more...

Using AMFPHP Toolbox 2.1

Posted on November 15, 2010 in Tutorials

Yesterday I recorded and released a 10 video tutorial series how to use my ActionScript 3 library, AMFPHP Toolbox. I've been meaning to do this for ages, but, you how it is. You can view all the videos at its YouTube playlist. Due to AMFPHP kindly tweeting about it, and a number of others retweeting (1, 2, 3, 4, 5 - thanks guys!), there's been a big upward spike in my visitors graph. In fact,...

Read more...

AMFPHP Toolbox 2.1, GitHub, and SOSConnection 1.0.1

Posted on October 22, 2010 in Projects

Well, it's been awhile since I've posted. I've been a lot of stuff lately, so I haven't really had the time to make a post. Anyhow, in this post, I'll cover a few major events. The first thing I'll talk about is that the NovaFusion AS3 library is now hosted on GitHub as of yesterday. I have heard GitHub recommended among developers, and after giving it a try, I can certainly see why. Playing around...

Read more...

Experimental AS3 Benchmarking Classes (and Other Updates)

Posted on August 30, 2010 in Projects

I just thought I should probably post an update on my blog. The big thing I forgotten to post about on here is the release of a package of three experimental AS3 classes, targeted at benchmarking. They gather information on two topics, FPS (Frames Per Second) and the time between points in time. I won't re-describe what I already have here, so I'll point you to its project page. As stated, sorry for lack of...

Read more...

First Days With the Mac Pro Part 2

Posted on August 23, 2010 in General

Well I thought I'd write another entry on how my experience with the Mac Pro is going. The machine hasn't crashed in a couple weeks (as far as I recall), and is running smoothly. What do I think about Macs now? They're brilliant! My Mac Pro runs smooth as ever, is very fast (unlike my sluggish PC) and I don't have to shut it down every few days (I usually shut down my PC everyday)...

Read more...

First Days With the Mac Pro

Posted on August 09, 2010 in General

A number of days ago I bought I used Mac Pro. It's a 1,1 model from 2006, so it's certainly not the new model from 2009 (as much as I would like one of those). A few days ago the screen I bought for it also arrived, and I was able to start testing it out. So this is what this blog post is about, my first couple days with the Mac Pro. So I...

Read more...

SOSConnection - A New AS3 Class

Posted on August 08, 2010 in Projects

Today I released a new ActionScript 3.0 class. It's called SOSConnection, and in short it speeds things up when sending messages to SOS max. Just in case you don't know, here's a brief overview of SOS max. It's a socket server made by Powerflasher, which allows you to send messages from Flash to the server and provides a graphical interface to view them in. It's sort of a much more advanced trace() function, and is...

Read more...

NovaFusion Blog Launched

Posted on August 06, 2010 in General

Well, I've finished making my blog, so here it is. The main point of this post is to make sure you don't get an error message when coming to the home page. :)

Read more...

AMFPHP Toolbox v2 Final Released!

Posted on August 06, 2010 in Projects

The final version of AMFPHP v2.0, my ActionScript library for working with AMFPHP, has been released. A number of things have been changed since the beta version and I'm going to go over them here. CallQueue First of all I'll introduce the new CallQueue class. This class acts has some similarities with CallSet, and it's functionality is to move a list of call objects up a queue (in the first in first out order) calling...

Read more...