Category: Development Blog


Very rarely, do I come across a configuration problem I can not easily find the solution. Sometimes despite all my searching, solutions to problems just haven’t been posted yet. This is the solution to something I’ve been needing for a very long time:

Symptom:
You are a PHP developer who uses Eclipse PDT, or netbeans IDE, or something else and needs to debug via xdebug. If you have ever come across the problem where setting breakpoints ONLY seems to work in index.php, here is the solution:

Solution:
Simple explanation is if you have soft-links in your php include path, or if you are using a case-insensitive file system (OSX), the path of the breakpoint your setting in your IDE must EXACTLY match the path where php loads the file from. In my case, both of these conditions were the root cause of my debugger not stopping on my breakpoints in my IDE.

Here was my configuration:
I set the include path in my .htaccess file. Lets just say I set it to something like:
“/Applications/xampp/htdocs”

And lets say that in htdocs, I’ve got two files index.php and MyClass.php. Now, in my case the path “/Applications/xampp/htdocs” is actually a softlink to “/Applications/XAMPP/xamppfiles/htdocs” (notice the upper-case). Now, this is all fine and dandy. Php works fine, it finds the path on the filesystem, and loads up my files without php problems… However, when I debug in Eclipse PDT, breakpoints only work in the index file…. WTF? So I enabled xdebug logging, and I saw the that debug client was telling xdebug to break inside MyClass.php, but the path of the file it was breaking on was
“/Applications/XAMPP/xamppfiles/htdocs/MyClass.php”…
Php loaded the file at: (due to what my include path is)
“/Applications/xampp/htdocs/MyClass.php”

Yes, it’s the same file, but i guess xdebug just can’t figure that out. Simple solution, throw an xdebug_break() in the file you want to breakpoint on…. This should always work. Have a look at your stack and check the path of the file that the breakpoint is on… Make sure that that path is exactly the one your using in your include path in php…. CASE SENESITIVE AS WELL….

At first I thought this was a php 5.3 problem (as the problem just started when I upgraded to 5.3, however that’s when xampp project decided to use CAPITALS XAMPP instead of lower-case)… Then I thought it had something to do with mod rewrite…. Nope. If breakpoints work in your index file they should work everywhere else… If they’re not, it’s a PATH problem.

In my case, I just changed my php include path from
“/Applications/xampp/htdocs”
to
“/Applications/XAMPP/xamppfiles/htdocs”
and VOILA! All breakpoints work again. :)

Ok. So my initial bold claim of one month of development didn’t really pan out.. But coincidently, it just happens to be two months to the day.. And two months to the day isn’t that bad. And really, the game really did need the polish. Here’s what I’m talking about. Here are some samples of what the game looked like when I designed the levels, and what it looked like after Ty got his hands on it. Can you you guess who’s the designer???

Ok. I did the ones on the left… Moral of the story, get a designer. These screencaps really don’t even give the new designs justice. Was it worth the extra month? You decide.

————————————————————————
r79 | 2010-03-14 13:47:21 -0600 (Sun, 14 Mar 2010) | 1 line | complete level processor
————————————————————————
r80 | 2010-03-14 14:29:52 -0600 (Sun, 14 Mar 2010) | 1 line | fixing level 7
————————————————————————
r81 | 2010-03-14 15:14:40 -0600 (Sun, 14 Mar 2010) | 1 line | moon base
————————————————————————
r82 | 2010-03-14 15:31:25 -0600 (Sun, 14 Mar 2010) | 1 line | fixing multi hit
————————————————————————
r83 | 2010-03-14 16:03:15 -0600 (Sun, 14 Mar 2010) | 1 line | Making flag a dynamic world based image

Ahh yes. So the fourth course I started on I wanted to do a moon type course…. (originally maybe adjusting gravity in the physics). Anyways, the background is black, and the golfer sprite is black… So i needed to make the golfer sprite images dynamic based on the course.

————————————————————————
r84 | 2010-03-14 16:47:51 -0600 (Sun, 14 Mar 2010) | 1 line | level2
————————————————————————
r85 | 2010-03-14 17:06:16 -0600 (Sun, 14 Mar 2010) | 1 line | secret level bounce

Hmmmmmm not sure what this is….. ;)

