Wednesday, October 28, 2009

White Boarding

There's skate boarding, surf boarding, wake boarding, and for us developers there's "white boarding."

I've been sketching out the tasks, and scripts for my game, so much so, I had to run out and get another white board. I should have taken up the idea my friend, Everett Harris, did. He bought sheets of white plastic panel material and lined a wall with it, and now has a wall sized white board. Unfortunately, or fortunately, I don't like playing, "This Old House," and doing home projects, especially when my time is already limited and thoughts are flowing.

So, this week it is, "step away from the keyboard, with your hands up," and get all my new thoughts down and then schedule out my new tasks. This may run into next week, but when this round of design is complete, it is just straight crunching, where I can sit and get into the zone, and be on "coding cruise control."

That's the skinny of what is going on right now...you'll see, you'll see...the game will be worth the wait. :-D

Thursday, October 22, 2009

Wooaa Partna'

Damn! I know I said I was back, but I didn't expect to be up until 3:30am working last night/this morning. The fire is back. So, while I eat my lunch here at my day/real job, let me tell you what I did last night/this morning. "I got my mind right." :)

I reacquainted myself with my code (I mean I hadn't seen it in like 2 months), and was like, "oh yeah, that's what I was doing, and you know I like what I see." I did stumble across "SWIG," read about it in "Game Developer's," magazine, and I am going to see if I can replace the LuaBind I have with SWIG.

So, back to work here, and then back to work at home later.

Tuesday, October 20, 2009

Back For Real

Wow! It's been months (2) since my last posting. To say that I've been busy is an understatement. My real job has absorbed my spare time like a black hole, but all for the good. We are on the verge of a release, that could, "shock the world!" :)

Anyway, I'm back on the game with a major focus for a Christmas holiday release. My artist, Nick Davis, is off cracking on the final animations. I'm re-working some of the engine.

So, the push is back on!

Stay tuned...

Friday, August 14, 2009

Vacation Over

My vacation ends today. My boys and I have been chillin' at Myrtle Beach, SC. So, I'll be back on the code Sunday evening.

I've got to push myself to get back in the saddle. I admit I've slacked some, and real work has also impacted me. I should be finished by now, but such is life.

I'm really going to push to be done before the December holidays.

Friday, July 31, 2009

M.I.A.

Yes, I have been "missing in action." Real world/Real Job caught up with me. We have been in a few weeks of design meetings, and new code architecture. We've just begun the last 2 weeks to begin the implementation of our new design.

So, now that things have settled in my brain on that, I should have some spare brain cycles to get back to my part-time job. :)

Stay tuned...

Tuesday, June 30, 2009

Crosstown Traffic

Youre just like crosstown traffic
So hard to get through to you
Crosstown traffic
I dont need to run over you
Crosstown traffic
All you do is slow me down
And Im tryin to get on the other side of town
-Jimi Hendrix (The Master)

Actually, I'm no longer slowed down. I just got the cross-project building working. Hold on, here it comes...WHOOOHOOOO! Okay, it was pretty simple, and actually better than how I've done it on the PC/Visual Studio.

The cross project settings in XCode make it so that you can build static library projects, and link them to your main App project. The great thing is that you don't have to worry about the flavor of the build, i.e., iPhone debug/release Simulator, iPhone debug/release Device, iPhone debug/release 2.0, 3.0, 3.1, etc... You don't have to worry about getting the proper build libraries building with the proper App build settings.

The cross project settings handle it all for you. I read through the XCode Build Management documentation like I said I would, and it wasn't very clear, but I did find this tutorial that got me setup and running, so instead of regurgitating what I read, here's the link I followed...

http://blog.csdn.net/dotphoenix/archive/2009/05/16/4191455.aspx

However, in my journey of reading the docs I did run across a feature of XCode, "snapshotting," that works like a mini repository backup. So, if you don't have a SCM (source control manager) setup, or TimeMachine running, you should probably take a look at "snapshots."

Now, to the LuaBind build steps I promised in my last posting. Some asked, "how did you do it?" Now, without further ado, the steps...

1) Download Luabind 0.8.1 from here: http://mac.softpedia.com/progDownload/Luabind-Download-52705.html

2) Download Lua 5.1.2 from www.lua.org (LuaBind 0.8.1 currently only works with Lua 5.1.2).

3) Download Boost 1.39.0 from www.boost.org

4) Extract the above downloads to your desktop or some other area.

5) Create a Mac OS static library XCode project named "Lua...the following is from an earlier posting of mine that detailed how to build Lua. I will italicize so that the step numbers do not become confusing.

a) Get lua-5.1.2(Xcode).zip


b) Unzip it


c) It will unzip to the folder lua-5.1.2



d) Open it and double click on the lua.xcodeproj



e) Build the project (just to make sure it builds) ...it will generate a library file.



6) Now, create a Mac OS static library XCode project named "LuaBindLib."

7) From the extracted LuaBind download folder copy the LuaBind folder to the project's folder.

8) From the extracted LuaBind download folder copy the Src folder to the project's folder.

9) From the extracted Boost download folder copy the Boost folder to the project's folder.

10) In the LuaBindLib project folder create a folder name "Lua."

11) In the just created Lua folder, create a folder name, "Include."

12) From your earlier built Lua project find the following header files,

luaxlib.h
lau.h
lauconf.h
lualib.h

Copy them to the LuaBind\Lua\Include folder.

13) Your LuaBindLib folder should look like this...

LuaBindLib\
\LuaBind
\Src
\Boost
\Lua\Include

14) Add the Src folder to the project.

15) Bring up the "info," project window and go to the "Search Paths," section. On the "Header Search Paths," set the paths to the LuaBind, Boost, and Lua\Include folders.

16) Build and good luck. Leave a comment if you have any problems and would like some help.

To wrap up. Now, that I have the cross project library stuff working, I can get on with building my components as static libraries now. One more time...WHOOOHOOOO!!

Missed It

I was to attend the local iPhone/Android Meetup this evening, but had to miss it. The artist working with me on the game was in town this weekend, and leaving (ahhh...now this morning) today. We missed hooking up over the weekend so had to meet Monday night, thus I couldn't attend.

I was asked by more than one person to detail how I got LuaBind to work on the Mac/iPhone since there *are* some problems building for the Mac. So, in my next posting, not now, I'm tired, I will put down the steps that got LuaBind to work for me as a static library.

Until the next posting, happy coding. :)

Wednesday, June 24, 2009

Errata and What I'm Doing Now

In an earlier post I showed how to add to your $PATH. I actually typed it incorrectly, here is the correct way...

PATH=$PATH:/your path here
export PATH

Tonight/Today is one of those days where I take a step back, in hopes of being able to work smarter and faster in the long wrong. I have started reading the XCode documentation so that I can learn how to do "cross-reference project." Since I am a relative stranger in the Mac/XCode environment, the things that come to me rote on the PC/Visual Studio, have me fumbling around on the Mac.

