Monday, October 24, 2016

Sea Trading Game. Improving sell/buy pricing, producing goods at "factory" locations, and starting to manufacture seeds

This was another week with relatively few easily visible changes, but those changes are quite critical! The changes include manufacturing at "factories", which previously did not work correctly, manufacturing "seeds", which will allow one to make seeds if there is not sufficient raw goods to form an object.

Seed production was the biggest change, and the most complex one. They are required for situations in which a city wants to make cotton clothing of some kind, I will need Cotton. In order to make Cotton, I need to plant it, which will produce "raw cotton", and that "raw cotton" will then be converted to usable cotton, by removing the seeds from the useful fibers. Previous to this week, I could only produce goods that directly satisfied a need, now I am able to produce the materials required to manufacture such goods. I am still not completely done with this, while I have seen it work somewhat, it doesn't work as well as the other good production works. In addition, there is no demand for seeds, which seems to not be realistic. I'm still working out exactly how I'm going to do all of this, stay tuned!

One of the most positive changes was improving how goods are sold. Previously, it was possible to have even valuable goods that aren't in demand at the moment to sell for 0. This isn't realistic at all. I was able to fix the system. Buying a good and selling it in the same port will lose you some money, but not everything you originally invested.

I'm still working through how a lot of things are going to work out. I think I'm going to re-design the ship hold system sooner than later, as it's becoming more of a pain, although I can't promise I will work on that this week. The critical thing I believe is to finish the systems I added this past week, to get them working as expected.

Lastly, I'm starting to think about putting together a promo video. I would be interested in any tips that anyone out there might have. Thanks for all of your support, you guys are awesome!

Monday, October 17, 2016

Sea Trading Game- Improving selection of goods to produce, more goods.

This week was much like the previous week. I continued to refine both the model of growing crops as well as adding more goods, and refining existing goods. I also made use of the regional modifier, as used for minerals.

The first thing that I added was a capability to see what a city was doing. Specifically, I told the game to place an icon on the tile to show what was being produced on that tile. As of right now, I don't actually have any icons drawn, but I am using a simple standard icon to show the difference. This code is very inefficient at the moment, but I'm working on improving it.

Right now the dot is rather small, I'll tweak the size of it when I have actual icons to be used, I recognize that what is seen right now is really small. I'll figure out a way to improve the speed of this as well, but for right now I'm leaving it slow because it helps me in debugging the game.

I started to balance the game a bit as well, to make sure that crops were being developed appropriately. For instance, Gold is now produced only in certain locations, although it can be quite highly available in those locations. There is a generic "food" gathering capability, which will give food for local population, think gathering berries, hunting, etc, and the more generic crop growth, which will give much more food, albeit at less frequent times.

Some crops are currently growing, primarily tobacco. Tobacco is interesting because it is used primarily for recreation, and it is the easiest to produce of the goods that I have for "luxury" usage. I'll no doubt be adding more, but I'm primarily focusing on food crops for now.

Bottom line is, the game is continuing to make slow steady progress. This week I plan on ensuring that goods can be produced that aren't dependent on a tile, such as clothing. I'm going to look at the buying/selling price at a port to make sure it seems reasonable. And lastly, I'm going to start looking at including demand for goods that aren't directly required. For instance, Wool is required to make Clothing, but Wool by itself isn't particularly useful. Right now Wool won't be produced, because it isn't directly required.

Monday, October 10, 2016

Sea Trading Game- Improving farming model, factories, livestock breeding

The name of the game this week was to improve the farming model. Previous to this week, I had a simple model in place, but I hadn't really tested it out much. As I'm now going through the process of adding more goods, I needed to improve this model quite significantly in order to make more sense. Features added included consuming seeds, producing new seeds, working differently for the southern hemisphere vs northern hemisphere, if applicable. I also changed things such that seeds produce goods only when the good is complete. I did a full set of tests to make sure that everything was working as expected, which revealed a number of issues which I was able to resolve.

I also fixed the Tutorial mode, at least to the point of getting it to run, although it still doesn't quite do what I would like. This will still continue to be updated as I get the feature set to where I want it to be, but I'm still not quite there yet.

I started to work on livestock breeding, such that there will be new sheep (The only livestock that I have thus far) will be born. I'm still not quite happy with this system, and it will be one of the first things that I tackle this week, but it is a start at least.

I also added factory system for creating goods. Wool and Cotton clothing was the first thing that can be created through this system. Check out the latest amount of goods!

Lastly, I have made it so there are multiple ways to produce goods, although they aren't currently being used. This could, for instance, allow for collecting food vs planting food.

As with last week, as I added new goods, I was able to identify more issues with the underlying system. As mentioned before, I'm not really happy with the livestock system, I'm going to re-work how that is managed. I also have a few more specific details that I'm considering as far as my goods system is concerned, but it is coming along quite nicely. Lastly, I'm increasingly getting to a point where I need to change how my goods are displayed, with so many goods I probably don't want to actually show everything that I can.

