Saturday, April 30, 2011

First impression of Gnome3

Just like Unity, Gnome3 is on a trip to reinvent the wheel. So here a few quick first impressions. Note that Gnome3 doesn't come with Ubuntu 11.04, but it can be installed via packages from the PPA.
  • no UI elements that pop in and out of existence, good
  • no minimize button and no minimize functionality, so the desktops clutter up fast
  • no maximize button either, but functionality is still there by dragging the window to the top of the screen
  • dragging a window to the left/right edge makes it fill half the screen, looks useful, but only really helps you with two windows, can't handle three
  • concepts used don't seem to work well together with multi-monitor setups, as it makes a lot of use of screen corners
  • the application "menu" got turned into a fullscreen thing, provides a desktop switcher, the application menu, along with search and a dock, when in the application screen all windows are visible as thumbnails
  • application menu can be activated via moving the mouse into the corner, no clicking required
  • the dock is only in the application screen
  • dock behaves like MacOSX, allowing only a single program instance to be started
  • moving windows between desktops is quite easy, when all desktops are used, Gnome automatically adds a new one
  • the application list is straight forward, not split up into installed, frequently used, etc. like Unity, makes it much easier to browse
  • no panel applet support
  • only a fixed top panel that can't be configured
  • the Gnome3 panel has a unique look that differs from regular Gtk, makes it look inconsistent
  • current Gnome3 PPA packages are incompatible with Unity and Gnome2, installing them will render both of the other unusable
  • no global menubar
  • seems to be incompatible with Gimp, as Gnome3 ignores Gimps additional windows, thus making it impossible to use Gimp on another workspace
  • gconf got replaced with dconf, which looks pretty much the same as before from a users point of view, except that you now have to search for your configuration options in two different registry editors
Overall my first impression of Gnome3 is much more positive then that of Unity, idiotic things like the overlay scrollbar are missing, the dock doesn't fold its icon and the whole user experience seems much more well thought out. The way it handles moving windows around to different workspaces is quite nice.

However it still feels like a toy interface with little reconfigurability, missing minimize/maximize buttons, no applets, bad compatibility, etc. It is also very application driven, making the file manager feel like an afterthought. I wouldn't want to use it, but in a few years when some of the missing features are added back in, it could turn out to be a usable system. That said, it is sad that they as well go the "invent the wheel" route instead of simply improving the Gnome that we already have, none of the changes are so fundamental that they couldn't be handled with a few small improvements and a new applet here and there.

Also whats with the requirement of OpenGL that both Unity and Gnome3 have? Did all OpenGL driver issues magically got solved when I wasn't looking? I don't think so. On basically every single dist-upgrade over the last few years I ran into either Nvidia or ATI drivers going nuts on me and it taking multiple weeks to get it fixed. And of course we still get complains about SuperTux going OpenGL.

Why the overlay scrollbar is crap

The overlay scrollbar is one of those crazy wheel reinventions for no reason in the new Ubuntu, here a few basic reasons why it sucks:
  • it's inconsistent, when windows are maximuzed or close to the screen border it will pop up on the right, otherwise it will pop up on the left
  • it's inconsistent as it is hardly used by anything, even among Gtk+ applications only a tiny fractions make use of it and there is no chance that any of the non Gtk applications will ever make use of it
  • it's invisible and thus much harder to hit then a visible scrollbar
  • it's impossible to hit in a single straight line when approaching a window from the right, it will only pop up once inside the window, but when that happens it will pop up on the outside of the window, so you have to move your mouse close, stop, then move back to click it
  • selections have the same color as the scrollbar, thus when a widget has a selection that goes till the edge it will blend into the scrollbar, making it not only look weird, but in the worst case completely invisible when scrollbar and selecting merge into one
  • it's much smaller then a classic scrollbar, real scrollbars fill the whole height of the window, overlay only fills the tiny portion that is the visible part of a document, thus you have a much smaller area to click on for page-up/down events
  • it doesn't pop up under the mouse, but a few pixels to the right, this makes it incredible frustrating to use, as the regular pattern of "graphical reaction -> I am hovering over the item" becomes untrue
  • the thing you want least in your GUI is randomly blinking stuff, yet overlay does exactly that, whenever you move your mouse around the screen overlay scrollbars pops up and fades out
  • if you are off by a single pixel to the right it will disappear instantly, forcing you not only to travel that pixel back, but to travel all the way to the left to make it reappear and then back to the right to actually click it, making it not only hard to hit, but actually punishment, as you get reset to an earlier stage then where you failed
  • buttons that are clickable and dragable at the same time without clear visual indication that they are special
  • it's extremely tiny, yeah the point is to save "screen real estate", but seriously, a scrollbar is worth more then four pixels that look more like a graphic glitch then a user element
  • it violates Fitt's law on maximized windows
