Category Archives: Open Source

PyStroke: Pre-alpha at last!

It’s been a long time coming, but I finally got my game engine properly online in a version controlled, browsable form. Say hello to PyStroke v0.02!

This isn’t an amazing success, or even much of a step forward, in terms of programming. I haven’t worked much on it since Ludum Dare, thanks to various assignments, including writing a twenty-page report on PyStroke and assorted research as part of my Final Year Project. However, I have met some nice people through Reddit and Twitter who are interested in reading the code and giving it a try. As well as that, I wanted to have a build online by Christmas. Unfortunately that wasn’t possible, given the aforementioned assignments taking up so much time, but less than two weeks later isn’t too bad, I don’t think. And technically, my Ludum Dare game included a build of the engine more than a week before Christmas, it just wasn’t very readable. So overall, I think I succeeded.

The code isn’t exactly pretty, but it is very, very much a work in progress – pre-alpha is even being a tad generous. I have used it to create games, but I don’t necessarily think it follows that someone else will be able to. In the next week, I hope to knock together an extremely simple game and write a little tutorial on how the engine is used, as I see it.

There is one semantic bug that isn’t going to go away for a little while – rotation of the ‘vex’ (or vector sprites) uses a slightly incorrect call to do some of its calculation. The rotation works, but under the hood it isn’t strictly right. I’ll need to give that some time as a priority in the coming days.

Anyway, I’m glad to have it finally out there! Feels good. Expect to hear more about it as January (and the year) continues.

Ludum Dare 25

My Final Year project has ballooned somewhat from a relatively simple idea to make an open-source game, to the considerably more complex idea to create a game framework for others to use. I’m not upset about this, though. I’ve discovered I really enjoy playing about with the bits that people will use to make games.

Last weekend was the 25th Ludum Dare competition. It was also, on Saturday, the time of my last exam this semester. So, as tempted as I was, I did not start a Ludum Dare game at 2am on Saturday like many other participants. I told myself that if the exam went well, and if I could make the current pre-alpha build of the library separate from the main sample game, that I would try to knock something together.

As it happened, the exam did go rather well. After some recovery time, that evening I sat down, without much hope, to try and extract the framework from the game without breaking it. Two hours later I had it working from a separate folder, and it wasn’t even close to bedtime. ‘I guess that’s it’, I thought. ‘I’m finally making a go of Ludum Dare.’ Armed with a couple of uncaffienated beverages and some paper, I set to work designing a game to fit the theme of LD25: You Are The Villain. At first I struggled, but then I had a flash of inspiration: a packet sniffer! It was simple, could have malicious intent, and could be gamified using the vector graphics style my framework revolves around.

Thence came IdentiThief, a game that took me about twelve hours of work and vindicated many of the niggling suspicions I had about the framework’s design, as well as highlighting a few new ones. Nevertheless, I was able to see my framework through the eyes of a developer at last, which was very valuable indeed. I went from concept to full design to first prototype in a matter of hours, and that was a lot of fun. At the end, I even had time to work in a separate menu and game state, which I have never done before in Pygame, let alone in my framework. I had to hack it a little to make it work, but it will definitely be a feature now.

All in all, I had a great time and gathered (somewhat) useful data on how I could improve my framework. Not to mention, I made a game in a day! Not too many people can say that.

Nexus Innovation Centre


Over the last month or so, I have been working with the Nexus Innovation Centre at the University of Limerick. Gerry, Shane, Ian and I first met with them on the tenth of October. The idea was to gain experience by helping them add value to their online and offline presence.

The Nexus Innovation Centre aim to help budding enterpreneurs with ambition realise their ideas and connect with a supportive network of like minds. To this end, they have office space which they rent out to companies under their umbrella, as well as a number of free consultation services for companies not yet ready to commit to office space.

There are more than ten companies resident in the building, and several external members. All of these companies have websites, most of which were linked on a Nexus page, yet none of them had an explicit link back to the Nexus website. When trying to establish an online presence, it is important to know the audience, and we knew that the audience Nexus is trying to reach includes enterpreneurs and people who wish to become enterpreneurs. We knew that such people would visit the websites of other enterpreneurs. A simple link didn’t seem like enough, however – so we created a JavaScript button with a Nexus logo that would inform people even if they didn’t click it.

During the summer, the Nexus was putting together an initiative called ‘studio to street’. Enterpreneurs-to-be could collaborate in a targeted environment to develop an idea and then bring it to potential customers. This initiative had a good name but no logo, so we created one that kept focus on the name, while giving a visual association with the building that houses the Nexus.

We also worked on making the entry to the Nexus website a bit smoother. When we looked at their website initially, it was a bit difficult to see answers to the questions ‘what do we do?’ and ‘what can we do for you?’. Our solution was a landing page, which would show up instead of the current home page. Visitors could get an idea of the Nexus without having to navigate through menus to find the ‘about us’ page. Reasoning that visitors fall into one of two groups – students and enterpreneurs – we decided to answer these questions with those groups in mind. We created a page which asked if the visitor was a student or an enterpreneur, and directed each towards another page which explained the benefits the Nexus could hold for them. One more click took them to the current homepage, where they could explore as before, while being a little more informed. Below is a draft of the landing page, which is awaiting some text content.

We developed some poster templates for the Nexus to use in promotion of themselves and their events. We used their highly recognisable logo and photos of the building to personalise these posters.

Finally, we put together some ideas for further promotion of the Nexus in the coming months, including a competition for the best business idea.

I think we learned a lot about working with a client here:

  • Never assume anything about a client.
  • Always respond to client input as promptly as possible.
  • Don’t wait too long to get client input – better yet, have input at every stage of a project.

