Archives for April 2011

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...