Monday, April 26, 2010

TheRunner

Many improvements for KazRace for iPhone (now codenamed TheRun) since the last post.

It finally runs on the actual iPhone and the framerate is quite good. The XCode OpenGL ES profiles shows numbers above 50 Hz on my 3G, which is notoriously slower than the 3GS.
This means that I can comfortably expect it to be running at 30 Hz.
The underlying OS however will slow down the game from time to time. This is a multitasking environment after all, and the phone has to do its duties.

Running on iPhone was both simple and complex. The actual device connection doesn't require any special magic, but one has to generate some private/public key pairs and do some initial setup.

Actually getting this thing to publish will be more troublesome. The whole system is complex and requires quite a bit of reading. It doesn't help that I was doing all of it on my MacBook on a mere 13 inches monitor, going back and forth between the instructions on the browser and the XCode window.
(Note to self: I need a real desk !)

Alongside I've been developing the PC version too. The goal is to develop mostly on the PC side, where there is a build that is enhanced with whatever is needed to edit and debug.
For this and other reasons, I'm keeping the Objective-C stuff to a minimum... just some sample application skeleton !

Looking into some sample minigames for iPhone, I was impressed how easily some simple games can be done by using XCode and all the API/system stuff that comes with the iPhone SDK.
As for any platform, there is always some base high level and proprietary API that helps to make simple things very quickly... but that's usually also the stuff that more advanced developers never use for their own reasons.

In this case my reason for not using the Apple stuff is that I need to be multiplatform. At the very least I need a PC build (maybe one could be OSX/iPhone OS multiplaform ?), but it's also desirable to potentially target other phones.
Speaking of which, someone already got an Android version running !!
Pretty impressive, though, sadly, Android doesn't seem so developer friendly: C++ code is confined and cannot do things such as loading files on its own. to do that kind of stuff, it needs to beg its Java overlord.
Arghhh... c'mon, enough of this BS.. C/C++ is here to stay, and making it hard to use it is only going to make it hard to develop games or any other serious software.

Anyhow, here is a list of the improvements in TheRun:

- iPhone version running at good frame-rate
- Added a simple buttons GUI (using OpenGL and touch messages)
- Added game flow code to move between modules (main menu, game play, options, etc..)
- Added on-screen virtual buttons for steering
- Added accelerometer steering
- Added PC simulation of touches (single touch using mouse)
- Added PC simulation of accelerometer (a clickable window, see, picture)
- Major cleanup of road-related code in preparation for adding multiple stages
- Cleanup of code for car handling
- On PC, added a bird-eye view of the track to aid track editing for the future
-- Developer can click on track and drag around to instantly move to that location

...there is a lot more to do, but so far, I think things have improved greatly.

At some point I'll need some "art", especially for the GUI.
I've also been thinking on the process of taking pictures of new car models, and I have to thank my sister for buying a couple of small tripods and setting up a system to keep car models on a tripod (hint: involves some sort of sticky tape ;)

Oh and today was my first day at home. I'll be using my remaining holidays to the end of the month and after that I'll be officially unemployed ;)

wooooooo