On the PC if I want to have separate projects that build libraries that other projects use, it is simple, all I have to do is set the build environment to build the library and output the library to some common folder. Then, in the other project, just link against the library(s). I don't like adding the libraries to the project settings since I want to be able to easily move from one build setup to another, so I do in the source file...

#pragma comment(lib, "some lib")

So far, I haven't been able to do so in XCode. Ignorance is the common force behind prejudice so, I'm taking the time to know XCode. I already love most things about it, and once I become more familiar I am sure there will be more love. Besides, "some of my best friends are XCode.," "XCode you aren't like the others, you are special," "XCode you don't smell like *they* said you did," etc....

I want to be able to build my core components as static libraries, tie them into a project and have the changes updated.

Back to reading...

Thursday, June 18, 2009

Fade In

Int. Home Office Evening

Middle age, man, sits hunched over computer keyboard, pecking away.

MAN (muttering whisper)
Guess I'll blog about Lua Script integration success.

We zoom into his blog...

Whoooohooo! The Lua scripting is tied in. I downloaded, and built LuaBind as a static library and tied the scripting into my engine. I wrote up some little test scripts and was able to bind C/C++ to Lua, and Lua to C/C++. LuaBind is great, it frees you up to do what you want to do and that is script. Not sit around writing LuaGlue functions so that you can script. I've said it before, I'm lazy and want my tools to be easy to use, and this one surely is.

I also went back to my messaging scheme and enhanced to do derivable messages. Now, I can derive base objects, and have the derive object class register for the messages it wishes to have, and let the base class handle any messages I want the base implementation of, or ignore entirely.

So, after a night of being pretty tired and my mind not working, I arose after a solid 4 hours of sleep and things came to my mind more clearly.

Tonight I will relax on the coding and read some things I want to read on design and continue designing my engine.

Fade out.

Wednesday, June 17, 2009

I Smell Another Journey Coming On

Rolling my own bindings for Lua isn't going to cut it. So, I'm going to use LuaBind or LuaPlus. My hunch is that they just don't have a package that I can easily install. :)

We'll see...as Slick Rick sang, "wish me luck, 'cause I'm scared and I'm nervous" (The Ruler Is Back...that's old school hip hop).

Tuesday, June 16, 2009

"What has God wrought?

Okay...so it isn't as dramatic as Morse sending out his first message over wire, but I've completed the messaging for my engine using Boost Signals2. All is working well.

That's it, that's the post...short and sweet. Okay, okay...here's a sample of the messaging setup using Boost::Signals2...


class ObjController
{
public:
ObjController() { printf("ObjController::ctor called.\n"); }
~ObjController() { printf("ObjController::dtor called.\n"); }


boost::signals2::connection RegisterHitMsg(const signalSend_type::slot_type &subscriber)
{
return m_SendHitMsg.connect(
subscriber);
}

boost::signals2::connection RegisterRenderMsg(const signalSend_type::slot_type &subscriber)
{
return m_SendRenderMsg.connect(subscriber);
}

boost::signals2::connection RegisterTestMsg(const signalSend_type::slot_type &subscriber)
{
return m_SendTestMsg.connect(subscriber);
}

void CheckCollision(short nID)
{
m_SendHitMsg(nID);
}

void RenderObjs(short nID)
{
m_SendRenderMsg(nID);
}

void TestMsg(short nID)
{
m_SendTestMsg(nID);
}

private:
signalSend_type m_SendHitMsg;
signalSend_type m_SendRenderMsg;
signalSend_type m_SendTestMsg;
};

class ObjA
{
public:
ObjA(ObjController& objCntrl, short nID) : m_objCntrl(objCntrl), m_nID(nID)
{
printf("ObjA::ctor called.\n");

m_connection = m_objCntrl.RegisterHitMsg(boost::bind(&ObjA::HandleCollision, this, _1));
m_connection2 = m_objCntrl.RegisterRenderMsg(boost::bind(&ObjA::RenderObjects, this, _1));
m_connection3= m_objCntrl.RegisterTestMsg(boost::bind(&ObjA::Test, this, _1));
}

~ObjA()
{
printf("ObjA::dtor called.\n");

m_connection.disconnect();
m_connection2.disconnect();
m_connection3.disconnect();
}

private:
void HandleCollision(short nID)
{
if(m_nID == nID || kBROADCAST == nID)
printf("ObjA::HandleCollision called - id: %d\n", m_nID);
}

void RenderObjects(short nID)
{
if(m_nID == nID || kBROADCAST == nID)
printf("ObjA::RenderObjects called - id: %d\n", m_nID);
}

void Test(short nID)
{
if(m_nID == nID || nID == kBROADCAST)
printf("ObjA::Test - id: %d\n", m_nID);
}

boost::signals2::connection m_connection;
boost::signals2::connection m_connection2;
boost::signals2::connection m_connection3;

ObjController& m_objCntrl;
short m_nID;
};

typedef boost::shared_ptr spOBJA;

int _tmain(int argc, _TCHAR* argv[])
{
ObjController theObjController;

spOBJA pTheObj1(new ObjA(theObjController, kOBJ1_ID));
spOBJA pTheObj2(new ObjA(theObjController, kOBJ2_ID));

theObjController.CheckCollision(kBROADCAST);

// delete pointer to test that following test msg isn't called since object is gone == slot gone

pTheObj2.reset();

theObjController.RenderObjs(kBROADCAST);
theObjController.TestMsg(kOBJ2_ID); // will be ignored

return 0;

}

I set it up so that I can only signal a specific object if I like, utilizing a specific ID or BROADCAST to all. Yes, I know I can disable slots and turn off individual updates, but since the game will have a relativily small number (20 at most) of objects in a level at a time, I went for the quick and dirty.

The ID approach works but, a better approach would be to have a base message class, and derive messages off of it. Then have the objects when they receive a base message, send back for the actual derived message, but this will work, and I didn't want the over head (although it wouldn't be much more overhead).

The Boost libraries used are signals2, bind, and shared_ptrs. In the engine I add an aggregate to keep a list (vector) of bools on the returns on collision detects, for the game control object to notify the Lua scripts. I don't want any game specific actions in the engine. I also moved the connections into a vector and iterate through them to disconnect on the object reset.

This is just a sample, the code has some typedefs that are in a header file. So, this will not compile or run, but if you would like the complete working source shoot me an email and will send it off.

Well, back to designing the scripting engine component and tying that in.

- .. .-.. .-.. / -. . -..- - / - .. -- . (so you like games? figure out what that Morse code says. :) )

Sunday, June 14, 2009

Signals, Paths, and Static Libraries on the Mac

The last few days I have been thinking about and designing out the engine for the game. As I stated before, all this time I have been writing tests apps and using programmer art and some art the artist of the game prepared to make sure all the mechanics of what I wanted to do worked.

