Master of Blocks

My last game written in Lua got accepted to App Store. Get it before Apple removes it :)

Destroy a mortal or try to survive the wrath of God as long as possible. Classic game turned into an awesome two player game.

Are you the Master of Blocks against AI opponent and your friends. See who can master the blocks.

When you play with a friend using Bluetooth, the other player plays God and the other one plays mortal.

Price: 1.59€/$1.99

View in App Store

  • Share/Bookmark

Apple May Have Lost the Mobile Game Business

Apple has admitted that it does not make money with App Store. They make money with the number of devices sold. So the whole purpose of App Store is to sell as many iPhones, iPod Touches, and iPads as possible.

It’s in Apple’s best interest that there are as many good games as possible in the App Store. The mobile gaming industry is still growing strong. Apple has the chance to become the biggest player in the market with App Store, but they need game developers’ support.

Writing games only in C, C++ or Objective-C is, of course, doable, but without the possibility to use scripting languages, it’s not the most convenient way to develop games. Scripting languages are the heart and soul of games these days. The speed of development increases, when the game can be scripted. Frameworks, like Unity3D, are a big reason why there are so many games available in App Store.

Games don’t need support for multitasking from the OS. Games don’t run in the background. Games are always multi-platform; they don’t rely on native UI components. Most game code is game logic, or graphics.

All the reasons that people have given for Apple’s decision to limit programming languages do not affect games. Apple just made developing games a lot harder for iPhone. With the limitations, game developers have to decide, if they want to write games exclusively for App Store. It’s, of course, possible to use the same code base, written for example in C, with other platforms, but it will be a lot harder to develop games that way.

Apple was in a good position to challenge Nintendo as the leader in mobile gaming business, but now that might not happen with Apple’s decision to piss of game developers. We just have to hope that Nokia doesn’t make another pathetic attempt to enter mobile games like it did with the Nokia N-Gage. It will also be interesting to see, if Android starts to gather some momentum in mobile games.

  • Share/Bookmark

RIP Lua Programming on iPhone

It’s over. Steve killed you. We had a good run, but it came to an end sooner than I expected. I was always worried that something like this might happen, but it was still a surprise.

We knew each other only for a couple of months. Those months were the best time of my life. I will always remember the fun we had. I can still remember asking you to create a complete table including the data model with just one line of Lua code. You did all the hard work for me. I never knew what was happening behind the scenes. I bet your autopsy will reveal thousands of lines of ugly Objective-C code, but I don’t care. I will always remember you and your clean and nice Lua interface.

I remember when we did the multi-player code. You just said that I should give you the function that will be called on the other iPhone. It worked beautifully. I could just run code over the network as I did locally. I suspected that you did something against the rules, but I was ignorant and trusted you. The autopsy will probably show me the nasty details how you implemented this.

We also had fun, when we tried to hide you from Steve. We obfuscated the Lua scripts and put them inside the binary. Now, even that wouldn’t do the trick anymore, because running strings command on the binary, reveals that Lua library is inside the binary. I don’t know, if Steve’s minions would actually do this, but I am not going to risk it.

You showed me your true powers with closures and metatables. I was amazed, how you could do so many amazing things, when you seemed so simple. I felt that I was cheating, because programming with you was too easy. Most people think that programming for mobile devices is supposed to be hard, but you proved them wrong in your short visit on this planet.

We had our problems also. Remember, when I tried to use timers that were released. I would use pointers after you thought no one was using them, and cause you a lot problems. We talked about fixing this problem in your next version, but we didn’t even get to start working on that; your end was so sudden.

I hear there’s a new kid in town called Android. From what I understood, he doesn’t kill stuff like Steve. I hope I can resurrect you with Android. It might be dangerous, but I have to try it. I grew so fond of you that I cannot see myself coding in Objective-C or Java. They are just too verbose. You were so simple and elegant, but I guess Steve didn’t like the competition advantage you provided for people like me.

I will always remember you and keep a copy of you in my version control close to my heart. I will leave everything the way it is now. If I try to resurrect you with a new device, I promise I will use Git this time. I will let you have your peace in SVN.

  • Share/Bookmark

Master of Blocks Preview

I am getting ready to publish my second application that uses the Lua framework I have created for iPhone. You can check out the Lua source code for the game : here.

The game is a 2 player Tetris clone inspired by the awesome Tetris God video.

I hope to get game finished and submitted to App Store later this week. After that, I will work on the framework to get it open sourced.

  • Share/Bookmark

Office Space Out 2

Don’t feel like working. Feel like spacing out? What to surf the web or sleep without interruptions at the office?

Never has slacking off been so easy and fun at the same time!

