Wednesday, 8 June 2011

Developing Objective-C on Windows PC


As I'm using Windows PC most of the day I wanted to look into finding a way to try and learn Objective-C while on Windows PC. I just managed to compile and run my first "Hello World!" code so thought might be useful to make a note how I got there.

I thought I'll be able to find something I can plug-in to Visual Studio to be able to write and compile Objective-C but couldn't. Searching the internet I found a Mac forum where number of people asked the question - how to code Objective-C in Windows PC? The answer was short (Apple style) - Go to www.gnustep.org!

So visited GNUstep site and found GNUstep installer for Windows: www.gnustep.org/experience/Windows.html. From this page I downloaded and installed in order (as advised in the page):


GNUstep MSYS System Required 0.28.1 - MSYS/MinGW System
GNUstep Core Required 0.28.0 - GNUstep Core
GNUstep Devel Optional 1.3.0 - Developer Tools

The installation procedure created a program group in the Start/All Programs menu called GNUstep and in there I found Shell application which simulates Unix console.

I used Notepad to create a simple Objective-C file:

#import <Foundation/Foundation.h>

    int main (int argc, const char * argv[])

    {

        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

        NSLog(@"Hello World!");

        [pool drain];

        return 0;

    }

and saved the file with ".m" extension. When I tried to compile it the first time it failed to find the file so I moved it under C:\GNUstep\msys\1.0\home\dreriMIX folder which was created by the installer.

I ran the command
gcc `gnustep-config --objc-flags` -L /GNUstep/System/Library/Libraries objC1.m -lgnustep-base -lobjc
and that created an application called a.exe which when I run (use ./a in the console) I get:

2011-06-08 11:27:14.354 a[20272] Hello World!

Success!

Starting to develop for iPhone

I've been thinking for a while that it would be great to develop some little mini-apps for my iPhone/iPod. I'm a total Apple n00b but finally, I decided to bite the bullet and look into it.

First of all I was pleasantly surprised when I found out that I need to use Objective-C. I used to love programming on C some 20 years ago.

Then I looked in what I need:
  1. Mac computer, going to use MacBook.
  2. Sign up as to become registered iPhone developer... done in 2 minutes.
  3. Download the software development kit - got Xcode 3.2.6... long download...
  4. Then I realise that I have Leopard (OS X 10.5.x) so had to upgrade to Snow Leopard (OS X 10.6.x) in order to use this version of Xcode.. oh well, ordered from Amazon Mac OS X version 10.6.3 Snow Leopard.
  5. Got some books:
    Programming in Objective-C 2.0 (2nd Edition) by Stephen G. Kochan
    Learn Objective-C on the Mac (Learn Series) by Mark Dalrymple, Scott Knaster
    Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark, Jeff LaMarche 
  6. Bookmarked some links:
    iOS Dev Center
    Objective C Programming Language (Apple site)
    iDeveloper TV
So I'm ready to go. AppleWorld, here I come!

Portal 2

I've recently had a 5 days Portal 2 marathon. I rented the game from Blockbuster as spur of a moment and had to concentrate on it to try and finish it.

If you have played the original Portal game from Orange Box or Portal arcade game then Portal 2 will not be a novelty for you. If my memory serves me right it looks very similar and the gameplay is more or less the same. Even though I have not played Portal for couple of years, when I started Portal 2 I was a bit disappointed they have not changed it a bit more. But as I started solving the puzzles I realised that there are plenty new types of puzzles so the game started to bewitch me as the original game did.

In total there are two sets of maps, one for single player and the other for co-op game mode.

The single player maps can be played during the story mode or with developer commentary, which is a great touch. Story mode is great. You get brilliant puzzles to solve using all sorts of chamber features (won't give any details as it might spoil it for someone), the story is interesting and Glados is as funny as it was. You can also choose to play the game with developer commentary which is the same as the story mode except you can't save and you get comment bubbles here and there to open the developer's commentary.

Co-op section does not run as a story but you do have to play it sequentially the first time you play. You get one learning chapter and then another 5 chapters with different types of puzzles to solve. The puzzles are absolutely brilliant, simply work of a genius. You can play co-op on split screen or via xbox live. If you play over xbox live you can play with friends or any random dude. You do get a reminder from developers that the game is best played with friends and there is a reason for that. Communicating during puzzle solving is great part of the gameplay. Not just in working out how to get form a to b, but the banter around it is priceless. You can create traps for each other and laugh your head off with comments from Glados and the different ways you can die.

I had to take it back but will definitely buy the game to finish the remaining 2 co-op chapters.

9/10 from me :D

Wednesday, 1 June 2011

Gears of War 3 trailer

Probably seen it but in case you haven't here it is:



I was a bit disappointed, I thought they'd show us a bit more story details. We knew Adam Fenix
Image

was going to have a part (from the teaser they showed before). So unless I'm missing something there isn't anything knew on this trailer.

Friday, 20 May 2011

BRINK - 1st impressions

Got Brink yesterday, at last. Played for couple of hours so thought I share my first impressions with you.

Game presentation looks good. Menus and few cut scenes look very nice. You set you character and then choose which side you want to join - rebels or the authority. Won't spoil it and tell you what the difference is but will tell you that the game looks like it is split in two halves. You play it start to finish as a rebel and then again start to finish as authority troop.

Had 3 options to choose from: campaign, challenges and free play I think. I tried campaign and challenges. You get unlocks for completing challenges. There are many things to unlock and they seem to be unlocking very quickly ie finish one mission and you get 6 unlocks.

Campaign can be played on easy, normal or hard. I decided to go for normal as didn't want to get stuck and didn't want to have totally dumb opponents. It turned up AI is mostly very dumb. Most of the time I was struggling to find my way around and working out what I need to do. I failed the second mission because I did not know what to do. I could activate objective (use up in the D pad) and got to it but was in the wrong class because pressing X was not doing it.

In the end I can only echo what many others said. If you have friends to play it with, it can be a good fun. If you end up playing with AI, it is only a weekend fling and back in the shop it should go.