————————————————————————
r86 | 2010-03-14 17:22:21 -0600 (Sun, 14 Mar 2010) | 1 line | more fun
————————————————————————
r87 | 2010-03-14 17:46:19 -0600 (Sun, 14 Mar 2010) | 1 line | Lev 5
————————————————————————
r88 | 2010-03-14 17:49:11 -0600 (Sun, 14 Mar 2010) | 1 line | fixing up water delay
————————————————————————
r89 | 2010-03-14 19:32:35 -0600 (Sun, 14 Mar 2010) | 1 line | bounce levels

Still not sure what this is….. ;)

————————————————————————
r90 | 2010-03-14 19:44:47 -0600 (Sun, 14 Mar 2010) | 1 line | circle level
————————————————————————
r91 | 2010-03-14 19:46:50 -0600 (Sun, 14 Mar 2010) | 1 line | fix
————————————————————————
r92 | 2010-03-14 20:00:03 -0600 (Sun, 14 Mar 2010) | 1 line | final stuff more moon base world

I think I was probably close to finishing up the fourth course at this point.

————————————————————————
r93 | 2010-03-14 20:56:43 -0600 (Sun, 14 Mar 2010) | 1 line | fixing up high score and unlockables
————————————————————————
r94 | 2010-03-14 21:14:40 -0600 (Sun, 14 Mar 2010) | 1 line | unlock levels

I think I added the ‘unlocking mechanism’ here for courses. All the scores and stuff at this point were using NSUserDefaults.

————————————————————————
r95 | 2010-03-14 22:12:43 -0600 (Sun, 14 Mar 2010) | 1 line | remove user defaults
————————————————————————
r96 | 2010-03-14 22:58:51 -0600 (Sun, 14 Mar 2010) | 1 line | Difficulty choose
————————————————————————
r97 | 2010-03-14 23:04:30 -0600 (Sun, 14 Mar 2010) | 1 line | difficulty
————————————————————————
r98 | 2010-03-15 00:13:38 -0600 (Mon, 15 Mar 2010) | 1 line | whoop whoop wind

Ahhh! Finished up the Easy/Hard versions here. Hard just has random ‘wind’ on each hold.. Pretty simple to implement, but it makes it really hard to make pars on these holes depending on which was and how hard the wind is blowin…

————————————————————————
r99 | 2010-03-15 21:26:16 -0600 (Mon, 15 Mar 2010) | 1 line | two more scenens
————————————————————————
r100 | 2010-03-15 21:44:36 -0600 (Mon, 15 Mar 2010) | 1 line | options checkboxes

Options here.. Vibrate options and sound options. Using NSUserDefaults underneath.

————————————————————————
r101 | 2010-03-15 22:23:06 -0600 (Mon, 15 Mar 2010) | 1 line | fix
————————————————————————
r102 | 2010-03-15 23:08:01 -0600 (Mon, 15 Mar 2010) | 1 line | high scores scroller
————————————————————————
r103 | 2010-03-17 21:35:49 -0600 (Wed, 17 Mar 2010) | 1 line | addinng open feint

YEAH! OpenFeint! All around, OpenFeint is good stuff. I does take a while to setup and get things going, a bit of overhead for a one month project, but not too bad. Did a custom High score view here using UIKit table controllers again.

————————————————————————
r104 | 2010-03-17 22:09:51 -0600 (Wed, 17 Mar 2010) | 1 line | Swing animation psd

OK…. so at this point I think I’m actually in tweak mode. Realistically, most of the game is finished at this point. I’ve got four full courses. All scenes working, high scores, unlockables, all the graphics are finished at this point. Not too shabby.

————————————————————————
r105 | 2010-03-17 23:53:07 -0600 (Wed, 17 Mar 2010) | 1 line | a bunch of stuff.
————————————————————————
r106 | 2010-03-17 23:57:01 -0600 (Wed, 17 Mar 2010) | 1 line | added a PARS.rtf in the psd folder
————————————————————————
r107 | 2010-03-20 12:28:22 -0600 (Sat, 20 Mar 2010) | 1 line | power tweaks, exponential velocity curves, and start of openfeint high scores

OK… So feedback starts in.. Here, the main thing I heard from friends, was that mid-range shots were just too hard to make. I was using a linear scale for applying and impulse to the golf ball when it was struck. It was just soo hard to make mid-range shots, most of the shots were either too short or too long.. Time to turn that from linear to exponential with some thresholds…