To sum things up, the overlay scrollbar is baffling. It is not just a cosmetic change or a small tweak, but a drastic change in usability for the worst while providing no new features of its own. The way it punishes the user for slipping a few pixels off to the right makes it fell more like a frustrating and badly designed maze game where you are not allowed to hit the walls then an actual user interface element.

The only good part about the overlay scrollbar is that one can still purge it from existence:

sudo apt-get purge liboverlay-scrollbar.*

PS: I am using a trackball without the luxury of a separate scroll-wheel. I can certainly see how having a scrollwheel might make it more tolerable, but that doesn't change the fact that its completely awful for actual point&click interaction.

Monday, April 25, 2011

Review: Star Wars: Tie Fighter (PC)

Star Wars: Tie Fighter was developed by LucasArts and originally released in 1994 for DOS on floppy. A year later it was rereleased as an enhanced CD edition featuring additional missions and full voice overs, which this review will focus on. The game is the sequel to Star Wars: X-Wing and just like it precesessor it focuses on building a complex simulation of the spaceships of the Star Wars universe instead of just an arcade shooter. The story focuses on the imperial side in this game and is told in the form in the form of some short cutscenes and the missions briefings you get to hear before each missions, but it stays very impersonal overall, neither your own character nor any of the wingmen are established as characters, only a few commanding admirals get that handling in the cutscenes.

The games main menu comes in the form of a space station, after giving your pilot a name you have the choice between either flying one of numerous training missions, watching a few technical details of the spaceships, watching recorded mission playback or starting one of the thirteen battles that form the core of the game. Each of those battles contains around five to seven missions, putting the total mission count, including the training missions, of the Tie Fighter CD edition somewhere at around one hundred.

Before playing a mission the game will show a little briefing of what is about to follow and what the players role in the battle will be. A flight officer will provide additional tips and a member of the Imperators secret orders will provide you with information on bonus objective in the mission. All of those are fully voiced. One weird aspect of the mission briefing is that they loop, without a clear indication of where the end was. The spaceships weapon loadout can be configured before a mission as well. The spaceship itself however is predefined for the given mission. While early in the game focus will be on the unshielded Tie Fighter, Tie Bomber and Tie Interceptor, later on the will switch focus to the faster and better protected Tie Advance, Tie Defender, Gunboat and Missleboat.

Once the mission launches the player will be put into his ship and launched into space. The games controls are quite complex, featuring numerous command to target specific ships or even specific parts of those ship, redirect energy from the change engines to the weapons or shields, switch weapons or change between couple or individual fire, give commands to wingmen and so on. Some missions also include transporters from which you can request resupply and repair of your ship in the mid of the mission.

If the players ship is hit, his shields will reduce, if the shields are completely down, the hull will get damages, this not only can temporally knock out ship systems, but also visually destroy elements of your cockpit, thus making some game tasks substantially harder when for example your radar monitor gets destroyed. This mechanic however doesn't come into play very often, as your ship can only take a few hits without shields, thus you will rarely end in a situation where you survived an attack and be left with a heavily damage ship and instead simply be destroyed in the attack.