Monday, October 3, 2016

Sea Trading Game- Adding new goods. modeling real-world agriculture.

This week has started something that I've been wanting to get to for a long time, adding new goods! I started to test my various systems, including the use of seeds, tools, and working on modeling livestock. I didn't actually change a lot this week, although what I did change allowed me to see what some of the problems I'm currently faced with, and work to tackling those issues.

I've thought for some time that I wanted to model something like the Columbian Exchange, which was the process that brought goods in from across the globe. Rubber was found in Brazil, tobacco in Mexico, potatoes in the Andes, horses, sheep, and cows in the Western Hemisphere. These, and many more, were moved across the globe, such that now these foods, and animals, are grown across the globe. This week, I started to make progress towards that goal.

I've been focusing on Agriculture for the beginning. Having procedurally generated seeds is proving to be interesting. I know that Civilization has different "Luxury" goods that are randomly placed throughout the globe in regions. I wanted to do something similar to this, and I've got a system that I think has at least started it.

In doing research for this, I've learned a lot of things. First of all, many of the plants that we have are combinations of plants from different locations. Some crops existed in both the Americas and Asia, like cotton. Others only existed in one region, like rubber. I've got a system in place that will set these up at least initially, I'm struggling to make sure it will work for a longer term game, but it's coming along slowly. What my preference would be at this point is to have many goods such that each area has it's own unique type, although how well that will work I'm still determining.

One of the most useful resources has been this data sheet on plant growing seasons and locations in the United States from Cornell University. Every one of these plants will be included. I expect I will also include other plants as well that aren't commonly grown in the United States. I'm still working on how to get this to model fruit growth, which will follow a different system. Seasons will matter in this game, it will dictate the availability and demand of goods!

I did a bit of revision to my biome table. The key difference is that desert is less common than it was before, which is replaced by grasslands. This has a small effect, here's a randomly generated map you can see below. Desert is much rarer than it was previously, although I will likely still do some tweaking to that. I'm using an Arizona State University provided Biome Map as a reference to my game database to determine what grows where.

So far I have several eatable plants, sheep, wool, and cotton that I've started to think in more detail about how they should work. I've also started to work with rubber, although I'm still trying to figure out the usage of that for the time period that I'm working with, it was only really made useful in the 1800s, although it was in some use prior to that time. I think before I move too much more forward I'm going to work on first manufactured goods (Clothing most likely), then think through mining and trees more, and resolve a few issues that have come up as I've started to increase my database of goods more. I'm hoping to have these resolved soon, so I can proceed.

One thing that I thought long and hard about over the week, and I'm starting to get a better idea, is how to make the ship loading and configuration easier to use. I've decided to drastically limit the options of cargo hold types, including some that can only be placed on the top deck of the ship. It's coming along slowly, although I'm probably not going to do a ton of work on that at the moment, I might rename a few of the hold types, and possibly change graphics, accordingly. The main purpose of this change is to allow for the transportation of livestock, which will primarily be done on the top deck of the ship, as was done historically. Large cargo will also only be carried on the top of the ship. Barrels will be the primary cargo contained below decks, which will replace crates.

The crew of the ship also gave me a lot of thought. Right now I have crew as a single person, with a few attributes. I'm thinking that I will actually allow for the entire ship to be staffed, by looking at bios for potential candidates in each port. These sailors will stay for some time, some might only be for a single port, others might stay for a few voyages, and still others might stay for life.

Lastly, I've been thinking of ship based needs. This will include food and water, both for cargo (Livestock and passengers), as well as the crew. There will also be items for use during the voyage, and how that will work I'm not quite sure yet, but likely tar, sails, weapons, etc will be of some use during the voyage. Fishing will be a rare occurrence, although it will be something that can be a task that the crew will attempt, they likely won't get huge hauls (Unless the ship is configured for fishing, which will be a huge set up upgrades I'll get to some day). I'm trying to think of how these will be monitored, and I'm starting to come up with a system, although it will still need some time to come to full fruition.

I do want to add that I'm not sure how much I'm going to follow reality, but I'm going to try to do it as much as I can, because I think modeling reality will in the end make things more interesting. World history is interesting, and I think making a game that mimics the aspect of bringing goods from one part of the world to others is interesting. 

Bottom line is, I didn't actually do a whole lot this week, but what I did was able to help change the direction a bit of the game towards a useful end. I think I found a lot of issues now that will save me a lot of time in the future, and make a more interesting game!

Monday, September 26, 2016

Sea Trading Game- Distributing seeds, goods

One of the biggest things that I've been struggling with is how to distribute the initial set of skills, and seeds. Historically, plants really only existed in a small area of the world, and were distributed from there to other locations. Domesticated animals were fairly easy to transport, and often moved significantly from place to place. Skills often existed in only a few particular locations, although they often could be spread significantly from place to place. How was I to model this?