————————————————————————
r108 | 2010-03-28 15:31:55 -0600 (Sun, 28 Mar 2010) | 1 line | open feint
————————————————————————
r109 | 2010-03-28 16:14:44 -0600 (Sun, 28 Mar 2010) | 1 line | new
————————————————————————
r110 | 2010-03-28 16:40:20 -0600 (Sun, 28 Mar 2010) | 1 line | fix for level arrangement
————————————————————————
r111 | 2010-03-28 16:56:50 -0600 (Sun, 28 Mar 2010) | 1 line | goof fix
————————————————————————
r112 | 2010-03-28 17:24:04 -0600 (Sun, 28 Mar 2010) | 1 line | local high scores now
————————————————————————
r113 | 2010-03-28 17:37:21 -0600 (Sun, 28 Mar 2010) | 1 line | fixes and more high score stuff

Ok. So I was doing a lot of OpenFeint tweaking here… Basically getting the local high score to display along with the global high scores.

————————————————————————
r114 | 2010-03-28 18:58:32 -0600 (Sun, 28 Mar 2010) | 1 line | overlay for profile pics
————————————————————————
r115 | 2010-03-28 19:27:38 -0600 (Sun, 28 Mar 2010) | 1 line | loading screen for high scores
————————————————————————
r116 | 2010-03-28 19:46:32 -0600 (Sun, 28 Mar 2010) | 1 line | background fix
————————————————————————
r117 | 2010-03-28 22:07:48 -0600 (Sun, 28 Mar 2010) | 1 line | fixing up swing anim
————————————————————————
r118 | 2010-03-28 22:13:05 -0600 (Sun, 28 Mar 2010) | 1 line | double fast scroll

Ahh.. This was a nice fix. Basically, the scroll through the hole was as fast as the finger swipe displacement. Adjusting it so that it scrolls twice as fast as the finger move displace really improved that feature.

————————————————————————
r119 | 2010-03-28 22:26:15 -0600 (Sun, 28 Mar 2010) | 1 line | gettin there
————————————————————————
r120 | 2010-03-28 23:30:56 -0600 (Sun, 28 Mar 2010) | 1 line | now working with open feint
————————————————————————
r121 | 2010-03-29 01:15:57 -0600 (Mon, 29 Mar 2010) | 1 line | more stuff
————————————————————————
r122 | 2010-03-29 01:42:40 -0600 (Mon, 29 Mar 2010) | 1 line | fixing up water textures
————————————————————————
r123 | 2010-03-29 01:51:20 -0600 (Mon, 29 Mar 2010) | 1 line | more stuff hiyoooooo
————————————————————————
r124 | 2010-03-30 19:11:44 -0600 (Tue, 30 Mar 2010) | 1 line | whoop whoop, scroll in and fade booya

This was really cool actually. This ’scrolls’ over the hole before starting the whole. (It pans the camera from the pin position to the golfer’s starting point)…. Very cool and helpful.

————————————————————————
r125 | 2010-03-30 19:27:40 -0600 (Tue, 30 Mar 2010) | 1 line | whoop whoop
————————————————————————
r126 | 2010-03-30 19:30:43 -0600 (Tue, 30 Mar 2010) | 1 line | yo
————————————————————————
r127 | 2010-03-30 20:38:16 -0600 (Tue, 30 Mar 2010) | 1 line | booyakashaka
————————————————————————

Yeah. I don’t know what the last few commits here were, but it was all tweaks pretty much. A few more commits for sound effects and it should be very close. I’ve already pretty familiar with CocosDenshion, so it should be fast. I was in my studio tonight, and got the few sounds that I need all together and ready to go. So there it is. Basically one month with a vegas trip in which I absolutely did no development.. (vegas, 2010-03-20 – 2010-03-28).

I’ll post some screen shots, and see if I can’t get a YouTube video of the game play up here shortly.

February 25th to March 30th (with a trip to vegas in there!). Thats what the svn log says. Now, that’s just impressive… All graphics (with the exception of some logos and stick animations), all programming, all sound.

