Tuesday, September 21, 2010

The Story Continues: Jangaron 0.70

I just promoted version 0.60 to "stable" and uploaded a new "experimental" version 0.70. 0.43 is no longer linked (though still online) and 0.54 is now the "old" version.
Here are the highlights of the new experimental version 0.70:
  • Using soundManager2 for HTML5 sound that works in modern browsers without any plugin and even on iOS (iPhone, iPod touch, iPad)! Well, still quite experimental, but it's a proof of concept... As a fall-back, if available, Flash is still used. Moreover, I had to repair stuff to make it work on iOS again.
  • New controls  In single-player mode, you can now press Shift or Ctrl combined with the arrow keys. What happens is that when you hold down a modifier key, releasing the arrow key will turn your lightcycle again! Using Shift, you turn in the opposite direction, while using Ctrl, you turn in the same direction. Thus, you can do side-steps (Shift + arrow) and U-turns (Ctrl + arrow), and the time between pressing and releasing the arrow key determines the "width" of the move. Be warned that holding down the key for too long will trigger key repeat, and you will most likely crash! Maybe I can fix that...
  • Improved team lightcycle resurrection  When you play in a team with other programs and you crash, you are transferred into another lightcycle of your team. So far, this move was so confusing that usually, you immediately crashed again. Now, the view port changes to the other lightcycle, but it remains controlled by the program until you press the first controlling key. Thus, you can relax and wait for a not-so-close situation until taking over control, or just decide to watch the game continue. I plan to visualize the state in which the program has control over the viewport's lightcycle.
  • More technically, I used the latest Jangaroo compiler to recompile all libraries and the game itself. Should not really make any difference in game play, but leads to cleaner JavaScript code and a better build process. I hope to be able to put all Jangaron source code on github soon.
Please tell me what you think about the new features and whether they work for you!

P.S.: For those of you who are bored with the splash screen and voice, there is a secret switch: Just add ?nosplash to the URL, and you'll be directed to the settings dialog immediately, like this: http://www.jangaron.net/jangaron0.7/jangaron.html?nosplash

Tuesday, September 14, 2010

Eventually: Jangaron + Sound in Firefox 3.6

Greetings, programs, it's been quite a while.
Jangaron looks a bit abandoned, doesn't it? Well, you may be right. I've been working hard on the "parent" project Jangaroo and its Flash compatibility: see this new Flash-ported-to-Jangaroo Demo!
But nonetheless, I was quite annoyed when I noticed that Jangaron was not working correctly with Firefox 3.6. To be more precise, the mini game worked, and the settings UI worked, but starting the full game from the settings UI with sound enabled failed. The workaround was to
  1. play Jangaron mini only or
  2. switch off sound before starting the game from the UI.
Now that I found time to dig into the problem, the solution sounds somewhat familiar: browser detection was broken with Firefox 3.6! After patching that, everything now works fine again. So please spread the word to Firefox 3.6 users to go ahead and play Jangaron (again)!
The problem was in the browser detection code I copied back then from an old version of MooTools, which detects Gecko aka Firefox like so:
  if (window.document["getBoxObjectFor"] != null)
    return ENGINE_GECKO;

It is not really bad practice to use proprietary methods or properties to detect a browser, but as you can see in this case, it is not very future-safe. Because as browsers become more and more standards-compliant, especially these proprietary methods are likely to be removed (as in this case, see here). Or, as for example happened in case of Microsoft extensions like CONTENTEDITABLE, they are copied by other browsers, and thus also fail as a distinguishing criteria.
Whatsoever, since the only thing that came after GECKO was OPERA and UNKNOWN, I now ask for Opera first and consider everything else a Gecko and hope your exotic Linux browser won't mind.
Powered by WebRing.