What I decided to do is to allow for a number of "seed" locations. The seeds will only exist in certain biomes. The seeds are given to certain cities to start with. There are a number of locations that is specified to create each seed. The seed generation is set to have each city have a good chance of having a seed. Skills work in the exact same way.

I'm still trying to decide how to transfer these seeds from place to place. As it stands right now, the seeds will only exist in a single location, although I'm probably going to allow for seeds to spread to nearby cities, although exactly how close I haven't determined yet.

I also worked on speeding the game up, and was able to fix a few long-standing issues to speed the game up. See the results below.

As of right now, I have one last objective to go until I can start populating goods. That objective is to allow for using multiple input files, to spread out the load a bit easier, allowing me to share XML files between configurations.

Once that happens, I can start mass producing goods! I've been playing a free game called Dwarf Fortress recently, and through it been thinking about how I want to have goods actually work. I've long been wanting to have a huge system of potential goods, and I think I have a better idea of how to make it work after playing DF. Still working out a few details, but it is most certainly coming along!

Monday, September 19, 2016

Sea Trading Game- Trust Factor, Upgrade Buildings, Automatic flow of goods, prefer closer cities for missions

This was a week of a whole bunch of little fixes. There are a number of little things that I needed to do in order to start adding more goods. That is the major milestone that I'm working towards at this moment. I was able to finish almost all of them.

Fixes this week include:

1. Transporting people will actually cause a loss of talent and people from the original station, and bring that to the new location.
2. Goods now will flow automatically, albiet rarely, from city to city.
3. Missions now have a preference towards closer cities, not having to go so far out.
4. Automatic good and people transfers will prefer closer voyages as well.
5. There are more types of buildings in a city. These buildings will be mostly hidden, at least initially, although I have hopes to include them in a photo of the city. These buildings will allow for the production of various types of goods in addition to what they currently do.
6. There is a trust factor. If you complete many missions for the same location, then it will tend to trust you with more cargo.

I also did an appraisal to review every time in code that I have listed an item as needing to be done in the future. Many of these I was able to do now due to updates I've made in other locations in the game. I did add an action item list to keep track of all of these things, and moved a few of the higher priority ones to the top of the list!

This week, on my agenda, is to prioritize a bit more my to-do list that I captured this week, to do some speed enhancements by object pooling, and to finish a few upgrades that I need to do to allow for entering goods. If I get all of those changes done, then I will start with the fun stuff, namely adding goods. I'm hoping to include a LOT of types of goods, my goal for this initial pass is maybe 30-40, or even more if I can make it happen.

Lastly, I'm going to leave with a request for some feedback. One of the things that I think is the least clear in the game is the ship dialog. Part of that is the poor graphics, which I've included below. I'm very much in favor of changing just about anything. Please let me know what you think!

Things that I'm looking out for:

1. I would like to have different types of holds.Currently I have hidden compartments, very secure storage, two types of passenger cabins, and a generic hold, plus an area that isn't set up for anything. I'm considering more options.
2. Some goods will prefer certain types of holds.
3. The ship should be configurable.

Right now I have the tile based system seen above, where each section of the hold can be independently configured. I was hoping to someday make the outline of a ship out of this somehow, but I haven't quite figured out what I want to do. I'm curious to see what ideas you have. Thanks!

Monday, September 12, 2016

Sea Trading Game- Improved missions, pathfinding speed, trade goods in the background, and better population distributions

This has been a pretty productive week, and once again I'm starting to really make some good progress. My list of things to do is mostly relatively easy, except for the re-balancing which no doubt will be a long term task, and adding new goods. I even put out a test build to my Google Groups test group, although it has plenty of problems.

One of the first things that I did was to allow one to see more missions in the "Broker" screen. This proved to be relatively difficult, but it is now working as expected.

The next major task was to try and improve the frame rates, in particular when doing pathfinding operations. I did quite a few changes, including many updates to my C# A* I released to Github. All in all, I improved the speed by about 5 times, which reduces the lag considerably in the game!

That being done, the next task was to increase the mission level in a logical fashion. While no doubt I will need some improvements, including letting the user know when they have achieved a new level, levels are now in fact being updated behind the scenes. The effect of this will be to gradually increase the size of the cargo of the missions, which ultimately will allow for making more money. I'm still no doubt going to tweak the system somewhat, but it is coming along nicely!

People and goods now will be  moved around spontaneously. This will keep cities fed even if they can't produce food, for instance. It's still a primitive system, but it is coming along nicely.

Lastly, I improved how people are managed. People moving will actually transfer skills when moving from place to place. Also, the number of people in a given location is more realistic.

For the next week, I'm hoping to do a number of small systems on my plate. The most difficult of these changes will be to allow for goods to be manufactured in buildings, for things that require such buildings. Finally, I'm going to start working on a more realistic set of initial conditions, which should come together nicely. If I manage to get all of that done, I'll start adding goods, which you can suggest for possible credit in the game, especially for unique items!