The new and improved version of Office Space Out, will enable you to configure your program to play keyboard and mouse sounds, like you were actually using them for real. Your boss will never know the truth and he will probably think that you are the hardest working person in the company.

There are three prerecorded types of keyboard sounds available. If none of them match your keyboard, you can record your own.

You can configure how much fast typing, slow typing, mouse usage, and silence should be in one loop. You can configure the sounds to match your work task.

Price: 0.79€/$0.99

View in App Store

Lua source code

Office Space Out 2

  • Share/Bookmark

Why Lua truly rocks

For the uninformed, I am of course talking about the programming language Lua.

Recently I have been working on my Lua-based framework, for creating games and applications for iPhone. Yesterday I submitted my first application which uses the framework to App store. The whole application is written in Lua. You can check the Lua source code for the application here.

I have been working on the framework for weeks, but I wrote the Lua code for the application in just one day. The application is not very complicated, but Lua shows its potential compared to Objective-C, when you need to get iPhone apps done quickly. The more I improve the framework, the easier it is for me to write those application in Lua, because writing the application logic and adding a user interface is quite simple compared to writing everything from scratch with Objective-C.

The reasons for choosing and using Lua for iPhone applications were pretty obvious for me. It is written in ANSI-C, which means that I can just take the Lua source code and compile it with rest of my framework. Lua’s licensing model, MIT license, allows me to do anything with Lua. Lua is also quite compact. The binary size will only grow by a couple of hundred kilobytes, which makes it really light. It is also quite fast compared to other scripting languages and the memory usage is not too bad. I haven’t done any heavy calculations in my applications yet, but if I ever need to that, I can move the heavy processing to the Objective-C side.

Where Lua really shines, and what is was actually designed for, is that it is probably the best language for embedding and extending other parts of the software written in C, C++ or Objective-C. Once you understand the Lua stack model, adding functionality to Lua is very easy. It is almost as easy as calling functions directly. Only thing that you need to do is to get the arguments from the stack, which is very easy.

Lua is actually a very powerful and flexible language, because it has metatables and support for closures. You can do a lot with these features. I am currently working on two-player Tetris clone, and I can forward function calls automatically to the other player with this piece of code:

function create_peer_opponent(page_name)
    local opponent = {}
    local mt = {__index =
                function(table, key)
                    function remote_call(...)
                        local str = page_name .. "." .. key .. "("
                        for k, v in pairs({...}) do
                            str = str .. tostring(v) .. ", "
                        end
                        str = str .. "nil)"
                        ui.rpc_call(head_to_head, str)
                    end
                    return remote_call
                end}
    setmetatable(opponent, mt)
    return opponent
end

After creating the peer opponent, the rest of the code does not need to know if the opponent is a local AI opponent or a remote human opponent. The function calls will end up in the correct place automatically.

Of course, everything I want to do from Lua needs to be wrapped in the framework. Fortunately Objective-C is actually quite dynamic language, and the reflection support is pretty good. I might be able to leverage the reflection mechanisms to automatically create and use Objective-C objects from Lua, but I don’t know yet if it actually is possible or does it make any sense.

Another nice thing about writing the game logic in a scripted language is that I can implement the framework on other platforms, e.g., on Android, and use the same Lua code for the game. The platforms are not limited to mobile platforms; basically anything that has support C supports Lua.

If anyone is interested in using the framework, just let me know, and I might actually open source it.

  • Share/Bookmark

Master of Speed Lite

Test your quickness and memory skills with this awesome game.

In speed mode you need to keep up with the flashing buttons as they flash faster and faster.

In memory mode you need to remember the sequence the buttons flashed. As the game goes on you need to remember longer and longer sequences.

This game is a modified and improved version of the classic game that was featured in Finnish TV show, Speden Spelit.

The Lite version has limited gameplay. Buy the full version to get unlimited gameplay.

Price: Free

View in App Store

  • Share/Bookmark

Master of Speed

Test your quickness and memory skills with this awesome game.

In speed mode you need to keep up with the flashing buttons as they flash faster and faster.

In memory mode you need to remember the sequence the buttons flashed. As the game goes on you need to remember longer and longer sequences.

This game is a modified and improved version of the classic game that was featured in Finnish TV show, Speden Spelit.

Price: 0.79€/$0.99

View in App Store

  • Share/Bookmark

Office Space Out

Don’t feel like working? Feel like spacing out? Want to surf the web or sleep without interruptions at the office?

Use “Office Space Out” to play keyboard typing sounds and fool you boss into thinking you are the hardest working person in the company.

Two different types of keyboard sounds to choose from.

Price: Free

View in App Store

  • Share/Bookmark