It’s actually kind of hard to believe that I’m just finishing up the sound tonight… I’m actually pretty shocked. Anyways, I found myself looking at my svn log comments and thought I’d actually get this blog going with something interesting… The one-month one-game log analysis:  The format is:  revision | date | svn commit message (yes i know my messages are ridiculous)

————————————————————————
r1 | 2010-02-24 23:06:39 -0600 (Wed, 24 Feb 2010) | 1 line | importing project

So yeah. This i guess was pretty much the creation of the project. Checked out the latest cocos2d trunk and started away using Chipmunk as the physics engine. I started with pretty much a similar template to ‘Scuba Guy’, which is currently in development… But not much here, pretty bare bones.

————————————————————————
r2 | 2010-02-24 23:08:22 -0600 (Wed, 24 Feb 2010) | 1 line | in
————————————————————————
r3 | 2010-02-24 23:22:11 -0600 (Wed, 24 Feb 2010) | 1 line | pro
————————————————————————
r4 | 2010-02-25 00:24:20 -0600 (Thu, 25 Feb 2010) | 1 line | new

Ok. So, I can’t really remember where I was at this point from the messages… I assume I was just truckin along hacking away..
————————————————————————
r5 | 2010-02-25 00:29:52 -0600 (Thu, 25 Feb 2010) | 1 line | asdf
————————————————————————
r6 | 2010-02-25 00:32:19 -0600 (Thu, 25 Feb 2010) | 1 line | Test level

Ok. So obviously here, I’ve got some test level stuff done. I essentially ripped the whole build process from ‘Scuba Guy’. Because it’s just awesome and super efficient. 1 photoshop file, 1 level. Export a big file file, and the build chops it up, figures out all the boundaries, and recognizes all the dynamic elements. The test level looked pretty bad as I recall, but it was a start.

————————————————————————
r7 | 2010-02-25 00:33:15 -0600 (Thu, 25 Feb 2010) | 1 line | new
————————————————————————
r8 | 2010-02-25 00:43:51 -0600 (Thu, 25 Feb 2010) | 1 line | new stuff
————————————————————————
r9 | 2010-02-25 00:55:17 -0600 (Thu, 25 Feb 2010) | 1 line | moew
————————————————————————
r10 | 2010-02-25 22:27:41 -0600 (Thu, 25 Feb 2010) | 1 line | build new stuff

I remember what I was doing at this point.. OK, so you know in UIKit or Cocos2d, stuff like [UIImage imageNamed:] or [CCSprite spriteWithFile:]. Ya that’s no good if your Xcode build generates images on the fly. The last part of my build is a script that runs the level generator, which means that none of the images are ‘added’ to the Xcode project. Anyways, I built a framework for accessing these images really easily.. It ends up just using: [[NSBundle mainBundle] pathForResource:] which is where all the level images get put in the end.

————————————————————————
r11 | 2010-02-25 23:01:27 -0600 (Thu, 25 Feb 2010) | 1 line | test
————————————————————————
r12 | 2010-02-25 23:21:05 -0600 (Thu, 25 Feb 2010) | 1 line | fix
————————————————————————
r13 | 2010-03-01 21:47:05 -0600 (Mon, 01 Mar 2010) | 1 line | stuff
————————————————————————
r14 | 2010-03-01 22:00:59 -0600 (Mon, 01 Mar 2010) | 1 line | new
————————————————————————
r15 | 2010-03-01 23:33:10 -0600 (Mon, 01 Mar 2010) | 1 line | test
————————————————————————
r16 | 2010-03-04 20:43:26 -0600 (Thu, 04 Mar 2010) | 1 line | new

I don’t really remember what specifically I was doing at this point. But I remember being in about 50% Xcode and 50% photoshop. Cutting up images is tedious….

————————————————————————
r17 | 2010-03-04 21:19:06 -0600 (Thu, 04 Mar 2010) | 1 line | fix
————————————————————————
r18 | 2010-03-06 14:19:50 -0600 (Sat, 06 Mar 2010) | 1 line | new
————————————————————————
r19 | 2010-03-06 15:41:51 -0600 (Sat, 06 Mar 2010) | 1 line | fix
————————————————————————
r20 | 2010-03-06 16:25:42 -0600 (Sat, 06 Mar 2010) | 1 line | new
————————————————————————
r21 | 2010-03-06 22:12:16 -0600 (Sat, 06 Mar 2010) | 1 line | box2d

