Friday, March 30, 2012

Dweller 1.16.12

This is a minor release including only two fixes:

#143 Corrupt graphics on Android using large tiles
#145 Increase size of d-pad

Dweller 1.16.11

First of all I'd like to apologize for the problems with GetJar downloads of Dweller for J2ME devices. Even though I have explicitly specified the release to be available for *all* J2ME devices the GetJar service responds with:

"We've got good news and bad news: we've figured out that you have a <insert_phone_model_here> mobile phone, but unfortunately Dweller RPG won't work on that phone"

This is complete rubbish and I do expect a swift answer from GetJar on my support ticket. Please use the Handster download link for now and I'll make a post here once GetJar works as expected.

Now on to the release. This is what's been done so far:

#121 Monsters should not interact with braziers
#126 Merchant should never sell artifacts
#89 Add an option to "use until full health"
#139 Add names to credits
#141 Don't show quickslots all the time on non touch enabled devices

Thursday, March 29, 2012

Dweller 1.16.10 released

I'm happy to finally be able to announce a new release of Dweller. The release has been delayed for quite some time due to me being bogged down in framework and performance issues. I'm happy to say that Dweller is better and faster than ever. Critical/slow portions of the user interface are cached to bitmaps to improve rendering performance significantly. If you happen to come across any weird stuff such as corrupt graphics or delayed updates of UI elements please let me know!

Another major change is some improvement of the quickslots. All of the quickslots are now always visible which makes them so much more useful. You are now also able to use spell books from the quickslots without having to equip them first.

And last but not least I have also added some new spells and added different cast times to spells depending on their power and area of effect.

Download the latest version here.

Full list of changes:

#16 Quickslots always visible
#45 Run a new "Design your map piece" community effort
#70 It should not take any time to switch between spells in quickslots
#59 Large mini map
#80 Spell review
#93 Pathfinding move option in targeting mode gone missing
#97 Adjust healing
#98 Trapped chests always trigger when disarmed
#100 The rat quest description doesn't mention sewer rats
#102 Main menu pushed to upper left corner after changing settings
#103 Possible to "resurrect" dead character on game over screen by accessing inventory
#136 Change "Send Save Game" to "Send Bug Report"
#132 Separate tile and ui scale
#104 Performance review
#135 Add "Disarm" SCT and possibly also status warning of some kind

Friday, March 23, 2012

Where's the release?

These last few days I have received several questions about when I plan to release the next version of Dweller. All I can say is that it has been delayed a little while longer. I am done with the UI changes and I've added a few new spells and given spells variable cast time depending on their potency (e.g. a big damaging area of effect spell will be slower than a single target damage spell).

My focus now is to improve rendering performance and make the game feel snappier than it does today. I've done some performance profiling and I spend way to much time rendering graphics. I am now working on ways to improve rendering speed to increase FPS and make the game feel more responsive. I will release the new version when I'm done with this, but I am at this point unable to give an accurate estimate. We are talking days, not weeks, but that's all I can say for now.

Where's the release?

These last few days I have received several questions about when I plan to release the next version of Dweller. All I can say is that it has been delayed a little while longer. I am done with the UI changes and I've added a few new spells and given spells variable cast time depending on their potency (e.g. a big damaging area of effect spell will be slower than a single target damage spell).

My focus now is to improve rendering performance and make the game feel snappier than it does today. I've done some performance profiling and I spend way to much time rendering graphics. I am now working on ways to improve rendering speed to increase FPS and make the game feel more responsive. I will release the new version when I'm done with this, but I am at this point unable to give an accurate estimate. We are talking days, not weeks, but that's all I can say for now.

Thursday, March 22, 2012


Axon is a curious little neuro science promo-game by where your goal is to grow neurons as long as possible by clicking nearby "protein targets". I really like the look of the branching neuron "tree" and the sound effects when you grow your neuron and how it fits well with the music. I'm not sure if it's a game that I would come back to again in a week or so, but it was a nice experience regardless.

Monday, March 19, 2012

2012 7DRL competition summary

The 7DRL competition of 2012 officially finished yesterday (18th of March). There was a record number of announced roguelikes this year. Here's the full list (let me know if I missed any):

