Archive

Archive for the ‘iphone’ Category

Dev Diary: Lokomotywa – Julian Tuwim

February 8, 2013 Leave a comment

Kids always says the truth. Creating application for kids is simple from one point of view but really hard from the other one. They will not tell you that animation lost couple of frames, but will tell you that this character is ugly and don’t want to play any more.



Peaple outside Poland probably hadn’t heard about Lokomotywa poem by Julian Tuwim, but in my country it’s one of the best know children’s poem ever. Big Rabbit made a marvelous job exploring it again in a completely new way. You can notice wonderful ilustrations, exclusive soundtrack composed especially for this book and narration made by Piotr Fronczewski (famous polish actor). Big Rabbit is a group on nice peaple who want to make things that are just outstanding.

Read more…

Scripting iOS games with LUA (lua-wax)

April 6, 2012 Leave a comment

Creating game for iPhone/iPad is one thing, but making it enjoyable is way harder. Most of current games use physics for animation, to make scenes more realistic and not repeatable every time you start the same game level. You can teach your level designer Objective-C to code different behaviors for different things, but the simpler method is to script it in LUA. Lots of previous and today games use this scripting language to describe AI, events and many other things.

I wanted to implement LUA to my upcoming game and found pretty good library called wax. Its pretty impressive. All you have to do is:

#include
- (void) runLuaScript
{
    wax_start("your_script.lua", nil);
}

The problem was that you were unable to execute wax_start() function again (it was possible, but had no effect, script was not executed once again). It lead to big problem, how to load different scripts for different levels? To achieve it you have to clone/fork/download my forked version of wax that fixes that issue.

Steps to do:

  1. You can add my repository as submodule to your XCode workspace by executing command:
    git add submodule git@github.com:zbyhoo/wax.git
  2. Add libwax.a from your workspace to “Link Binary With Libraries” building phase
  3. Finally add “$(SRCROOT)”/wax/lib path (with recursive search) to your “User Header Search Paths” in Build Settings.

Now you will be able to do it this way in your application:

#include
- (void) runLuaScript
{
    wax_start("your_script.lua", nil);
    wax_end();
}

You can call runLuaScript method as many times you want.

Using you Objective-C classes in lua wax is really simple.

-- your_script.lua sample
local my_object = MyObjcClass:init
my_object:someMethod()
my_object:anotherMethodWithArgument("hello")
my_object:oneMoreMethodWithArgument_secondArgument("hello", "lua world")

For more details for lua wax take a look at Wiki page.

UPDATE:
My commits have been pulled to the original repo, so now you can use it instead of my fork.

Extending EGOTableViewPullRefresh Project

March 10, 2011 2 comments

During my work on my first “semi-pro” iPhone application, I wanted to find good and easy way for refreshing data in table view. I found EGOTableViewPullRefresh project, that is used i.e. in Facebook application for iPhone. This is that text and arrow at the very top that downloads new content if you pull down the view during browsing news feeds.

I wanted to have such functionality in the bottom of my view for downloading older posts (Facebook application solution is simple cell, which after tapping triggers downloading older feeds). This project however supports header only. I extended it to make it possible for placing this “pull to refresh” object in the footer, at the very end. My forked project with this change you can find here: zbyhoo/EGOTableViewPullRefresh

I hope that authors will accept or maybe will be inspired by my modification and pull request.

Categories: iphone, programming Tags: , ,

iTunes U – Stanford iPhone Development Course

October 22, 2010 Leave a comment

I started to learn how to develop iPhone applications from web tutorials and two books I bought, but I encourage you to watch and listen the Stanford iPhone Development Course available on iTunes U.

It’s pretty well explained introduction to iPhone development. I haven’t watched all the lectures yet, but I definitely will and I will post my experience.

Categories: iphone Tags: , ,