The mission design itself focuses on three main goals, either you have to protect specific ships from destruction, inspect the cargo of other ships by flying near them or destroy specific ships. Frequently those goals are combined, so for example a typical mission might have you inspect multiple ships to find the one carrying the valuable cargo and then have a transporter which you have protect dock to that ship to gain control over it. Navigation points to which you have to jump to get to the next sub part of the mission like in Wing Commander, are not present in Tie Fighter, a single mission will focus on a single sector of space, both friend and foe will however jump in and out of hyperspace over the course of the mission and thus either provide valuable support or try to escape. The length of a the individual missions varies from five minutes up to half an hour. Mid-mission checkpoints or the ability to save the game within a mission are not provided. You can however do a full recording of a mission that you can use for later analysis.

Graphics in the game come in good old 320x200 VGA for the menu and cutscenes, when flying a ship one can also chose a hires mode that runs in 640x480, but I found that to slow when running under DOSBox to be usable. Ships are untextured and only have gouraud shading on them, for small ships that is not a practical problem, but for the Stardestroy size ships the lack of texture can make it really hard to judge distance when you are close and as result you might sometimes crash right into them. A later rerelease apparently contains textured ships, but I haven't played that. Cutscenes are presented as a mix of still images with a bit of animation mixed in and voice overs.

The music comes in a form of a MIDI track, while that might not sound so great by todays standards, it is actually a dynamic track that reacts to the arrival of new enemies, completed mission objectives and other events, thus it becomes not just background music, but an actual part of the gameplay that informs you of important events.

The thing that makes Star Wars: Tie Fighter an impressive experience is how all its parts end up working together. Instead of simplistic arcade battles the games tries to portrait large scale space battles and successes at that extremely well. The success in a mission rarely depends on raw reflexes and is most of the time much more dependent on understanding the structure of the mission, whom you have to protect, which enemies you have to attack first and how to make best use of the limited resources you have.

What the game manages like few other is that you actually get to see a lot of what is going on, when an enemy group tries to attack one of the ships you should protect it can happen quite frequently that you actually witness first hand how that group approaches and fires the last devastating torpedo at their target. Even in such a situation last minute rescues is possible, as torpedo can be intercepted by a precise, but difficult to pull of laser shot. Interception of enemy groups also turns regularly into a game of chicken, with both fighters going on a head on collision course, a few well aimed laser beams in that situation can destroy the enemy craft, but just as easily a devastating collision might occur, so its a gamble that should not be taken lightly. When a friendly shuttle is docking with another ship the game also leaves enough time to fly close and wideness the event.

The game also make a good point of letting your wingmen and other flight crews matter, in quite a few missions they not only provide support, but are essential for the completion of the mission, as you might fly support for a few bombers without carrying any bombs yourself. And taking down a larger spaceship without support is basically an exercises in futility. In the later parts of the game however there is a little to much reliance on the players fighting skills, as you will only rarely get wingmens under your command and have to do most of the job yourself.

In terms of difficulty the game falls on the thought side, just randomly shooting won't get you far and trying to figure out the best approach to complete the missions objectives might take a few times. But the game manages to stay completely fair through most of it and you never really end up blaming the game, as when stuff goes wrong, there is almost always a clear mistake done by the player. In case the difficulty gets overwhelming the game allows you to switch between one of three difficulties and additionally enable invulnerability and unlimited ammunition, not via a cheat, but straight from the option menu. While success on the mission requires your survival, it doesn't actually require the survival of your spaceship, so as long as you eject and get not captured by the rebels, you can still complete the mission. Dieing in the game is actually incredible rare, it only happens to me once over the course the 40 hour campaign, all the other times I got auto ejected and most of the time rescued by the Imperial side. Dieing itself doesn't lead to any kind of punishment, your pilot will simply be reset to what he was before the mission.

