I just rewrote the server-side part of the site, this time using mongoDB instead of mysql.

While I can't speak for the performance of mongoDB, I did find the workflow to be very nice. There are three key things that make that the case: It's not a relational database, it's schema-less, and it uses BSON(Binary json).

Because it's not a relational database, I don't have to have to make as many seperate tables(or 'collections' in mongodb). For example, I put the comments in an array right inside each post. The data is still accessible out of context in the same basic way it is with a relational database: find the post based on id, then the comment based on id. You can also still search for a comment id directly without worrying about what post it's in.

MongoDB is schema-less, which means you don't have to spend the time to create a database structure beforehand (tables, columns and their type).

The coolest part to me is that it uses BSON for queries. This means the mongoDB driver can take data structures directly from my programming language, in this case perl, and use those as the query.

The three things combined means I'm working with a database more integrated with my programming language: The mindset is that I create a data structure in my programming language that represents what I want to store (such as a comment), and then I just store it. No need to create the structure beforehand, no need to stringify the data into a query, and no need to seperate it into chunks in a relational database style.

Android divider colors

The ability to change the color and transparancy of the divider has been the most commonly suggested feature. I'm just letting everyone know that this is being worked on. A few details: The app will integrate with DefCol to change the colors. DefCol will be optional, but required if you want to change the color. If you try to change the color without DefCol, it will give you the option to install it.

Open Space and Graffiks

I've been thinking about a game idea for a while: A dynamic universe in which you control a large capital-sized ship. The universe is infinite in size.

To put to scale how dynamic the game would be: All objects would have a gravitational pull. This means a small ships could get stuck in orbit around a large one. A large ship could change it's position to alter the orbit of another ship in such a way that could the ship's orbit path to go into the sun.

You would build your ship modularly. The position of the engines would change how the ship moves. You would need to make sure to have engines for rotating the ship (if you want to be able to rotate, anyway).

The Game

I decided to build this game with support for android. Desktop/laptop linux will hopefully follow. To build the game, I need a graphics engine.

Looking around the internet, I found alot game engines that support android. Every engine I found either didn't have the features I wanted, or wasn't open source. In addition, they where *game* engines and not *graphics* engines. They did more than render graphics; They handled input, parsed JSON, or did other common tasks a game would need. This sounds convenient, but it only makes sense for these tasks to be in other libraries. These tasks aren't specific to graphics or games, so if they become separate libraries, they're instantly more useful for more things.

The solution? I've decided to build my own graphics engine, named Graffiks. My friend is also working on a physics engine for the game, called fizziks. Here are some features I plan to implement (some of them are already implemented):

  • Load many types of model formats, and provide a script to optimize model formats that are inefficient
  • Automatic mesh triangulation
  • Normal maps
  • Lighting: Spot, Point, Sun, Ambient
  • Ambient Occlusion
  • Quaternion and Euler rotations
  • Multiple main loop styles: frame dropping, dynamically lengthed ticks w/ smoothed average, fixed tick length w/ no frame drops etc.
You can follow and fork both Open Space and Graffiks on Github

A line!

With the blog becoming more and more filled with android related things, I bring you a line!


I've released an android application on google play: defcol

Oil rush

Been playing Oil Rush alot the past few days. Cool game.

Unknown Horizons 2012.1 release

I said I would probably post stuff about Unknown Horizons often, and here we are again a couple of days later: 2012.1 has been released.

Unknown Horizons

I make graphics for an open source game called Unknown Horizons, and I'll probably post stuff about the project often.

A few examples of stuff I've done for the project, right now just going to be static images on the page as the portfolio page doesn't work yet:

tower storage hut windmill frigate

The Infinity Misconception

I've noticed that infinity, in the mathmatical form of the word, tends to be used incorrectly. Why? Because in some contexts, infinity is 0.

Let's start with the definition of infinity: infinity is a value that is endless in size - both negative, and positive. If I said "Plotted on a graph, the x-axis locations of these boulders use every value of infinity as long as there is space for the boulder", then that would mean that there is a line of boulders that go on forever in both directions.

But what if I said: "There is an infinate number of boulders over there."? That would be the negative half of infinity, added to the positive half of infinity. I would have just said the equivalent of "There are 0 boulders over there".

A bit of pseudo-code might help demonstrate this, I'll build a loop that will run forever, effectively acting like infinity (untill the limit in integer size, anyway):

int boulder-count = 0;
while (true) {
  // add 1 to our number of boulders (positive side of infinity)

  // remove 1 to our number of boulders (negative side of infinity)

When used directly as a number in a sentance, infinity is 0. Despite all of this though, I don't think there are seperate words for the positive and negative halves of infinity.

Error: your browser doesn't have full css3 support

This probably means your browser is out of date, as you aren't useing internet explorer.