Sunday, July 31, 2016

Ham Finder 2.2.12 Upgrading to Android Studio and Android 6+

I know recently I've been doing far more game development than Amateur Radio stuff, but I figured this deserved a blog post. I've been working on upgrading a lot of the internal guts to Ham Finder, specifically updating to the latest APIs. What this means is there should be prompts for permissions, for example. It should be more stable, and be overall faster. Here's what it took to do that:

  1. Import in to Android Studio- When I last touched Ham Finder, it was built using Eclipse.
  2. Update all of the API calls to the latest versions, getting from Gradle where possible.
  3. Go through almost every file fixing issues that Android Studio detected. One of the most common issues has to do with preferences, these are now all done asynchronously, so it should be a bit faster. The same goes for maps, it should be somewhat smoother.
  4. Update Spatialite- Spatialite is the core library that allows for the offline county, country, state, dxcc, etc testing. In upgrading the Android build, the old Spatialite stopped working. I was able to resolve this, with quite a bit of work.
  5. I discovered a few minor issues along the way that were resolved.
 This sounds easy enough, but I actually spent quite a bit of time getting all of this to work right. The bottom line is, Ham Finder should run smoother than before. I did keep a list of a few issues I'd like to resolve that I found when working through it, but as you might have noticed, my unnamed Sea Trading Game is taking quite a bit of time. If I see enough interest, I will make some of these updates. In fact, part of the reason why I did this round of updates is because of generous purchasers buying upgrades over the last month. Thanks guys! If I see sales continue to climb, that will be a good sign that there is still interest in this product. That especially holds true if I see some of the more obscure in app purchases being bought, such as the French offline maps.

The new version should be released by August 1st, although it might take another week if I find some critical issue at the last minute. It is currently available for beta testing, which you can opt in to via this link.

Monday, July 25, 2016

Sea Trading Game- Modeling Supply, and a path forward!

This week as in recent weeks has been a week of figuring out some core gaming stuff that doesn't easily translate in to progress, but is really essential to getting the game to work correctly.

The main focus of the week was on creating supplies. Like the demand before it, I set up a series of modifiers that can be added to a good that determine exactly how a supply is managed. The most interesting of these was to require "tools" and "seeds".

A tool is an item that is required that isn't consumed to make a new product. For instance, an ax will make wood production easier than it would be without one.

A "seed" is something that is required to make something else. For instance, you have to plant a bit of food to grow new food. A seed could even be making a resource out of another, using iron to make an ax, for instance.

Of course, most of this modeling will be semi-transparent to the user, but what will be seen is that you will be able to change the world through your trading. There might be a continent that has never seen potatoes, for instance. You bring a load of potatoes, and someone plants them. Then all of the sudden that new continent has potatoes growing there.

Another similar thing to "seeds" is "skills". A skill is required to make something. These skills will be propagated by moving people around. If a continent has never seen black smithing, and a black smith is brought there, then that new skill will begin to be used, and spread throughout the continent slowly.

The effect of all of this will be that you, as a lowly trader, can change the world in profound ways. I'm starting to see this as a real possibility, and excited to see how it all comes together!

The last thing of importance that I did was to get my upcoming path figured out much more smoothly than I have been recently. For the last 3 weeks, my task was "Figure out Supply/Demand". That's it... Now I've broken down what's left into more manageable chunks, which always helps my productivity.

Top of the list is to add a bit more logic to supply management, and then start figuring out how the pricing structure will work from supply/demand. I'm not quite sure how this will work out in the end, but this is a really crucial step to the game, and when it's done, I really think it will feel like a smoother game overall! I expect to have most of this accomplished by mid-August, and from there to start adding more goods and working on balancing the game.

Monday, July 18, 2016

Sea Trading Game- Getting demand just right

This week hasn't had a lot of visible progress, but I have been making good progress on the real heart of the game, the trading goods model.

There are two things in particular that I'm working on modeling, the supply and demand. Together, these will create a price for a good. In theory, the higher the demand, the higher the price, and the higher the supply, the lower the price. Of course, it sounds really simple to put it like that, but there's a lot more behind the scenes to make it all work.