On the technical side I had quite a few issues with the joystick calibration. The game requires you to recalibrate the joystick on each startup, however when you do that the calibration still ends up completely wrong when actually flying a spaceship, thus you have to recalibrate when actually getting into the ship (Alt-C). I am not sure if that is an issue with Dosbox or with the game itself, but I faintly remember having similar issues with X-Wing on a real DOS PC. I solved the problem with a simple joystick macro that would automatically perform the calibration procedure, that didn't fix the problem, but might quick recalibration possible.

One positive surprise was that the games commands, pretty much all of them, fit nicely on an Xbox360 controller, thus making the game playable without touching the keyboard. A proper configuration however requires mapping most buttons with two layers of shifting, which can be a bit confusing at times, but still allowed a very comfortable play.

There are of course also a few things in the game that could have been improved. The destructible cockpit never really becomes a real part of the game, it happens to rarely and when it happens it is extremely hard to recover from, as your ship doesn't provide secondary instruments, thus damage to your targeting computer makes it almost impossible to actually find out where you need to go. A set of secondary instruments that make the tasks at hand harder instead of pretty much impossible would have been welcome, just as a to damage the cockpit without losing the whole ship in the process.

Targeting of individual ship parts also gets only relevant in a tiny few situations. Destroying the missile launcher of a big ship can be quite an advantage for example, but trying to go after the laser canons is often futile, as they are to hard to hit. Targeting the shield generators also seems to have no noticeable effect, even when done the enemies ships shields stay up.

While the game actually does provide a bit of meaning to the eject function, in that it allows you to succeed a mission even if you ejected, it doesn't go far enough with that mechanic. You will be ejected almost always automatically and almost never have time to eject manually, as destruction will come far to quickly. Shifting the balance and making manual eject more useful, while making the automatic eject less dependable, would have been a nice addition.

Last not least, the final thing I found lacking are landings. You can end a mission via three ways, eject, going into hyperspace or landing on a nearby friendly ship, but landing doesn't actually require any talent, it just means getting close enough to a ship and hitting Space, you do not actual perform the landing. Same goes for hyperspace, triggering it starts an automatic that leaves you with nothing to do. A bit more user interaction would have been welcome.

Overall Star Wars: Tie Fighter still holds up extremely well. The lack of detail on the bigger ships might be a bit annoying, as you essentially end up having just a handful of flat polygons on your screen, but the actual space battles are as thrilling and clever as ever. The brilliance of the mission design is simply that there is always stuff happening and all of that is actually meaningful. When you then fly along and actually see that docking maneuver that you heard about in the mission briefing, it just gives a great sense of immersion, lacking in most more modern flight combat games. The story could certainly be more character driven, as that is an area where it is really lacking, close to the point of being non-existent, but it is good enough to give you plausible reasons for your missions. In the end it is simply an incredible well put together game that really managed to capture the size and thrill of Star Wars space battles, in some sense even batter then the actual movies.

Monday, April 18, 2011

Some more faces for Naev

Did a few more character graphics for Naev over the weekend, some recycled with some modifications, some completely new:

Full resolution graphics are available at (licensed under GPLv3 and CC-by-sa-3.0):

git clone

Friday, April 15, 2011

