The Blog

Android Game Development (Day 4)

Day #4, Saturday, June 26th.

Android Game Development, Day 4

Keep reading below if you’re interested in today’s progress. Comments are welcome! In case you missed it, also don’t forget to read the report on my first three steps in Android game development.

Continue Reading →

Android Game Development

I’m building rather boring enterprise applications at work and I love creating more appealing things in my spare time, so I do a bit of game development whenever I can. The main problem for a programmer is to get some graphics, but fortunately I have some nice renderings from my old Project E tutorial and the even older Project D game by sechsta sinn on my harddisk that I could put into use (all done by my friend and favorite artist Martin Ernst, btw.).

This is what I managed to do in three after work sessions so far, if you’re interested in the details, continue reading after the video.

Android Game Development – Steps 1-3 from Matthias Gall on Vimeo.

Continue Reading →

Sculptris

There are a very few people who are genius, disciplined and focussed at the same time and thus can put their productivity to a maximum. One of the most talented guys in the Indie gamedev scene I’ve seen so far in that regard is Tomas “DrPetter” Pettersson. Late 2007 he already came up with a really useful little tool called SFXR (not to mention the even more impressive Musagi) and now it got even better. Within only six months he produced an amazing 3D mesh sculpting tool called Sculptris, now available as version 1.0.

Check out his trailer and see for yourself.

Isn’t that great?

Don’t ever say it’s almost done.

Chris Pruett at Google I/O on Android Game Development. Besides that quote I used as the post caption he shows some very interesting ideas how he analyzed the behavior of his users in order to improve their game experience. I love that hotspot idea, probably something useful for my friends working on Glow as well.

And for the record, also watch the excellent day 2 keynote. I had a good laugh at all the Apple taunting. For example, Android 2.2 features tethering and portable hotspot mode and guess what they’re showcasing? They’re using a Nexus One as an AP for “… another device that doesn’t have connectivity. What about that iPad?”

Apple, Google, whatever… they all have their downsides. But they bring so much innovation that I’m eagerly looking forward to seeing more cool things becoming reality in the next years and building cool things with them myself.

Stay Hungry. Stay Foolish.

This recording of Steve Jobs is “old” in terms of the Internet, but its message remains cutting-edge. If you don’t know it yet, it’s worth watching.

NB: When I watched that the first time, I was surprised that a versed speaker like Jobs told stories of his own life but still had to read them from his notes.

Unidirectional 1:1 relationships with Hibernate annotations

This is mainly a note to self because I screw up every time I need to write something like that, so here’s an example for myself in the future.

@Entity
@Table( name = "master" )
public class Master {
	@Id
	@GeneratedValue( generator = DBConstants.MASTER_SEQ )
	@SequenceGenerator( name = DBConstants.MASTER_SEQ, sequenceName = DBConstants.MASTER_SEQ )
	private long id;

	@OneToOne( fetch = FetchType.LAZY, optional = false, targetEntity = Detail.class, cascade = CascadeType.ALL )
	@PrimaryKeyJoinColumn
	private Detail detail;

	// ...
}

@Entity
@Table( name = "master_detail" )
public class Detail {
	@Id
	@GeneratedValue( generator = DBConstants.DETAIL_SEQ )
	@SequenceGenerator( name = DBConstants.DETAIL_SEQ, sequenceName = DBConstants.DETAIL_SEQ )
	private long id;

	// ...
}

Reference: java.sun.com, Tadtech

GWT 1.7.x + Safari 4.0.5 = Crash

Last year’s success story continues. If you consider to do GWT 1.7.x development on a 10.5.8 Leopard, you better spare the 4.0.5 update too and stick to Safari 4.0.3; it keeps crashing even though the bug was reported to be fixed in 4.0.5.

I am displeased.

DVW Panorama

Christopher, one of my highly-paid sechsta sinn colleagues, has spent some of his expensive hours to compile a panorama screenshot of a DVW map. But it all pays off when the fans are happy.

Click here for the fully blown version.

Small version, follow link to see full version.

Android: Render OpenGL on top of camera preview

I was searching for that today and thought I could write a short wrap-up of what I ended up with. Particularly helpful was the Android TranslucentGLSurface sample code and a thread in the Android Beginners group.

