Rainbow Madness!

While observing the new influx of players I noticed a new tactic take place that seems to be the most effective (more so than black and white).

Arrange pixels alternating between Red, Green and Blue. Then at least one of the color channels will be within range of the opponent and the odds are much better (almost certain).


Using C for a specialized data store

Pixenomics stores and transports 1.2 million pixels from the server to the client. During development we played with various methods to store and process this. Our ultimate goal was to send the entire board in under 1 second.

During the stages of prototyping we used a MySQL database without thinking too much about performance. With a mere 2,000 pixels we quickly realised this wasn’t even usable as a demo. Changing the storage engine to memory was much better but still obviously unusable.

The problem wasn’t to store the pixels but to retrieve all 1.2 million pixels quickly as well as process them. The game runs an algorithm every 3 hours to determine who wins or loses pixels based on the surrounding pixels’ color which means 9.6 million (1.2 million * 8) iterations.

We were reluctant to use a NoSQL solution as this would require retrieving the pixels through a socket, storing it in memory and then processing them. It makes more sense to process it where it’s stored.

This led to the idea of using Node.js. Node is the hottest new tech and was very simple to get a working prototype going. Initially our demo took around 7 seconds to grab an empty board (around 1.2 megs) and this was the lowest possible size. We were storing the pixels in an object where the key was a string of the pixel coordinates. It looked something like this:

for(row = 0; row < ROWS; ++row) {
    for(col = 0; col < COLS; ++col) {
        output(board[col + "," + row]);
    }
}

Turning the board into a multidimensional array shaved off 3 seconds:

for(row = 0; row < ROWS; ++row) {
    for(col = 0; col < COLS; ++col) {
        output(board[col][row]);
    }
}

So in the end we could retrieve the entire board in about 4 seconds. This is still much too slow. We decided the only realistic option left was to go deeper. We had to use C.

A daemon would store the pixels in a multidimensional array where it can be processed, modified and interface with PHP through sockets just like any other data storage. For persistent storage we write the board to a file and scp it to another server every hour or so. This presents another problem where writing becomes slow because it has to backup the entire board. To solve this we just wrote the file in a tmpfs (file system in memory).

The result of grabbing 1.2 million pixels using C?

0.03 seconds.

This was a result we didn’t even think would be achievable but shows how C is still very relevant in web applications today and a good choice when it comes to large amounts of data processing and retrieval.

Note: This article is a very simplistic view of what you should use to store data. There are many other concerns that may be more important such as concurrency, security, backups and portability. We were looking for the fastest way to get a lot of data processed and to the client and this was it.


Why pixel advertising failed and a simple attempt at fixing it

Once an interesting novelty, pixel advertising is now a dead form of advertising made popular by The Million Dollar Home Page. The website would sell a pixel for $1 on a board with 1 million pixels. It quickly became a hit in a matter of days which led to various imitation sites; though they didn’t seem to do so well. It also led to various websites hosting a smaller board in a spot generally reserved for advertisements; again this wasn’t very popular.

Why was the Million Dollar Home Page so successful and the others not?

  1. It relied on a gimmick. It wasn’t intended to be a serious and sustainable platform for advertisements. Other imitation sites have tried tweaking the idea such as temporary pixels or a better interface but it will never get the same attention because it’s already been done.
  2. It only benefits the advertisers. If the everyday person visiting the site has no real motivation to visit other than the novelty, they are less likely to return or even click an ad. This means the advertising is not very effective and advertisers will be less inclined to buy space.
  3. The space is too small. Other forms of advertising offer much more space to fit an ad with room to include a spiel.
  4. Too expensive for the common user. Not everyone can afford to advertise but why should that stop them.

Pixenomics is an attempt at solving these problems.

  • It’s a game. It isn’t meant to be a gimmick that has one use. The advertising is just one of the appeals for playing the game where the goal and reward is pixel ownership.
  • It benefits all parties. Players benefit by potentially making money from selling pixels they win as well as the thrill of the game. Advertisers benefit because users are more likely to return when there is a gameplay aspect.
  • 10 free pixels. Anyone can make an account and gain lots of pixels without paying assuming they play the game well. The default price for a pixel is 10 cents, much more affordable should someone want to buy pixels instead of playing the game.

If this sounds like an interesting game please share the link with friends. More players means more pixels to invade!


Why you should be using the ‘Laterbase’ for your projects

It seems the most common pitfall in the development of a project is feature creep. Developers get sidetracked by inventing new features that ultimately extends the development time. The most important part of any project is to get it out in the wild, observe your audience’s reaction and make changes according to their feedback.