It was also good to see how useful open-source tools such as Inkscape (used for graphics) and Bluefish (used for HTML/CSS) can be in a professional context.

tile_puzzle: A Python tile puzzle emulator with simple solver

During the last couple of months I have been attending a module on artificial intelligence and machine learning in games. One of the basic algorithms the course looks at is the best-first search for making in-game decisions such as the next move in chess. In class, we used A* search (finding the shortest possible path from one node to another – an extension of best-first search) to solve a puzzle like the one below – a selection of sliding tiles in a housing that allows for one tile to move at a time.

A 15-tile puzzle with 16 spaces, also known as a fifteen-puzzle.

Beginning with a scrambled (but legal) board state, the algorithm uses a heuristic to assign values to every possible next state, puts them in a list of open states, and then picks one of those states to move to. Then it does the same thing again, adding new board states to the open list and already-used states to the closed list. This continues until it has reached a predefined goal state – in this case, the start state. The heuristic takes into account not just the closeness of the state to the goal, but also how many moves it took to get to the state. That is what allows it to find the shortest path every time.

I liked this algorithm when I heard it the first time, but it wasn’t as clear to me as I would have liked. This time, I decided to make sure I understood – by implementing it in real code. I began with emulating the tiled board. The board state is simply a two-dimensional list, which is generated in the start (or goal state). Random legal moves are then made on the state to generate a random, legal, board state.

The other part of the program is a solver, which creates an instance of the board and randomises it. Then it uses the algorithm described above to attempt a solution. I say ‘attempt’ because even at the 15-puzzle level, complicated board states can take more than a few hours to solve. The 24-puzzle is considerably more complex, so I don’t even consider it here, although the code will work for a square board of any size from two upwards.

I enjoyed this project because it was fun to use Python in a new context – solving heuristic problems. Previously I had only done this with Java. I learned a lot about how A* algorithms work, and got some experience with designing for general solutions. I designed the code to work with any size board, and made it possible to solve different problems using the same solver.

The code is available on GitHub. Below is a fairly simple execution log of a 24-puzzle with 20 random moves on it.


Size: 5
Random iterations: 20
Randomising: 20 iterations
Tiles out of place: 11
Isolated moves from goal state: 39
1
2
3
4
5
6
7
8
9
10
Found it after 10 moves
Total children added to open list: 21691

| 1| 2| 3| 4| 5|
| 6| 7| 8| 9|10|
|11|12|13|14|15|
|16|17|18|19|20|
|21|22|23|24| 0|

| 1| 2| 3| 9| 4|
| 6| 7|13| 8| 5|
|11|12|18|14|10|
|16|17|19| 0|15|
|21|22|23|24|20|

| 1| 2| 3| 9| 4|
| 6| 7|13| 8| 5|
|11|12|18|14|10|
|16|17| 0|19|15|
|21|22|23|24|20|

| 1| 2| 3| 9| 4|
| 6| 7|13| 8| 5|
|11|12| 0|14|10|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 9| 4|
| 6| 7| 0| 8| 5|
|11|12|13|14|10|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 9| 4|
| 6| 7| 8| 0| 5|
|11|12|13|14|10|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 0| 4|
| 6| 7| 8| 9| 5|
|11|12|13|14|10|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 4| 0|
| 6| 7| 8| 9| 5|
|11|12|13|14|10|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 4| 5|
| 6| 7| 8| 9| 0|
|11|12|13|14|10|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 4| 5|
| 6| 7| 8| 9|10|
|11|12|13|14| 0|
|16|17|18|19|15|
|21|22|23|24|20|

| 1| 2| 3| 4| 5|
| 6| 7| 8| 9|10|
|11|12|13|14|15|
|16|17|18|19| 0|
|21|22|23|24|20|

| 1| 2| 3| 4| 5|
| 6| 7| 8| 9|10|
|11|12|13|14|15|
|16|17|18|19|20|
|21|22|23|24| 0|

Did it in 10 moves.

Ryan ‘icculus’ Gordon on Tools for Open Source Game Development

Here is an hour-long video that I found in my research for my final year project. Ryan Gordon’s website, icculus.org, was the primary host for the Quake3 open source project (and similar projects) for quite some time, and he has been a big part of making the Humble Indie Bundle games run on multiple platforms.

In this video, Ryan talks about the plethora of free and open source libraries, languages and development tools that are available for game developers. It doesn’t start well, sound-wise, but if you skip to about the 2:20 mark the sound comes in perfectly from then. I encourage you to take an hour of your time and check this out, if you have even a passing interest in open source game development.

Zeouterlimits's Blog

Just another WordPress.com weblog

Smaointe Lambo

Lambo's thoughts on Lambo's intrests.

Colm's Blog

Full of games, programming and overblown opinions

jester252

Just another WordPress.com site

xtremesolutionsie

Just another WordPress.com site

Project Management Blog

Learning in the module

Paul's Plethora of Peculiar Posts

Here be dragons (made of bad jokes, puns and weird imagery.)

Sophie O'Gara's blog

Creativity shall make dreams soar

Les Divagations d'une Jeunesse Imaginative

The ramblings of an imaginative youth

Phil's Blog

A blog about Philip and his opinions on Video Games, Art and just general Navel Gazing

Conor Murphy

Not sure if you know this but, I’m kind of a big deal

Some general vizardry

A novice programmer's musings

andruQuinn

Problem solving in programming. A blog to give new views into problem solving

Player Two

Ludology from a developer

William Laffan

A Portfolio blog

Not Your Blog

Let's go in there and take out that dragon!

Lukes-Site

Gravity-It's not just a good idea, it's the LAW!

wi11iamcb

The quite mutterings of a madman