Oooooo. Yup. I know exactly what I was doing here. So chipmunk didn’t really work out as a physics engine for this game. The problem? CCD, continuous collision detection. Chipmunk doesn’t have it. And the way I wanted this game has the golf ball really small. With Chipmunk the ball kept passing through the group boundaries. Increasing the cpSegment size wasn’t possible because then it would appear that the ball wasn’t quite touching the ground… Chipmunk, I love ya, but it was time to dive into Box2d..

————————————————————————
r22 | 2010-03-06 22:30:28 -0600 (Sat, 06 Mar 2010) | 1 line | remove

Hahaha… I GUARANTEE (without looking at the detail svn) that this commit was changing all the bloody .m extensions to .mm… *facepalm*

————————————————————————
r23 | 2010-03-07 00:45:06 -0600 (Sun, 07 Mar 2010) | 1 line | box 2d
————————————————————————
r24 | 2010-03-07 00:55:13 -0600 (Sun, 07 Mar 2010) | 1 line | box 2d

Ok. prolly more Box2d tweaks here. I did spend ALOT of time trying to figure out why stuff in Box2d wasn’t moving faster… Without getting into the details… PTM_RATIO. Ya, there’s a limit to force and velocities and I was reaching it way too soon.. Applying a stronger impulse to an object, and getting the exact same result… I was running into limits. Scaled all the physics down by a factor of 25, and it was all good from there.

————————————————————————
r25 | 2010-03-07 13:51:58 -0600 (Sun, 07 Mar 2010) | 1 line | c plus plus collision handler

Ok. So now we need collisions handlers right? Well, time to take out those Chipmunk callbacks and write a C++ class… ( I wrote a lot of server software in C++ a few years ago at a different job… not impressed… ).

————————————————————————
r26 | 2010-03-07 14:25:16 -0600 (Sun, 07 Mar 2010) | 1 line | left right boundary walls

Ok. So i added invisible boundary walls here.

————————————————————————
r27 | 2010-03-07 15:13:40 -0600 (Sun, 07 Mar 2010) | 1 line | new
————————————————————————
r28 | 2010-03-07 15:58:11 -0600 (Sun, 07 Mar 2010) | 1 line | intro

This was probably the fade in of the logos.. Most CCScene transitions..

————————————————————————
r29 | 2010-03-07 18:45:43 -0600 (Sun, 07 Mar 2010) | 1 line | new test screens
————————————————————————
r30 | 2010-03-07 19:32:14 -0600 (Sun, 07 Mar 2010) | 1 line | World select scene

OOO.. level select scene. This put some UIKit stuff on top of Cocos2d. Mostly just TableViewController stuff.. Maybe some transitions in there..

————————————————————————
r31 | 2010-03-07 19:39:39 -0600 (Sun, 07 Mar 2010) | 1 line | testing again
————————————————————————
r32 | 2010-03-07 19:40:00 -0600 (Sun, 07 Mar 2010) | 1 line | testing again
————————————————————————
r33 | 2010-03-07 19:40:17 -0600 (Sun, 07 Mar 2010) | 1 line | testing again
————————————————————————
r34 | 2010-03-07 20:04:06 -0600 (Sun, 07 Mar 2010) | 1 line | fixing up menu
————————————————————————
r35 | 2010-03-07 20:08:44 -0600 (Sun, 07 Mar 2010) | 1 line | fixing up menu
————————————————————————
r36 | 2010-03-07 20:56:38 -0600 (Sun, 07 Mar 2010) | 1 line |
————————————————————————
r37 | 2010-03-07 21:03:07 -0600 (Sun, 07 Mar 2010) | 1 line | new image
————————————————————————
r38 | 2010-03-07 21:56:31 -0600 (Sun, 07 Mar 2010) | 1 line | whoop whoop
————————————————————————
r39 | 2010-03-07 22:01:50 -0600 (Sun, 07 Mar 2010) | 1 line | whoop whoop
————————————————————————
r40 | 2010-03-07 22:06:27 -0600 (Sun, 07 Mar 2010) | 1 line | moving
————————————————————————
r41 | 2010-03-07 22:41:46 -0600 (Sun, 07 Mar 2010) | 1 line | images in images folder now

