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!
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 me was the difficulty). A few people (negativeview, @PeteDevlin, @b1naryth1ef, and @headchant; thanks guys!) volunteered to test it, and gave me some pretty helpful feedback. I plan to release another test build sometime soon.
Read moreA 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 successfully with one pixel is have instructions given inside the game; other than that it was perfectly possible to do.
Read moreIn 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. The reason for this was that I had programmed the game to move the ship on the y axis instead of moving everything else, as expressed by this code (line 72 of ship.lua)
Read moreIn 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()
rect = {
x = 100,
y = 100,
width = 100,
height = 100,
dragging = { active = false, diffX = 0, diffY = 0 }
}
end
The next thing we need to do is define love.draw
to draw the rectangle. (We'll see what rect.dragging
is all about soon.)
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, I won't repeat what I've already written, you can get more information and download the game from its page. Also, I'd really like to hear your comments and suggestions regarding it.
Read moreAfter 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 I failed last time was that my framework was riddled with bugs. My framework is much more solid now, nevertheless my main reasons for not using it are:
Read moreI'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.
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
end
The shape gets drawn multiple times, each time with a different line width, set by i
. In all, six shapes are drawn with the widths 7, 6, 5, 4, 3, 1. For all the lines, except the last, the alpha of the colour (by the way, r
, g
, and b
represent the respective values of whatever colour you might choose) is set to 15. Since the alpha of every overlapping colour is added to each other (by default), for each line the colour will get stronger and stronger, giving the glow effect. The last line is given an alpha of 255, since this is where all the "light" is meant to be coming from.
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 = {} -- our metatable, which contains nothing right now
setmetatable(t, mt) -- sets mt to be t's metatable
getmetatable(t) -- this will return mt
As you can see, getmetatable
and setmetatable
are the main functions here; I think it's pretty obvious what they do. Of course, in this case we could contract the first three lines into this:
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.
I'm guessing you probably already know, but for those who don't, LÖVE is a 2D game engine (or, framework). It's an environment which contains a lot of pre-written code targeted at making games. It interfaces with the Lua programming language to makes things even easier for you.
Read moreIn 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 only HTML code we'll need is a div
tag with the proper class:
<div class="big-button">Your Text Here</div>
If you want the button to link somewhere, just wrap a link round it:
Read moreFor 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, so whenever I change something I have to regenerate the entire site. For my needs this isn't bad, and it affords browsers a lot more speed while browsing the website.
Read moreWhile 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).
For those who don't know what much about ASCII codes, I'll give you a quick introduction. ASCII stands for "American Standard Code for Information Interchange", which assigns certain numbers to certain common characters. Since computers can only work with numbers, every letter, or character of any sort, must have a number associated with it. ASCII assigns numbers to 128 different commonly used characters (although many of the non-print characters are no longer used for their original purpose).
Read moreThis 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!
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 when you're following players, for example, and you don't want the camera to show any of the stuff beyond the level (usually blackness) when the player comes to an edge. Now of course, movement bounding can get much more complicated than a simple rectangle, you restrict it to certain paths and the like, but we're going to keep it simple here.
Read moreIn 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, the object will be drawn 20 pixels up, as in y - 20.
This allows us to do many useful things. First of all, if we have an object with centre based coordinates (like physical bodies), instead of drawing like this:
Read moreJust 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!
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 know now, however, the end result was me pulling out not long after half-way.
So anyway, I started when the competition was about 6 or 7 hours in. My plan was to use the Love2D engine, along with a personal framework I'd written for it. The theme was "It s Dangerous to go Alone! Take this!" So my first idea was to have sort of dangerous test facility which was pitch black with darkness (making it dangerous to go all alone), and you're given a light or something (the "this") to see your way through. Well that didn't work too well, so I switch the character to a rolling ball, and made "this" the ability to propel yourself in any which way.
Read moreFor 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.
Read more