15 comments:

  1. I am finding that programming on a laptop is very slow, even with a 17.3" screen. My problems come mostly from keyboard layout (no separate insert,home,delete,end) keys and a lack of a mouse. But maybe its just a matter of getting used to it.

    ReplyDelete
  2. Kaz-Racer!

    Nice progress! If you're not coding-on-the-go i.e. coding while sipping coffee at Starbucks, you can get an adapter for your Macbook and output to a normal PC monitor; it makes things a lot easier during development.

    Recently, my 13" Macbook's palm rest casing cracked (exactly like in the picture) ... resting my palms while typing causes the mouse pad buttons to stick ... makes things miserable. I haven't had a chance to take it in to see how much it will cost to get it fixed. Hopefully not too much. :-/

    ReplyDelete
  3. Paul,
    I saw some large laptop from Sony that had even a numeric keypad 8)
    But nowadays even regular keyboards get mangled 8(
    Like Mr. Ragin says, unless you are on the go, you should probably at least hook a proper keyboard to it.

    My laptop is a MacBook and the Home/Page keys are emulated by pressing a funtion key on the botton left and the arrow keys.
    That works well, however, even the Delete key needs the function key (Fn + Backspace), and that's annoying.

    In general, I mostly write code on the PC and I'm getting more and more used to VIEmu... though it takes a while to learn all the capabilities (sometimes by mistake !)... but in the end it's a lot more powerful and I hardly ever use the mouse and the Home/Page keys anymore when coding !

    wooooo


    Ragin-er,
    I've got the dongles.. both for VGA and DVI. The problem is that I have a very cramped "computer" desk where no more than one thing can exist.. so, I really need to buy a proper desk first.. though that's going to take half of my living room or something... but that should be a top priority !

    woooo

    ReplyDelete
  4. You don't mean to tell me that your 'desk' is still the closet? 8P

    ReplyDelete
  5. Ahah.. Closet Coder !!

    ..no.. I bought a "computer desk" several years ago.. and that was probably one of my worst purchases.. really crampy !

    I need to buy something new.. but I'm undecided !

    woooo I need a proper office.. with cute secretaries and all ;)

    ReplyDelete
  6. http://englishrussia.com/index.php/2010/04/26/office-in-the-balcony/#more-12760

    ReplyDelete
  7. ...hohoh.. cool.. and that's the same keyboard I have 8)

    ReplyDelete
  8. Mine is an Asus G73, and it does have the numeric keypad. i guess its just a matter of getting used to the new key positioning.

    ReplyDelete
  9. It even has directional arrows for ASDW keys.. for the pro gamerzzz !!

    On the web there are a lot of "geeks" that happily (?) remap their keyboards to dvorak and whatnot and get used to it in 1-2 weeks.

    ...good for them ! I cannot do that !!
    However, you may want to try to invest some time on Vim/VIEmu and see what you make of it.
    For me it took quite a long time and I'm still struggling.. especially since I can't quite touch-type (brackets, ouch !!) the way that is taught in American/Canadian schools.

    Combinations like ya( and da( to copy (y) or cut (d) everything between the brackets ('(') or Enter to go to the next line's soft-start (first non-blank of next line) may come only later and finally make a significant difference... ..for me that beats having to use displaced extra keys, which are becoming more and more obsolete as both software and the average user doesn't rely on them 8(

    ReplyDelete
  10. Ummmmm sounds like too much re-learning, I am too old for that. Just going to try and get used to new key positioning.

    In the meantime I have a new situation where I have more than 1 pc that I work on, so I needed some sort of source control. Turns out perforce is free to use as long as you have less than 5 clients! Cool. Was pretty easy to get it to setup and Visual Studio integration seems to be working fine too.

    ReplyDelete
  11. Geezzz .. there is no "too old for that" !

    Same with version control.. Perforce is nice if you always have a server available, but it's probably to learn GIT (I plan to, for the projects to come).

    woooo

    ReplyDelete
  12. My wifes pc is the server, its always on. But seems like I was wrong about the number of users you can have. Its only 2 users for the 'free' license. Enough for me. Still nice that you can use production grade software without having to pay anything.

    ReplyDelete
  13. ..there is nothing like running your SCM on your wife's PC ;)

    Anyhow, P4 is very popular.. and I think that it's offline "skills" have improved (though I haven't tested that).

    mumble mumble

    ReplyDelete
  14. I used Mercurial for my personal SCM needs. It's weird at first, but it's nice. :)

    The Linux box that's a PIII/450MHz (old early gen PCI motherboard w/ ISA slots!) machine's hard drive is showing signs of (eventual) failure. Gotta find a more tiny/compaq machine to use as my server. Those NetTops seem to be the way to go ...

    ReplyDelete
  15. Mercurial is supposedly quite similar to GIT.. distributed SCM !

    woooo
    zzzzzz

    ReplyDelete