2009-12-24 - Best wishes

The crew of qanar.be want to wish you all
A merry Christmas
and
A happy 2010!

2009-11-10 - SOLVING THE SLIDER PUZZLE part 1 - Introduction

This series of articles is based on the Sliding Around article on the Daily WTF. In this first part I will tell you more about the modelling of the slider puzzle and how the model discussed here could be extended even further.

 1 | 2 | 3 
---+---+---
 4 | 5 | 6 
---+---+---
 7 | 8 | _ 

Used files:
PuzzleState.java: State of a n*n sliderpuzzle.
Position.java: small class to keep track of 2 integers that define a position in the grid.
Main.java: contains main function and the actual solvers.

There are several ways you can keep track of where all the pieces in the puzzle are. One way would be to just have 9 integers keeping track of each piece, 0 being the empty square. Another way would be to have a single or multidimensional array or vector. I chose for a one-dimensional array because it allowed me to work not with only puzzles of 3*3 but also 4*4 or any other number of pieces on the side.

That vector however, is on the inside. What is important in a class are the public funtions and what they do. There 1 constructor. It will create a correctly solved puzzle with a edge-size of n. There is also a static method called createRandom. This function will return a puzzlestate with size n that has had x random moves. Thus this function always creates a solvable puzzle.

isCorrect will return true when the puzzle is correctly solved.

getSquare will return the value at the given position. Should the position be out of bounds an assert will trigger. getEmptySquare will return the position of the empty square.

makeMove returns the puzzlestate following at the moving the piece at the specified direction into the empty space. If a move should not be possible, (being at the edge) the function will return null.
example of the result of a moving the piece to the left of the empty square:
 1 | 2 | 3 
---+---+---
 4 | _ | 6 
---+---+---
 7 | 8 | 5 
  
 1 | 2 | 3 
---+---+---
 _ | 4 | 6 
---+---+---
 7 | 8 | 5 

As last function there is getPossibleMoves which will return all possible puzzlestates following a move from this puzzlestate. toString and equals have no special prequisites and do what you expect them to do.

This was an overview of puzzlestate. In the next part I will discuss how I made 2 solvers for this state and what else I would need for other solution methods.

2009-10-03 - reset.css

Ever wondered why your websites build with perfect HTML and CSS look different in different browers? That is due to the build-in stylesheets of each browers. There is however a solution for this. It's called a reset.css file. Basicly it standardizes cross-browser rendering on common elements, neutralizing browsers' built-in stylesheets. I used it this website too, my implementation is a quite standard one, targetting all basic HTML components. Feel free to use it if you wish.

reset.css

2009-08-13 - News-categories

News/blog now contains categories, so I can order my blog-post items better. Not all categories on main-page have articles linked to it. Should happen soon. I really want to start blogging.

2009-08-12 - Heavy Metal in Games

13 years after Nine Inch Nails writing the music for Quake, heavy-metal music is again on the uprise in games. Besides all the Guitar Heroes, Singalongs and other playback games there are several RPG's on the way that include metal-tracks.

Sacred II
First up is Sacred II. The title-track for this game, aptly named 'Sacred' was composed by Blind Guardian. The band members also appear in an in-game quest and cutscene.

Chronicles of Spellborn
Not all games are success stories. The Chronicles of Spellborn is a MMORPG set in a post-apocalyptic fantasy world. In June 2009, the developers of Spellborn, Spellborn NV, went bankrupt. The publisher, Acclaim, announced the following month that the game would be re-developed as a free-to-play game support by microtransactions. The new version would be released sometime after 2010, and until then the current pay-to-play/limited free-to-play version would remain active.

The Dutch band Within Temptation wrote two songs for the game: "The Howling" and "Sounds of Freedom".

Risen
There's also Risen. A RPG due to be released on October 2, 2009. Preview-movies for this game include fragments of Nightwish 'Poet and the Pendulum'.

Brutal Legend
And then there's also Brutal Legend. A game featuring all kinds of metal from Ozzy Osbourne over Iced Earth to Motorhead.

Brutal Legend tells the tale Eddie Riggs, the ultimate roadie. The "roadie's roadie", Eddie is the 1st person anyone calls when they need guitars tuned or stages rigged. With a love for hot rods and a photographic memory for every Heavy Metal album cover, and the lyrics those albums contained, committed to memory, Eddie has always felt out of place, like he should have been born earlier, when the music was real.

One night a stage accident knocks Eddie unconscious. With his blood dripping into the belt buckle he wears, a gift from his father, his blood quenches an ancient thirst that sucks him into a world that looks very strange yet oddly familiar, a world where every Heavy Metal album cover and lyric Eddie knows has come to life, a world where the evil emperor Doviculus and his demon army, The Tainted Coil, have enslaved the last remaining humans.

Led by Lars Halford alongside his sister Lita and the mysterious Ophelia, the human resistance is far from helpless. However, what they lack is someone to bring them all together; someone who can organise them and lead them into battle, what they need is a roadie. Under Eddie’s command, this barbaric force of hot-rods, Marshall stacks, leather, and chrome will bring this ancient world into the age of Metal.