Successful 7DRLs (63)
2149RL by Adam Piskel
AppRogue by vwood
Ascension of the Drillworms by Sebastian Steinhauer
Ascent Into the Depths of Beyond by Jaldhar
AsylumRL by scootah
Beyond the Light (formerly Daybreak) by Joe M
Bone Builder by Goblinz (TE4 mod)
Cave Chop by Martin Read
Cogmind by Josh Ge
Dark Valhalla by Legend
Das Schurke Boot by John Maag
Dead Night Forest Chapter 2: The Lost Caravan by Edwin DeNicholas
Drakefire Chasm by Tanthie
DuneRL by Draconis
Emet by jab
Equal in Death (blood-arbiter) by yufra (TE4 mod)
Escape from the Vault by eggmceye
Fictional Roguelike by Tritax
Fragile Wrath by Konstantin Stupnik
Fuel (formerly Space Miner) by Ido Yehieli
GatewayRL by kipar
Hellmouth by Eronarn
Hope by slashie
HunterRL by Mosenzov
HyperRogue II by Z
I rule, you rule, we all rule old-school Hyrule by Trystan Spangler
Infiniverse by Tapio
JaggedRL by Michael Curran
Jelly by sheep
Kaiju Roguelike by Jason Pickering
Kitchen Masters by Sammage
Life of Sir Pointsalot by Geeze
LinLem's Vague Adventure Roguelike by Mike "LinLem" W
Locks by zurn
Me Against the Mutants by Team Rat King
Mont Asall by OceansDream
Mujahid by pat
Mutant Aliens by srd
Nightfall by numeron
phage by Pawel Kowalczyk (TE4 mod)
Porta Lucis by Chris Whitman
Professional Sword Tester the Roguelike by Oohara Yuuma
Revenge on a Toy Factory by Derrick Creamer
Roadlike by Sos Sowoski
RoboCaptain by heroicfisticuffs
Ruins of Kal Raman by tndwolf
Shadow Rogue by Orkus Malorkus
Smooth Rogue by peous
Steel Knights by psy_womvats
Swamp Monster by Craig Turner
Sword in Hand by Jeff Lait
The Adventurer's Guild by nolithius
The Challenge! by XLambda
The Death of Juga t'Dy (formerly TurnRL) by ivanah
The Well of Enchantments by IBOL
Top Dog by kbmonkey
TrapRL by RedMike
Turambar by Legend of Angband
Waaghammer by corremn
Warden by magikmw
Wyrm by deej
Zaga-33 by Michael "Brog" Brough

Failed (21)
Antigen by John Leffingwell
Chosen by Will Robinson
Cyber Prison Escape by Dominic Millar
DescentRL by Jan Pobrislo
Dungeon of Disease by Lunaritian
Forgerl by Thomas Larsen
Gods of Catan by steev
Great Mystery by George Oliver
InfestoRL by magmacrab
Knighthood by Joshua Sigona
Lakhnauti by Joshua Day
MarioRL by NeedsFoodBadly
MechRL by Kevin Mees
Pit of Hate by Walter Landry
Restless by dock
Roguery by zzajin (will be a 14DRL)
Rogue Rage by Darren Grey
Rogues Wanted by Horse Guy
Star Rogue by Arannis
TLOK2 by Miikka Kilkkilä and Simo Rinne
YASR by korri

Unaccounted for (2)
Backwoods by William Fehling
Bullet Hell RL - Daniel Miller

Tuesday, March 13, 2012

Dilluting the term roguelike

I think the term roguelike has been dilluted these last few years. The roguelike genre is more popular than ever with several commercial roguelikes making a lot of noise in the indie community. In my opinion it is because of this recent success that the term roguelike has become almost like a buzzword and games that would never ever have been considered a roguelike three or four years now proudly claim roguelike heritage.

Take TowerClimb for instance. TowerClimb is marketed as a roguelike platformer and in the announcement on r.g.r.a the developer says "While not a conventional turn based roguelike, it features many things which make roguelikes fun, like permadeath, important decision making, random events etc." and in the Youtube video "A roguelike platformer". In my opinion this is not a roguelike, conventional or otherwise. The game looks fun, but I would have better understood what the game was all about if it was called "a procedural platformer with perma death".

Status update #2

Ok, so I'm finally coming out on the other side of reworking the UI. I have not only rearranged the UI components but I have also separated scaling of the map and the rest of the UI components. You can now play with small tiles and still have large enough UI elements to interact with when using a touch screen. It took longer than I had planned but I think it turned out pretty well.

My plan now is to do some more work on spells and then package a new release, hopefully by the end of the week. I hope to get back to a faster release cycle since I have a ton of stuff in my issue and feature tracker that I'd like to get out to all of the players.

Friday, March 9, 2012

Blowing things out of proportion

I think Visual Studio is blowing things a little bit out of proportion, don't you think? It's not really a natural disaster of catastrophic proportions, it's just some errors in my code, relax...

Windows Phone form validation