So, now the design is clearer in my mind and ready to get built. One thing I know I wanted in the game is a messaging system. So, instead of writing my own observer/listener and visitor patterns to handle it, I decided I would use, "Boost::Signals." So, I went about putting together a small test to make sure they could work. I include the header "boost/signals.hpp" in my file, set the path to the include and libraries in my project settings and copied in the signals .a library file into my project. I coded up my sample, after fixing some syntax compile errors I built it and all cleared compilation and linking. Next step, fire that baby off. BOOM! Crash!

Okay...what's going on. I step through the debugger and I could see that the code was crashing on the "connect," call of the signal (note: if you are curious and don't know about Boost::signals read up at boost.org, I will not be giving a tutorial on them here). Now, I really have fallen in love with developing on the Mac, but it still has some shortcomings, one of which is XCode. The flaky breakpoints, and sometimes not remembering my changes, I can live with, but the very generic error messages are a real pain. Armed with only sigbus(10) error. I scowered the internet. I found that my problem was a stack overflow. Documents recommended that the Boost:signals library be recompiled on the target machine.

After hours recompiling, re-downloading the library and recompiling and still getting the error. I was at my wits end. So, for grins I said, let me grab the 1.39, latest Boost build. Well, I found in the deliverable notes that "Signals2," had been added to the library and it didn't use a library, just a header file that had everything inlined, which screamed to me, "NO REBUILDING OF THE LIBRARY!" I liked that, scream at me all you want (holla atcha boy).

I think most good programmers, are lazy programmers, so we build tools to do the work for us. My laziness goes even further, I like the tools I'm going to use to already be built for me as well. So, I placed the paths to the new library in my project settings and rebuilt. Sccreechh!

The boost include path couldn't be found. Which leads another pet peeve with the Mac. Since I'm not a unix guy, I wish things like setting environment variables were easier. Noooo! If you read a blog entry of mine long ago, this entry seems like deja vu, because I remembered I had this same problem when installing Boost the first time I wanted to see if it would work in the iPhone environment. I searched back to that blog posting to see how I did all this before.

I found in order to do so I would have to get a terminal window and use the "bash," shell and set the path. So, I followed my earlier blog's instructions and promptly set the boost path, but blew away my other paths. Which rendered "ls," inoperable, leaving me having to type out, "/usr/bin/ls," each time.

So, I turned to a friend, Everett Harris, who is a unix/linux guy (Ohh...I know some unix/linux guys too, is he...no he isn't some pudgy, pasty skinned guy, with long hair, a beard, and wearing suspenders). He instructed me that the easiest way to add/append to the path is (okay, I'm documenting it right here so the next time I forget, I will know how to do it correctly) type the following...

PATH=$PATH=/your path here
export PATH

That's it. So, armed with that knowledge I set my path, and reset all the paths I had blown away. Changed over to "signals2," rebuilt everything, ran it, and viola, my little test now works. Yes, yes, "the journey is, the reward." Sheesh!

So, now back to engine design. I'm laying out all the data, actions, and messages, so I know how I want to hook up all the components, and then I will start coding. Probably, by mid week I will begin coding, at that point I should just be in my zone, knowing what and how I wish to do things...when I am at the point, things tend to go much faster.

Wednesday, June 10, 2009

Dirty Musings

I just verified that when editing your Lua scripts, "Build & Run," will address the changes. The build doesn't have to be "clean," in order for script changes to be noticed. Dirty (changed) scripts, just need to be rebuilt. Still not dynamic as scripting outside of the iPhone's Bundle scheme, but livable.

No coding for a few days, narrowing down my design...designing out my components. I know, I said that about a week ago, but I got involved with the Interface Builder and playing with views to see how I would do my "settings," "high score," etc...views, and doing the music for the game.
So, now back to design...

Design patterns and components is the same approach for my *real* job's (Secure Command...shameless plug) application (Internet Cleanroom...another shameless plug). It has saved me lots of time and headaches, as our small company's product has morphed into other products. We can take the components I designed and plug them in easily, and add new components where need be. Or just add new behaviors (strategy pattern) and change how the app behaves.

So, I will be employing the same techniques here. Which means on this first game, I'm doing lots of work, but hopefully, afterwards I'll be able to crank out another or two faster.

The underlying engines...graphics, physics (limited and basic for this game), file manager, and fonts are done. I still have to do sound and ai. The current ai is crude and was just making sure all the mechanics worked. Now, that I have Lua incorporated I will be scripting most of the ai. I've decided for sound I will be using OpenAL.

The "strategy pattern," and "observer pattern," will be heavily used I can tell you that already. Anyway...there's still 3-4 more hours left for me to get some work done.

Cya, or C++ya, or ObjectiveCya.

Century Milestone

Whooohooo! I just had to do the programmer's cheer, but you know, not too loud. One must stay humble or the Programming Gods will smote you down.

Anyway, its been 100 days of actual work on my game. The journey has been long, but rewarding. I celebrated it yesterday night/this morning (what time is it?) by re-writing my OGL ES graphics engine and I kid you not, after a few compile and link errors, I told myself, "just kick that b*tch off and when it crashes, start debugging." To my amazement, I mean, that usually doesn't happen, it ran flawlessly (staying humble, I will check it out thoroughly later, make sure nothing is lurking to bite).

Also, this evening I finally got around to incorporating Lua into my project. I ran the obligatory "Hello, World!" script to make sure it was working and it is. Whooohooo!!

Now, for those who may still be trying or wanting to incorporate Lua into their projects and haven't been able to get it running or wondering where to start, well I will tell you here, because it wasn't easy for me, and I will try my *best* to make it plain and simple. Ohhh...I hate postings on the web where people leave out the little details.

Anyway, you will (oh yeah...this is strictly getting Lua to run in an xCode/iPhone project) need to grab, "lua-5.1.2(Xcode).zip" (now that I can't remember where I downloaded from since I downloaded it 2 months ago), but if you want it and can't find it, post a comment asking for it and I will email to you. So, the steps...

1) Get lua-5.1.2(Xcode).zip

2) Unzip it

3) It will unzip to the folder lua-5.1.2

4) Open it and double click on the lua.xcodeproj

5) Build the project (just to make sure it builds) ...it will generate a library file but don't try linking with it, too may hassles.

6) Copy the /Src folder from the Lua folder into your project. I created a "Lua," folder inside the "Classes," folder in my project and dumped it there.

7) Find in the /Src folder the files lua.c & luac.c and remove them (they both contain a "main," entry and will screw up the build).

8) Build your project to make sure things can compile (they should).

9) Create a file test.lua and type this in... print("Hello, World!") or whatever you want to print.

10) Copy the test.lua file to your project. I have a folder in my project GameResources, so I added a folder named Scripts and added my test.lua script there. Where ever you copy, just
remember to go to the Xcode menu, select Project and click "Add to Project," and navigate to "test.lua," or if you did create a folder to hold your scripts select the folder, and add it to your project. This will add your script to your Bundle.

11) Now find a file in your project, any one for now, since just testing, I placed my little test inside my view class. Add...

extern "C" {
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}

Since I wanted the code to just fire off, I added the following lines of code in the view class "initWithCoder" method.

