Archive for the 'Debugging' Category
Saturday, August 20th, 2011
AirPlay Mirroring was without a doubt one of the coolest iOS 5 features announced to the public at the 2011 WWDC Keynote. This amazing technology allows you to display the screen of your iOS device on an Apple TV 2. At the moment, the only supported mirroring device is the iPad 2 and the receiving device is limited to only the Apple TV 2. Airplay Mirroring is the latest in a pedigree of Apple media streaming technologies. The previous entry in the family was Airplay Video and is a slightly different technology that allows specific content to be broadcast from a variety of iOS devices and iTunes to an Apple TV 2. The precursor to that technology was originally called AirTunes and is used to broadcast audio content from iOS devices and iTunes to the AirPort Express and Apple TV (either 1 or 2). One peculiar thing that people noted about AirPlay Video was that it was wide open and unencrypted! This was surprising in light of the fact that AirTunes was most definitely not. Because of AirPlay Video’s relatively easy hackability, there quickly sprang up all manner of apps for both Mac OS X and iOS which would act as an AirPlay Video consumer.
So my thought process went like thus:
- AirTunes – Encrypted
- AirPlay Video – Unencrypted
- AirPlay Mirroring – ???
(more…)
Posted in AirPlay, Apple TV, Bugs, Debugging, Hacking, iOS, iPad, Networking, Programming, Security/Cryptography, Systems, Video | 12 Comments »
Wednesday, June 22nd, 2011
So you’re successful right? How successful? Let us count the ways. Let us count them by ranking you against your peers with an Elo ranked leaderboard and achievements. Remember that your worth can now be quantified and compared, so be sure to push your numbers as high as you can. “Greed, for lack of a better word, is good”. Welcome to the Wall Street update.
Complete Changelist:
- Bumped engineCompatibility to 0.5.10. (this means all games previously created by versions <= 0.5.9 will be deleted)
- Fixed a bug with the friction attachements that was casuing divergence.
- Taking another initial stab at redoing the cluster picker menu.
- Initial stab at 2X UI for the iPad.
- Added in-game stats panes and leaderboards.
- Designed the profile page and got initial replay functionality implemented.
- Made some changes to speed up app initialization.
- Added more capability to the stat gathering functionality.
- Added “Judge” capability.
- Added all the server-side support for interacting with judges and passing judgement on games.
- Added more stats functionality and judge bug fixes.
- Refined convex sweeping to only be super aggressive when dealing with the (thin) terrain.
- Fixed some concurrent loading bugs.
- Fixed a sound loading bug.
- Added a pragma to skip the intro.
I described the initial set of achievements that I had come up with in a previous blog post. For this update these are the achievements that are actually implemented and currently earnable:
| Boot Camp |
Rookie’s Luck |
Start A Fight With A Total Stranger |
Keep Your Enemies Close… |
| Finish Him |
Good Game |
Battle Hardened |
Angry Zurps |
| The General |
The Old College Try |
Flawless Victory |
LOL HAX |
| Peashooter |
Moonshot |
Greased Pig |
Heh Heh, Fire!, Fire!, Fire! |
| Rainbow Roll |
Lucky 7s |
Sky High |
Going The Distance |
| Pacifist |
One Hit Wonder |
Jack Of All Trades |
Critical Hit |
| Epic Fail |
McDuck |
The National Debt |
All Your Base |
Alpha Testing List
Would you like to be one of the awesome alpha testers that help make Cannonade great? Send an email to: cannonade@aorensoftware.com and I will reply with instructions on how to get onto the Trac server, Testflight list and tester forums.
Posted in Achievements, Bugs, Cannonade, Debugging, Games, Graphics, Indie, iOS, iPad, iPhone, OpenGL, Programming, Video Games | No Comments »
Wednesday, June 1st, 2011
Did you know that bullets (and other quick moving objects) in video games sometimes exhibit magical properties if they move too fast? If they gain enough speed, sometimes they can even pass completely through other objects without leaving a scratch or affecting them at all! You might have seen this happen occasionally in games that have a lot of complicated physics simulation. Sometimes fast moving objects just seem to pass through the ground or other objects. Unfortunately this is not a desirable user experience and it quickly breaks the illusion the game is trying to convey. This phenomenon is called “tunneling” and game developers attempt to deal with it in a variety of different ways. I thought I would share my unique combination of techniques to deal with it that I used in Cannonade. I have not seen this specific combination of techniques explained or suggested anywhere and so I thought it might be beneficial to share what I have learned with others who might also be suffering from object tunneling woes. First lets explain how most modern game physics simulation works and investigate why this problem crops up.
(more…)
Posted in Bugs, Bullet3d, Cannonade, Computer Games, Debugging, Games, Graphics, Hacking, Indie, iOS, iPad, iPhone, Performance, Programming, Psychology, Video Games | 1 Comment »
Monday, May 23rd, 2011
I have decided to give names to all of my alpha updates going forward. I have chosen to follow a movie theme naming convention. I am therefore proud to announce the “Primer” update (Cannonade 0.5.9). Aptly named, this update finally adds the timeline scrubbing feature! This feature allows you to pause and restart the game at any point in the past by dragging the timeline slider and hitting the play button. Perforated glass doors quickly shut and you hear the low hum of time travel occurring in the background. Once the universe has temporally moved to your desired point the doors open and you can watch history repeat itself!
Complete Changelist:

