Developer's blog

Delicious software picks, pt. 2

Tom, April 06 2008
ClipX - clipboard history manager. How many times did I press Ctrl-C just to realize I have overwritten something important in the clipboard? A whole paragraph of text that I just cut from a file that's already saved and closed, an important screenshot captured with PrintScreen or a randomly typed password I just used to register some online service. Oh, the pain!

With ClipX, I press Ctrl-Shift-V instead of Ctrl-V and a list of clipboard items pops up, newest to oldest. I can copy several items at a time, then switch to another application once and paste them all - this saves me a lot of switching back and forth between the two apps.

Once you get used to it the fact that it is not a default part of any major operating system will seem silly to you.


Code. I've been working, you see. ClipX - bluemars.org/clipx/

glView - OpenGL Extensions Viewer - no surprises there, it reports the OpenGL extensions of your videocard. In addition to that it has a database of all different kinds of videocards, so you can look up and compare texture size limits, bit depths, shader support, whatever. People are free to submit their cards' parameters to the online database so it is always up to date. The UI is very clean and nice.


glView - OpenGL Extensions Viewer - www.realtech-vr.com/glview…

Delicious software picks

Tom, April 03 2008
IcoFX - finally a good and free icon editor. Very similar to Axialis IconWorkshop, except that it's free and it has less bloated user interface. Can import PNG files with transparency and supports the Vista compressed icon format. All in all, everything about this program seems just right.


IcoFX - icofx.ro

Launchy - even with Vista, this is still the quickest way to launch programs. Instant search on a hotkey. What makes it superior to the default Start menu search is the way the searching works - you don't have to type PHOTOSH to get rid of "Adobe Stock Photos" that pops up when you only type PHOTOS. You want Photoshop, of course! Everybody does. And the bloody Start menu search never learns!! Well Launchy does learn from your previous choices and it also understands that you want Photoshop when you type PS or Dreamweaver when you type DW - even though the letters don't match exactly. Lovely and, again, free.


Launchy - www.launchy.net

TrueCrypt - nah, I'm not paranoid but storing a list of passwords in a plain textfile on a laptop is pushing it a bit, don't you think? With TrueCrypt I don't have to put up with any password keeper nonsense and keep the textfile and throw in some SSH private key files too - all stored on an encrypted filesystem that can either be a regular partition of a physical drive or a "loopback" filesystem that is stored as a file in the regular filesystem. If you really are paranoid TrueCrypt can even encrypt the boot drive and offers a wide choice of password combinations, various encryption algorithms and key files - why not use your favorite MP3 file as a key to all your data?


My PayPal password, right there. TrueCrypt - www.truecrypt.org

Eclipse 3.4M6 just released

Tom, March 31 2008
Another development milestone of the Eclipse IDE has been just released and as always it is full of great new features.



Every time I go through their "New and Noteworthy" list it makes me smile. Maybe it's sort of a fetish thing, but that's alright, I have plenty of others.

Good to see that the package management has finally received an overhaul; the newly added "dropins" folder is a brilliant idea. No huge surprise on the Java editing front but it's all getting better bit by bit.

New and Noteworthy: download.eclipse.org/eclip…

Downloads: download.eclipse.org/eclip…

Hosting recommendation: PowerVPS

Tom, March 28 2008
The Catnap Games website has had some bad trouble with the previous web hosting provider, PIPNI. That's a Czech company that offers very cheap shared web hosting with enticing parameters. Lots of disk space and bandwidth and a decent administration interface. But the truth is that PIPNI sucks.

Shared web hosting was a bad choice in general and with those suckers it really turned sour. PIPNI were overbooking like crazy, having frequent unexpected outages and provided essentially no support at all. PIPNI is a prime example of how web hosting is not supposed to be done. Stay away from them.

After an extensive search for an alternative I chose PowerVPS. They had decent prices and I read only praise about their support. So I ordered a rather basic VPS package for $45/month and it is more than enough for Catnap Games right now. I even added some more domains with my friends' websites into it so I can redeem part of the costs. The VPS has been working without a hiccup since the beginning.

I assume their support is outsourced to various people around the world, because sometimes it takes two tries to explain a more complex question. But that's OK! It may seem weird but it works. I always get a satisfying answer in matter of minutes.

Since I didn't think it was necessary to run my own mail server I turned it off and switched to Google Apps. A quick registration, couple of MX records changed in my DNS and I was up and running. Google now takes care of mail delivery and spam filtering for my domain for free and I get to keep the @catnapgames.com in the addresses and use the fabulous GMail interface to read mail. Sweet.

www.powervps.com
www.google.com/a/

Instant GUI editor

Tom, March 25 2008
My experiments with SWT have been pretty much fruitless. Initially I wanted to use SWT for all content editing tools - the level editors, sprite editors and possibly more interactive tools if things went well.

I did manage to get a LWJGL game up and running inside a SWT window and make it handle input and rendering without major problems but I realised that building a fully fledged level editor using SWT would be a very time consuming task. Not a time saver at all!


SWT with a LWJGL view inside.

I needed something more agile. So I turned my attention back to the basics. I was already using the principles of the Immediate mode GUI, as described in the infamous Molly Rocket video (mollyrocket.com/forums/vie…), so I decided to work further in that direction. The code was pretty rough, since it had been used only for very basic UI elements so far.

The most time consuming task had always been arranging various buttons, inputs, frames and other widgets on the screen. An endless cycle of adjusting values in Java code and restarting the game to see the results. Edit, restart, edit, restart. Very boring!

The first thing I did was to add code that used roughly estimated hard-coded values as defaults and saved them into a text file at the same time. Next time it would load these values from the file and ignore the defaults. That's a pretty pointless change by itself since it just moves the hard-coded values from Java code into the text file. But wait.

The second thing I did was to add a global keyboard shortcut that activated the new "layout editing mode". This mode disables the default behaviour of all widgets and turns them into dumb draggable rectangles. Mouse dragging moves, shift-drag changes the dimensions and another hotkey saves the layout back into the file.

Here's a chunk of pseudo-code to show what happens. First the default behaviour:



And this happens when the editing mode is enabled:



And that's pretty much it. The real code is about 300 lines, including support for unlimited undo/redo. I can now adjust any part of the UI directly inside the game, with instant feedback. Even if it's an custom animated bobbing button above a game character's head - as long as it uses the Button.process() routine to register mouse clicks, I can press F4 and edit it in realtime, while the game is still running. Neat, isn't it?
« Older Newer »
Games
Devastro
Titan Attacks
Chocolate Castle
Shop
Buy Devastro
Buy more games
Newsletter
Subscribe
Unsubscribe
Blog
Latest posts
Browse all posts
Subscribe to feed
Contact
Contact us
Feedback form
Game name generator