I've spent a lot more time than I had expected these last two days trying to figure out the best way to do form validation on Windows Phone. In the app that I'm working on there is a registration flow and at one point the user needs to provide a user name, password and some other information. All of this data need to be validated before sent to the server and if something is missing or incorrect (invalid e-mail address or a password and password confirmation isn't matching) I need to present this to the user.

On Android I would do something like:

  1. Listen to the Register button click or if I want early validation listen to text or focus change (TextWatcher or OnFocusChangeListener) on the fields in question
  2. Validate the input
  3. Call setError(string) on the invalid fields. Doing this: "Sets the right-hand compound drawable of the TextView to the "error" icon and sets an error message that will be displayed in a popup when the TextView has focus. The icon and error message will be reset to null when any key events cause changes to the TextView's text"
This will result in something like this:

Three simple steps and you get everything you need. Easy. Now how is something like this done on Windows Phone? It turns out that there's quite a few more steps involved and many pitfalls on the way...

Windows Phone does support data validation when working with data bindings and the system is pretty powerful, but in my opinion lacking in a key area, namely a way to present validation errors in a standardized way like on Android. So, how does the data validation work? If you look at the documentation referenced by Microsoft's own Eric Fleck you'll see that there's simple data validation in two-way data bindings and additional support using IDataErrorInfo and INotifyDataErrorInfo. There's also an example of how the user feedback might look like:

That looks fine and dandy and just what I needed. My first attempt at achieving this was to use simple data validation by raising an exception in the data bound setter and specifying in my XAML that the field will validate on exceptions:

And in my setter in the ViewModel:

private string _UserName;
public string UserName
throw new Exception("You must enter a valid e-mail address");
_UserName = value;
return _UserName;

This looks like a very nice way of handling form validation and it doesn't really require a lot of work, but the problem is that I did not get the nice little tooltip when I entered an incorrect e-mail address. My first thought was of course that there was something wrong with my binding or that the exception wasn't handled properly. I did however manage to verify that the validation was working by providing an event listener via the BindingValidationError property. If you add an event listener and make sure you have NotifyOnValidationErrors=True you'll trigger the event each time you come across a validation error. 

As a side note: It took me a while to figure out how to add a data binding to the BindingValidationError property (I'm trying to be a good MVVM boy here and leave my code behind as clean as possible) since you cannot bind to events out of the box. You need to use BindEventToCommand from MVVM Light to get this working.

Ok, back to my missing tooltip. I did a great deal of Googling and read numerous blog posts about data validation where examples of data validation with tooltip feedback was used, but the more I read the more unsure I became if this really was supported on Windows Phone and not only present in Silverlight on the web. I finally came across indication that this was the case. Eric Fleck (again) posted (although admittedly one year before the post mentioned above) that "the standard control templates do not act upon the ValidationStates and this is why nothing appears to happen when you set ValidatesOnException to true". Eric continues by saying that "you can override a control template to add ValidationStates", but at this point I'm losing hope of an easy solution using ValidatesOnException and I abandon the whole thing and look at an alternative.

What I end up doing is that I add validation feedback as textblocks below each textbox and by default set their visibility to collapsed (i.e. not visible). I then databind the visibility of the feedback texts to properties such as IsInvalidUserName, IsPasswordsNotMatching and so on in my view model and use a data binding converter to convert from booleans to Visibility (Visible and Collapsed).

One of my biggest take-aways from all of this is that the Windows Phone documentation is lacking in some key areas and that it many times is extremely hard for a new Windows Phone developer to actually know if documentation and examples are valid for WP and not only for Silverlight on the web. The Windows Phone development quickstarts are good and very clear, but they often don't go into enough detail and this is the times when I've found myself in the wrong place reading the wrong documentation.

A final remark: Does tooltips actually work on windows phone? You can set  ToolTipService.ToolTip="Some text" and  ToolTipService.Placement="Right" on any control in your XAML, but I have so far never been able to display one.

Wednesday, March 7, 2012

Status update

I've started adding some new spells to Dweller to make the wizard more interesting to play. I've had to do a bit of ground work on the whole spell/effect code and add some handling of new areas of effect. So far spells have only affected a single target, except for Book of Flames which had a "chaining" behavior where the spell jumped from target to target. I have prepared for other kinds of areas of effect, but not really implemented them, and now that I need some new areas of effect I've had to spend some time coding them.

I've added a new AoE which affects targets adjacent to the caster, up to a certain radius, and added a cyclone spell that knocks back and damages monsters adjacent to the player. Useful if you get swarmed. I've also added a "fire sweep" spell that does fire damage to adjacent targets. Next up will probably be some kind of mass sleep spell that affects monsters in a small area of the casters choice. A "cone of cold" or "dragons breath" spell with a cone shaped area of effect would also be nice, but I haven't written the code to handle that kind of AoE yet.

What I've also worked with since the last release is to make the quick slots more useful. In previous versions they've been to cumbersome to use since you had to long-press the quick slot button to get access to other quick slots than the most recently used. I want the quick slots to be immediately available and usable with a single click. The main problem here is one of screen real estate. There's so much info and interactive elements  that I need to make available to the user at any given time, and it all needs to play nicely on a touch screen.

This is the current state of the UI. This is a work in progress!

Some comments:
  • Character. I'm not sure yet how I want this box to look. It should provide a link to the character screen, but besides that I'm not really sure. Should it show HP and XP as it does in the versions available for download now? Could I get rid of both? I've moved XP down into it's own bar and HP could be put in a small bar above the player character. The problem with HP only as a bar and not a numeric value is that it's pretty important to know if you have 3 or 6 HP left as it will affect your decision making (eg. drink a potion now or finish the fight?) I'd also like to have somewhere to put buffs/debuffs such as Poisoned, Slowed, Flying, but maybe those should be shown as small icons elsewhere?
  • XP Bar. I moved this away from the Character box and down into it's own bar. I'm not sure if I need to show a numeric number here as well. Probably not.
  • Quickslots. A horizontal bar with 10 slots. The bar is scrollable left/right if all slots don't fit on screen.
  • Menu, inventory and targeting mode. I'd like to get rid of as much as possible here. I could possibly also ditch the Menu button and only make that accessible via the phones Menu soft/hardkey or key binding, but I think that might be annoying for the player. Inventory and Targeting/Look is a must and I don't think I can leave these out.

And the same in landscape mode (note that the quickslots share the same horizontal space as the rest of the buttons):

Tuesday, March 6, 2012

Android Market is now Google Play

Today Google announced the launch of Google Play, a revamped Android Market with apps, games, movies, music and books. I think this is a brilliant move and I'm thrilled that Android is my current OS of choice. As for Dweller nothing will change. The old Android Market link will redirect to Google Play, the download links on this site are updated and your current Dweller installation will remain and you are not required to do anything to receive future updates for Dweller.

Windows Phone - Are they mad?

Today I came across my first real Windows Phone WTF moment. I needed to show a long text and that should be a very trivial matter on almost any platform. Is it non-trivial on Windows Phone? No.

Imagine this: No controls (buttons, images, textboxes etc) can have a width or height larger than 2048 pixels. This has to do with the hardware rendering and texture sizes in some way and it completely prevents you from displaying a long text (such as the very verbose "Terms & Conditions" text I needed to show)... how on earth can such a limitation exist on a modern device and platform such as Windows Phone?

So what's the workaround? Well, from what I figured the best way is to split the text into several texts, each less than 2000 pixels high. Luckily there's a class that Alex Yakhin has made available on an MSDN blog. The class comes packaged into a DLL which means that you can't really modify it that much. Another option would be to display the text in a web control, but that is cumbersome if it's local data from a text resource (you need to write it to a file in IsolatedFileStorage first).

In my case neither of the solutions work well. I wanted a page with a title, a long text and a button below the text and all of the page should scroll. Using Alex Yahkin's class the title would not move and neither would the button. The same goes for the web control...

Windows Phone - Bing Maps and Location tracking

Yesterday I set up a quick test of Bing Maps and location tracking (using GPS and/or network)  for Windows Phone. Location tracking is very similar to how it's done on Android:

  1. Get an API key (
  2. Create a GeoWatcher instance (Android equivalent: LocationManager)
  3. Add event listeners for when the position or location status has changed
  4. Start the GeoWatcher instance in it's own thread (Android equivalent:  LocationManager.requestLocationUpdates which does step #3 and #4 in one go)
  5. Receive location updates as GeoCoordinates containing latitude, longitude and optionally altitude, accuracy, speed and course. Latitude and longitude are in the range -180.0 to 180.0 as opposed to the Android micro degrees
And when it comes to the actual map it's not really any different from working with Google Maps either:

  1. Add a Map tag to your XAML and your API key as an attribute
  2. Add optional things like starting zoom level and if zoom controls should be visible or not
  3. As child tags you can add PushPins, Layers and Shapes (to plot routes and areas)
The above can be done programatically of course. I did however decide to go for full use of XAML and databinding to bind the "I'm here" pushpin location to the location I get from the GeoWatcher. Simple and very elegant.

Monday, March 5, 2012

Non-approved Dweller distribution

I have recently come across versions of Dweller on different app and software distribution sites (GetJar and Mobile9 so far). So far it's only been the J2ME version and luckily I haven't found anyone trying to sell Dweller for money yet...

I have never really liked the idea of alternative app stores since it becomes very hard as a developer to get your game out to as many users as possible, and it also adds a lot of overhead when releasing new versions or bug fixes since it has to be uploaded to several sites instead of a single one.

It is important to keep in mind that Dweller is still a work in progress and therefore contains bugs and unfinished features. By distributing Dweller in ways I have not approved prevents me from controlling software updates and bug fixes.