- Bumped engineCompatibility to 0.5.9. (this means all games previously created by versions <= 0.5.8 will be deleted)
- Got the timeline scrubbing working!
- Added a neat glass door progress indicator when you jump through time.
- Moved auto-camera to only be active during opponent’s turns.
- Did a top to bottom redesign of the cluster menu
- Added basic OpenGL lighting to blocks.
- Added an initial pass of the intro sequence.
- Moved the castle picking view to one-quarter height up.
- Used glPolygonOffest to correct decal the friction splatter.
- Changed the editor so that it moves the camera to the half-height everytime the blocks change.
- Baked the current levels and fixed some bugs related to baking.
- Added history grabbing functionality.
- Fixed a lot of bugs related to observing various points in the timeline.
- Modified the project so that I could submit a dummy IPA to iTunes Connect so I can keep my identifier (I hope).
- Made a new Pad+Phone based experience.plist.
- Changed the level’s info format from a serliazed file to an NSDictionary/plist.
- TONS of changes aimed at making it easy to integrate art.
- Removed the individual block textures now that the atlas is working everywhere.
- Pulling demo/intro values into the experience.plist.
- Initial demo intro game type implementation.
- Added a dummy account loging pragma (LOGINASAORENTEST1).
- Minor tweaks.
Alpha Testing List
Would you like to be one of the awesome alpha testers that help make Cannonade great? Send an email to: cannonade@aorensoftware.com and I will reply with instructions on how to get onto the Trac server, Testflight list and tester forums.
Posted in Bugs, Cannonade, Debugging, Games, Graphics, Indie, iOS, iPad, iPhone, OpenGL, Programming, Video Games | 2 Comments »
Monday, May 9th, 2011
The focus of this update is the new in-game tutorial! Now when you first launch Cannonade if you have never run through the tutorial it will prompt you to do so. The tutorial level is meant to teach new players how to use the battle interface and get them some target practice with the fundamentals. Give it a whirl and let me know what you think!
Complete Changelist:
- Bumped engineCompatibility to 0.5.8. (this means all games previously created by versions <= 0.5.7 will be deleted)
- Initial implementation of the tutorial game type and level.
- Made some menu refinements and added a “Wiki/File A Bug” menu option.
- Made it so that you are prompted to run through the tutorial if you havn’t before on that device.
- A few quick menu sound effects.
- Added detailed statistics gathering.
- Fixed lots of little simulation execution bugs.
- Tons of leak hunting.
- Added friends info to the game server packets and cleaned up the server code a bit.
Alpha Testing List
Would you like to be one of the awesome alpha testers that help make Cannonade great? Send an email to: cannonade@aorensoftware.com and I will reply with instructions on how to get onto the Trac server, Testflight list and tester forums.
Posted in Bugs, Bullet3d, Cannonade, Debugging, Game Center, Games, Graphics, Indie, iOS, iPad, iPhone, OpenGL, Programming, Psychology, Video Games | No Comments »
Monday, April 25th, 2011
The two most note worthy changes in this build are SPEED and WEAPONS! After spending two days on physics performance optimization and a week and a half on graphics performance optimization Cannonade now runs a lot faster on both the iPhone and the iPad! There are still speed gains to be had but the framerate difference is like night and day. Thanks to your voting, in this build we also have the debut of the Gravity Bomb, Fire Bomb and Friction Bomb weapons. They still need to be tweaked and balanced but they are still fun to play with. Give them a shot!
Complete Changelist:
- Bumped engineCompatibility to 0.5.7. (this means all games previously created by versions <= 0.5.6 will be deleted)
- Did a lot more investigation into physics performance. Content with how much I have for now.
- A HUGE graphics performance related commit.
- Added the Gravity Bomb, Fire Bomb and Friction Bomb weapons.
- Added powerSlider tuning buttons
- Added a block override fade timer
- Added all sorts of neat effects to the gravity, fire and friction bombs.
- Added a new lava island level to design around the !FOGENABLED and NONBLENDEDLAVA speedups.
- Initial “connection-less” Game Center implementation. Initial support for key-based communication (added libcrypto.a)
- Added a label toggle button in game and removed the reticle label fade.
- Reworked the visual styling of the shootMenu.
- Abandoned scrolling on weaponScrollView because UIScrollView is too buggy.
- Added BlockAttachements.
- Added CANNON_IMPACT and BLOCK_POOF emitter types.
- Tweaked Gravity Bomb effects.
- Removed old levels.
- Fixed a bug where resetCollisionFilters was not being called (killed replay).
- Extended ASGlassButton to handle corners.
- Fixed some ASGlassButton issues that were causing uneccessary redraw.
- Added a biased decal shape as a hack until http://aorensoftware.dyndns.org:8000/TRAC/ticket/145 gets fixed.
- Refined convex sweep tunnel protection even further.
- Added convex sweep querying to block movements as well.
- Added LOCALMODELVIEW so that we don’t stall OpenGL everytime we need to read/update the camera matrix.
- Added more benchmarking oriented functionality and updated libbullet.a.
- Tweaked build settings and switched compilers to llvm-gcc4.2.
- Fixed the editor back into working shape.
- Fixed cull and texture state for projectiles until they get their real objects.
- Fixed big in terrain removal code that was smashing memory.
- Fixed some block label override bugs.
- Fixed key loading.
- Fixed projectile state dirtying.
- Added an in-game fps counter.
- Added server games auditing to the ADMIN_MENU.
- Checks first before copying into history now.
- Misc bug fixes.
Alpha Testing List
Would you like to be one of the awesome alpha testers that help make Cannonade great? Send an email to: cannonade@aorensoftware.com and I will reply with instructions on how to get onto the Trac server, Testflight list and tester forums.
Posted in Bugs, Bullet3d, Cannonade, Debugging, Game Center, Games, Graphics, Indie, iOS, iPad, iPhone, OpenGL, Performance, Programming, Video Games | No Comments »
Friday, April 22nd, 2011
For the past month or two I have been lightly seeding to Cannonade to testers. I have gotten the strong impression that the “fun” of my game was unfortunately getting lost in the low framerate. There is a certain reaction in the human brain that I am trying to evoke by making the blocks explode and collapse in physically realistic ways. However, when the framerate is too low the perception of motion is lost and so is my core game mechanic. I first spent a lot of time optimizing the execution of the Bullet physics engine and found a significant speed increase by tweaking compiler settings. I found that the execution of the physics simulation on iOS devices was very strongly locked to CPU performance. Now the time had come to start attacking the performance of the graphics engine. I was hopeful that I would be able to find even more significant speedups in this area because the graphics engine was custom written by myself and I could also employ device specific optimizations to take advantage of specific strengths or avoid specific weaknesses. Many of the techniques I tried out were nothing that hasn’t already been done before but I thought it would be worthwhile to document my experiences executing them in my specific situation. These are the results of a week and a half of aggressive performance benchmarking, exploration and experimentation. It goes without saying that my results are very data set specific and so they could perform better, worse or the same when applied to a different iOS app.
(more…)
Posted in Bullet3d, Cannonade, Caster, CoreGraphics, Debugging, Games, Graphics, iOS, iPad, iPhone, OpenGL, Performance, Programming | 1 Comment »
Friday, January 28th, 2011
One day while I was hard at work a couple weeks ago I hit a really difficult technical snag. I stood up from my desk, let out a sigh and declared to the other person working in the office that “I’ve lost my determinism!”. He then inquired how I had lost my motivation while visibly wondering if I had used the word correctly. Although I had hit a significant roadblock, my determination to overcome it and make progress on my game was higher then ever. The “determinism” of my game however, had been lost. Now I needed to take it back.
(more…)
Posted in Bullet3d, Computer Games, CoreGraphics, Debugging, Game Center, Games, Hacking, Indie, iOS, MySQL, Networking, OpenGL, Programming, Security/Cryptography, Starcraft, Video Games | No Comments »
Saturday, October 16th, 2010
A couple of years ago I wrote an article called Neo Geo Cart Conversions which detailed a cool hobby project that involved turning a Neo Geo game called Metal Slug from an MVS (Arcade) version cartridge into an AES (Home) version. The primary reason for performing the conversion was to save the thousands of dollars it would take get a hold of an authentic AES cartridge and experience the original game at home legally (plus, doing the actual conversion was tons of fun!). A few years later I decided that it would also be fun to do a write up of my experiences and share my findings for others to enjoy. Over the years people have occasionally emailed me about the article with compliments and questions about the article. It has also been especially satisfying to hear about people who have successfully performed their own Metal Slug conversions by following my article. So far there have been four people that I know of who have done so, the latest of which is Akira Van who sends this image of his finished product:
It just goes to show that despite the end of officially produced Neo Geo carts, the wide and cheap availability of Neo Geo games in virtual console/compilation form and essentially the entire video gaming world moving on that there is still a vibrant and thriving community of enthusiasts and hackers dedicated to this great platform.
Posted in Bugs, Debugging, Games, Hacking, Neo Geo, Systems, Video Games | No Comments »
Saturday, March 8th, 2008
I have spent quite a few hours with the iPhone SDK now and must say that I am quite impressed. The experience of bringing some of my code written for Mac OS X over to the iPhone with no changes and having it just work is quite a pleasant experience. I REALLY enjoy being able to use Objective-C 2.0 synthsized properties and fast enumerators in my code (garbage collection would have been nice but hey, this is a mobile device). I maintain Tiger support for Language Aid and develop purely for Leopard in Razor and it is kind of an interesting mix of both to code for the iPhone. I am really excited to to flesh out a game I have been thinking of for the iPhone that would take advantage of a lot of its unique features.