Ok. not sure what I was exactly doing this day. But it looks like from this message that I was tweaking the build a little bit.

————————————————————————
r42 | 2010-03-07 23:32:30 -0600 (Sun, 07 Mar 2010) | 1 line | new level
————————————————————————
r43 | 2010-03-08 00:29:15 -0600 (Mon, 08 Mar 2010) | 1 line | 4 and 5
————————————————————————
r44 | 2010-03-08 00:37:07 -0600 (Mon, 08 Mar 2010) | 1 line | new
————————————————————————
r45 | 2010-03-08 00:53:40 -0600 (Mon, 08 Mar 2010) | 1 line | six
————————————————————————
r46 | 2010-03-08 01:02:28 -0600 (Mon, 08 Mar 2010) | 1 line | ne 6 fix

Right on here we go… looks like we got levels 3 4 5 and 6 going. These are finished levels. One photoshop file. Export. and done.

————————————————————————
r47 | 2010-03-08 20:08:21 -0600 (Mon, 08 Mar 2010) | 1 line | whoop whoop, new slow
————————————————————————
r48 | 2010-03-08 21:16:40 -0600 (Mon, 08 Mar 2010) | 1 line | shifty
————————————————————————
r49 | 2010-03-08 21:55:13 -0600 (Mon, 08 Mar 2010) | 1 line | two more levels booya son
————————————————————————
r50 | 2010-03-08 22:55:01 -0600 (Mon, 08 Mar 2010) | 1 line | final level booya

Looks like the first course was done here. ‘Loftstrom Links’. With a minor fix later, I think this was actually complete here…

————————————————————————
r51 | 2010-03-08 23:06:30 -0600 (Mon, 08 Mar 2010) | 1 line | new finished scene
————————————————————————
r52 | 2010-03-08 23:30:37 -0600 (Mon, 08 Mar 2010) | 1 line | a new finished scene
————————————————————————
r53 | 2010-03-09 00:42:21 -0600 (Tue, 09 Mar 2010) | 1 line | putting angle
————————————————————————
r54 | 2010-03-09 00:46:13 -0600 (Tue, 09 Mar 2010) | 1 line | collision group static bodies
————————————————————————
r55 | 2010-03-09 20:14:29 -0600 (Tue, 09 Mar 2010) | 1 line | finally water

Ahhhhhh.. YES. Definitely remember this. Implemented the ‘water hazards’ in the game. Needed some definate tweaks to the level processor script, and some Box2d sensors, but other than that, not too much! A custom graphic for each course which is the water hazard graphic and thats it!

————————————————————————
r56 | 2010-03-09 20:23:56 -0600 (Tue, 09 Mar 2010) | 1 line | water slowness booya
————————————————————————
r57 | 2010-03-09 20:25:39 -0600 (Tue, 09 Mar 2010) | 1 line | water slowness booya

Heehee.. Slowing down the ball when it hits the water…

————————————————————————
r58 | 2010-03-12 23:52:05 -0600 (Fri, 12 Mar 2010) | 1 line | new world

Alright. So, started creation of the second course here…

————————————————————————
r59 | 2010-03-13 00:28:19 -0600 (Sat, 13 Mar 2010) | 1 line | level 2
————————————————————————
r60 | 2010-03-13 13:27:17 -0600 (Sat, 13 Mar 2010) | 1 line | more tweaks and updates
————————————————————————
r61 | 2010-03-13 13:28:00 -0600 (Sat, 13 Mar 2010) | 1 line | fix
————————————————————————
r62 | 2010-03-13 14:57:18 -0600 (Sat, 13 Mar 2010) | 1 line | water haz and more stuff
————————————————————————
r63 | 2010-03-13 15:06:52 -0600 (Sat, 13 Mar 2010) | 1 line | backgrounds fix. fixing up par hud display
————————————————————————
r64 | 2010-03-13 15:38:39 -0600 (Sat, 13 Mar 2010) | 1 line | nother level
————————————————————————
r65 | 2010-03-13 15:59:24 -0600 (Sat, 13 Mar 2010) | 1 line | a level6
————————————————————————
r66 | 2010-03-13 16:17:49 -0600 (Sat, 13 Mar 2010) | 1 line | Level 7
————————————————————————
r67 | 2010-03-13 16:48:56 -0600 (Sat, 13 Mar 2010) | 1 line | another two levels
————————————————————————
r68 | 2010-03-13 17:00:08 -0600 (Sat, 13 Mar 2010) | 1 line | more