Keep reading below for the fully commented source code.

Android: Render OpenGL on top of camera preview

Continue Reading →

GWT 1.7.x + Safari 4.0.4 = Crash

I installed the Safari 4.0.4 update yesterday on my OS X 10.5.8 (Leopard) and got GWT 1.7.x crashes ever since then. That’s a pitty since I’m involved in a larger GWT project (featuring GWT Canvas). There’s already a ticket and a simple workaround available but that’s no choice for production environments. So if you have a Google account, please vote for it so it gets resolved soon. Apparently it’s a Webkit bug which will be fixed in Safari 4.0.5.

Update: I could downgrade back to Safari 4.0.3 using Pacifist and the Safari 4.0.3 installation package. I opened the package with Pacifist and chose “Replace” as the option for all files. Trying to apply the package alone won’t help because it detects that a later version was installed, even if you try to remove Safari competely using AppZapper.

Safari’s “About” screen shows version 4.0.3 again, OS X asks me to update to 4.0.4 again and my GWT application is back running. Not sure whether there are any other side effects, though, so handle with care.

Another update: Someone wasn’t as lucky as me and screwed his system with that approach. Better follow this instruction.

Things Have Changed

One of the best things I did last year around this time was writing ELFrun together with Martin. It was great fun and I think we both really enjoyed it. This year, I have even more pretentious projects but I hardly find the time to sit down and work on them. Sometimes I really want to cocoon myself and eliminate any external influences for hours or days. I guess that’s why I love working at night.

I was always working on PCs before and bought my MacBook Pro solely for the purpose of writing an iPhone app. It’s funny how things have changed in the meantime: I bought an HTC Hero, which is an Android phone, meaning I eventually turned away from the iPhone, but I spend most of my time in front of the MacBook Pro and use my PC mainly for playing games. I even consider buying the new 27″ quad-core iMac – if it ever gets a matte screen.

Funny how things have changed.

Unity 2.6 now free

Earlier this year I purchased Unity3D Indie after I evaluated it for a while, along with several assets to do some prototyping for these adventure game ideas I have in my head. I found Unity to be an incredible flexible, easy-to-use and serious toolkit and actually the first “game maker” that ever convinced me that I don’t have to build everything myself.

I don’t have any time to look into it further right now since I’m way too busy with plenty of other jobs and obligations I currently have. But I’ve heard some great news today (at least for those who did not yet purchase Unity): the Indie version is free now! Unity Technologies has released a new version 2.6 and decided to make the Indie version completely freely available. If you’ve ever considered creating a game or if you don’t emphasize on writing all code yourself, Unity may be for you. It’s the most mature game development toolkit I’ve ever seen and if you’ve played around with game makers earlier, you should give it a try, too. Unity is for Mac and Windows and builds web-player (browser plugin) and stand-alone applications.

Screenshot from a Unity scene I'm working on.

If you’re on a Mac…

…it just works!

It just works
(Source)

Android Developer Challenge

Google has announced the second Android Developer Challenge and I’m seriously considering taking part. They have ten different categories with three attractive prizes each and one overall category with three even more attractive prizes. Given the facts that there were only 1788 submissions last year, that I have already gathered some experience in mobile device development and that I do work with several Google APIs for my freelancing job I consider my chances not too bad. Idea, anyone? ;-)

On The Job on sale

If I had known this earlier. Currently, On The Job is on sale for 50% off on mupromo.com. I already mentioned this software in a recent post on software I use. If you’re doing freelance work on your Mac, have a look at that one.

Great Mac Wallpaper

While I’m at it, I could also post a great wallpaper I use on my Mac.

OH FUCK I CAN'T SWIM

Comes with multiple color themes.

Firefox AddOns and OS X Software I use

People seem to like posting their favorite plugins and software these days, so I thought I could add my little list of useful stuff here, too. I’m open to suggestions for other good extensions, of course.