lua_State* L;

L = lua_open();
luaL_openlibs(L);

// The "dofile," needs a path to our script. Well, the iPhone stores your data in the Bundle so
// you will need to grab the path to the bundle.

NSString* bPath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"lua"];

// check to see if it was found, if not then you didn't add it to your project properly
if(bPath == nil)
{
NSLog([bPath stringByAppendingString:@"was not found"]);

// abort do something ...some real error handling...whatever
}

lua_dofile(L, [bPath cStringUsingEncoding:1]);

lua_close(L);

That's it..Build and Run...you should see your script write out to the debugger console. Good Luck!

Special thanks goes again to Chris Dillman who pointed me in the direction of including the script in my project, and telling me I needed to get the path to the Bundle. Also, Chris mentioned that each time you touch your script, you will need to clean the build in order for the changes to take place...I haven't actually tried that out to see.

Now...time to get some sleep.

Monday, June 8, 2009

Test Posting

I'm just posting to force a republish of my blog page...ignore.

Sunday, June 7, 2009

Some Right Brain Work

I completed the music for the game, when I figure out how to post it here, I'll put it up. A first snippet of my game. :)

Thursday, June 4, 2009

Easy As Pi

Big man crush for Apple. They make things so very, very simple. Pulled my iMac out of the box (which also is designed well), set it up in 5 minutes. Plugged in my external backup hard drive, and setup my new Mac with my old Mac's work folders, via TimeMachine restore. Viola! That was it...good to go.

Then, spent the next 2.5 hours downloading iPhone 3.0 SDK, and installing that.

Now, I'm up and running on a sanctioned machine..."doesn't it feel good to be doing the right thing, Rod?"

And, so that's what my game really looks like...since on the PowerPC the colors were funky. It is great to see things as they truly are, no more pointing out to my boys, "no, no that's not a green flying saucer, that is a red plate." Haaa haaa...now you think you have an insight into the game I'm making...whatever you are thinking the answer is nope. :) You will have to wait until it is near completion then I will post some screen shots and talk about the specifics.

Okay...my real job beckons.

Wednesday, June 3, 2009

The Arrival

Noooo, noooo...the game isn't finished yet.

I'm just announcing the arrival of my new iMac. So, now I will be legit. I dubbed thee, Hitchcock. My other Mac is Shyamalan.

Alright...back to real day job work, but tonight...I'll be running my fingers across Hitchcock's keys...ooohhh you're so nasty.

Tuesday, June 2, 2009

There Are No Problems, Just Solutions

There is no problem with the way my artist is doing transparency. Thanks to Cara Motycka, Gyuri Grell, and Chris Dillman for looking at the art and pointing me to a tutorial. Turns out my artist had already read the tutorial that Gyuri mentioned, and Cara & Chris looked at the sprites and said they were correct.

So, what's the problem you ask. The answer, and as Dave Chappelle would say, "it pains me to say it people," is either my blending code ("noooooo!" the chorus roars) or the fact that I'm running on a non-sanctioned PowerPC Mac and the color/alpha scheme is funky. RGBA on the PowerPC is GRAB, so things may be working but the hardware is showing me differently.

Also, Chris pointed out to me that my converting the PNGs to PVRTC may also be stripping the alpha out. He told me to just stick with the PNGs. The curious thing is that in the funky GRAB scheme, I found some sprites online that did alpha blend for me. Only the ones with black backgrounds worked though. So, who knows...

When my new Intel based iMac arrives (hopefully this week), I will find out if its me or the machine.

Thanks again to those dear souls that helped me see error of my ways. :)

Gyuri is already receiving a free copy of the game for being the first to answer some previous question I had, and now Chris and Cara will as well. Also, here's a plug for Chris, buy his game "Mouse House, " that is already up in the iTunes store.

Now, back to work.

Monday, June 1, 2009

Doin' The Cha-Cha!

Yesterday a took a step back to clean up some things. Today some steps forward...cha-cha, cha-cha.

I'm proud to announce that I'm now up and running in my own project. I've started laying out my different component classes (yes I am big on Design Patterns). Ahhh...it feels great to be in an organized environment.

I will continue on.

One draw back. My artist is still having trouble creating transparent sprites with Illustrator and Photoshop. I keep getting things that aren't transparent at all, or half of the sprites are transparent.

Call for help...if anyone out there knows how to create transparent PNG images in Illustrator and/or Photoshop please drop me an email.

Thanks!

Now back to work...

Sunday, May 31, 2009

One Step Forward, Half A Step Back

Okay...so I spent the day (did take a 2.5 hour nap) cleaning up code and making my OpenGL class component, but ran into trouble mixing my OpenGL C++ class with the EAGLView class. I think I know what is wrong, and it is forcing me to take another step back and do something I should have done a while back, but I was being quick and dirty and making sure the mechanics of the game worked.

Alright, alright, I admit that all this time I have been adding my code into the "TouchFighter2," sample project...stripping out lots of stuff and throwing mine in. The time has come now for me to build my own project and have things nice and tidy.

So, I took a step forward today, and now have to step back again...all this stepping forward and back, will get you cha-cha-ing. You know my mantra, "the journey is the reward."

I forgot all about this...so let me post, it has been a while since I looked at the tasks I set for myself when this journey began back in December...it has been five months, but I have only worked 92 days on the project. As I mentioned in an earlier posting, I fell into a funk and basically didn't touch the code for 2 months, but I'm cranking again. I found my mojo and it is thoughts and dreams of deneros!

Oh come on people if you are developing for the iPhone you are dreaming of making some cash too! Let's don't lie to ourselves.


Anyway...here's the progress...

Key (red = task completed, green = in progress, black = not started)
Tasks/Status

1) Learn the iPhone Tech
* Download/install iPhone
SDK
* Upgrade Mac OS $130

* Join iPhone Dev $99
* Read iPhone Docs/Samples
** iPhone OS Technology Overview
** Cocoa Fundamentals Guide
** iPhone Application Programming Guide
** iPhone Human Interface Guidelines
** iPhone Development Guide

** The Objective-C 2.0 Programming Language
** Write little tests programs to learn the iPhone Capabilities ( iPhone audio, memory allocation, file I/O,graphics, etc...) - (sprite displayed by Dec. 15th)

2) Test my game concepts out on the iPhone
3) Build tool(s) if needed
4) Solidify Game Design

5) Architect the game code

6) Develop game w/ scratch art

7) Drop in real assets
8) Test/Debug
9) Ship It

Haxton out!

Organizing

I'm taking the time now to start really building my engine. I've completed a good deal of the tests that I wanted to figure out to be able to do my game. The journey has been long, and interrupted, but now I am seeing the big picture much clearer. We (artist and myself) have some assets in the game and the mechanics are working. Thus, it is time to get the editor/engine built so that things can go faster.

So, I'm now putting all the mashed and hacked up code into my component classes, so that I can easily assemble my engine/editor.

I have, I think, only 2 *major* things to figure out...

