Molydeaux 2013

Molyjam 2013 is inspired by a parody twitter account by the name of Peter Molydeaux. There are some interesting and funny ideas in there. The theme for this year’s molyjam used actual quotes from Peter Molyneaux, of course in the manner of promising a lot. I compiled a shortlist and checked and saw if I will be working in a group. Not! I worked alone so I also needed to pick something that would be do-able in 48 hours and that would be interesting in looks.

For my game I chose the quote “Pull the right trigger to see The Most interesting Thing in the World”. Hmm. OK. I had a random maze generator up and running, well, kind of, and I thought about googling the most interesting thing in the world. Based on that result I decided on how to fullfill that.

Here I will present what went right and what went wrong and what can be done to improve it.


Since I wanted to do something interesting, not just plain and simple planes floating about, I decided to actually build tiles and then set them up in Unity. For that I went on with 15 different blocks and then I proceeded to model them. The whole modelling process took me around 8-10 hours, since I wanted the models to look good and because I haven’t used  3Ds Max in quita a while. My final results looked really good but when I imported them in Unity… well, it didn’t work out as expected.

The objects, once imported into Unity, had their direction scrambled. Which meant that I then needed to figure out a way to make them fit. So lesson learned from here: If you are importing an object and its axis is screwed, make it a child of a Game Object. Doing that solved the problem. Of course, it does not happen all the time but when it does…

Hand in hand with the rotation problem, I also had a problem with my models as they did not fit in a box as well as expected. The Maze was first tried with Unity’s primitive cube system, but it did not seem to work properly. It was Saturday night, a long day had passed and I needed to know what to do because to top it all, the smoothing I applied increased the number of polygons to such a degree that a 10×10 maze took around 30 seconds to generate which wouldn’t be ok at all. So I decided to redo the models and just apply a smoothing division to them to make them somewhat more smooth.

The result? Vastly improved performances and since I knew exactly which tiles I had to redo, it all went by quickly. The only problem appeared in the corners and I wanted to keep its flexibility and get to putting them in. I had the clock ticking against me so I decided to use a column on every corner to hide the imperfections and put a plane beneath them with the same texture as the walls. This way the imperfections would be somewhat masked on first glance. Lesson learned? If you need to redo an object, simplify it as much as possible by taking out until there is nothing to take out.

Another problem was with the possible combinations and figuring out how to place the right prefab and what orientation it should use. (It’s also a problem I have apparently not completely fixed but I’ll do that ASAP). Due to the nature of the maze generator, and the fact that I have 15 prefabs, I have 256 possible combinations. Luckily some combinations just disappear and I’m left with a lot less. To solve that I created a help table to list every possible variation, where it occurs and how. To improve efficiency, I used a variable to sum up a value for each of the tiles around our tile and then used that in a switch. This made the switch be about 500 lines long! If you have a way of going around that I would appreciate your help :D but so far it’s the solution that works and it works pretty fine, especially since a switch is optimized to work in a way similar to a BST.

Then, all I needed to do was test and fix with each model until they worked. Some rotations are still off, due to my sloppy calculations, but I aim to clear those up as soon as possible.
I could also say that the final models and the algorithm were pretty efficient. On my laptop it took 3 minutes to generate a 100×100 tile map, which means effectively building well over 10k objects. Not bad!


The last part that I’m going to cover are the trigger boxes which some of you who have played the game have found already. I currently have a public array where I store the textures for the surprises (yes, I know, but I was tired, ok?!) and then just put them out. The problem with the  boxes is that they still are not placed as expected. Some are placed outside which comes to show that there are still bugs in the algorithm. That and a proper number of boxes should be found as I would like for a person to find at least one and soon as it would motivate one to keep on looking for more.

(Controls: W,A,S,D to move)


What’s in store for the future?

Well, I aim to build a menu system where you choose the size of the maze that you’re going to play in. That and fix any possible prefab orientation and trigger position bugs. Other than that it would be very cool to be able to hook it with a internet meme website so that a random meme is shown everytime. It’s a would be cool but it’s to be saved for last. Furthermore, I would like to increase the feel of the dungeon by creating torches and putting them in there. So far I am pleased with what has been done in these 48 hours.

What’s the next project?

Since I am still currently unemployed and am working to fill up my portfolio with more stuff to show my skills, I aim on doing several projects before my allocated looking for a job time runs out. My next project though is a match 3 game, but in complete 3D. Kind of like a 3D tetris. I aim to try and develop it for google play and actually put it online and on google play for free for testing. I would like to use it initially to gather data but if it’s good enough I will try and find some help with the art side and making a good looking 3D match 3 tetris-like game.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>