Here’s my list of Firefox AddOns I am using actively:

  • Adblock Plus
  • Firebug
    A powerful debugging aid for web developers. Comes with e.g. a DOM explorer and a JavaScript debugger.
  • Web Developer Toolbar
    A toolbar which offers many useful functions for web developers. In particular, I like outlining of block elements or enabling read-only form fields.
  • FoxyProxy
    Manage proxy configurations and use them depending on URL patterns etc.
  • ImageZoom
    Zoom images with RMB and mouse wheel.
  • Foxmarks
    Synchronizes bookmarks. I found it particularly useful to define synchronization profiles so that I can separate work bookmarks from private stuff.
  • Tabinta
    Ever tried to enter a TAB in textarea controls? Tabinta allows you to use TAB there.
  • Flagfox
    Shows the country flag of the server’s origin in the address bar.
  • Split Browser
    Splits the browser window into multiple areas.
  • Nuke Anything Enhanced
    Allows to remove any DOM object under the mouse. Useful e.g. to get rid of layer ads that Adblock Plus doesn’t catch.

I also found the following OS X software to be useful:

  • On the Job
    I bought this one to do my expense tracking and invoicing when I do freelance work. It can be tested freely for 20 days and I really liked it from the beginning, but I got convinced to buy when it offered me another 10 days trial after the first period was over – wasn’t that nice?
  • Cyberduck
    Great FTP client.
  • TextWrangler
    Powerful text-editor with FTP-support.
  • The Unarchiver
    Unarchiver which supports plenty of file formats. Good replacement for the native ZIP tool which is pretty limited.
  • LabTick
    A little tool which keeps the keyboard light on all the time, independent of the ambient light.
  • Little Snitch
    Firewall which monitors outgoing traffic and keeps programs from “phoning home” if you don’t want them to.
  • ChMox
    Tool to read Windows CHM files.
  • 0xED
    Small and fast hex-editor.

2D Graphics

I was searching for a nice 2D graphics library today, again, because I wanted to piece something together very quickly. My requirements were:

  • Should be available for the Mac so that I could code with my MacBook Pro on my lap. Currently I really prefer this way of coding. Screw dual monitors!
  • Crossplatform would be a plus so that I could continue coding on the PC if need-be.
  • Should have a somewhat modern C++ API, i.e. SDL was out of the question.
  • Should provide basic shape drawing functionality (e.g. circles, lines,…) and font support (TTF or at least bitmap fonts) innately. SDL disqualified again.
  • Either mature enough to be almost bug-free or still under active development.

I came up with something that was described as a “C++ version of SDL” somewhere. I must admit, this didn’t sound very promising to me at first, but when I digged a bit deeper, I became confident that this was what I was searching for.

http://www.sfml-dev.org/

SFML has everything I need plus lots of other cool features. And the best is, it even comes with pre-compiled OSX frameworks and XCode project templates to get you started directly.

The standard main.cpp looks somewhat like that. It’s pretty straightforward and you can jump right in and take care for the more important things:

#include <SFML/Graphics.hpp>

using namespace sf;

int main( int argc, char* argv[] ) {
    RenderWindow app( VideoMode( 640, 480 ), "SFML Graphics" );
    while( app.IsOpened() ) {
        Event event;
        while( app.GetEvent( event ) ) {
            if( event.Type == Event::Closed ) {
                app.Close();
            }
        }

        app.Clear();
        app.Draw( Shape::Circle( 200, 200, 100, Color::Yellow, 10, Color::Blue ) );
        app.Display();
    }

    return EXIT_SUCCESS;
}

The only thing I don’t like so far is the PascalCasing for method names, but hell, you can’t have everything, can you? So I’ll be using SFML for some debug graphics for another project I’m working on, DVW-related.

Some German comments on ELFrun

mattin posted at mac-tv.de and one particular comment gives a quite comprehensive feedback. Also, there’s a pictured review on a Swiss site, apfelkraft.ch.

Oh, and btw., version 1.5 is in the store and we’re working on version 1.6.

Did I mention the ELFrun review on iphonegamenetwork.com?

ELFrun featured on YouTube channel

mattin found ELFrun featured on “Englishtwist’s” Christmas Countdown for December 3rd. If you want to see the whole ELFrun intro video (because you don’t have an iPod/iPhone, of course, otherwise you would indeed buy the game to watch it), have a look at his footage starting at about minute 4 :-)

There’s another video from “ipodtouchlab” who is featuring ELFrun over here with two (simple) levels of gameplay. I’m really wondering whether someone will ever make a movie of the harder ones.