Monday, October 31, 2016

Dev Blog- Sea Trading Game- Seeds now being produced, demand now prioritized

The main goal of this week was to improve the seed functionality, to ensure that seeds are being produced. I was in fact able to get that functionality to work, and seeds are now being produced! The other goal was to better allocate unused productivity, basically producing goods when nothing is needed. I have the logic in place to do such, and am currently testing it out.

One of the first things that I did was to improve my "secret" developer panel to let me know how many goods were being produced of what variety. I learned a lot from these, including what resources are being produced, and that some of them were not being produced. I also learned that there were lots of idle people, which indicated problems in my system.

Figuring out how to properly prioritize demand was difficult, to say the least. What I ended up doing was thinking about what characteristics would be in an ideal demand prioritization system. Of these, some applied to a specific need, and others applied to maximizing the benefit of the city. I set up a separate priority queue for the latter case, and it's all working out nicely!

This week I need to finish debugging things put in last week, and then I'll be back to adding in lots of goods! I'm planning to add in crop building first, and then I'll be able to start working on other types of goods, including resources and manufactured goods.

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!