This is why you need a laterbase (made famous by Alan Johnson from Peep Show). The laterbase is a glorious repository for unnecessary features that don’t make the release date any closer. This could be as simple as a todo list or an issue tracker label.

It’s important to feel comfortable deciding when something is not vital and although it may make the project oh-so-amazing it doesn’t mean much if no one can use it. The laterbase isn’t just a trash can of ideas. You can always come back to it, but you come back to it after having your users give feedback. The feature may not be a great idea and your audience will tell you if it is or isn’t.

The laterbase helped us immensely during development of Pixenomics. We had (and still have) some great ideas to implement but they are all currently sitting in the laterbase; releasing was more important. By doing this we managed to do the majority of the project in a month— part time. After some feedback from players and observing how they utilized it we’ve discovered more important issues that we didn’t even foresee before release.

Use the laterbase! Feel comfortable putting off ideas. It will save you a lot of work and will get you to your end goal of a usable product much much quicker.


10 FREE Pixels for 1 tweet!

1 tweet = 10 FREE pixels.

Simply tweet about @pixenomics and send us a direct message with your email address and we will credit your account with 10 free pixels worth $1!

If your tweet gets over 10 retweets we will credit your account with 50 pixels worth $5.

So get tweeting!

(1 tweet per account only)


10 shameless ways to market online for next to nothing

10. Social media

This seems like an obvious one, because it is. If you don’t have a twitter account and blog make one now! Maybe even make a facebook page if you’re really shameless. These platforms are almost the foundation of free advertising. Make sure you customize your account inline with your identity (think color, style, target audience).

9. AdWords

A cheap way to advertise on various websites related to your site with a budget of your choosing. This is the only point on the list that actually costs anything and I don’t know how effective it is without a big budget but always a last measure if you’re not feeling creative.

8. Link aggregators

By far the most hit or miss form of advertising. Posting your business on sites like Reddit or Hacker News is like the roulette of free advertising. You could end up with tens of thousands of views or about 100. Try and present it from the perspective of the viewer; why on earth would I care about your website? Make it sound interesting and important.

7. Offer something free

Free Beer! Just visit my website and click my ads. Everyone likes free stuff. Visit Pixenomics for 10 free pixels to advertise your website! See how easy and shameless that is?

6. Write blog posts

There’s only so many ways you can spam the internet with a link to your website. Write blog posts related to your website that interests readers and you essentially have an infinite amount of content to market. At least some of those readers will checkout your website. 

Here is a lot of sites where you can submit your post to reach as many people as possible and where this post will likely go.

5. Make infographics

Everyone loves infographs. They’re informative, easy to read and entertaining. Similar to blog posts, just make one related to your site and be sure to mention your website a few times. This does require some design skill and research, the last thing you want to do is anger the internet with misinformation. Make it bright, colorful with big readable text and different fonts.

4. Go viral

Easier said than done. Create a controversy, make a cool video, devise something you can create that people will almost always share with friends. Make an embaressing video of yourself; how shameless can you go?

3. Guest articles on other blogs

There are millions of popular blog sites that love new content as much as you love advertising. Offer to write a guest post related to your site but make sure you have complete ownership and can host the same article on various other sites whenever.

2. Email news websites

Find some news sites and look for contact forms or email addresses. Compile a big list and send them a specially crafted email letting them know about your site. This isn’t as effective as some of the other points because it requires effort for them but it can’t hurt.

1. Pixenomics

Obviously the most unique and fun form of advertising is Pixenomics! Start with 10 free pixels and take over other player’s pixels to make your ad bigger and bigger. Or if you’re lazy you can buy a pixel for only 10 cents! Think of all the pixels you can buy with $10 (it’s 100).

Shameless


Invert button added

We noticed a lot of white pixels so to avoid a board with nothing but white pixels, there is now an ‘Invert’ button that will change the background color to dark grey. The ‘My Pixels’ button will no longer change the background color, just limit the drawn pixels to yours.


No more eCheques

We have decided to block payments through eCheques. The payments take too long to process and end up with pixels that are in limbo until the funds are transferred which doesn’t fit well with the style of the game.


Battle Tactics: 2

Already I’m starting to see some more battle tactics. One very effective in particular.

The White Dwarf
Setting the pixels to be white means no one can see the pixels without hovering the mouse around the board.

I am slightly inclined to allow players to change the background color of the board to black so we don’t end up with a board of white.


Scheduled Maintenance

We will have some down time in about 10 hours for around 30 minutes. Hopefully this will speed up moving pixels.