Sunday, March 4, 2012

Episode 6 - Camera controls and exceptions

Implementing camera controls for Board Game Machine

Worked on some camera controls for our upcoming (multi player, multi device) board games simulator Board Game Machine . Control mechanisms demonstrated in the video below:
  • 90 degree spherical (elliptical) rotation of the camera position to view each side of the game board
  • Continuous vertical rotation of the camera position to get the desired view angle onto the board
  • 90 degree camera rolling when the camera is facing straight down

Notice (or rather, please do not notice) how there is a myriad of debugging text on the screen (the video is recorded straight from the dedicated development tool), and how the graphics are still very much in development.

Making Eclipse stop on Null Pointer Exception (and friends)

By default, debugging an exception in your Android application goes something like this:
  1. Watch the IDE stop into an empty page somewhere in the Dalvik code (no source code available unless you installed the full Android sources) with a rather meaningless call stack.
  2. Hit F8 to continue running.
  3. Look at LogCat to find out what was actually wrong. Find the red lines in the log, scroll down until you find the "caused by" line, doubleclick, and finally be transported to the offending line in your code.
I just learned you can force Eclipse to actually behave like a sane IDE by performing the following simple steps:
  1. From the menu, select Run, Add Java Exception Breakpoint
  2. Find NullPointerException (or whatever exception you are debugging)
  3. Verify Suspend On Caught Exceptions is checked. Click OK.
The debugger will now immediately break (suspend) where the exception occurs. Like, you know, every other (proper) debugging environment on the planet. I'm kinda stumped as to why they didn't make this the default debugging behaviour, but at least you can configure it to work properly.


Mobile client for DMSforSharePoint

Since after a fair bit of swearing and cursing I've got SOAP + NTLM up and running now (hurray, detailed blog post on that topic later), ít's time to develop a little prototype of a mobile client for our SharePoint-based DMS, DMSforLegal / DMSforSharePoint. Here is the first screenshot of this work in progress:

 
Misc

- The Android game engine now plays sound & music through some convenient manager objects. This was really easy to get up and running on android (thanks, MediaPlayer and SoundPool!). Still unsure about the best engine design for handling sound effects, but we'll see how it works out.

2 comments:

  1. Bet365 Casino provides a diverse vary of classic table games, jackpot slots and stay on line casino games all inside an industry leading games foyer. Caesars on line casino is a legendary brand that 1xbet has repeatedly appeared in Hollywood motion pictures. As such, it is no surprise gamers can discover massive collection of slots and table games.

    ReplyDelete
  2. Injection molding is a quick, high-volume, low-pressure, closed process using, mostly, crammed thermoplastics, such as nylon with chopped glass fiber. In the past 20 years, however, automated injection molding of BMC has taken over some markets beforehand held by thermoplastic and metallic casting producers. Compression molding is flip flops at cvs a high-volume thermoset molding process that employs expensive but very durable metallic dies. It is an acceptable selection when manufacturing quantities exceed 10,000 components.

    ReplyDelete