So the posted requirements say that this beta version of the SDK requires an Intel Mac but so far I have not run in to much trouble developing with it on my G5 (the only Intel mac in the house right now is a Core Solo mini which is already pulling duty as a source server, build server, DVR and media center). Inspecting the simulator and the xcode plugins show that they are all universal binaries. The only gotcha that I ran into is that I had to make sure that in my build settings that the “Architectures” setting is set to “Native Architecture of Build Machine” so that the binaries produced are ppc so that the simulator (I have heard a surprising number of people errantly referring to it as an emulator) can load and run them. For some reason this reset itself to i386 one time and I had to track it down to that setting.
Other small quirks that may or may not be related to me running on ppc are that it seems like every 10th click event or so on the simulator window seems to fall through and hit the window behind it. Also, for some reason the simulator is also not responding to the “Rotate” commands whereas it would correctly respond on my Intel mini. Of the example code on the developer website there are a lot of projects that will not run in the simulator due to a pragma that intentionally errors itself out if built targeting the simulator:
#if TARGET_ASPEN_SIMULATOR
#error This application cannot be run in the Aspen Simulator. Please change Active SDK to "Device" and ensure a device is connected.
#endif
The common theme of which projects will and will not run seemed to be that they all used
Open GL ES. I eventually stopped to read the description before downloading the example which explicitly states as much:
Simply build the sample using Xcode and run it on the device (OpenGL ES is not supported in the simulator).
It is inevitable that I will plunk down the $99 to be able to perform remote debugging/use Instruments/use Shark with a real iPhone. However, for now while I am busy bringing up the core game engine and getting used to the new platform, the simulator is doing just fine.
Posted in Bugs, Computer Games, Debugging, iPhone, Programming, Systems | No Comments »