1) Sound (I don't believe the AVFoundationFramework/AVAudioPlayer is difficult, so I may, this evening quickly code up a test).

2) Lua (I still have to sit down and compile/build the framework code I squirreled from somewhere...when I post that I have it working I will find author and give credit here.

That's what is going on. My iMac should be coming in this week, and then I will download the 3.0 SDK and get up and running with it.

One other thing I may tackle this week is setting up xCode to tie into Subversion, and then tie into to CruiseControl. I've been relying on Apple's "TimeMachine," for my backup repository, but that is tedious. So, something else I have to crunch down on.

How many licks does it take to get to the completion of this game?
Ahhh one, ahhh two, three, *crunch!*

I'm not evening going to whine about working a day job, and trying to squeeze in time to do work on the game...I'm not, I'm just not going to do it!

Whinnneeee arrrggghhhh whinnneeee!

Okay...so I lied. :)

Wednesday, May 27, 2009

Previous Bug Fix

Oh yeah... a posting before this I mentioned a bug I was having. Turns out it was art related. My artist forgot that the iPhone only supports textures that are squared so the image would not convert or load.

Sometimes it is the small things...

Bit The Bullet

I did it...I shelled out the money for a new iMac. I was getting tired of seeing the funky colors on my MacBook Pro Power PC, and the requirement that everything has to be running on iPhone version 3.0 pushed me to finally going legit.

I have had enough horrors updating the versions. I decided against the Mac Mini only because I found a good bargain on Apples web page on a refurbished iMac that cost close to the same amount the Mac Mini would cost. Also, the iMac has a 20" monitor. So, I will continue to develop on my PPC Mac, until the new arrives (4-6 biz days).

I still haven't gotten to the LUA integration yet, I hope to get to that soon.

Wednesday, April 29, 2009

Well...

Well, I am in the process of fixing a very simple bug, something I've done a million times before, but changed, and now wondering WTF could be wrong. My background image isn't loading and I don't see why not. I will look again this evening with a fresh mind.

I will then try and integrate LUA into my project.

I've also been having some minor artistic squabbles with my artist. He hasn't done games before, and keeps bending towards "realistic," art. I keep trying to tell him that it is a game, so should have some whimsy in it. I have to choose my battles, when we get in enough for some play testing, we'll get some feed back. Hey, he will be the one having to crank out new art.

Just letting you all know that I'm still cranking. After I get LUA up and running I will detail here how I did it.

Anyway...back to day job, and then tonight...fix the damn bug.

Friday, March 27, 2009

Like Air

I read something by Keita Takahashi (of Noby Noby game fame). He said that when he was working on the game he found a programmer to help him with it. The programmer took the design home, and asked his wife should he do it. She told him, he should work on it like his life depended on it.

This struck me as the attitude that I need to take to complete my game, my goal, my vision!

So, I'm going to attack this thing with an enthusiasm, and gusto unprecedented before. :)

No, seriously...I was on fire, then my fast came along and sort of got my energy low, and I have been puttering back. I have commitments this weekend, but Sunday evening...cracking!!

My game is my air! (Okay...breath slowly...slowly!)

Monday, March 23, 2009

Back In The Saddle

It's been 25 days since I sat down to work on my game, due to my religious fasting (see last post) and lack of energy. I'm all charged up and ready to get back at it. So, know that my fingers are clacking over the keys, and my brain is working.

Giddy up!

Tuesday, March 10, 2009

Dormant

I've been dormant, for the last week and a half. Why? Low energy is the answer. This time of the year Mar. 2nd - Mar.2oth, is my religious fasting period (Baha'i' Faith). So, I cannot eat or drink anything from sunrise to sunset. Thus, in the evenings I am completely out of energy. Having to rise early, means that I am not working late into the nights.

So, I have been reading and hope to do some small tasks, but while my spiritual battery recharges, I don't think I will be cranking on the game.

I'll be back in the saddle soon.

Monday, February 23, 2009

More OpenGL

I've started coding up the OpenGL code for the animation viewer tool on the Mac. Oh brother, now I have to do stuff specifically for the Mac. I was afraid of this when I started out on this iPhone game journey.

The iPhone uses OpenGL ES on the PowerVR MBX chipset. So, the animation code I've written for the iPhone, doesn't translate, 1 to 1, over to the Mac OS. Fortunately, the NSOpenGLView, and NSOpenGLContext class help alleviate some of the setup headaches, but now I'm going to have to write some code specifically for the Mac OS.

I wish Apple would incorporate a PowerVR MBX emulator view object for the Mac OS, so that those of us writing code for the iPhone, but also have to write tools, and game editors on the Mac would be able to use the same code that is in our engines.

If anyone reading or stumbling across this blog, has been able to use the same code from OGL ES on iPhone, on the Mac OS, drop me a note, I would like to communicate with you.

Oh well, as my grandmother always said, "there's no rest for the weary." Actually, she would substitute "wicked," for "weary," when talking to me. LOL!

The Saturday train trip, deadline approaches.

"I hear that train a comin', comin' round the bend, I ain't seen sunshine, since I don't know when..."

Saturday, February 21, 2009

Oh yeah

I forgot to mention that I have the NSSpeechSynthesizer tied into the tool as well. I coded that up and have it working, although the selection to change to different type voices has a bug, and, well, I'm not going to waste time figuring that out. I don't want him wasting time playing with changing voices, and stuff.

So, when he enters the file name in wrong, he likes to add spaces to the sprite sheet files, it is going to parse the file name for spaces, and if it finds any, I have it say, "Dude, no spaces! I said, no spaces."

I know the first time it does that he's going to freak out. :)

More Hot Cocoa

As my boys plow down the slopes on their snowboards, I sit (uncomfortably) in the ski lodge, at a counter coding away on the sprite animation viewing tool, that I'm preparing for my artist to use. Using Cocoa I managed to get the OpenGL viewer, NSSlider (to allow him to step frame by frame), NSMatrix for the slider, NSTableView for the image files selection list, two NSButtons for start and stopping of the anims, and a couple of text entry fields, laid out, and the beginnings of the tool, completed.

I still have to connect some of the objects together so that the IBOutlets, and IBActions are tied together. So, I'm hoping that I will be way finished before my trip up to NYC on the train this coming Saturday.

This Cocoa, deep hands-on, learning is good (as mentioned before) because I'm learning things that I will be able to translate to the iPhone as well.

I'm tired of sitting here in this lodge and can't wait to get in the car, so we can get home!

Oh yeah, the Oscars are tomorrow...GO SLUMDOG MILLIONAIRE GO!!

"Computer-gi, movie, wallah, tell me who is the best picture?"
answer: Slumdog Millionaire
"Is that your final answer?"
answer: You're damn skippy!

Tuesday, February 17, 2009

A Taste of Cocoa

So, last night I started applying the Cocoa/Objective-C knowledge I gained early on in this journey. I am pleased to say, that Cocoa & Interface Builder are a pleasure to use. I can see why when John Carmack, first created the editor for Doom, he trekked miles through the snow to buy a Next machine. I can in seconds create the UI of my Animation Viewer tool, and tie the components together.

