Industrial Revolution Project Diary

So it begins...

9 August 2004

Another year, another uDevGames contest.

The first step completed is the creation of the basic Model - View - Controller framework application. This framework is based on the same process as I used in my FlipSquare, Card Games and Nuclear War games. (A short task for a work time lunch-break).

As this project will end up getting very large and complicated I will be using my Project Tracker application (shameless plug) to keep track of what I've got to do and the bugs that occur. I'll also be using Project Tracker's Diary feature to write up these blog entries as I go so that I do not start to leave things out.

As I hope to use this contest as a proper test for Project Tracker I will have to tidy up a few outstanding issues and release the application before I can fully concentrate on IR.

More ground work

13 August 2004

Just doing some further ground work and setting up of the IR project.

Imported the Button class I created for Nuclear War into the IR project. This button class will allow the easy addition of action buttons to the various screens of the game. This class works well because, as buttons can be defined to be either text or images, it is possible to get a UI up and running without the need to worry about getting bogged down in graphics at such an early stage. Currently the button are hard coded into the source. At some point in the future I may create scripts for generating the buttons, but there is presently no need for it.

Added in the code for handling the current game state used for controlling which screens to draw and how to handle the input.

The following screens are required for the game:

* Intro - introduction screen that appears when game starts
* Title - game title screen
* Credits - the credits screen
* High Score - for displaying previous game record information
* Prefs - preference screen for setting any of the game options
* Opponent Selection - screen for selecting the various computer opponents that you will play against
* Office - the main decision making screen
* Map - the map of Britain showing your product centres, the transport network and the cities and harbours for transporting your products to
* Stats - a screen showing how well you are doing compared to everyone else
* Game over - the screen for when the game ends

This list is just for starters. The modular nature of my code means that is is very easy to add in additional screens.

Created an unimplemented screen for handling cases that have not yet been coded.

Temporary title screen in place with a single Start Game button.

