Tag Archives: Android

The Dark Art of Java Programming

To add another string to my bow, I have decided to learn how to write apps for the Android operating system (For those not in the know, there are basically 3 types of smart-phone/tablet: 1) Windows Phone/Tablet (Microsoft), 2) iPhone/iPad (Apple) and 3) Android (made by Google). if your smart-phone is not an iPhone, and is not Windows, it is almost certainly running Android).



The base code for writing programs for Android is called Java. You may have seen Java Updates in the corner of your PC screen. It is a well established computer language, and is used in all manner of ways on web-pages. You may also have seen this chirpy fellow on phones, apps, and elsewhere. He is the mascot/logo for Android. Wherever you see him, you know that you are looking at something for the Android system.

So, back to writing apps. I learnt some basic programming a long time ago, in a language known, appropriately, as BASIC. While it still exists, BASIC is not used very much any more, as languages have evolved, and new, better ways of writing code have been developed alongside new technologies.

Java was originally called Oak, and was developed for Interactive televisions in the early 1990s, but was far ahead of its time. It was renamed in honour of the large amounts of coffee drunk by the development team, and published by Sun Microsystems in 1995. Quickly included into most Web Browsers, Java Applets (small sections of Java code) became very popular for adding interactive features to web pages.
But enough of its history. What of its future? In particular, its future in my hands!

First, I needed a goal. What was my App going to do? I decided upon a Character Reference Sheet for D&D.* To play the game, each player needs to keep track of their Character’s capabilities and skills. Each Character has a Profession, which gives them access to unique abilities (such as a Wizard’s ability to learn Arcane Spells, or a Warrior’s rapidly advancing combat capability). Add in their Power Levels, Hit Points (how many times they can be ‘hit’ in combat before succumbing to their injuries), and several other things that need recording, and it seemed like a reasonable task, that could be built up piece by piece.

Character Sheet App

Character Sheet App

So, I’ve been reading through tutorials, looking over examples, and typing up my own code. After what seems like months of tracking down error messages, figuring why what looks to be correct code produces garbled output (or no output at all!), and generally hammering my head on my keyboard for hours on end, I have produced a simple program that records and displays some of the more important facts and figures needed. I have learnt a lot along the way, including many ways NOT to do things, and as the app grows, I find myself having to rewrite it from scratch, trying to reuse as much code as possible under new structures, as the old code becomes tangled and unwieldy.

I did have a chat over a beer with a friend who knows a lot more about this that I do, and he has pointed me in the right direction in several parts of the program. Hopefully, the next version will be tidy, efficient, and cover most of what is required!

If anyone is interested in a copy of the App, they can contact me at the usual email address: support@thecrystalwizard.co.uk

(Disclaimer: All characters appearing in this work are fictitious. Any resemblance to real persons, living or dead, is purely coincidental. Photos and names blagged unceremoniously from one of the tutorials I found very helpful: )

*Dungeons and Dragons, a tabletop Role Playing game where players take on the roles of Warriors and Wizards to do battle against Evil foes such as Goblins, Orcs and Dragons.

Art In Space!

In Space, no-one can hear you say “Actually, I’m really enjoying this game!”

Star Traders, one of the Trese Brothers‘ games for Android phones/tablets, has been described as “Elite for the New Generation”. Although it lacks the 3D flying-through-space effects that made the Sinclair game a Classic, it does have over 200 planets to visit, with control of them spread between the Three Great Houses and the Three Syndicates, along with some Independent places.

The basics of the game are quite simple – choose a profession (including Merchant, Pirate, Explorer or Military Officer), jump in your ship and zoom around the Quadrant, trading, exploring Wild Zones, fighting other ships, Aliens and Pirates! But soon the intricacy of the game’s design becomes apparent. The Quadrant is not a happy place, and each of the six Factions has their own plan for ruling it. Political Intrigue soon (from Turn 1) colours your choices, as Factions declare Trade Embargoes, Alliances, Spy Battles and even Solar War on each other, but beware, these relationships can change rapidly, leaving your peaceful trade mission suddenly in the heart of hostile territory! Aiding a Faction in its cause can be very profitable, but will make you enemies!

I could go into details of how to play, what tactics work best for each style of play, how to customise your ship, etc, but I think I’ll leave you to explore it yourself!

This is made all the easier with, like all of the Trese games, free versions being available, so that you can try them out before deciding whether to upgrade to the Pro versions. There is also an active Forum, where you can read up on other players’ tips, and ask how to refine your strategy. Even better, the Designers constantly monitor the forums and have opened both  “bug reports” and “Design Suggestions” threads, which they take on board, and reply to swiftly, letting you know how things are progressing. There are constant updates to the Game Engine, which is generally a positive affair, adding new features, extra ships and tweaking the interface.

So, if you like the sound of taking control of your own spaceship, and zooming across the vast expanse of The Quadrant, dodging Patrol Vessels, fighting Aliens and Exploring Wild Zones, ready to land at a safe haven to off-load your ill-gotten gains hard earned cargo, why not give Star Traders a go! You won’t be disappointed!