My Side-Job

•27. August 2008 • Leave a Comment

One of my side-occupation is my charitable art exhibition project named Artenade. It is a web-based project founded by me and an associate of mine. The goal is to create a platform for artists to participate in exhibitions/auctions around the globe. The profits from these exhibitions/auctions get divided between the artist and the organisation or the institute for who the exhibition was held. The last exhibition was held in The Hague, the Netherlands, in July, check this link out for some pictures from that event. The event was named The Hague Red Cross Exhibition since the procedes went to the Dutch Red Cross. There is another exhibition/auction taking place in November in Tallinn for an Estonian orphanage. Click here to check out the exhibition’s web-page.

If you’re an artist or know an artist that would like to participate, don’t hesitate to spread the word or even to submit your work at http://www.artenade.com/tallinn/submitwork.aspx.

Click here to leave a comment…

First Game of the Year – Progression

•3. August 2008 • 4 Comments

I’ve made progress on my strategy adventure game, lovingly code named Mr. Bubbles. It’s a strategic platform game where all the levels are procedurally generated; you’ll never play the same level twice. I’ve pretty much finished the strategic part of the game and am now starting to concentrate on the platform levels as well as the enemy AI and fine tuning of the level generator.

All the game logic is written in structured ActionScript. I say structured because I use classes and external files and other modern programming paradigms as opposed to embedding all the code in the flash project itself, which is the worst kind of spaghetti code imaginable. Most of the time ActionScript doesn’t tell you about problems the way, for example, C# would tell you about at compile time, but rather just silently fails and you end up scratching your head, wondering why some of your graphics aren’t showing up in the correct order.

The procedural content generation module is written in C#, and the source code can be found on the My Files page. The flash part is embedded in a simple Windows Form window (created in Visual Studio 2008) using the Internet Explorer ActiveX control. I originally had a problem with the time it took to generate enough levels. In the end I found a good solution. The C# module starts by generating 10 levels before starting the game, after which it delegates the level creation to a worker thread which goes on to create 200 levels behind the scenes for the flash module to use later. I’ll have to see if this creates performance issues during the content creation, if so, I may have to lower the priority of the worker thread a lot and see if that helps.

Click here to leave a comment…

Flash Card Study Aid – A Summer Project

•2. August 2008 • Leave a Comment

I was approached by two college students earlier this year about the possibility of me implementing a study aid program for them as a part of a national Young Entrepreneur contest held in May 2008. The implementation was a success and the project won first prize. I implemented a second, improved version of the program (called Recall 2008) for the follow-up contest, this time an international competition that took place in Sweden on the 24th – 27th of July, called “Junior Achievement-Young Enterprise”. Here’s a link to the project’s web-page.

Recall 2008 Startup Recall 2008 Input

The program, Recall 2008, simulates Q&A flash cards where people write a question on a card, the answer on the other side and then go through the stack of questions they have to try to remember the answers to the questions. The most innovative factor in the program is the way it goes through the questions. There are 5 methods of learning:

  • The study mode – asks you the questions you have until you’ve gotten a grade of 80% and automatically focuses more on questions you’ve been having problems with.
  • Exam – goes through the questions one after the other and gives you a grade in the end, also offers afterwards to go through the questions you were unable to answer.
  • Recall – Goes through the questions until you’ve had enough.
  • Timed Recall – you set a timer and answer as many questions as you can in that time.

The most difficult part of this program was actually implementing a passable word processing module for the flash card entry section. All I needed were the basic word processing tools. The cheapest one I found was from Aspose at ~250 Euros, but that one couldn’t even do underlined text and looked rather dated. In the end I just wrote my own word editor using the standard RichTextBox control as a base. The program also includes my first attempt at a shareware protection implementation as well as key generation and unlocking mechanisms.

You can download this program here

Click here to leave a comment…

A Real Application for Procedural Creation

•16. January 2008 • Leave a Comment

I’ve been working on a project that has a direct application for a procedural content creation module. The project is a flash platform game with strategic elements. The game will be highly replayable because the platform levels will be created on the fly through a PCC module written in C#. I’ve already implemented a basic, but complete, version of the level creation algorithm as well as the basic platform elements of the flash game. The work ahead will be, amongst other, to refine the PCC module, add further game elements as well as graphics work (done by Ben).

Click here to leave a comment…

Procedural Content Creation Finished

•10. January 2008 • Leave a Comment

The Procedural Content Creation project has been finished. There are a whole bunch of procedures and methods in there that are too long to elaborate on which is why I’m including the final deliverable (containing binaries and a manual) plus the full source which you can check if you want. There are still some loose ends, especially regarding seams and such but all in all this project is finished. I will for sure come back to this project in future games to borrow procedures and functions and even the entire project for creating highly dynamic content for games.

PCC Terrain 1 PCC Terrain 2

You can download the latest project by going to the files section of this page.

Click here to leave a comment…

Procedural Content Creation Continued

•28. October 2007 • Leave a Comment

I’ve been working on my project for the past week. The main thing I’ve done is that I’ve added an exporter for the globe model. Basically what it does is translate the height texture map (displacement map) into an array of points which is then composed into an OBJ file and saved to disk. The model can then be viewed or used in some application. There is one catch though, the globe model is extremely large. I’ve been trying to find some polygon reduction algorithms but most of them are so complex that I wouldn’t be able to finish the project in time if I implemented them.