OK. There you go. A course in ONE day. I remember doing these… I hammered through these course designs. All that time building that level processor pays off..
————————————————————————
r69 | 2010-03-13 17:40:13 -0600 (Sat, 13 Mar 2010) | 1 line | new world
————————————————————————
r70 | 2010-03-13 20:47:59 -0600 (Sat, 13 Mar 2010) | 1 line | sand traps and new level

OK. So it looks like I added the sand trap feature here.. Pretty simple as it’s very similar to the water hazard.. Just needs different logic on the sensor.

————————————————————————
r71 | 2010-03-13 20:55:59 -0600 (Sat, 13 Mar 2010) | 1 line | sand edges and restitutions
————————————————————————
r72 | 2010-03-13 21:09:08 -0600 (Sat, 13 Mar 2010) | 1 line | whoop whoop… sand son
————————————————————————
r73 | 2010-03-13 22:21:47 -0600 (Sat, 13 Mar 2010) | 1 line | more tweaks
————————————————————————
r74 | 2010-03-14 11:43:47 -0600 (Sun, 14 Mar 2010) | 1 line | nother level
————————————————————————
r75 | 2010-03-14 12:33:27 -0600 (Sun, 14 Mar 2010) | 1 line | levels
————————————————————————
r76 | 2010-03-14 12:59:41 -0600 (Sun, 14 Mar 2010) | 1 line | querky level
————————————————————————
r77 | 2010-03-14 13:13:30 -0600 (Sun, 14 Mar 2010) | 1 line | level 8
————————————————————————
r78 | 2010-03-14 13:46:48 -0600 (Sun, 14 Mar 2010) | 1 line | finals

OK. So it looks like I finished the third course here…

Egg Shaker Propulsion

EggShakerPropulsion

So, I had some spare time and was playing around in my studio… I thought it might be cool to develop a quick little game that used binaural audio somehow. I looked at a lot of methods of actually doing the stereo recording, but that all required special equipment that i just don’t have. After some quick research, I came across the head-related transfer function.. Ya some pretty cool stuff.. And it turns out, logic has a pretty sweet plugin that does exactly that.

I didn’t really want to write this, as I don’t really have too too much experience with dsp other than some basic filters. I couldn’t really find an lgpl library or free for commercial-use library out there that I could integrate into an iPhone/iPod game… So I just started exporting looped audio samples every 15 degrees… I guess if I can’t do the audio dynamically, I’ll just write the game so it cross-fades between audio layers. It actually turned out really really well.


I finished up some basic design for the game and got a prototype going. It actually works quite well. If you close your eyes it even helps to locate the direction of the audio. The audio will actually simulate the direction of a torpedo for the game… Since it’s actually an egg shaker, the torpedo’s will be propelled by the revolutionary ‘egg shaker propulsion’.

Game should almost be ready to go.. I’ll repost in another week or so with a demo video..

So recently I began to start some optimization on scuba guy. Our first game. Everybody’s always talking about fix your timestep fix your timestep, so I finially got around to doing it. My previous method was scheduling as fast as it could, and stepping through the space with a different delta time every tick..

[self schedule: @selector(tick:)];

-(void)tick:(ccTime)dt {
    cpSpaceStep(space, dt);
}

So i finally switched it to a fixed timestep. Funny, cause I actually saw no significant performance improvements in this case. I switched my scheduler to 1.0/60.0 and the fixed timestep to 1.0/60.0 as well. Running at 30FPS and nothing too significant. After poking around the forums, supposedly you see some performance improvements in chipmunk because it can cache things with a fixed timestep. Anyways, here’s the switch:

[self schedule: @selector(tick:) interval: 1.0f/60.0f];
-(void)tick:(ccTime)dt {

    float fixedTimeStep = 1.0/60.0;
    float timeToRun = dt + timeAccumulator;
    while(timeToRun >= fixedTimeStep) {
        cpSpaceStep(space, fixedTimeStep);
        timeToRun = timeToRun - fixedTimeStep;
    }
    timeAccumulator = timeToRun;
}
Follow us on twitter