End of lunch and back to the day job :-(

Player Class, Placeholder Screens and Screen Navigation

14 August 2004

Added a Player class. This class represents each of the players / characters in the game.

The Player class has an AI member variable to indicate which AI to use when it is the player's turn. An AI of 0 indicates that it is a human controlled player. This will allow multiple human players to play the game.

The other member variables are name for the name of the player and money for the amount of money that the player currently has.

I also added member methods for handling these variables.

Additional member variables will be added to the class as development progresses.

Added array for storing the players to the game class.
Added methods for handling the players array (adding, retrieving, count).
Added newGame method to the game class for resetting the game. Currently this just creates four new players, one human controlled and the others computer. Generic character names are used.

Added placeholder screens for Office, Stats and Map.

Added navigation buttons between Office, Stats and Map screens.

Added Quit Game button that returns to the title screen.

Factory Class, Screens Take Shape

19 August 2004

After a break from the project due to real world stuff and working on Project Tracker I've finally got a chance to do some further development on Industrial Revolution.

Added the Factory class that represents the production centres that each player owns.

After going through the boring task of creating the basic methods and their definitions for the class member variables I've decided that I'm going to write myself a little wizard application that will do it all for me. However I'm not going to let that distract me for now - a new project to add to Project Tracker for a later date.

Added code to the Stats screen to list all the players and the factories that they own. For development purposes each player is given a single factory by default at the start of the game.

Added the displaying of the money the player has to the office screen.
Added the displaying of the factories owned.
Added a button to allow a factory to be purchased.

Added a Buy Factory screen.
Added ability to select a factory of whatever type is required and buy it if enough money is available.

Added End Turn button to the Office screen for ending the current turn and causing all actions to be carried out.
Added endTurn method to the IRGame class for handling all end of turn processing.

Added End of Turn screen. At some point this will contain a report of the outcomes of the turn that has just ended. As there currently is no End of Turn screen, the default Not Implemented screen appears, but due to the way I've implemented by button system it is possible to add a Continue button without the need for an actual screen.

As a basic test, the player gets money each turn per factory based on the following formula: factory output ratio * workforce. Once the game gets further into development then this will all change, but for now I just want to test the basic mechanics of the game engine.

Added the displaying of workforce, stock and output ratio and size for each factory to the Office Screen.

Added a Turns To Build value to all factories. This means when I new factory is built it takes so many turns before it becomes operational. This will also be used for upgrading factories.

It now costs to run a fully constructed factory each turn depending on the size of the workforce.

Every turn the workforce of a factory increases until the maximum has been reached. For now there is an infinite supply of labour but later on there will be a limit of labour in an area.

End of train journey and nearly end of iBook power so time to stop for now.

Transport - Nearly

22 August 2004

Planned to do some further development work but instead I got distracted by writing my ClassBuilder application that automatically generates the method definitions and code for setting and accessing member variables.

Transport

23 August 2004

With the aid of my new ClassBuilder application, I finally got the Transport class added.

Added array to the Player class for the transport that the player owns.

List of transport owned added to Office screen.

Added Buy Transport button to the Office screen.

Added Transport Buying screen.

At some point I will create generic shopping screen handling code instead of having separate screens.

Added code to allow new Horse & Carts, Trains and Barges to be purchased. At the moment there is no game logic to control what can be bought i.e. you need to invent and own a railway before you can buy a train.

Once more the 9 to 5(.30) stops development :-(

Cities

24 August 2004

Not much added today, but here it is.

Added the City class.

Added the Distance class that contains the distances between a Factory and a City by the various transport systems.

Added an array of Distances to the IRGame class.

Added an array of Cities to the IRGame class.

Office screen now list the distance by road between the factories and the city .

A Very Basic Map

25 August 2004

Time to do some work on displaying the map. For now it is going to be very basic and just consist of the factories and cities and straight lines joining them up to represent the roads. As development continues this will be improved to show the different transport networks between the cities and factories and allow for lines with multiple nodes. However I do not want to take this too far or I'll end up doing the same stuff in my day job as my hobby which is a big bad thing!

In order to display the items on the map I have had to add a location member variable to the Factory and City objects.

For now the factory position is randomly set, but later on it will be based on the region selected when the factory is first built. Also the cities are set to fixed positions in the vertical centre of the screen. Later on the cities will be placed in different locations.

Enhanced Buttons

25 August 2004

In addition to the predefined fixed buttons using my Button class it is necessary to have dynamically defined buttons that all have the same ID but with a custom data field. This means that I can easily add a generic button to each transport listed in the Office screen and assign the actual transport object to the button. As a result of this I've expanded my Button class to allow this generic data driven feature.

This data addition caused a rewrite of the Button class and the way it is handled. I changed the addTrackingRect to send its messages to the Button it tracks. The Button class itself now sends a notification when it has been changed and requires a refresh. As a result of these changes, I've also had to modify the button handling in the IRGameView.

The plus side of these changes is that the Office screen now lists a set of buttons for each item of transport listed. These buttons allow the load for each item of transport to be changed.

Delivery Time!

26 August 2004

Now that I have factories producing units and the ability to load these units on to transport it is time to see about sending the transport off to the bright lights of the city.

Added a name field to the City class. For now the cities are just named 'City 1', 'City 2', etc. but later on these will have real city names. For now I just need to be able to tell the cities apart.

Added a button to each item of transport owned to allow them to be sent off to a city. Clicking the button brings up the new Destination election screen.

Added a destination field to the Transport class. This will point to either a City or a Factory depending the direction of travel.

Added a location field to the Transport class. This will point to either a City or a Factory or nil if it is in transit.

Added a distanceRemaining field to the Transport class. This indicates how much further the transport must travel to reach its destination.

Add method to the IRGame class for returning the distance between a city and a factory.

The end of turn handling now moves any transport with a destination towards its destination depending on its movement rate.

More Progress

26 August 2004

Added a speed setting to the Transport class. This value is now used when moving vehicles towards their destination each turn.

Added name field to the Factory class. For now it just returns the type of factory but at some point it will be possible to give each factory a custom name.

Added selling of stock delivered to a city. If a transport with stock is at a city then it is automatically emptied and money paid for the load.

Added profit and loss fields to the Player class. This is to display the total cash flow for a turn on the End of Turn screen.

Added End of Turn screen that lists money in and money out and the total profit / loss for the turn.

Internal Tweaking

27 August 2004

Modified the main drawing routine to use a selector instead of a switch statement every time. A switch statement is still required to set up the selector on a game state change.

The Return Trip

28 August 2004

Added buttons and code for allowing transport at cities to return to the factory.

Wasted Time

29 August 2004

Now that the basic game mechanics are all working I've turn my attention to the map screen. For now it is still just a vector based system.

I'm very tempted to still use this vector system for the finished game and add abilities to zoom in and out of areas to see the information for the various items on the map. This system is tried and tested and used in many commercial GIS applications. However I suspect the gaming audience will not be impressed with such a system.

Replaced the four temporary cities with the real cities of Manchester, Birmingham, Bristol and London. Using a Photoshop and a map of England from World Book I've located the four cities in realistic positions compared to each other on the game map. The more I think about it I will use actual real world geographic positions of the cities and areas for building the factories on the map as the game progresses. Doing this means that I can actually get the correct routes between factories and cities for a more authentic game.

Wasted too much time messing around with locations of items on the map. Moral of the story is do not waste time on pointless visual stuff until the actual game engine is fully complete!

I've decided that having a separate array of factories for each player is proving impractical. Instead I've replaced it with a single array of factories in the IRGame class and just holding pointers to these factories in each player. This also means that a owner member variable is added to the Factory class so it is easier to associate factories to players.


Note to self: Add pumps and their advancements to the technology tree for use in mines for increased output. Pumps started the Industrial Revolution.

Back on Track (Hopefully!)

30 August 2004

In an effort to get back on track I've decided to do some work in the rules of the game.

Added technology level counters array and handling methods to the player class. Currently there are road, rail and canal technologies. More will follow as I need them.

Added displaying of tech levels to the Office screen. At some future point this information may be moved off into a separate R&D type screen.

At the start of the game each player only has level 1 road technology - a basic horse and cart going along a pot hole filled road.

Changed the Transport Buying screen so that it is only possible to buy transport for which the player has a sufficient technology level for.

New transport purchased now has its current location set to the player's first factory.

Added an Invention screen. This will display the tech levels, list of inventions owned and list of inventors. From here the player will be able to spend money on new research.

Added Invention button to the game screen navigation controls.

Added basic test code to the end turn processing to automatically do some inventing each turn. This will be replaced later on with inventing based on research budgets and inventors employed.

Inventing Stuff

31 August 2004

Added an Invention class. This contains inventions that the player has and how long until they are completed. Another outing for ClassBuilder!

Added invention array to the Player class.

Each player starts with a list of inventions that have yet to be invented. As the turns pass things slowly get invented allowing new transport to be purchased. This method of inventing is just for temporary development testing and will be replaced with something more complex at a later stage.

Modified the end of turn processing code to handle the new Inventions class.

Added an array of text messages to display to the IRGame class. This allows various end of turn events to be displayed as text messages on the End of Turn screen.

More Inventing Stuff

1 September 2004

Added an invented flag to the Invention class.

Added tech level required array to Invention class. This is the minimum tech levels the player requires before they can begin to invent the invention.

Modified end of turn processing so that only inventions that the player has a high enough tech level have their turns until invented counter decreased.

The very basics of the inventing system are now in place! The next stage is to allow the player to set what gets invented and then on to the fun task of building an invention tree.

After a stop for the day job, back to coding on the move. iBooks and trains are a very good mix for developing as there is no internet to cause distractions. I think it would be safe to say that all this travelling for work has definitely helped the development of my uDG 2004 entry.

I've now turned off automatic inventing. Instead a mechanism is now in place for letting the player choose to do some inventing. The player can only select to invent items they have the tech levels for. This is in preparation for adding the code that will make inventing an expensive past time and one that requires inventors.

Inventions Overhaul

5 September 2004

Messed around with some background graphics for the map and end of turn screen. I've used just a simple texture to add some life to the screens.

Removed technology levels information from the office screen.

Added canInvent method to the IRGame class for checking to see if a player has the relevant tech levels to carry out an invention. This moves test code out of the IRGameView class.

Now that the technology checking is working I have replaced the test technology types with the following:

- Construction - required for anything that involves building such as bridges, railways, canals, tunnels or improved factories.
- Steam - allows engines of various kinds to be built
- Pump - allows engines of various kinds to be build
- Art - allows improved quality and designs of finished goods
- Metal - allows working with metal for construction or machinery

Added a method to the IRGame class for returning a technology type as a human readable name. This will be expanded at a later stage to return the relevant icon when graphics are added.

Modified the layout of information on the Invention screen to accommodate the revised technology types. Instead of a list of things to invent being displayed only a single invention is displayed. Buttons have been added to allow the player to scroll through all the inventions on offer.

Added background image to the Inventions screen. This is a temporary image from the Metamorphosis project but it is along the same lines as the one that will be used in the Invention screen.

I've had a rethink about the way technology progresses through the game. My latest idea is that the player has to research each of the technologies to increase their levels and then they can invent specific items when the levels have been reached. Hiring inventors increases the technology levels based on their specialities.

Added a details member variable to the Invention class. This is a text description about the invention.

Added the display of the invention details to the Invention screen.

Added array of research counters indicating turns until research completed to the Player class.

In trying to get the research system working I've discovered a flaw with the dynamic buttons which needs to be resolved before I can continue with game development.

Nearly time for some screenshots but not yet.

Well that is enough development on IR for now. Time to switch and do some work on Chromacell.

Map Interaction

6 September 2004

The Map screen now only shows factories, and transport networks connecting them, that are owned by the player.

Add ability to select a factory on the map. This meant also adding a currentFactory member variable to the IRGameView class so that it could be highlighted on the map.

Added the same for selecting a city on the map.

In order to allow the player to select a specific object on the map when there are multiple items at a point I've decided to add a pop up selection menu. To do this I've added an array of items for selection to the IRGameView class.

If a selected factory or city contains any transport then they are listed in the selection menu to allow the player to select the transport.

Moving Transport Stock

7 September 2004

As development continues I am increasingly thinking of moving a lot of the functionality from the Office screen to the Map screen. This would make things such as selecting the destination for transport much easier for the player.

Details for the currently selected item of transport are now displayed in the top right corner of the map screen.

Added a Move To button to the map screen. Clicking this brings up a list of all the possible destinations for the current item of transport.

Via the new Map screen Move To menu it is now possible to move an item of transport between any connected cities and factories. This marks a major milestone in the game's development as the moving of vehicles around the map is a key part of the game. I would say that it is nearly at the stage of being playable by other people.

For testing purposes the distance between factories and cities has been reduced. I was getting fed up with the time it was taking to test round trips with the slow horse and cart.

Re-enabled the displaying of factories for all the players on the map. This allows the player to send their transport to factories owned by other players. Currently there is no point to this but later on it will add the possibility of buying items from other players and even transporting their goods, at a price, for them.

Moving Functionality

11 September 2004

After a couple of days' development lost to work on Project Tracker, work finally resumes on Industrial Revolution. Today's development sees a lot of the Office screen functionality added to the Map screen.

Added the displaying of details about the currently selected factory to the Map screen.

Added load and unload buttons for the current transport to the Map screen.

Added a End Turn button to the map screen.

Map screen is now default screen at the start of a new turn and game.

Stock produced in the current turn now displayed on the End of Turn screen.

Repositioning of information text and buttons on Map screen.

There is now an actual 'playable' game here. It is possible to produce units at your factory and then transport them to a city for selling. However with the current values for factory overheads and selling price of units it is not possible to make a profit. After a couple of turns it is only possible to break even each turn. Sounds like life really ;-)

Time to think about using more realistic values for the game.

Changed the base running cost of a factory from 10 to 5.

The Long and Winding Road

13 September 2004

Added a node array to the Distance class. This will contain individual stops along the route between locations.

Modified map drawing code so that it uses the nodes of the route.

Added route to the Transport class. This points to the Distance object that the transport is travelling along.

More Roads

14 September 2004

Completed code for displaying travelling transport at the correct node. The code for working out the current node is not the cleanest around but it will do for now. At some later stage I may go back and make things a bit slicker.

Modified Distance class so that it now has a separate node array for road, rail and canal. Modified methods for handling nodes to handle the multiple types. Once again the code for this is not perfect but it functions so it will do for now.

Map now displays rail and canal routes as well as the road routes.

Added some random twists to the road route.

Building Transport Networks

15 September 2004

Added built array to the Distance class. This indicates how much of the connecting route of has been built for each transport type.

Modified map displaying code so it only shows built transport networks.

Added code to the Distance class for building incomplete networks.

Modified the end of turn code so that it automatically carries out construction on any incomplete transport networks and adds a message to be displayed if construction is completed.

Added checking to the end of turn processing to ensure that construction of a type of transport network only takes place if the relevant inventions have been completed. Yet another small, but vital, part of the game engine completed.

Some Graphics and Game Logic

16 September 2004

Created the grass background texture that will be used for the Map screen. The texture requires some tweaking but it will do for now.

Added a completed array to the Distance class for storing if the network for a particular transport type has been fully built.

Destination menu for an item of transport is now only built up of cities that have completed roads running to them.

Added an array of construction flags to the Distance class. This is to indicate whether or not building work is to be carried out on an uncompleted transport network.

Modified Distance build processing to ensure that only routes that have the construction flag set are built.

Changed amount of alpha used when displaying the menus from 0.2 to 0.8 to make the items more visible when the menu is displayed on top of images.

Added an image to the Factory class. This means that the map can now display a little icon to represent a factory instead of the dot currently used. For now there is just one factory graphic, but later on I plan to add different graphics for the different types and sizes of factory.

Added an image to the City class. For now I'm just using the same icon as for the factories as I do not want to go down the route of spending too much time on graphics and missing out the coding.

Added an icon for switching to the Inventions screen.

Added an icon for switching to the Stats screen.

Added an icon for switching to the Office screen - this is a temporary graphic.

Added an icon for switching to the Map screen.

Added icons to represent the various details about a factory. This replaces the text headings that used to appear when a factory was selected.

Source Organisation

20 September 2004

Spent sometime documenting the classes and their relationships using OmniGraffle.

Tutorial (21st Sept)

23 September 2004

Commenced work on the on screen tutorial system to guide the player in their tasks. Once this is completed then it will be possible to actually release a version of Industrial Revolution.

Added a new Task class. Each Task contains a description and a set of target aims.

Added an array of Tasks to the IRGame class. This is used for the in game tutorials. When the target aims of the first task are completed then the next task will become active.

Added currentTask object to the IRGame class to track which is the current task.

Added a drawCurrentTask method to IRGameView for displaying the details about the current task to be carried out.

End of Turn process updated to check to see if any tasks have been completed.

Mobile Development

23 September 2004

The start of a 550 mile journey and lots of development.

Added a method to the Player class for returning the number of items of transport of a given type that the player owns.

The Task class now contains a SEL for specifying the method to be called for checking if the task is complete and the parameters to be passed into the method. A value to check for is also set in the Task class.

Using the various fields of a task it is possible to check for such things as

player has more than 1 horse and cart

or

player has more than 3 trains

or

player has a steam technology level greater than 4


The first training task of buying a horse and cart at the star of the game is now complete.

Added method to IRGame for getting the next task once the current task is completed. The method returns if it was the last task or not. This may be used at a later stage to provide levels to the game.

Task Display

26 September 2004

Did some visual changes to the task display system.

Button Performance

28 September 2004

Improved the performance of the displaying of buttons as their state changes.

Add backing wood effect panel at bottom of Map, Stats, Office, Inventions, End of Turn and Title screen for displaying the icons on.

Added button for going to shop screen. This screen contains all shopping for transport and factories.

Added Shop state.

Added displaying of tool tips for buttons.

Shop

1 October 2004

Added a variable to the IRGameView class for tracking the current shop item being displayed in the Shop screen.

Added the ShopItem class for describing the items that can be purchased from the shop. Each item has a title, a brief description, a cost, the number of turns before it arrives once bought, the tech levels required and also any inventions required.

Add shop items array to the IRGame class.

Added code to the new game code for stocking the shop.

Extending the Shop

3 October 2004

Added selector and parameter member variables to the ShopItem class to allow specific code to be triggered when particular items are purchased.

Added methods to IRGame class for handling purchasing of transport and factories. For now there is no game logic in these methods however later on the ability to select where the new items are placed will be added.

More Shop Work

4 October 2004

Changed the layout of the Shop screen.

Modified the IRGame buyTransport and buyFactory methods so they use the actual item cost instead of a hard coded value.

Added turns to build counter to the Transport class that will work the same way as factory construction.

Added processing of new transport to the end of turn code.

Added end of turn button to all game screens.

Current task now displayed on all game screens.

First Public Release

4 October 2004

Released a version for people to play with.

Rewired Buttons

11 October 2004

Expanded the Button class so that it accepts a selector for specifying the action to be taken when it is clicked. The idea behind this was to make it easier to expand the game and add the possibility for some simple scripting. However, as is usual with development, things did not go so smoothly and I ended up wasting nearly a week's worth of development on this.

I guess the lesson learnt here is to stick with hard coding as it is much quicker to write, test and implement.

Research Budget

11 October 2004

Added a research budget to the Player class. This will control how much research a player can do in a single turn. The research budget gets reset each turn i.e. you use it or lose it.

Research budget added to the Invention screen.

Modified the IRGame research method to check for available research budget and deplete it where necessary.

Invention screen now displays the amount of planned research beside the current level for each technology.

Added a method to the IRGameView class for loading the graphics. This replaces the loading of each graphic every time it is required.

Replaced mouseEntered and mouseExited in Button class with mouseMoved in IRGameView. This has fixed the problem with a button not being selected if the mouse was moved too quickly.

Dragging Images

12 October 2004

Added an image member variable to the Transport class. This image is used to display the transport on the map and in the current transport information location.

Added handling of the mouseDragged event to the IRGameView. Using this the ability to drag the current item of transport to a chosen destination has been added. This replaces the menu driven system for setting the destination.

The current location of transport along a route is now displayed using the transport's image.

Travel Checks

13 October 2004

Add checks to ensure that the destination the current transport is dragged to actually has a direct connection.

Added position on map member variable to the Transport class. This allows easy interaction for drag and drop.

Icon Wheel

14 October 2004

Started work on the icon wheel which appears when more than one object shares the same position at a mouse click point. This will replace the drop down menus.

The icon wheel makes good use of the NSBezierPath class. A path is used to generate the background circle. Next is the slightly clever part. I create a new path that is built up from arcs rotating around the centre of the wheel. The size of each arc is 360 divided by the number of icons in the wheel. Using the NSBezierPath currentPoint method allows the current position for each icon around the wheel to be set so they appear neatly and without me having to work out any equations for calculating the points.

With a radius of 100, 9 icons can be displayed although 8 looks a bit nicer. For now I'll now cap the number of icons but at a later stage I'll allow sub wheels when there are more than 8 icons to be displayed.

Add a line between the original location of a dragged item and its dragged position.

Repositioned the factory and city icons so they are centred at their location.

Released Beta 002

14 October 2004

Released Beta 002 to the public.

Upgraded Xcode to 1.5

15 October 2004

Bug Fixing and Requested Features and Construction

15 October 2004

Fixed Icon Wheel Icons Rotation bug.

Added a highlight circle behind factries and cities when mouse moves over them while in drag mode.

Added a generic icon wheel item class. This will allow actions to be placed in the wheel as well as objects.

First pass code implemented to allow the building of a railway from the factory to the current city.


More Construction

15 October 2004

Building a railway is now initiated by dragging the build railway icon from the icon wheel of a factory to the target city.

Added icon for railway building.

Added icon for horse and cart. Depending on time this may stay as the final graphic.

Added icon for train. Currently it is just a piece of railway track but it will be replaced later with a train.

A train can only be sent to a city if there is a complete railway.

Increased distance to London from 5 to 10.

Added price member variable to the City class. This allows different prices to be paid per unit different cities. For now the standard price paid is 10 except for London where 20 is paid. The price paid is displayed in brackets after the city's name on the map.

Load for each transport is now displayed in the icon wheel.

End of Turn button now in same location as Continue button.

Released Beta 003

15 October 2004

Canal Construction and Graphs

17 October 2004

Modified the Action class so that it calls a IRGame class method when selected. This allows a Build Canal button to be easily added to the icon wheel and means that canals can also be built using the same code as railway construction.

Added a Stats class (another outing for my ClassBuilder tool) that records the money in, money out and total money at the end of each turn. This class will be expanded to record other information as I see fit.

Added Stats array to the Player class for recording the profit and loss and money each turn.

Added basic displaying of total money, money in and money out over time to the Stats screen.

Improved Graphs

18 October 2004

Added automatic scaling to the graphs so there is something more to look at when the values are small in the early stages of the game.

Completed Graphs and Transport Changes

19 October 2004

Completed the graphs for money in / out and total money.

Trains and Barges now have a capacity of 20 compared to a Cart's capacity of 10.

Added a draggable flag to icon wheel actions.

Added load and unload transport options to the icon wheel.

Removed load and unload buttons from main map screen.

Graph Scaling

21 October 2004

The money graphs now scale along the horizontal axis.

Status screen now displays the current game turn.

Loading of transport now automatically loads as much as possible into the transport. Unloading still works a unit at a time.

Moved the code for building the icon wheel out into its own method in the IRGameView class.

Selecting an item of transport in the icon wheel causes the wheel to be rebuilt using the selected item as the current transport. This means it is now possible to select a factory, select an item of transport, load it and then set the destination all from the same icon wheel session.

Loading Icons

22 October 2004

Created icons for load and unload.

Constructing Transport

24 October 2004

Transport that has been purchased but is still being constructed can no longer be interacted with on the icon wheel. The number of turns remaining until the transport is ready for use is displayed when the mouse moves over the transport on the icon wheel.

Unselected icons in the icon wheel are now faded out. This gives a clear indication of the current item.

The radius of the icon wheel now varies depending on the number of items to be displayed.

Distance to Bristol from the factory changed from 5 to 7.
Price paid per unit at Bristol changed from 10 to 15.

The player no longer starts the game with a horse and cart.

Added game tasks for getting a barge up and running.

Released Beta 004

24 October 2004

Uploaded beta 004.

Construction Costs and Help System

24 October 2004

Building of railways and canals now costs per turn and construction halts if there is insufficient funds.

Added next and previous icons.

Added icon for inventing in the Invention screen.

Added icon for buying in the Shop screen.

Added standard button for switching to a Help screen.

Added new Help game state.

Added the Help class that contains in game help.

Added an array of Help objects to the IRGame class.

Added Help topics for Loading Transport, Moving Transport, Building Canals and Building Railways.

Released Beta 005

24 October 2004

New Technology

25 October 2004

Added the Loom invention. This will allow improved Cotton Mill production output.

Added a method to the IRGame class that allows a factory to be upgraded.

Added an action that allows a factory to upgrade. Factories that are undergoing an upgrade do not produce any output.

Factory construction now costs 100 per turn. If there is insufficient funds then construction is halted.

End of turn screen now lists any invention and construction work in progress.

Added help topics for Upgrading a Factory and for what the Factory details icons mean.

Newspaper

26 October 2004

Inventing into an invention can now only start if all the required technology is known. Previously it could be selected and would always be listed as being worked on even when no tech was known. Technically this was correct but found to be confusing.

Added a newspaper look and feel to the end of turn screen.

Added check to ensure that draggable icon wheel items are not triggered on a single click. This prevents accidental building of transport networks to cities.

Added stock produced to the Stats class. This allows the stock for the turn to be displayed on the end of turn summary screen and possibly in a graph at some point.

Current money now displayed on map screen.

Added ability to select a vehicle in transit to see its details.

Released Beta 007

27 October 2004

Actually released on 26th Oct.

Disaster Strikes!

27 October 2004

Added in random disaster during construction of new transport networks.

At present the only result of a disaster is an item in the Industrial Revolution News and building does not advance for a turn which means more money to reach the destination. Once construction workers have been added to the game then they may be killed in the disaster. However in the eyes of some Victorian factory owners then loss of money is a greater hardship than the loss of life. If I do get this fully implemented then Industrial Revolution could end up being the game with the highest human death count and there is not even a rocket launcher in sight!

The factory information icons are now only shown if a factory is selected.

Current factory details are now displayed in a framed box. The code for display the details allows the box to be positioned anywhere on the screen. This means that I have it as a floating window that can be moved around the screen. On the other hand I may tie it in to the main button interface at the foot of the screen.

Current transport details are now displayed in a framed box similar to the factory detail.

Current city details are now displayed in a framed box similar to the factory details.

Repositioned the cities and factory on the map.

Repositioned the current task window.

Tweaked appearance of the icon wheel.

Added place holder details window for worker details.

Upgrading a factory doubles its maximum stock capacity by.

The maximum size of a factory is now 5 instead of 10.

Released Beta 008

28 October 2004

Released 008

Updated Transport Details

28 October 2004

The details displayed for the current transport have been modified. Destination and journey distance remaining are now only displayed if a destination has been set. Location details are only displayed when the transport is not in transit. There is now also a turn ETA.

The transport icon is now no longer displayed on the map if it has been set a destination and yet to leave the city or factory.

Added a from member to the Transport class. This allows transport to automatically set off on a return journey once they have reached their destination. Transport that arrives back at the factory gets reloaded before returning to the city.

Currently the automatic movement of transport is not very intelligent. The transport just leaves the factory even if it is not fully loaded.

Upgraded factories now have their worker capacity doubled.

Add factory with size 0 as a place holder for new factories to be built.

Purchased transport is now placed at the current factory.

Expanding the Map

29 October 2004

Repositioned the cities.

Added additional empty factory spaces. These factories are of size 0. Factories with size 0 have no fixed type. Selecting the will provide the option to build any of the four kinds of factories at the site.

Added flag to the Transport class to specify whether or not the transport automatically carries out its route.

Added option to the icon wheel to allow selected transport to have auto return turned on or off. By default auto return is off. I may add some global option for making all new transport auto return by default or not.

Added a method to the IRGame class for turning auto return on or off for current transport.

Clicking on an en-route item of transport now brings up the icon wheel. This allows auto return to be turn on or off.

Building New Factories and Training Scripts

30 October 2004

Added a buildFactory method to the IRGame class. This turns a 0 size empty factory space into a factory of size 1 of a given type.

A factory with 0 size is now displayed as a Vacant Site. On this site it is possible to select the type of factory you wish to build.

The game now starts with factory sites instead of any factories. The first thing the player needs to do is choose a site and build a factory.

Set the first task to Build a Cotton Mill.

Added a method to the Player class for counting the amount of each factory type owned. This should really be a method the IRGame class but it would complicate somethings and complications at this late stage are not welcome.

Added icons for turning transport auto return on and off.

From the title screen it is now possible to choose to play either the Training Game which has the training tasks or just play a normal game.

Modified the IRGame newGame method so that it now takes a flag for having tasks or not.

Due to the desire to actually get the game working I have not done that much defensive coding. Having no tasks in the normal game mode has shown some areas which need some checks added.

The code for setting up the tasks has been moved from the newGame method into its own method. This makes the source a bit more readable. It will also allow the additional of different sets of tasks at a later stage.

After close to 5 hours of work I've managed to get a basic scripting system in place for the training tasks. I'm still not sure if all the hassle and time was worth it.

Modified the Player transport count code to only count fully built transport items. This means transport owning tasks are now only completed when the transport is complete and not first purchased.

The Fiddly Bits

30 October 2004

Working on those little fiddly bits that have to be done but seem to take forever.

The Player invented checks now only return a positive if the inventing has been completed and not just started.

Added an invention field to the Transport class for stating the invention required before the transport can be purchased. This prevents trains and barges being bought without the required knowledge.

Modified the buyTransport method to use the new Transport invention required checks.

Closing the Shop

31 October 2004

Did the title screen sketch. This has still to be scanned for the computer.

Removed the shop screen.

Purchasing of transport is now done via the icon wheel when a factory is selected. This makes setting the factory the transport is for easier for the player as they do not need to select a factory and then go to another screen.

Added barge icon.

Added icons for buying horse and cart, train and barge.

Added icons for building factory and building canal.

Removed access to the Shop screen.

Previously transport items were checked for being at the mouse click location before factories and cities. This meant that if an auto returning item of transport was at a factory then the icon wheel for the transport would be displayed instead of the factory and transport. The order has now been changed to check for factories then cities then transport.

Added the ability to check for new version of the game via a Industrial Revolution -> Check for Updates menu option.

Moved the Training Tasks task.dat file into the Resouces bundle due to problems locating the data file when the application was moved into a different location.

Released Beta 009

31 October 2004

Released Beta 009

First version packaged in a folder with readme and uDevGames readme.

Icon Wheel Tweaking

1 November 2004

Added a member variable to the IRGameView class to track the object that the icon wheel is for. This allows the icon wheel to be generated when an item is selected, i.e. turning auto return on rebuilds the wheel to display auto return off.

Fixed the bug where boolean task end states were not being processed correctly. This was done by storing the Task value and result value in local BOOLs and then checking the BOOLs. After some testing it appears that this still has not solved the problem. This is the only real show stopping bug in the game. If all else fails then the training tasks will be changed to fit around this problem.

Modified the layout of the Office screen. I was considering removing this screen but decided to leave it in as a summary of a player's assets. Added background image.

Modified the layout of the Stats screen. Removed the list of factories owned and the player name from the screen. Added background image.

Repositioned buttons on Title screen.

Added place holder buttons to the Title screen for Voting and Credits.

Added uDG mascot to the Title screen.

Added vote method to the IRGame class for launching official uDevGames voting page when Voting button pressed. However without knowing what the URL this just links to the site for now.

Scanned in title screen sketch. This replaces the temporary Metamorphosis image that has been used up until now.

Added a Credits screen.

Added Quit and Help icons.

Tooltip background is now only the size of the text instead of a fixed length.

Added application icon.

Released Beta 010

1 November 2004

Turns out that the uploaded version of this was Development and not Deployment.

Quick Start and More Disasters

2 November 2004

Added a quick start game mode where the player starts with a factory and some transport. This has been added to save time while testing new development features. However there is the side effect of offering a quicker way into the game for the player.

Added more disasters, this time for transport on the move. Transport involved in a disaster can either lose its cargo or the transport itself can be lost. Also the transport may be attacked by Luddietes and require repairs that take 2 turns.

Added a method to the Player class for removing transport.

Made further cosmetic changes to the Office and Invention screens such as adding the Industrial Revolution logo.

Released Beta 011

2 November 2004

More Cosmetic Changes

3 November 2004

Continued the cosmetic changes to various screens started prior to the release of 011.

Changed some of the transport capacity.

Barge was 20, now 30 (barges could take 3 times as much as cart in history times)
Train was 30, now 60.

Added some new inventions:

* steam engine
* pump

Added an array of inventions to the Invention class and code to handle them. These inventions are the inventions required to invent the invention.

Invention screen now also lists required inventions for an invention.

Modified the canPlayer:invent method to check that the required inventions have been invented.

Set basic invention tree using new invention requirements code.

Invention Overhaul

4 November 2004

I've had a rethink on the way that the invention process is handled.

The revised system works as follows.

The technology levels have been replaced with technology points. These points are increased in the same way as the technology levels were by carrying out research.

Each invention now requires a certain number of points in different technologies before invention can be commenced.

When the invention is commenced the technology points are decreased. Basically this means you are buying an invention with technology points that you have to then restock.

It is now no longer possible to buy a barge or a train for a factory if there is no canal or railway leaving the factory. The transport can be bought even if just the first section of the connecting network has been built.

Started work on the manual.

More Invention Stuff and graphics update

4 November 2004

Moved the code for setting up the invention tree out of newGame method and into its own method.

Created buttons for all the title screen options.

Removed the credits screen and moved details on to the title screen.

Modified button code so the tool tips are only displayed for graphic buttons.

More Tweaks

5 November 2004

Added a cost member variable to the Transport class. This fixes a problem where buying transport was using a ShopItem cost instead of the actual transport cost.

The option to buy transport is now only present if the player has enough money available.

Modified the text block display code so that a fudged text height is returned.

Modified end of turn code so that all of the inventions get their name displayed when completed instead of just Rail, Loom and Canal.

Completed final buttons for End of Turn, Continue, Help and Exit Game.

Removed items from the menus that are not required.

Released Beta 013

5 November 2004

Added simple sound

7 November 2004

Added a click sound for when a button or icon is selected.

Completed User Guide and Quick Start Guide.

Changed the chance of a disaster happening from 1 in 10 to 1 in 50.

Changed the max money value used in the stats screen to 10000 to make it look more pleasing.

Added Music

8 November 2004

Add music track from Gordon.
Added Quicktime control for playing the music.
Added application menu item to turn music on and off.

Released 1

9 November 2004

Uploaded version with music, User Guide and Quick Start Guide.

Evolution of Revolution

30 November 2004

Voter feedback from the uDevGames 2004 version of Industrial Revolution was mostly positive.

Time to get on with rebuilding and finishing the game.

First thing to do is remove the music to restore game performance. Music will be restored at some future date.

Removed uDG logo, voting and other uDG references from the game.

Message appears on title screen if there is a newer version of the game available.

Added nextPlayer method to the IRGame class for switching to different player at end of turn.

Added currentPlayerIndex for handling nextPlayer code.

Current player displayed in the money area on the map screen.

The game engine kind of works out of the box with additional players. However there is the flaw where it is possible to load up and carry off stock from another player's factory!

Modified Statistics screen so that the financial history of all the players are shown on the graph.

Making Sense of it All

1 December 2004

Well after not looking at the code for only a month I'm having problems finding where some of the stuff is!

Moved the factory site generation code from out of the Player set up code. This was causing multiple factory sites to appear at the same location.

Icon wheel is not populated with factory options if another player's factory is selected.

Added test AI button and code to the Map Screen. This is to allow the computer to do an action.

Modified the Player factoryCountOfType method to allow the inclusion of under construction buildings to be included.

Basic AI code checks to see if a Cotton Mill is owned and if not attempts to build one.
Next it checks if any horse & carts are owned and if not buys one.
Next it sends horse & cart to city on auto return.
Copyright © 2005 Andrew Sage