Some notes on Ubuntu 11.04

  • Unity flat out doesn't work, full of graphic bugs and glitches
  • Unity doubly doesn't work with a multi-monitor setup (GUI all stretched out, while mouse input is not, making it impossible to click anything)
  • Unity is pretty much unusable on a regular desktop, designed for tiny screens and running only a few applications
  • remove Unity via: apt-get purge unity ubuntu-netbook.*
  • GUI customization didn't survive the upgrade
  • restore proper window icon order with:
    gconftool --type string --set /apps/metacity/general/button_layout close,menu:minimize,maximize
  • console and grub run at a higher resolution by default, to disable that set GRUB_TERMINAL=console in /etc/default/grub
  • they reinvent the scrollbar (called overlay scrollbar), it now hides itself when not moused over and other weird stuff, very annoying, hard to hit a target with the mouse that you can't see, new scrollbar is only in a few apps, not in all Gtk stuff
  • fix scrollbar with: sudo apt-get purge overlay-scrollbar.*
  • new default music player seems to be Banshee and no longer Rhythmbox (no obvious import/export to transfer media)
  • it takes way longer then before from the time the mouse is visible to when the Gnome panels show up on boot
  • XVideo and OpenGL on ATI is broken, the video always gets displayed on top, even if the window is in the background
  • Firefox constantly resets my "middleclick paste" setting to false
Overall this upgrade so far looks pretty horrid, some of the changes might make sense on a touchscreen device, but none of the interface changes really make any sense on a big desktop screen, this is doubly bad considering that the new interface is what you get on a regular dist-upgrade, not something you have to manually enable. Good news however that all changes so far seem to be revertible.

Sunday, April 03, 2011

C64: How to get BASIC programs into Vice/x64

One issue one will encounter when trying to develop C64 applications is the problem of getting BASIC programs into Vice. Vice support direct loading of PRG files, which are in essence BASIC programs, but those are the tokenized in-memory representation of BASIC files, not raw ASCII text files. On Windows there is an easy workaround, one can just copy&paste the BASIC source into the Vice interpreter, on Linux there doesn't seem to be a way to copy&paste text between Vice and the regular Linux userland.

The solution however is easy, "petcat" which comes with Vice is a BASIC tokenizer that will convert a ASCII text BASIC file into a PRG that can be read by the emulator. So to create a first simple BASIC program one uses a file with the content of:

10 print "hello world"
20 goto 10

And then the command:

$ petcat -w2 -o outfile.prg infile.bas

The "-w2" switch marks the program as V2 BASIC, the default that comes with the C64. Once the PRG is generated one can start it with:

$ x64 outfile.prg

It can also be saved with the usual:


inside Vice when an empty disk image (can be created from within the emulator) is attached.

A little warning: Upper/lowercase do matter a lot here, all the BASIC commands have to be written in lowercase, if they are written in uppercase they will be confused for other commands, this is due to the C64 BASIC's uses some uppercase characters (which are not really upper case characters, special symbols in PETSCII) as shorthand for the full text commands.

PS: For full disk image creation from Linux there is the program "c1541", again part of Vice.

Saturday, April 02, 2011

C64: How to build a colored hires sprite

The sprites on the C64 come in two modes, single colored 12x21 (stretched to 24x21) and multicolored 24x21, a simple trick to get a sprite that has both a resolution of 24x21 and contains color is to split it up. One sprite gets the hires details and the other one gets the lowres color. When using those two sprites in a game one simply has to place them at the same coordinates:

Friday, April 01, 2011

C64 Graphics: Dissecting Creatures

The images below shows some of the tricks used in the C64 game Creatures to achieve the illusion of more colors. The games uses a horizontal scrolling playfield in multicolor character mode. The main trick used is to have the shared colors be light and dark midtones, while using the unique tile color to either add a shadow or a highlight to the tile. When you look closely, you'll see that a highlight and a shadow never occur on the same tile.

Another interesting game is Stormlord, with that one there is however the catch that I have absolutely no idea how it managed to do so many colors. It is again a horizontal scrolling title, but unlike Creatures it doesn't seem to use any obvious scanline palette switches, instead it actually uses more then four colors on a single scanline, like in multicolor bitmap mode, but that normally doesn't go together with scrolling. My current assumption would be a multicolor bitmap mode with custom blitting code and VIC bank switching to a second buffer, so that screen redraws can happen in the background and the buffer get flipped each eight pixels when the scroll-offset reaches its edge:

PS: All this analysis was done by looking at a screenshot, not by actually observing the C64's memory, so there will be bugs.