For anyone who doesn't know, Next machines and NextStep are the foundation of Cocoa and if you don't know John Carmack, then I guess you aren't into game development. It's like asking anyone who knows anything about religion, if they have ever heard of Christ, Muhammad, or Buddha. I'm not trying to single out anyone religion, pick any famous religious prophet you like, you get the idea...I am not trying to offend or have anyone putting a "crusade," "jihad", or whatever against me...I'm just a developer...just a developer! :)

As, I mentioned in earlier postings I'm bridging C++ and Objective-C, so the crux of my work is in C++ because I'm most familiar with it, and can go faster, but I know enough Objective-C to get myself in trouble. :)

I plan to do a bit more tinkering with Cocoa & IB, for the next 2-3 days, and then get onto coding up the Animation Viewer tool.

I haven't shown my status in a while, so here it is...

Key (red = task completed, green = in progress, black = not started)
Tasks/Status

1) Learn the iPhone Tech - always a work in progress
* Download/install iPhone SDK
* Upgrade Mac OS $130
* Join iPhone Dev $99
* Read iPhone Docs/Samples
** iPhone OS Technology Overview
** Cocoa Fundamentals Guide
** iPhone Application Programming Guide
** iPhone Human Interface Guidelines
** iPhone Development Guide

** The Objective-C 2.0 Programming Language
** Write little tests programs to learn the iPhone Capabilities (memory allocation, file I/O, iPhone audio, WiFi, graphics, etc...) - (sprite displayed by Dec. 15th)

2) Test my game concepts out on the iPhone
3) Build tool(s) if needed
4) Solidify Game Design
5) Architect the game code
6) Develop game w/ scratch art
7) Drop in real assets
8) Test/Debug
9) Ship It

In 73 days of learning/developing for the iPhone I've come a bit of a ways, but still a long, long road ahead. You know my mantra by now.

Sunday, February 15, 2009

As Always...

With just 2 weeks to have the animation viewer tool ready for use, I will have to push myself, and set small achievable milestones to get there. You can't get anywhere (fast that is) without knowing how to get there. So, these milestones, small but of course comprising of lots of work shall get me there.

The crux of the work will be getting Cocoa and Interface Builder down.

So, I will get some sleep now, since my weekend was long and had some emotional lows and highs. I will get some needed rest and begin the new quest tomorrow evening.

So, as always..."The journey, is the reward."

PS - Friday I watched the movie, "The Pixar Story." A very good, behind the scenes, movie of Pixar's beginning, and rise. I found the movie quite inspirational and it has fueled me more with the motivation to complete my game, no matter the road blocks, stumbling blocks, or jubilation's that pave the way.

Detour

I'm taking a step away from the "effects," learning/programming, that is going well. In dealing with the artist of the game, I've discovered that trying to explain things 300+ miles away (he's in NYC) is getting harder. So, I'm taking a step away from the effects programming and going to write an animation viewer tool for the Mac. So, this means I have to push ahead to something that was coming a bit later on my schedule. I have to learn Cocoa and implement the animation viewer tool, so that he can use it and see the animations (sprite sheet) he creates before sending them to me. This way he will know if they work or not before sending them to me.

So, 2 weekends from now I will travel to NYC, deliver the tool, and also the game doc along with the full list of assets needed for the game. We can discuss face to face how things should be formatted, labeled, and packaged. The animation tool writing for the Mac OS is good, because I was going to develop an editor for the game anyway, this just gives me a head start on that. Thus, the animation viewing tool will be expanded into the game editor a little later down the road, but in the meantime we will both be on the same page of what the game needs and he'll be able to sit back and crank things out. We can hash out the creative and technical stuff over that weekend and from there on out, we are both speaking the same language.

I have a game design doc and assets list already, I will put them in a more legible format. Now, where are all those napkins, and loose leaf papers...just kiddin'. :)

A train trip in 2 weeks, so I better get cranking on the tool.

All aboard!

Tuesday, February 10, 2009

Babbling On...

"I'm getting the Mac Mini, I'm getting the Mac Mini, I'm getting the Mac Mini..."

"That ditch is Steve Jobs ditch..."

Okay, my last posting I told you I was going to get my mind right, and get the Mac Mini. Well, I was told by a co-worker that the reason I could not change the permissions on the "codesign," file is because I had to login as Super User, "su." So, I packed that little Unix nugget away, went home and viola. I was able to change the permissions on the codesign file and thus replace it with the Tiku, perl script.

I compiled and built my code for the iPhone device, and it worked! I was on cloud 9. Life is a roller coaster, get used to it. My quick feelings of euphoria were soon replaced with dread, dispair, and lots and lots of frustration.

The certificate, ID provisioning on the iPhone in its current state is quite confusing. Once past the codesigning it doesn't matter if I'm on an Intel or PPC Mac. The problem is getting the provisioning IDs and xCode working properly. My problem was that I loaded the provision on to my iTouch wrong the first time (the wrong ID). The iPhone OS 2.2 I discovered has a bug that it only sees the first provision. Even though you are allowed like 100 on the iPhone/iTouch. Thus, when creating your ID you should name it, "com.yourcompanyname.*" The asterisk wild card, allows any app name to be tested on the device. I didn't do that the first time. So, now I have an ID on the phone I can't use.

The solutions were 3...the first two I wasn't going to even attempt out of not having the knowledge and the second out of fear.

Suggested solution 1 was to SSH into my iPhone, go to the directory where the provision ID was and delete it. Yeah, right...I wasn't going to waste time learning how to do that.

Suggested solution 2 was to reformat my iPhone. Yeah, right...and then find I might screw something up and render my iTouch useless.

Suggested solution 3 was to install the iPhone 2.2.1 OS on my iTouch. However, this means I would also have to upgrade to iPhone SDK 2.2.1. Which my fears were that Apple would have come up with a block for us PPC developers. Well, they did. The key iPhone packages wouldn't install and the previous hacks to get around that no longer worked. Fortunately, the 2.2 SDK and simulator still work...whew! So, I can still develop with my PPC.

So...

"That ditch is Boss Job's ditch. And I told him that dirt in it's your dirt. What's your dirt doin' in his ditch"

"I don't know, Boss."

"You better get in there and get it out, boy."

So, my mind is RIGHT now! I promise boss, I'm shakin' it! :)

I will get the Mac Mini, and go straight. So, all told, that was 5 days wasted trying to hack this thing. I just want to write code!

Thursday, February 5, 2009

Biting The Bullet

Arrrgghhh!!

I'm going to bite the bullet. I'm going to go on an purchase a Mac Mini. I'm tired of looking at the messed up colors of the PPC iPhone Simulator, and now trying to hack the "codesign," file. I've wasted 2.5 hours with this back door approach. First, I don't know Perl, so I have no idea what the script by someone, that goes by the name of, Tiku, provided on a forum last year. Second, I can't modify the "codesign," file anyway. The permissions locked me out. I've tried "chmod" -ing the permissions, but no go. Also, my Unix knowledge evaporated 20 years ago. So, if there is a way to change the permissions, so that I can modify the "codesign," file I wouldn't know.