The next step now is to find a polygon reduction algorithm and work on the color texture for the globe map.

You can download the latest project by going to the files section of this page.

Click here to leave a comment…

More on Procedural Content Creation

•19. October 2007 • Leave a Comment

I’ve done some more work on the procedural content creation. I decided to add a new pipeline for making globe height-textures. This task was a bit more challenging than the valley height pipeline creation and some basic graphics elements had to be added.The globe creation pipeline looks like this:

  • 1) Generate random noise
  • 2) Apply a Gaussian aggregation (discussed below)
  • 3) Make seamless (discussed below)
  • 4) Filter through an emphasize to draw out the highlights and low areas
  • 5) Normalize it so that each value is between 0 and 1
  • 6) Apply a Gaussian blur to soften the image
  • 7) Transform the matrix into a grey-scale image
  • 8) Create a sphere object using sphere coordinates, then transforming them to Cartesian coordinates. A look-up is made from the height-map image to the radius of each vertex for each sphere vertex; this is basically what creates the terrain

I did some experiments with fractal generation of terrain. That is a good approach but is more suitable for making smaller areas, clouds and plasma and such stuff. It is also much slower than the method I came up with, Gaussian aggregation.

The Gaussian aggregation is an idea I had for making lumps, in this case the lumps are suppose to represent continents on a globe. This method works very well when working with smaller images on the size of < 300 resolution points (not pixels necessarily). Higher resolutions like that sort of reveal some flaws with this method. It works at those resolutions but it starts looking less and less like continents and oceans.

The method works by an average aggregation effect. By creating a completely random image, there are bound to be areas that have a higher density if bright pixels and some areas where the regional average is lower. The Gaussian aggregation works by checking out each area of the image, if the area is higher than a given threshold,the pixel is brightened, if it is below, the pixel is made darker.

Possibly the weakest link is the function that makes the image appear seamless. The method I currently use scales very poorly and already becomes apparent at unit sizes > 100. I must do some more research into how make the image truly look seamless since this is suppose to be a texture that wraps around a globe. I’m going to look into what other researchers have found out on this topic.

As usual I have uploaded the source code as well as a running version of the program, feel free to have a peek and email me if you have any questions or inquiries.

Click here to leave a comment…

Procedural Content Creation

•15. October 2007 • Leave a Comment

Today I got a research project accepted. The project is about methods to procedurally create content for a video game. The video game in question is the one planned after the computer game “Escapade” has been finished. The content in question is a terrain. We want the terrain to be created dynamically for each level. Each level consists of a valley that acts as the back-drop of the level.

 I started working on the elevation topology today. I’m basing my work on a paper done by Timothy Roden and Ian Parberry, University of North Texas, called “From Artistry to Automation: A Structured Methodology for Procedural Content Creation”. Basically this part is broken down into a few steps.

  • 1 – First I create a matrix of pixels, each element holding a value generated based on two functions that take in the x and the y position being processed.
  • 2 – The function returns a value based on how far away the position is from the edges and from the northern regions of the area.
  • 3 – After this is done, the results stored in the matrix are normalized to conform to values in the range of 0 – 255 (also for visual checking). A value of 255 is the highest altitute an element can attain, while 0 is the lowest one.
  • 4 – The final procedure before vertex creation is the Gaussian Interpolation process where the jaggedness of the elevation map is smoothed out.

That’s as far as I got today. The results if this 2-dimensional terrain map will be used to create a 3D terrain. Another part of this is the procedural texture generator which I will start working on once the current pipeline is finished since it relies on the results of the first batch.

You can view the source code and run the visualization program by downloading it from the files section. Remember that you need the .NET framework, version 2.0 or higher for this to work. The source project was done in Visual Studio 2008.

Click here to leave a comment…

Secrets of Rigel

•14. October 2007 • Leave a Comment

I’m currently working on a space strategy game during the few hours when I’m off work or school. It’s suppose to become a 4x strategy game (explore, expand, research and battle). It’s still in it’s infancy right now, I started working on it this week. I’ve created the basic architecture and the galactic map plus fleet selection, sphere of influence (borders) and some other basic game elements. It will be a lot of fun to continue developing this game. I plan on using it, once I have everything except the opponent AI up and running, as a testing bed for my AI work, combining my two main interests, AI and games. I plan on implementing AI creation of assets (such as the space ship designs) and of course intelligent opponent behaviour.

The game is done in C# using only the windowing GUI platform that the .NET framework offers. The art, if that is what it should be called, will be done later, once the programming has been finished.

If you want to see what it looks like right now, just click on the “Files” link located to the right where you can download the source project (Visual Studio 2008).

Click here to leave a comment…

An AI award for my summer project

•13. October 2007 • Leave a Comment

The annual AI festival was held today at Borgarbíó, Reykjavík. A big part of it is the AI projects competition. I was honored to accept first prise, along with my co-worker Freyr Magnússon, for my summer project “Spatio-Semantic mapping for intelligent mobile agents” (intelligent mobile agent = robot). The trophy is a small plastic brain inside a plastic cylinder. You can read the entire report describing the project under the files section in a pdf format. One of my current projects is to take the results from the summer project and make it run on a real-world robot. Real-world tasks are always a bigger challenge, as can be seen by the lack of robots in our environment but hopefully, some of my current and future work will help remedy that.

Accepting the first prise for the non-final-project (BSc, MSc) category.  Jury  Presentation

Click here to leave a comment…