Creating TimeSeries chart with jfreechart

Second chart generated by Mavis – chart with my yearly activities with games and books, by each month. As previously described bar chart I use jfreechart to generate data.

Read more

Creating Bar chart with jfreechart

For last few weeks I was working on Mavis – little tool to generate data for posts on this, and personal blogs. Core feature is generating charts describing my monthly and yearly activities, so I’ll write some posts about generating charts with jfreechart library. Read more

Using Travis.CI with Java Eclipse Project

Lately I set up Travis.CI for my Mavis project. It’s hosted continuous integration service free for open source projects. It’ll build your project and, optionally, run tests after every push to remote repository that contains travis.yml configuration file.

As I never really used ant or before it took me too many hours to actually setup it correctly, so I figured I’ll share new knowledge.
Read more

Inheritance with phaser.js

Today’s short one to celebrate moving from dev.kofun to main domain – only code snippet, no further explanations.
How to make subclass for pharser.js class?

Let’s make subclass of Sprite, and call it Ghost.

function Ghost(game, args){, game, args);

// Add Sprite object prototype as Ghost prototype
Ghost.prototype = Object.create(Phaser.Sprite.prototype);
Ghost.prototype.constructor = Ghost;

And we use it like:

var tmpGhost = new Ghost(game);

// and add it to game like this:

Illusion of Intelligence – AI for Pacman

PacmanGIFAfter screwing up main game loop for Untangle (see postmortem) I really, really wanted to try using complete game-making framework, rather than writing everything from scratch. I decided to write simple pacman clone with phaser.js.

Today I’ll write about implementing AI for pacman’s ghosts. I assume that you already know rules behind ghosts behaviour (if not check awesome articles on GameInternals or Pac-man Dossier).

You can find pacman’s code on github. If you want to play newest version online click here.
Read more

Multidimensional Arrays without Subscript Operator

Some time ago friend of mine asked me how to operate on array without subscript operator, and – to be honest – I supposed it’ll took less than few hours…

NOTE as for all pointer arithmetic it’s rather inadvisable to use this trick in ‘common life projects’.
But I have some more knowledge so I’m sharing! (:
And if you want something more about pointer arithmetic you can check my previous article. Read more

Setup Allegro tutorial part 1

I haven’t seen any up-to-date Allegro 5 tutorial that focuses on learning via making games. All I found online were either small examples (like moving rectangle) about particular functions of Allegro 5, or complete guides for older versions. That’s why I decided to write down this small series of articles.
My goal is to teach various parts of Allegro gaming library, and basics of game programming concepts via making some – at first simple – game prototypes.
Tutorial assumes at least a basic knowledge of C/C++ programming, and although all examples were written and tested on Visual Studio 2010 under Windows 7 you can use any other IDE you like.

You can view code for this tutorial on github!
Read more

MPD-helper post-mortem


It’s post mortem time~! Finally I have enough time to describe my longest – for now – project: MPD-helper. You can get source code from repository on my github.

It is – as name suggests – helping tool for Modeling of Discrette Processes (in polish Modelowanie Procesów Dyskretnych). Purpose was to automatise solving simple, offline scheduling problems for two, or three machines. It supports:

Read more

Strategy pattern in MPD-Helper

Here are some thoughts about last refactoring step for my MPD-Helper (repo’s here, post’s here) – replacing code type with Strategy.

I’ll try to explain pattern (I’ll base on Gang of Four brilliant book), my motivation for this refactoring and (in short) implementation. Read more

Ludum Dare – Untangle Post Mortem!

Post mortem time~! Welcome Untangle – my second Ludum Dare compo submission. You can play & rate it here. Code repository is here.
Read more