I avoided upgrading to the latest iPhone SDK in fear that it would shut down my ability to develop on the PPC. Sheesh...it is a shame, outrage, mockery, and just plain, greedy on Apples part, to make you have to develop on an Intel Mac, when it is obvious that you don't have to.

Oh well, really Rod, what the hell are you gripping about, do you know what the development cost is if you were to try to develop on a PSP? So, shut your trap and get the damn Mac Mini.

The time has come to just pony up the bucks (Steve Job's you win) and get the Mac Mini so that I can code in comfort, and yes, have that warm and fuzzy, "I'm no longer a sinner," feeling. "Come brother, come into the light." (Congregation chimes in, "Praise the Lord.") :)

Now, I just hope there will not be any problem getting my codesign certificate, and keys onto the Mac Mini...now their shouldn't be since it is a provisional license, and the iTouch has a unique ID. We'll see, stay tuned...

Wednesday, February 4, 2009

I'm Official

I'm now officially, a registered iPhone developer. I activated my code. I will fool with the registering of my iTouch, and code signing tomorrow to see if I can run my code on the iTouch. The reason I say, *if* is because (see way early postings) I'm actually developing on a GS Mac, not the sanctioned Intel based Macs.

I've got some forum notes from some sites that describe how to code sign to get the GS Macs to work, but some folks claimed success and others did not. Anyway, I will tackle that tomorrow, and will see.

So, I will spend another hour or two, working on the effects I wish to use in the game, which will incorporate some decal texturing, blending, procedural textures, particles, and some dynamic fluids. I suspect I'll be working on these for a few weeks.

Working real job in the day, regular obligations, and then working on the game late into the night, and early mornings means something gets sacrificed, and that something is my body. My regular gym workouts have crashed to the side. Now, I just have to make sure I watch what I eat so that I don't become fat (or the politically correct saying, "weight challenged,"...call it what you want people you're still BIG).

Till next time...

A Winner

Gyuri will get the first "free," copy of my completed game...okay, I really have to finish this thing. Hopefully, Gyuri you will be able to play before Christmas. :) The reference was to Allen Iverson's "Practice rant."

Also, another thanks to Gyuri for letting me know about the iPhone Meetup group in our area. I don't do Twitter, MySpace, or FaceBook because, well, ahhh...I would rather be working to complete my game, than talking constantly about completing my game, this blog is bad enough. However, I blog about it, to make sure I complete it. Weird logic I know. However, the group meet up is good, because I can meet like minds, and share some coding gems.

By joining the meet up I also bumped into a former developer at a previous game company we worked at together. The former game company had so many war stories that everyone of us that survived that place when ever we bump into each other the first words, we usually utter, are "Oh my God! That place!" We all have a bond, forged in stone, for life. I could write 3 volumes on "that place." I'll just say this about it, and you will get the idea, "do you want to find your a$$ on the un-employment line!?"
Tahhhhhahhhhhaaaa! "Welcome to our quaint little company." :)

Less Than An Hour

Wow! Stealing another companies pitch phrase, "That was easy!" I just received my iPhone certificate, activation code. The elapsed time, 52 minutes.

This evening, the next challenge will be using the activation code, and running my code on my iTouch.

As Slick Rick "The Ruler," said, (okay...preface, going back to old school hip-hop), "wish me luck, 'cause I'm scared and I'm nervous." :)

On a side note, I read where if you do develop a paid app for the iPhone, and you make money, you are responsible for declaring you earnings with the IRS. Apple is not sending developers 1099 forms, even though you have to fill out tax info, and give your SSN when you place your paid app on the iStore.

Thus, you are responsible for keeping track of your earnings, and filing with the IRS.

"Taxes, we talkin' 'bout taxes, not a game, but taxes!" (said in another venue, in another vein, if you know the answer, the first responder will get a free copy of my game, when it is finished).

Signed Up

I just purchased my "Individual Developer," iPhone Certificate. I will detail the process here as I go. The date and time is, Wednesday, February 4th, 2009, 12:06pm. I will see how long it takes to get the certificate, and blog my progress of getting my iTouch signed to see my code run on it.

I am working on the "effects," of my game (not now, I'm at my real job...lunch break), that's where I currently am in my development.

Anyway, we'll see how the certificate signing goes.

Stay tuned...

Monday, February 2, 2009

Ground Hog Day

I peered out of my hole, saw my shadow, and have crawled back in...this means a few more months of work still needed before my dream is a reality.

I have completed the animation work. I am using texture, sprite sheet, pages...multiple textures, embedded in one large texture. Instead of loading and having to bind multiple textures for animations, I load one large texture, and calculate the texture coordinates based on the animation frame count, and use the texture matrix to shift to the image I desire in the texture. This saves on the load time, and also on the binding of textures when I go to render.

I will now began coding up the graphic effects I would like to have in the game. I will be researching "procedural," textures. For those who do not know what "procedural," textures are, they are textures generated from mathematical calculations. So, instead of using a canned image, I will generate the image via math.

So, that's the update. Until next time, I'm back in my hole, working away.

Thursday, January 15, 2009

Got it!

The main mechanics is in and working. Whew! I thought my math was off, but turned out to be a stupid error on my part. I was adding to the wrong variable. So, it was throwing my result of by about 15 degrees.

Okay, now on to see how to do texture mapping in OGL ES, it should not be to different from OGL. I know the iPhone uses PVRTC (PowerVR Texture Compression). The iPhone doesn't force you to use PVRTC, you can use PNGs, but PVRTC compresses the textures well for the iPhone, so I will use the "pvrtctool," to crush some images and figure out how to load them and display them.

I can now move from my little wire frames, and solids, and make this thing start to look like something. So, I can impress my boys. I know they look at what I've got going and say, all that time, and that's it. :) Dudes, houses aren't built over night. What you see is the scaffolding, and its going to get torn down after I have everything figured out...then I will build the engine.