This week in particular I worked on the demand piece. I've added a lot of items that will cause demand variation. Certain things will be in higher demand in certain seasons, for instance, or temperature dependent, or even days of the year (Holidays).

The one thing that's been causing me a bit of grief is demand related to novelties, or even addiction. This was quite important in historical, or even modern, markets, and I'm trying to get something that feels realistic. I've got a reasonable first pass at a model, but I'll no doubt have to refine it several times.

I also dusted off my old unit tests, and found a bunch of bugs. I managed to fix all of them, and my unit tests all pass! Unit tests are helping quite a bit with getting the supply/demand formulas correct.

Going forward, here's my rough plan. This week I plan on getting the supply piece figured out. The supply piece is quite a bit harder than the demand, because each city will have to make it's own decision as to what to work on. I'm not quite sure I'll get it to that stage, which is where I'd like to see it, but it'd be awesome if I did! I'm going to use resources such as the following graph, copied from the Wikipedia Supply and Demand Page.



The next major task is to figure out the pricing based on supply/demand. That is going to be rather difficult, and I expect it to take the better part of a week to figure out. Hopefully I can also figure out how to satisfy demand through other means, either loosing interest in something, or having other people ship it, or even starving due to a lack of supply!

Lastly, I'm going to start adding in goods. Hopefully a lot of goods. At the very least, I'll add something in that will test all of the major functionality.

Once this is done, I have a number of things to polish, like improving the displays, artwork, improving contract processing, etc. Those things will take some time, but I'm starting to see the light at the end of the tunnel.

Last thing, I've decided that I'm going to publish this game under a company known as "Old Ham Media". For now, it links to my sparsely populated Facebook page, but that is also something I plan on working on in the short term future!

Monday, July 11, 2016

Sea Trading Game- Modeling Supply and Demand

This week I don't have any pretty pictures, like I've had in recent weeks, but I do have something that is the real essence of the game coming to life. This week I've been working on modeling Supply and Demand, the very essence of economics, and a critical part of my Sea Trading Game. I haven't figured everything out yet, and some of this I want to be a surprise for when people are actually playing the game, but I will share a bit.

First of all, I now have an increasing supply of goods for a port. I'm now taking away from the supply to fill up the ship, and thus there is a limited amount of goods for a given port. I'm trying to model this in such a way that not all goods will be available, at least at the beginning of the game, in all locations, although the exact details of how this will work out I'm still trying to figure out.

I'm starting to add things that manage demand like temperature, season, and even interest in a particular item, such as artwork.

Bottom line is, it's slow work, but it's starting to come together. There's no pretty picture that I can show of the work in progress, unfortunately. I expect I'm going to be in this situation for at least a couple more weeks, hopefully by the end of the month I'll have something I can show for my work.

On tap for this week specifically is to keep making supply/ demand curves, and likely increasing the number of goods available by a few so that I can start modeling some of the more advanced supply/ demand items that I wish to do. If I somehow get to it, then I want to start adjusting the price based on the supply/ demand at a specific location. 

Monday, July 4, 2016

Sea Trading Game- More biomes, seasons, and several performance bug fixes!

This was a very productive week. At the end of it, things looked like this (Clouds disabled, as they make the GIF much larger):

I'm still working on the exact details, but I'm quite happy with how it has been working out so far. I'll probably tweak things a bit at some point in time, but for now, I'm quite content.

There are two things that I did from this. First of all, I added a moisture model, which seems to work pretty well. I also fixed the pathfinding code to be much faster than previously. I added colors for all of the seasons, and allowed for transition between them as you see. I don't think I particularly need to explain more on that front.



This week I'm going to start working on something a bit less glamorous, but still extremely important. I'm going to figure out how supply/demand will work in the game. I'll likely slow down the progress of seasons somewhat at some point in time. I'm going to start adding more goods, now that I have biomes figured out. It's probably going to take a while to get all of this worked out, so there likely won't be much visible progress for a few weeks, but I'll see what I can do.