Saturday, March 24, 2012

Version 1.3.1 released

I released a minor update (version 1.3.1) today; it has the following changes compared to previous version:

- Added a setting to define the odds, above which attacking unit will always win. This is by default 75%, but you can set it to any value between 70%-100% on 5% intervals. Value of 75% here means that whenever any player (human or AI) attacks with odds equal or better than that, the attack is considered to be so overwhelming that the defender does not have a chance against it. To disable this and get back the behaviour of version 1.3.0 and earlier, just set this to exactly 100% and it's like it used to be.

- Feature request: Settings for screen centering behaviour. You can disable centering on unit selection, and/or centering after unit has moved.

- Bugfix: Fixed a rare OpenGL ES crash when switching between the game and other applications. Occasionally happened while switching back to game after some time had already passed since playing, and Android had killed the graphics context already.

- Bugfix: Fixed a crash that sometimes occurs when last enemy unit was killed and AI then recruits a new unit in a town.

- Bugfix: Long range skirmisher can no longer be hit back when skirmish fails (thanks for the bugreport, this completely eluded me earlier!)

- Several variants of plains hex background textures to give a bit more varied appearance. I'll be tweaking these still a bit, also the forest hexes are going to see some variance in a future version ...

Sunday, March 11, 2012

Version 1.3.0 released

Version 1.3.0 released, with the following bugfixes/improvements/feature requests implemented:

- Added setting to allow/disallow screen dimming
- Added setting to enable/disable a player color marker under units (disabled by default)
- Town names are now displayed always (including when under fog of war)
- Small villages have their own graphics now (seen in Hannibal campaign)
- Rule adjustment: Failed skirmishing has now 50% chance of hurting the skirmisher
- Minor bugfixes for savegame handling (skirmished enemy units don't lose skirmish status prematurely)
- Performance enhancements for Android 2.2 and later (2.1 is unaffected)
- AI performance optimizations (should be now somewhat faster on maps with larger distances between armies)
- Fixed one more rare Force Close issue

Version 1.3.0 is initially available on Google Play (Android Market), with Amazon Appstore version following up in nearby days if/when Amazon QA is passed.

A brief update on the Hannibal campaign

The Hannibal campaign is going to contain the following scenarios:

1. Siege of Saguntum
2. Battle of Rhone crossing
3. Battle of Ticinus
4. Battle of the Trebia
5. Battle of Lake Trasimene
6. Battle of Geronium

These are the main battles (or otherwise particularly noteworthy / interesting events) in Hannibal's advance towards Rome, before the notoriously famous battle of Cannae. Speaking of which ... Cannae itself is a battle for which I'm not yet sure if it will be added to the game; It was such a large event within a small area, that modelling it with the same game mechanics as smaller battles (smaller by order of magnitude) might not result in believable results. I'll try to check if I can do it though, as it would make a great addition to the campaign, as scenario #7 :-)

I'm planning on spending time to finish scenarios 4-6 on the next few weekends, and hopefully have a playtestable campaign available in April (but not promising exact release date though, I'm working on the game on my free time which is a very limited natural resource) ... by the way, if there's someone who'd like to be a playtester for the new scenarios before it hits the market, send me email to poprominfo AT gmail.com.

Meanwhile, I released now version 1.3.0, which is a bugfix and feature request release (the Rhone crossing scenario is also included, by accident. Its not finetuned yet). Details on the new release in the next blog post, which will follow up shortly!

Monday, January 2, 2012

Does the AI cheat?

I noticed that there was a comment on both Android market as well as on Amazon appstore about AI cheating with battle results. I'll try to clear out the confusion about this.

Short explanation: No, AI really does not try to cheat. But apparently, on some devices (quite rare, it seems!) the random number generator in Android does not provide numbers that are random enough, but is occasionally "stuck" with giving out similar numbers over and over again ... A bit like imbalanced dice, which show always the same face up when thrown. This is a software or hardware bug which I can't directly fix. However, I'm making a workaround for these devices, and will upload it as version 1.2.1 when I have done a little smoke test for the release (will be available on Android Market immediately after upload, on Amazon Appstore in about one week as it needs to be approved first).

Long, boring and technical explanation: The battle resolver in the game does not even know or care, which side is controlled by AI and which by human. It is completely separate from AI logic. It just adds attacker and defender strength together, we shall call this number the "total strength" of the battle. Then the battle resolver retrieves the next random number between 0.0 (inclusive) and 1.0 (exclusive) from a random number generator, and multiplies it by the total strength of battle. If the resulting number is less than attacker strength, attacker is declared to be the winner. Now then ... if the random number generator consistently gives out numbers that are closer to 1.0 than 0.0, the battle results start to be skewed, in favor of the defender (being stuck with numbers near 0.0 would favor attacker instead). Now I'm switching away from ordinary "Random" to use the "SecureRandom" random number generator, which should provide randomness good enough to be cryptographically secure, so should be perfectly fine for this purpose also. As additional measure, I also added now code to shuffle that random number around by using the millisecond part from system current time. This has no effect on an already correctly working random number generation, but should provide a bit of "emergency" randomization in the case where even the SecureRandom would by some miracle fail to provide decent enough level of randomness.

If there's anyone who had encountered the "cheating AI" problem and happens to read this, please confirm after updating, if this workaround in v1.2.1 cures it for good, I'd really appreciate it! Just post a comment here or send email to poprominfo AT gmail.com.

Friday, December 23, 2011

A new campaign is in the works

A new set of campaigns is in the works now. While the first campaign was played from Roman perspective, this one is played as the Carthaginian commander Hannibal. Player gets to invade Iberian coast and then advance towards heartlands of Rome, fighting many historically significant battles along the way.

The first scenario from that campaign, "The Arrival", is preliminarily available in both the free and paid versions of the game (version number 1.2.0 - that's already available on Android Market, on Amazon Appstore the updates are pending Amazon approval so it won't be until next week or so).

Highlights of the new campaign: New units will be introduced! First unit, Longbowman, is already available for playing in "The Arrival". It's the first actual long-range unit in the game, having firing range of 2 hexes. Also, a couple of new terrain types are in mind. Village is a bit like a town (you can heal units there, and you get a couple of hexes visibility around the village), but you can't get income or create new units. Marshland is slow for moving and gives a slight defensive penalty.

So, the bottom line, brand new game content is definitely coming up :-) But it's just taking a little while to get it done properly. New units must not mess up the overall gameplay, but to blend in nicely.

Saturday, November 26, 2011

Local Multiplayer added, plus misc fixes made

There is now a Local Multiplayer game mode available. Play the game with your friend, passing the device between players at the end of the turn. Currently first four scenarios have been adjusted to support multiplayer (for two players at the moment, with AI controlling minor factions), rest of the maps are also being converted to multiplayer-capable.

Also this release contains a fix for scenario 6 (Adriatic Coast) which had become extremely difficult to complete. Now scenario 6 can be played with about the same difficulty as other scenarios.

Sunday, November 6, 2011

Please rate the game!

A plea to the people who downloaded the game and played it: Please rate the game on Android Market, it helps in getting the game to be noticed. Thanks in advance!