Anyway, next up...texture mapping. "It's show time!" (Micheal Buffet's "let's get ready to rumble," oh oh...he has that copyrighted, right? Is better than the Showtime's guy, "It's show time," saying. Anyway...I digress.)

Big weekend ahead (movies, some sleep, family/friends, Dr. King celebrations, and Obama stuff) so I might not get to sit down and work, until late Tuesday...we'll see.

Wednesday, January 14, 2009

Double Barrell Blast

Whoohoo! I solved two problems today (one at work, and my math problem here at home). Work was fixing a VMWare upgrade issue. APIs should not change behavior in upgrades...that's all I'm going to say about that. I discovered what the problem was and fixed it. On the home front I was doing something stupid with the dot product. I was feeding it the wrong vectors. Problem solved.

Now, I have a new problem. I've been working on this main mechanics of my game since Saturday, its much, much better, but still not quite right. Sheesh...I don't want to waste a lot of time on this, I still have lots to do. If I get into specifics, then the game is revealed and I'm not going to do that for a while. So, I will battle it out, mono y mono.

Just wanted to celebrate that yesterdays problems were solved and now onto the next.

And, I just want to say, "Get well Steve Jobs." I have always loved and used this quote of his since I heard it in the early 80's (in fact it is engraved on the back of my iTouch)...

"the journey is the reward."

Back To Life

Update on my work computer...its all good again (read previous blog to see why/how I got zapped by the prunnet.exe virus). So, a couple of days, doing slave back ups, and restoring software and my work computer is up and running again. I must admit it is going a bit faster too, I must have had a lot of junk on there.

Well, I am fooling around with some math, that I know is simple, but has me scratching my head. The first problem was that my coordinate system was upside down. I knew it was but I wanted to have the thumb app stop button on the iPhone on the right hand side (orientation left on iPhone), just so left handed folks wouldn't feel discriminated against. So, I got tired of that and switched things back to orientation right.

Hopefully, I will get passed this problem tomorrow, and move on. I'm still working out the mechanics of my game. After I solve this problem, I'm moving on to doing some procedural textures.

Wow! I've been at this for 40 days now. I've come quite a ways, but a long way to go. I hope things are looking even better in the next 40 days.

Friday, January 9, 2009

No Sound...not yet

Okay, last post I said I was going to tackle sound, but I've decided to hold off on for now, since there are a few more things I need to figure out in my game mechanics, and I want to also code up some effects. So, I won't get side tracked.

The update on the beast I was going to slay at work (socket dropping connection inside the VMWare VM). Well, I figured out what the problem was. The DHCP lease inside the VM was set for 2 hours. Which explains when I would build a fresh VM the connection would last that long. However, reverting the VM reduces the time since the snapshot is still the previous one. Which explains the more I reverted the VM the quicker the connection would be lost. So, the solution up the min and max DHCP lease time and implement the reconnection code I kept saying I would get to, but first I wanted to know what was causing the problem. Now, I know.

Ahhh...but, in my trying to figure out what was the culprit, I decided yesterday to disable the "denial of service," security on XP, turn of virus scanning, and turn off my firewall. Oh nooooo...yep, immediately I get hit with a virus. I spent most of the day running virus scanner on my machine (with the help of a co-worker), and got my machine back...I thought. Tonight I sat down to work on the fix, and the blue screen of death popped up on my work laptop. I can't even boot in Safe Mode...sheesh! One problem solved, another one gained.

No, iPhone work tonight, my brain is exhausted.

Thursday, January 8, 2009

Touches Update

Yeah!

Come on, come on, come on, come on now
Touch me, babe!
Can't you see that I am not afraid?

The touches are now working properly. They no longer lag. I had to fix my rendering code to render on the timer properly, and to switch over to double buffering. Now, things are working nicely. I will put in some code next to see what my frame rate is.

Some of the basic mechanics of the game are in place, but still much more to figure out...like sound. I will begin with OpenAL tomorrow evening. I have read some contradicting posts on the internet that say sound does and does not work on the simulator. I will put together some test code and find out.

Another gotcha...don't know if I mentioned this already, but since I'm running the simulator on a PPC, the colors are wrong. RGBA on the simulator with PPC is GRAB. I'm not going to worry about it for now. I'm going to do my prototyping and learning, and when I am well into the real game engine code then I will pluck down the $99 for the signing certificate and see if I can get a signature for the PPC (there appears to be a script that can do it, that someone posted on the internet). I'll give it a try, if it doesn't work, then I will plunk down $599+change for a mini Mac, and sign my app. However, that is down the road.

I've been wrestling with a tough beast on my day job...trying to figure out why my TCP/IP socket is dropping the connection inside a VMWare virtual machine. I don't know if it is their DNS kicking me out, or what. I've got keep_alives, receive/send time bumped up, pumping my own little heart beat messages, and still drops. The connections outside the VM work like a charm, so I will prepare for another day of battle. Why not ask VMWare support you ask...poooolllleeeaaaasssseee! I have asked them three times and "SILENCE!" (she blinded me with science). So, I'm on my own.

Oh...a funny thing happened to me the other morning. I was walking into a local grocery store to grab a couple of bagels from the bakery. As I walked into the store, two college age boys were coming out the door. I was wearing my "Video Games Live," (the Tommy Tallarico production) tour t-shirt (great show if you haven't seen it, check it out). Well, as I passed them, I heard a shout, "Video games DON'T LIE dude, they are the TRUTH!" So, I was like 30 steps passed them before it registered. "He was talking to me!" Which when I thought about it, proves three things...

1) Video games are an integral part of society.
2) People are passionate about video games (pro and con)
3) And...video games are contributing to the down fall of our youth...Dude couldn't read!! The shirt reads, VIDEO GAMES LIVE, not Video Games Lie. :)

Okay, I don't believe #3, but it makes you wonder.

Rockin' outta here to "Framing Hanley's," remix of Lollipop..."shawwty wannnna thuuug...you know I like to touch."

Sunday, January 4, 2009

Slow Progress Today

I'm here struggling with timing refresh problems, I believe. I am working on some prototype code, hammering out the mechanics of my game. I have some test entities moving about the screen, and touches and collision detection working. The only thing is the touches are recording sloooowwww! It is like I see the object I would like to select moving on the screen and touch, and the object is gone, and then the touch registers.

So, I believe my game objects are moving at a much higher refresh rate, and my touch object isn't. I will fool with this some more to see what is what.

Tomorrow, is back to work day. So, I may knock off early tonight and get my mind right..."I'm shakin' it, boss." (what...another "Cool Hand Luke," reference?...Dude, can I help it, if I'm a movie buff?)

Well I will go take another crack at the timing issue, and see what is what.

Take Care

Thursday, January 1, 2009

Digital Love

Well, the collision detection is working, thus the digital (work with me people...digital, finger, tapping, touches on the screen) love. My game will only deal with single touches so I will not enable the multi-touch capabilities in the release mode, but for debugging it is nice, I can tap the screen with two up to five fingers to do some mode I wish to toggle on and off.

I am really pleased with the iPhone and its capabilities for such a small machine, and non of the unofficial documents that I had to go through when hacking the DS, and not to mention the opportunity to get something out into the App Store. Really, I'm not focusing on that. I'm focusing on completing a quality, fun, little game.

Also, a very, very close friend of mine, Nick Davis, will be doing the artwork for me. He's a very good artist, but has never done anything for video games, so I'm telling him about sprites and he's learning how to create them. He's already mocked up some conceptual drawings for me and I'm more than excited about our game.

Tonight I'm going to treat myself, and knock off early. I've been burning the midnight oil way past midnight for like three weeks, and I think after my successes this week, well, I'm feeling a bit pleased with my progress. So, I'm gonna grab a Klondike and go watch one of the bowl games on TV.

Happy New Year again everyone!