11 April 1998
- The Population display is now a button; clicking on it cycles through Population, Jobs, and Food Production.
- The speed display is also a button; clicking on it cycles through Ticks/Sec., Frames/Sec., and Pixels/Sec. Ticks are a measure of internal simulation speed (water flow, blob movement, and so on). Frames are a measure of how often the window is being updated. Pixels measure how much of the window is being updated.
- Fixed mouse movement code so that if a button is highlighted and you move outside the window, it catches it and unhighlights the button. (This may not work in OS/2 Warp 3 without FP 17 or higher.)
- I still plan to change the user interface more, but I need to write some more code first.
10 April 1998
- Changed the location of information (population display, silver, and so on.) to work better when the window is smaller. There is now a bar at the top of the map window that shows silver and population. This allows the left information panel to be smaller, and information won’t be cut off if the window is at the default size.
- Moved the Tool help from just above the world map to the status bar; moved the date to just below “BlobCity” on the information panel.
- The current (game) year is now displayed along with the date.
- Experimented with putting the horizontal scrollbar at the top; it’s just too weird.
9 April 1998
- Removed the help in BlobCity, because it was leading to system instability.
22 March 1998
- Added a small amount of help to BlobCity.
21 March 1998
- Implemented a very basic prototype of The Silver Kingdoms economics.
20 March 1998
- Worked on a design of basic economic formulas for The Silver Kingdoms.
16 March 1998
- Fixed a bug with mouse movement outside the window resulting in the cursor appearing in the lower left corner.
- (Internal) Fixed a potential bug that could result if altitudes got out of range.
8 March 1998I tried upgrading my machine from a Pentium/133 to Pentium/200 but there have been some problems with instability, so I haven’t worked on SimBlob lately.
4 March 1998
- Changed the flow through gates to one foot of water per tick.
3 March 1998
- SimBlob now installs two-color mouse pointers for use in the map window. Two color pointers usually reduce or eliminate pointer flicker. The mouse pointer may change depending on the tool being used.
- The scale of the map has been changed. The highest mountains are now 750 feet higher than the lowest valleys. Walls are 120 feet high. Trenches are 50 feet deep. The terrain is simulated down to the nearest six feet, but water is simulated down to the nearest inch. It is possible that I will change terrain simulation to work down to the nearest foot.
2 March 1998
- (Internal) Fixed bugs in the selection tool.
1 March 1998
- Added a new tool, called the Select Tool. This tool allows you to point to an object on the screen and find out what it is. Later, it will allow you to click on an object to learn about its details.
27 February 1998
- Reduced the executable size significantly by moving some data to external files and moving other data from compile time initialization to run time initialization. Two weeks ago the executable was 400k, and now it is 220k.
26 February 1998
- Increased the water flow rate to make water flow look better.
22 February 1998
- (Internal) Created a train object that can move around.
21 February 1998
- Worked out train physics for acceleration, deceleration, movement on hills, and so on.
- Worked out train display formulas.
20 February 1998
- Added train graphics, for future use by a train/transport moving around the map.
15 February 1998
- Improved map creation.
- Removed the splash screen bitmap, since it was taking up 25% of the ZIP file and 40% of the EXE file.
- (Internal) Fixed a bug with dragging the mouse to draw something.
24 January 1998
- Improved path-finding so that blobs who need to walk a long distance can search part of the path, walk that part, and then search the rest of the path.
- Greatly improved the path-finder speed when the Path setting is “Fast”.
- To learn more about economics for The Silver Kingdoms, I have been reading many books about both economics and biology, including books by Rothschild, Gould, and Kauffman. With each book I was excited with the ideas at first, but I came away with nothing really compelling. I am now reading some papers by Paul Krugman, who criticizes the authors I was reading previously for having too many ideas and not enough substance. Krugman, unlike the other authors, seems convincing, although each of the other authors seemed convincing at first. (I have the feeling that he is different, though.) In a month or so, I hope to have a good economic model for The Silver Kingdoms. I also plan to read about geography and history of cities to get more background material for the game. Krugman has done some work on combining economics and geography, and I hope that will be useful for me to make city placement an important part of The Silver Kingdoms.
23 January 1998
- (Internal) Worked on path-finding improvements.
20 January 1998
- Reimplemented major speed improvements with non-DIVE drawing code. The mouse cursor follows the pointer much more closely now.
- When using the blob tool, blobs won’t be created until there are no blobs in the starting position (marked by a big ‘B’), because only one blob should be in any hex at one time. The blobs will wait to be created until there are no blobs in that position.
- Optimizations with map traversal and blob movement have boosted the simulation speed by up to 30%.
- Fixed a memory leak with auto-build mode and blobs.
19 January 1998
- Fixed a MAJOR bug with path-finding. Thanks go again to Tels, although this time instead of finding the problem he questioned part of my code, which turned out to be incorrect. Path-finding appears to be working perfectly now, for the first time. (Unfortunately, it’s not working well for longer paths.)
- Fixed some minor problems with the uneven distribution of trees and volcanos.
- Volcanos work better now, with lava flowing downhill just like water does.
- You are not charged for building something until the blobs actually build it. Previously, you were charged when you asked for something to be built.
17 January 1998
- The path-finding code is slightly faster, thanks to Tels (author of G.W.A.N.).
- A bug with houses and farms being built on top of roads was fixed.
12 January 1998
- A new Deity menu option, “Flash Flood”, will make rivers rise and possibly go over their banks.
8 January 1998
- I just got Civilization II. Don’t expect any changes to SimBlob for a while ..
28 December 1997
- The world map is much more responsive when you try dragging the mouse around.
- The world map now shows the location of blobs.
25 December 1997
- There is a new hybrid drawing mode that uses DIVE and slow PM. (Previously, the hybrid mode was DIVE and fast PM.) DIVE support is still experimental, and the hybrid modes are even more experimental, so use at your own risk!
- You can now control separately what kind of drawing is used for the controls around the window (left panel, world map, and status bar) and the main map. The first argument to SimBlob tells it what to use for the main map, and can be FASTGPI, SLOWGPI, FASTHYBRID, SLOWHYBRID, or DIVE. The “Fast” versions use GpiDrawBits, which is fairly fast, but isn’t supported in a few video drivers. The second argument tells SimBlob what to use for the controls, and can have any of the five values listed above. The default is FAST for both.
It is not recommended that you use DIVE or the HYBRID options for the controls.
- The InitMap.txt commands have changed, so take a look at Data/InitMap.txt again if you are using a custom InitMap.txt.
24 December 1997
- The path-finding works somewhat better now.
- Blobs can now climb over walls, but it takes some time.
- Blobs can now build and erase walls.
- Idle blobs will move around randomly now.
- If a blob realizes that some other blob has already performed its job, then it will stop and do something else.
23 December 1997
- Christmas Graphics add-on, with Santa Blobs (carrying candy canes and wearing Santa hats) and Christmas Trees was released.
22 December 1997
- The menus have been rearranged to group all the “Simulation” and all the “View” options together. (The difference being that in the future there may be more than one “View” but only one “Simulation”.)
21 December 1997
- The path finding code is somewhat faster, thanks to optimizations suggested by Tels (author of G.W.A.N.).
- The path finding code uses an adaptive cutoff instead of a static cutoff. The cutoff determines when the path finder gives up and returns a partial path. The cutoff is now determined based on the length of the path needed and the number of times the blob has been trying to find a path to the goal. As the distance to the goal increases, the cutoff increases. Also, the more times the blob tries to find a path, the longer the path finder will search. (In some ways this is like Iterative Deepening A*, in that it will only try so far but if it fails, it will try again, going deeper into the search.)
- Occasionally, water wouldn’t flow out of a spring because the spring was too low in a valley. This bug was fixed.
20 December 1997
- Fixed a bug with water tending to go north and east more than south and west.
- The map creation system is now controlled through a file called InitMap.txt. You can edit this file to change which algorithms are used to generate a map, and in which order they are applied. With this file you can choose whether you want good maps (which take a while to generate) or fast maps. The algorithms available and their names are likely to change soon though, so if you make a custom setup, check the InitMap.txt that comes with the game each time you download a new version.
SimBlob will look both in the SimBlob directory and the Data/ subdirectory for InitMap.txt. I recommend copying the file from the Data directory into the main SimBlob directory, and editing it there.
18 December 1997
- Fixed a bug with blobs that may occur after running the game for several hours.
- When a blob is idle, he will look around for nearby jobs first, so that he won’t have to walk far.
- The blob scheduler has been disabled, and instead blobs just pick for themselves which task to perform next. (The two were conflicting.) The goal is to have the blob scheduler assign tasks, and only if it doesn’t give orders, then do the blobs choose for themselves. This is based on biology: muscles and nerves can act by themselves, unless supressed by higher level orders from the brain. This is why chickens keep running around after their heads are cut off.
:)Here, blobs should be able to continue functioning even if the main task scheduler has no orders for them. However, I need to think some more about how the scheduler should work.
17 December 1997
- If a new building order comes in that is in the same location as an existing order, it replaces it so that a blob won’t waste its time working on something that’s going to be replaced.
- Blobs will pick the nearest job assigned to them instead of picking the first one on their list.
- Blobs should no longer get stuck trying to get past another blob.
- A hexagon is drawn around a hex that is waiting for a blob to work there. It is bluish green if a blob has been assigned to work there, and dark gray otherwise.
16 December 1997
- (Internal) I’ve finished reimplementing the way blobs build things.
- Up to six blob builders can be around at any one time.
- Jobs will be assigned to the blob builder closest to them, but this “greedy” algorithm isn’t an ideal way to schedule blobs. It is, however, better than the previous algorithm, in that a blob will try to take several related jobs at once.
- Blobs do not build walls or set fires. (This will take some more work.)
- (Internal) Several bugs involving blob creation and movement have been fixed.
30 November 1997
- (Internal) I’ve written some general guidelines for myself for using data without thread locking. I’m adapting the implementation of blob storage to follow these guidelines. It’s a little bit less restrictive than my previous guidelines, so the way blobs are stored can be more flexible.
26 November 1997
- Blobs can now accept up to six tasks instead of one. This way they won’t sit idle after finishing one; they will know where to go next without waiting for new orders.
22 November 1997
- (Internal) The way the blobs are stored is being redone to reduce the amount of thread locking needed, and also to support a new version of blob task assignment.
16 November 1997
- Instead of sending a lot of blobs to build something, a few are sent, and they receive new orders after completing each task. (Blobs are reused.)
15 November 1997
- (Internal) The simulation thread has a command queue that stores commands that have not yet been executed.
- When you draw with the mouse, the effects are not seen immediately. Instead, they are fed into the command queue, and the building is handled at the rate of one hex per tick.
- Blobs are sent to build the things you select with the mouse.
6 November 1997
- The map is now larger.
5 November 1997
- The altitude equalization routine has been modified so that it produces more grasslands than mountains.
27 October 1997
- The soil erosion algorithm was modified to do fewer hexes at a time, so that you no longer see an abrupt erosion “jump” from time to time.
26 October 1997
- The water erosion formulas were changed, hopefully so that rivers don’t mutate into lakes after ten million ticks.
12 October 1997
- The font is slightly better.
- During initialization, the progress (as a percentage) is shown on the status bar. The progress is calculated dynamically based on the initialization during the previous execution of SimBlob. This way, it is calibrated to your computer’s behavior, and it is not reliant on your computer being similar to mine. (The data is stored in Data/Progress.dat, for those of you who are curious.)
- The text in the world map window is more readable, thanks to a dark background rectangle.
- If there is a cost to building an item, that cost is displayed along with the name of the item under the tool area.
5 October 1997
- The killing of threads when you exit the program during initialization is improved. For reference, the thread priorities are: Main:Regular+0, Paint:Regular+0 (when the window is active), Paint:Idle+6 (when the window is inactive), Initialization:Idle+31, Simulation:Regular+0. While exiting, the thread priorities are increased to Regular+31 so that they can quickly finish whatever they’re doing, and exit.
- The main font is now Hershey-Plain 12. The Hershey fonts are basically free so I don’t have to worry about licensing of fonts.
- The current tool is highlighted in red, instead of a gradient gray. (The red is easier to see.)
- The textured background is gone; I’m experimenting with a cleaner, simpler look.
- There is a new option to the Speed menu to control anti-aliased drawing. The default is on but you may want to experiment with turning it off to see if it draws any faster. Unfortunately at this time, fonts look awful without anti-aliasing.
- The name of the current tool is displayed below the tool area.
19 September 1997
- Blobs that came out of a watch tower will go back in if they have nothing to do.
- Blobs that come out of a watch tower are worker blobs; blobs that you create with the blob tool are soldier blobs. For now, both fight fires.
17 September 1997
- The tool objects can take the Ctrl modifier into account. Also, only some tools default to line-drawing mode.
8 September 1997
- (Internal) The logic for determining whether the current cursor is valid has been moved into the tool objects.
- When using the Blob tool, the cursor is shown only when the pointer is over a blob.
20 August 1997
- (Internal) A “text style” class collects all the font style settings in one place.
18 August 1997
- The thread priority for the map creation have been adjusted to Idle +7.
30 July 1997
- BlobTool lets you send a firefighter blob to a particular location.
- The tool buttons have been rearranged because there are now ten instead of eight. The new buttons are the ‘firefighter blob’ button and the ‘fire’ button.
- With the blob tool, you can tell a blob where to go. Just drag the blob to a new location, and it will walk there if it can find a way. (Use the right mouse button to drag.)
29 July 1997
- (Internal) BuildTool is a Tool object that is used for building. The current mouse behavior for the primary mouse button (click and drag to build something) will be put into BuildTool. Note: the build tool doesn’t yet handle Ctrl and Shift modifiers properly.
- Other tools that are being designed are the SelectTool, which is used to select objects such as soldiers, farms, houses, and firefighters. This tool will also be used to give orders to the blobs. Another tool is the BlobTool, which will let you send a blob to a particular location.
26 July 1997
- (Internal) A new Tool class replaces the one I lost a year ago. It is based on CUA actions like drag, context-menu, and open, instead of physical mouse actions like right-drag, right-click, and left-double-click.
21 July 1997
- SimBlob should now follow the Mouse Settings more closely. For example, if you change the mouse setting for “context menu” to Shift-LeftClick, then SimBlob will use the new setting instead of the default RightClick. I’m not sure what happens when the settings conflict. For example, some people like to drag objects with the left mouse, but left-drags are considered “swipes” (multiple object selection). Also, it is possible to set up the left mouse button to bring up a context menu; should SimBlob consider left-click a draw request or a context menu request? At any rate, these concerns are present in other applications as well, and SimBlob’s behavior will be consistent with them.
20 July 1997
- (Internal) I’m now using Menu objects instead of handling menu commands directly, with PM functions and message handlers. The menu objects have made menus easier to work with and more flexible at the same time. Also, the game is slightly smaller due to elimination of repetitive code.
- (Internal) All the menu items that have checkmarks are now handled with the “Subject-Observer” pattern. This pattern lets me merely set the variable and have the menu item automatically update itself. Also, if one chooses the menu item, the variable automatically updates itself.
- A new blitting mode (HYBRID) is available. Each time something needs to be drawn, hybrid mode will select DIVE or PM, depending on which would be faster. Unfortunately, DIVE and PM seem to treat bitmap colors differently, at least in 16-bit color mode, so I’m getting some strange colors at times.
19 July 1997
- (Internal) I’ve made it easier for me to use the “Subject-Observer” design pattern. The code has become slightly smaller, and I’ve started using this pattern in more places.
18 July 1997I’ve been experimenting with the water simulation.
- Water levels are now calculated in inches rather than feet. This gives the simulation more detail.
- Under 6 inches of water will not cause water damage to houses, farms, or roads.
- Small pools of water will evaporate more quickly.
1 July 1997I’ve been playing Entrepreneur instead of working on SimBlob.
7 June 1997
- The firefighters can now detect fires in a larger area.
- Auto-build mode only extends roads; it does not create new ones.
- A new Debug menu allows you to view debugging information graphically. Preferences are white if blobs want to build a road, and black if blobs want to build a farm or houses. Labor is lighter if there are a lot of workers travelling along the roads. Heat is white for hot areas (caused by fire); it is black for cold areas (caused by extinguishing fire). Food is lighter if a lot of food is being transported along the roads. Moisture is lighter if the area is near moisture.
- After being able to visually see simulation variables, I was able to fix several bugs, including ones in auto-build mode, in labor calculations, in food distribution, in fire watchtowers, and in moisture calculations.
11 May 1997
- The fonts are nicer.
- The descenders on lowercase letters of fonts no longer get cut off.
- For now, firefighters will emerge from Watchtowers but they don’t go back in.
- When there is a fire on the map, the world map will display “Fire!”
10 May 1997
- Watchtowers are buildings where firefighters watch for nearby fires. If there is a fire nearby, a firefighter will exit the building to go fight the fire.
4 May 1997
- The date that SimBlob was compiled is shown in the information area on the top left.
3 May 1997
- The drawing code was optimized.
- The experimental river basin algorithm was modified, but it still isn’t very good.
2 May 1997
- The terrain generation was modified with an experimental river basin generation algorithm.
26 April 1997
- The mouse pointer changes to show you which tool is being used.
18 April 1997
- You can no longer erase fires.
- The cursor will disappear if you are not allowed to use the current tool in the current location. If you try an invalid drag operation, it will draw red hexagons instead of the normal drag hexagons.
- There are no longer canals in the game. Instead, there are “trenches”. The difference is that a trench is not concrete-lined, so there is a small possibility of erosion, and also that you can build other things in a trench. (For example, you may wish to build a gate in the trench to control water flow, or build a bridge over the trench.) The “canal” button is still there, but it now creates trenches.
- To erase a trench, you must first erase whatever is built on/in them.
13 April 1997
- In DIVE mode, only the main map is drawn with DIVE. (Previously, the statusbar and other parts of the window were drawn with DIVE as well.)
- A bug was fixed with the cursor; it now follows the mouse much more closely.
- (Internal) Buttons have been implemented with the new Glyphs.
- I’m now using new buttons for the toolbar. Finally, just about all the controls have been switched over to the new graphics format that I introduced last year.
12 April 1997
- When using the Shift key during mouse drag, the behavior depends on whether you are holding shift at the beginning of the drag, not during the drag.
- The `scorched earth’ graphics after a fire show gradual fading rather than sudden fading.
- You can right-click on the status bar button to cycle through in reverse order.
30 March 1997
- (Internal) I’ve again redesigned the Glyph system. I found a flaw in the previous design that was keeping me from the next step: the ability to click or drag map objects.
- (Internal) I’ve rewritten large parts of the graphics system to use the new Glyphs. A side effect of this new design is that parts of SimBlob have become simpler and smaller.
- SimBlob will remember the window position when you close it and use that window position again when you run it again. The information is stored in
os2.inibut it is very small (probably under 200 bytes).
- Text Glyphs can now have justification (Left, Center, Right) assigned to them. The numbers in the information area are now right-justified for easier reading.
- I discovered and fixed several bugs with some of the Glyphs.
- I discovered and did not fix several bugs with some of the Glyphs.
- There is a button in the statusbar that lets you cycle through the different kinds of speed indicators in the game. This uses one of the features in the new Glyph system: overlapping glyphs that can be individually turned on or off.
13 March 1997
- The cursor is now drawn with the new layered graphics system. It shouldn’t flicker anymore, and there should be fewer display problems.
- The the old graphics system was eliminated, since only the cursor code was still using it.
- For debugging purposes, if SimBlob crashes, it will create a trap file (
simblob.trp) in the current directory.
- Water sources are placed in a circle around the map, rather than in random positions. This ensures that no part of the map is too far from water.
11 March 1997
- The path-finding algorithm for blobs is improved. There is now an absolute limit on the number of hexes that can be searched before a path is found — currently it is approximately one-tenth of the map. If no path is found in that time, the blob will just walk to a point closer to the goal, and then later it will calculate another path to the goal.
- If a blob finds an unexpected obstacle in his way, he will not recalculate the entire but will rather recalculate the first 15 steps of of the path, in hopes that that will get him around the obstacle. If it does not, then he will calculate the entire path again (subject to the restriction above).
5 March 1997
- The information area has been cleaned up a little.
1 March 1997
- (Internal) I’ve cleaned up the Glyph code, which is used to put objects on the screen.
- (Internal) Glyphs can now accept mouse clicks. I will use them in the future to create buttons to replace the toolbar, which is using the OS/2 “ValueSet” control at the moment.
- (Internal) I’ve added glyph overlaying, where one glyph can go on top of another glyph. Buttons will use this, as they are a text or bitmap glyph on top of a button glyph.
- When dragging the mouse, I’m using mouse capture mode. This should fix some of the bugs with mouse dragging.
31 January 1997
- The flood command has been fixed; it now always causes a flood.
- Water can flow off the map; as far as water is concerned, there is no longer an artificial wall around the edges of the map.
26 January 1997
- I added a scrollbar class to handle the two scrollbars; they’ve been made narrower, and they were moved inside the statusbar.
- The text that goes in the statusbar will be clipped if necessary.
- Non-immediate drawing (where you draw a line) shows a preview of what will be drawn. For example, if you’re drawing roads, it will show the roads that are being drawn.
- The View options now affect the world map; previously they only had an effect on the map view.
22 January 1997
- A bug with scrolling when the “View” menu is pulled down has been fixed.
- Scrolling behavior has been improved, both for PM and for DIVE; most of the changes have to do with scrolling by clicking or dragging the mouse on the world map.
- The auto-build mode behavior has improved in some ways, but still needs a lot more improvement.
19 January 1997
- A lot of things have been changed to speed up the simulation code. Some of this is due to extensive profiling; other speedups are due to a change in the way the map is scanned for each part of the simulation.
- Before building a farm, farmers look near a plot of land to see if there is a lot of food available in the area. If there is a surplus of food, they are less likely to build a farm. Similarly, people are less likely to build houses if there are a lot of unemployed people nearby.
- If there is a shortage of food in an area, a farm is more likely to be built; if there is a shortage of labor, a house is more likely to be built.
13 January 1997
- I fixed a bug with the new palette system that would cause problems if the palette manager was not available.
- Farms now produce food.
- Food is transported along roads to houses.
- An excess of food at a house tends to increase the population there; a shortage of food tends to decrease the population there.
- The food produced and consumed is displayed in the information area on the left side.
- To use DIVE, run SIMBLOB DIVE.
- The statusbar now shows more performance information:
- Ticks per second: The number of times per second the simulation code runs.
- Frames per second: The number of times per second the window is drawn.
- MPixels per second: Millions of pixels drawn each second.
- The Speed menu is a little different:
- The speeds associated with Slow, Medium, and Fast are slightly higher.
- There are two Zoom options. Zoom Ticks is designed to maximize the ticks per second speed — your world will run as fast as possible. Zoom Frames is designed to maximize the frames per second speed — you will see more (small) changes to the map.
- Periodically, the rivers will flood. (Inspired by the recent flooding in the Western U.S.)
- A new Deity menu option allows you to trigger a flood.
9 January 1997
- I fixed a major bug with resizing that I introduced with the January 6 version; it was caused by the Blitter objects not knowing when the window was resized.
- I’ve added support for DIVE, as a Blitter object.
- The map creation messages are now displayed on the statusbar.
6 January 1997
- I’ve rewritten the palette system, and it should work pretty well now on 256-color systems (especially when Netscape or other palette-stealing application is running).
- (Internal) I’ve separated out the code that blits (“draws”) to the screen. These “Blitter” objects allow me to write the painting procedure without referring to any specific kind of blitting. The initial two Blitter objects use GpiDrawBits and WinDrawBitmap.
- (Internal) I’ve started adding support for DIVE, as a Blitter object.
- There is a money indicator on the statusbar, and it goes down when you build certain structures.
30 December 1996
- The water display system has been rewritten to use the new display system; this should result in faster simulation code and also faster display code.
- The fire animations use the new display system instead of an ugly hack that they used before. This also fixes a bug where fire animations would stop unexpectedly.
- There’s now a Options/View menu that lets you control what can be seen on the main map view. You can hide various parts of the map, but not blobs or text (for now). I’m not sure if this is of any use.
- The information area and status bar have a textured background.
28 December 1996
- (Internal) The automatic layout system has been extended to work with the new display system.
- Fixed a crash that would occur after several window resizes (including maximize/minimize).
- The information area on the top left now uses the new display system; the text in the new display system doesn’t yet support right-justification, so the information area and statusbar look weird.
27 December 1996
- The statusbar uses the new display system, so you will see anti-aliased fonts and shadows there.
- You can now drag the mouse around on the the world map to move the view to that area.
- (Internal) A few things were fixed in the automatic layout system.
26 December 1996
- (Internal) The font format has changed; instead of Data\Text12.RLE the file is Data\Font12.RLE. You can erase the old Text*.* files now.
- After a fire burns out, the ground is burnt; you can clear it out with the erase tool, or you can wait for it to clear on its own.
- There are new fire bitmaps; I am still looking for better ones.
- When you jump-scroll from one screen to the next, a small part of the map remains so that you can orient yourself. (Previously, the entire screen changed so that you saw all new hexes.)
- (Internal) There are a lot of changes to make font handling easier.
- (Internal) A new layer has been written for text objects so that text can be easily overlaid on top of the map.
23 December 1996
- (Internal) The sprite blit system has been sped up and made more flexible. (I now perform better clipping checks before blitting so that I can determine whether I should blit everything without clipping, or blit nothing, or blit with clipping.) Using C++ templates, I have 12 diferent versions of the blit routine, each optimized by the compiler, instead of having one version with lots of flags controlling how the blit is performed.
20 December 1996
- (Internal) So far, the map and blob layers have been implemented for the new display system. (As of Dec 16, only the map layer was implemented.) The layers have been put into separate modules.
- (Internal) I have designed and partially implemented a new display system. Previously, I was using hexagons to determine which parts of the screen needed to be redrawn. Each hexagon was marked ‘clean’ or ‘dirty’, and all the dirty hexagons were drawn. The problem with this approach is that some of the overlays (such as blobs) are not hexagons; I was handling that by marking the hexagons near and under the blob as dirty. Some of you may have seen the bridge drawing problem, where water would show up through bridges. This was also an artifact of the dirty hexagon system.
The new system is structured instead as a set of rectangles (
HRGNfor OS/2 programmers). Also, there are multiple layers of overlays instead of all the drawing code being in one huge routine. The map is drawn at the bottom, then water, then bridges, then blobs, and finally any textual messages.
The advantages over the old system are:
- Smaller pieces of code are more easily maintained.
- It should be possible to turn layers on and off individually.
- Oddly shaped items such as bridges can be drawn correctly.
- Transparency is handled correctly. Previously, it was possible for a transparent bitmap to be drawn twice in the same place, so that it showed up opaque. The old solution is to force a much larger redraw than necessary, but the new system can handle transparency so it won’t be necessary to draw so much.
- I will be able to handle overlay text properly. (In the old system, anything that was larger than a hexagon could not be drawn reliably.)
- I can place user-interface gadgets on the map as well, like buttons or menus. Since I can do this, I will change the status area on the left and the status bar on the bottom to use this system as well.
- “Picking” (which I had implemented as a separate module and then lost)
- Support for non-map layers for user-interface controls
- Irregularly shaped user-interface controls
- A bug with automatic building was fixed; it led to strange effects such as building of bridges inside canals.
- There is now an “About SimBlob” dialog box in the Help menu, which has been moved over to the right side of the menubar.
- The “About SimBlob” dialog shows the date of the last compile, and also the URL for the SimBlob web page.
10 December 1996
- The blob builders can sense fires several spaces away and move to extinguish them.
30 November 1996
- I am implemented a workaround for systems that do not have a working GpiDrawBits. Thanks to Peter Nielsen for the the technique! To use the workaround, run
SIMBLOB ALTBITMAP. It will draw much slower, but it’s better than not drawing at all.
29 November 1996
- The farms now go through many stages, from ‘planting’ to ‘harvesting’.
- Blob builders now put out fires. If they see a fire next to them, they’ll move to put it out. They don’t look farther than that, however.
17 November 1996
- The map now remembers which blob is at each location.
- If another blob attempts to move there, it is blocked.
- Path-finding code treats nearby blobs as obstacles. I assume that if the other blob is nearby, it won’t move out of the way in time for this blob to go there.
- Path-finding code treats all stationary blobs as obstacles. I assume that if the other blob isn’t moving, it’s more likely that it will stay there than move.
- A “B” is shown on the hex where blobs start.
- If there is a volcano erupting, the world map will display the word, “Volcano”.
- If a blob is blocked as it is walking, it will wait for a while before finding a new path around. This is useful when the blob is being blocked by something that is likely to move soon.
- (Temporary) Blob soldiers are drawn as blob builders, and will walk around not-so-randomly. (I am using a swarm algorithm; ask if you’re interested in details.)
- (Temporary) A shadow will fall in front of a blob soldier who is walking.
4 November 1996
- If you use the Shift key while drawing, it will reverse the sense of the line-drawing mode. Roads, Walls, Canals, and Bridges are normally drawn as lines; Fires, Trees, Eraser, and Gates use freehand drawing mode. If you use Shift, it will use the other mode.
- If you use the Ctrl key while drawing, it will use the Eraser tool instead of the tool you have selected. Ctrl can be combined with the Shift key to erase in straight lines.
1 November 1996
- The water graphics are slightly different; I’ve changed the way water is drawn in order to improve the bridge redrawing.
- Auto-build mode is more likely to build straight bridges.
- When walls and canals are drawn next to each other, the graphics are merged.
- The world map has a small box showing what area is being displayed in the main view.
- You can left-click on the world map to move the view to that location. There are still some bugs in the redisplay.
- Terrain generation includes some volcanic activity.
26 October 1996
- Springs now have an “S” on them.
- There are now bridges! Unfortunately, I still haven’t figured out how I want to handle bridges. Right now, they won’t display properly, and you can build any shaped bridge anywhere. (It doesn’t have to be straight, and it doesn’t have to be over anything.)
- There are more options in the Erase submenu, to erase only certain kinds of things from the map.
- If the blobs want to build a road somewhere, but there is a house or farm there, the blobs owning the house or farm might vacate.
- (Internal) Some more possibilities of thread deadlocks were removed.
- The colors on the world map more closely match those on the main view.
22 October 1996
- The wall graphics are now textured gray rather than flat gray with a pink border.
- The buttons on the left side of the window are replaced by population and job information. The numbers in parentheses are the percentage of people working and the percentage of jobs that are filled.
- The cursor flickers much less now.
- There are now more sources of water than before, and they can be anywhere on the map, rather than only one per quadrant.
- During map creation, the world is flooded. This is an attempt to create erosion channels.
18 October 1996
- Towers are now Gates. They allow a small amount of water to flow through. With gates, you can build a dam that has water flowing through the front. I find that three gates allows enough water to flow to produce a decent river.
- The world map updates more often if there is a volcano on the map. This slows down the game as well.
16 October 1996
- Water flow rules and erosion has been changed yet again; this time, I’m happier with the resulting world after 500,000 ticks, but I’m still unable to get the rivers to stabilize. On the other hand, perhaps it is better that the rivers change course often — players will have to control the rivers with canals and walls.
- I have reimplemented automatic window layout (see the what’s new entry for July 28 for details). I have not yet made the scrollbars use this.
- In preparation for various information being displayed on the left side of the window, I have added a static control. Currently it shows “SimBlob”, but eventually it will have information such as money, population, and employment.
- The button for “erase” has been changed to match Warp 4’s close button. The button for roads has been recolored so that it matches the road color on the map.
11 October 1996
- (Internal) A problem with threads locking up has been worked around.
- The house graphics have been made larger.
- The road graphics now have divider lines in the center.
- The terrain graphics are rougher and a little more textured.
- There are now thirteen months with twenty-eight days in each. The thirteenth month is the Holy Month, when the blobs hold religious ceremonies.
- Fires are animated.
- Water flow rules and erosion have been changed again. I’m still searching for something that will give rivers rather than lakes.
- Terrain generation now includes volcanic eruptions.
- The initial map includes forests, rather than just isolated trees.
- A bug with “disappearing water” has been fixed. Water no longer disappears except by evaporation.
27 September 1996
- The seasons menu has been removed. Seasons now change automatically.
- A major bug with window resizing has been fixed (again).
- The scrolling has been improved. For all the programmers out there, here are the details:
- WinScrollWindow gives you a dirty rectangle that should be redrawn. I was using this rectangle to draw my internal buffer, and then blit it to the screen. Instead, I now use it only to blit to the screen, and I determine what needs to be drawn to the buffer by looking at what would be uncovered by the scroll operation. (One edge of the window needs to be redrawn.)
- I moved the WinScrollWindow operation to the very end of the paint routine. This minimizes the time after the scroll but before the painting of the exposed area. Scrolling feels much smoother now because you don’t notice the redrawing of the exposed area.
25 September 1996Most of the changes are internal to redo some of the things I’ve lost. I’ve listed only the external changes.
- Lines are drawn straight when you draw a road, wall, or canal.
- The Drought menu option should now work; it turns off water sources completely.
28 July 1996Note: These changes were lost in a hard disk crash.
- Minor bugs with mouse dragging were fixed.
- Minor bugs with mouse dragging were introduced.
- There are two independently scrolling View windows.
- The terrain bitmaps have been fixed.
- You can drag from one window to another to draw “across the map”.
- The tree graphics have been changed, and young trees are drawn smaller than full grown trees.
- (Internal) Changes to the internals:
- The main window is laid out “automatically” using Layout algorithms. The layout objects can set up components Horizontally or Vertically, and a component can be another Layout, a fixed space, a variable space, or a window (or control).
Now I don’t have to compute the coordinates of each of the controls, so it’s very easy to add new ones.
- The scrollbars are now part of the main window instead of part of the frame window. OS/2’s frame window has flags to create two scrollbars, but I wanted four, and I also wanted to control their size and placement.
- The statusbar uses the “Subject-Observer” design pattern [also called Model-View-Controller] instead of the more traditional object interface.
This is very helpful because various parts of the program only have to know about Subjects — they don’t have to be aware of where the subject data will be displayed (a statusbar), so I can move the display to another control (like a static text control or titlebar) without requiring any changes in all the clients. Also, since StatusBar relies on PM, this will allow me to write modules are not dependent on PM in any way.
- I’m going to make the scrollbars use Subject-Observer so that the view window, the keyboard interface, and the scrollbar all look at a common (consistent) map position, instead of all three trying to update each other to maintain consistency manually. Subject-Observer requires less code and is more flexible than the traditional object interfaces. I should write a web page about SimBlob’s internals sometime, but things are changing so fast right now that I think I will wait until the internals stabilize.
- The main window is laid out “automatically” using Layout algorithms. The layout objects can set up components Horizontally or Vertically, and a component can be another Layout, a fixed space, a variable space, or a window (or control).
22 July 1996Note: These changes were lost in a hard disk crash.
- The Speed menu now includes options for using DIVE. Temporarily, DIVE is required, even if you have it set to 0%. Testers have reported that 50% DIVE works well, and 100% DIVE slows down scrolling too much.
- The right mouse button now controls Picking instead of soldiers. It reports what is under the spot at which you clicked, but it does not yet take into account water or blob soldiers.
- The house graphics have been made larger.
- The road graphics now have divider lines in the center.
- The terrain graphics are rougher and a little more textured.
10 July 1996Note: These changes were lost in a hard disk crash.
- The terrain drawing behavior has been rewritten. Internally, each terrain type on the toolbar is associated with a Tool object that controls the appearance and behavior of the tool. This will make it easier to add new types of tools that do not draw terrain to the map.
- The mouse drag behavior (when drawing certain types of terrain) has been improved. You can now cancel a drag by moving the mouse pointer outside the window.
7 July 1996
- I’ve completed the conversion to GpiDrawBits.
- I’ve implemented transparent bitmaps, and to see how they look, I implemented the marking (when you drag with the mouse to draw roads or walls) with a transparent bitmap.
- The layout has been changed. There is a panel on the left with various controls and displays, and a map on the right.
- There is a world map in the lower left side.
- The world map updates while the map is being created.
- A major bug with resizing windows has been fixed.
- The algorithm for “Auto Build” mode has been updated to make road builders stay away from walls and water.
- Thanks to IBM’s Performance Analyzer, SimBlob runs faster, even though the map is more than twice as big as before.
15 June 1996
- I’ve been rewriting the graphics system to be faster and use less memory. I’m now using GpiDrawBits instead of GpiBitBlt; it lets me use my own bitmap formats, and also opens up a path to DIVE.
- The blob soldiers are now drawn with blob bitmaps instead of little rectangles.
- There is now a nicer startup screen.
- There is a little blob on the bottom left of the main window.
- The pushbuttons are now “Volcano” and “Rain”.
- Volcanos produce lava, which raises the terrain (when it hardens).
- A “terrain equalizer” has been added to keep a good distribution of altitudes. If there are too many high altitudes, it lowers some of them; if there are too many low altitudes, it raises some of them. This keeps the map from being too boring — either too high, too low, or too flat. To try this out, start up several volcanos to fill in all the green areas. Set the speed to Zoom and watch the brown slowly turn green.
1 June 1996
- The terrain mode toolbox has been moved inside the main window. To do this, I rewrote the class lirary I was using for PM windows. I’m also testing this new class library by adding pushbuttons inside the main window.
- Two pushbuttons allow you to increase and decrease the amount of water that flows from the springs.
- You can now place “canals”, which look like inverted towers. They are the opposite of walls — they are dug 40 feet deep, and can be used to channel away floodwater or to divert rivers. Since the bottom of a canal is concrete, there is no erosion.
- When the window is not active, the paint thread gets idle priority, which speeds up the game and other applications.
30 May 1996
- The farm and cursor colors have been changed again.
- I’m trying out better water graphics. They show the depth of the water as well as the average depth between two hexagons; the result is that lakes and rivers look smoother. (There are also 64 levels of water now, instead of 6.)
- (Internal) A lot of internals have changed. Soon I hope to have support for multiple views.
- The dragging graphic has been changed from a partial outline to a shaded hexagon.
26 May 1996
- The house colors have been changed to dark gray for empty and cyan for full.
- The farm graphics are different, once again. (But not better!)
- Trees are more likely to grow near rivers.
- I’m trying out some experimental water graphics.
- You can now draw roads and walls by dragging a line from one place to another.
- Wall graphics are slightly better.
20 May 1996
- The house graphics are better.
- The farm graphics are different, not necessarily better.
- I’ve started to work on the economic simulation. Houses provide labor, and farms provide jobs. There’s just a question of how to link labor up to jobs. Right now, they try to move along roads to find work.
- The status bar shows statistics about the job market.
- Houses will empty out if the residents can’t find jobs.
- I’m really starting to consider using DIVE for this game …
10 May 1996
- The tree and tower graphics are better.
- Trees die out after some time. Trees on mountains are more likely to die early than trees in lowlands.
- Farmers prefer areas near a source of water.
- The scrolling speed has been improved a little.
- The Speed menu has checkmarks to show what speed is set.
- The status bar shows ticks/second. (A tick is a unit of time for the simulation.) I get between 8 and 10 ticks/sec in Zoom mode on my 486/66. I hope to improve that speed a little. :)
- The thread priorities have been adjusted. During startup, the system should be more responsive while the map is being generated. The painting has been assigned a higher priority thread so that it can respond quickly.
5 May 1996
- The toolbar is outside the main window so that it doesn’t block your view.
- I rewrote the scrolling system, so that it’s much faster!
- Erosion works better now. In addition to low terrain eroding fast, soil with lots of moisture will erode faster. (Areas near a river or lake erode quickly.)
- It’s now harder to build a wall underwater.
- The water-flow algorithm is new — it allows rivers to be wider than one hex wide.
21 April 1996
- The toolbar is cleaner so that it’s easier to see which tool is chosen.
- Forests grow when trees spread seeds around. Plant a tree and watch a forest grow from it.
- Houses are now like farms — they will spring up around roads.
- If houses are underwater too long, they will eventually be destroyed. (Previously, blobs would move out but the houses would remain.)
- Fires can burn trees, houses, farms, and roads.
- There is a new option on the Special menu to erase only soldiers.
- The terrain graphics have been updated to look better.
- Rivers pick up sediment upstream and deposit it downstream. This leads to interesting behavior that is matched in nature. If you start out with a straight river on mostly-level terrain, the sediment will build up and cause the river to “meander”. Some of the variables still need to be adjusted a bit; the buildup on the banks can be a bit too much at times.
- Erosion behavior is different — low terrain erodes heavily now.
- The scrollbar behavior is erratic. I’m still trying to get scrolling to work properly in the new screen painting routines. I’m considering using DIVE, which would solve all my painting problems.
13 April 1996
- There is a toolbar on the bottom left that lets you choose type type of terrain to draw. This interface will change eventually, but this one is really easy to program, so I decided to put it in until there’s something better.
- There are now lots of blob soldiers. Every time you right-click somewhere, a new soldier is created to walk there. There is no way to make that soldier do anything else (for now). You can do fun things this way — pick an area of the map and start right clicking everywhere, and an entire army will be created to walk to that area.
- There is a new menu with some neat effects: Rain, Army, and Erase. Rain creates lots of water all over the map. Army creates a hundred soldiers to go to random places on the map. Erase erases all soldiers and structures. WARNING: Do not use Erase while soldiers are moving, or there may be a crash.
- The different levels of path approximations let me experiment with tradeoffs in the A* algorithm for finding shortest-paths. Best finds really good paths; Fast finds paths quickly but they’re not very accurate. In particular, Fast tends to ignore roads. It also does really badly if there are obstacles — I’m still trying to debug this.
- There are a lot of redraw problems. I restructured the program’s paint loop to speed things up, but scrolling doesn’t work very well yet. Also, when the blobs move around, they sometimes leave garbage behind.
- Lots of path-search statistics are printed at the bottom after you assign a destination to a blob soldier. You can ignore these if you want. :) Steps tells you the number of hexes the blob will step through. Scan tells you how many hexes the A* algorithm searched to find the path. Cost tells you the amount of time it takes to walk that distance. The algorithm is currently set up to find the least cost path. You can compare the path cost to the approximation level — Best gives you the least cost and Fast gives you the highest.
8 March 1996(It’s been a long time!)
- The blob soldier causes fewer redraw problems as he moves.
- There are more terrain levels, giving more information about altitude.
- Roads now offer double the normal movement rate for blob soldiers.
- A bug with the soldier bouncing off a wall repeatedly when the wall spot was his goal .. was fixed. Now he will stop if the goal cannot be reached.
- I added some more erosion back into the game. High altitudes erode less than middle altitudes. Low altitudes have medium erosion.
16 December 1995(I was on vacation from December 17 to January 9.)
- Scrolling is much faster, but it doesn’t always look right. I think this is because another thread is drawing while I’m scrolling; I need to fix this someday. :)
- I’ve disabled erosion because I get much more interesting terrain without it.
- There is now a blob that can move around on the map! Use the right mouse button to select a target for the blob. He will try to avoid moving uphill when possible and he can’t travel through walls. If the path he selects later has a wall on it, he will recompute a new path. (Eventually, the blob will continuously update its path depending on new terrain conditions; this will be a background thread.)
- I think the last of the purple-splotch bugs has been fixed. There was a problem in 16-bit modes because SimBlob assumed that purple (255,0,255) existed in the palette, but in 16-bit mode, it doesn’t.
21 November 1995(School is still keeping me busy!)
- I think water is flowing pretty well now. There are still some places it needs to be improved — for example, sometimes it’s wider than I would expect, and there are still gaps in the flow.
- Transparent bitmaps should work now, on all video drivers! This has taken a long time to get working properly, because the `easy’ way (marking one color `transparent’) does not work on all drivers, and the `hard’ way (making a separate mask bitmap) needed to be done automatically. I am generating all the roads, walls, and houses instead of drawing them by hand, so I had to make all the routines produce a separate mask and image instead of a bitmap with a transparent color.
- The File menu was split up into the File and Speed menus.
- A new menu was added that will eventually let you pick which terrain to draw. It currently does nothing.
- A new `trees’ tile has been added, but it doesn’t do anything yet. I will probably turn this into several levels of forest (light, medium, dense) later.
- All the bitmaps are now in the executable, instead of being generated at the beginning of the game. This greatly reduces startup time!
- The huge executable size reflects the size of the added bitmaps. Right now, they’re all stored in 24-bit format, but I will soon convert them to 8-bit to save space.
- Erosion is disabled. I needed to do this to get the rivers to work properly. I want to add erosion back in, but I have not yet determined how I should do this.
5 November 1995(School has kept me busy, so I haven’t worked on SimBlob a lot.)
- A statusbar has been added, but it doesn’t show anything right now. You can do some fun things to it, like drag FG/BG colors or fonts to it.
- I spent a lot of time on getting water to flow properly, but it doesn’t want to cooperate. I might just give up on this, and use a static water model, like SimCity and Civilization. :(
- Towers are like walls in the current simulation, but once military units are added, they will be able to use towers for better defense than walls provide.
- A minor bug in house display was fixed — the seventh house would not get highlighted. (I was using a less-than test instead of a less-than-or-equal-to test!)
- The terrain is randomly generated now. I’ve been experimenting with various terrain generation algorithms.
- The File menu has several options for changing the speed of the simulation. (Yes, I know, I know — this should be in a Speed menu!)
- (Internal) I’ve taken some steps towards making “multiple views” possible. Once multiple views are possible, you will be able to open several map windows and view different parts of the map at the same time. They will all stay synchronized.
- The transparent bitmap display still does not work for most users. This is mainly because I haven’t worked on it yet — I do have several options in mind, but I haven’t decided which method to use. I don’t want to choose one method and then later decide to use another, so I’m considering my options carefully.
- If you resize the window large enough, the scrollbars should disappear. This is flaky right now — sometimes they don’t disappear, and sometimes they disappear and won’t come back.
20 August 1995
- The game is faster and some redraw bugs have been fixed.
- You can now build residential areas. Up to 7 homes can be in each hex. People will move in automatically, and the gray (empty) homes will turn into red (full) ones.
- (Internal) Some of the redrawing code has been rewritten. If you see any redraw problems, please let me know! Bright purple is my error color — if you see it, you know there’s a problem.
- The map initialization is done in a separate thread instead of in the main one. The window will come up faster now, but it still takes a while before the map appears.
7 August 1995
- The game is much faster! I restructured the redrawing code, and it got much faster, but it still needs some redraw bugs fixed.
5 August 1995
- Layered Terrain: There are three levels of tiles instead of just one. The bottom layer is the altitude indicator:
The middle layer has structures:
farm, road, and wall.
The top layer has water:
The main effect of this is that you can now have multiple things on a single tile. Previously, if there was a wall, the grass would not be displayed, and only a wall on a gray tile. Now the wall is shown on top of grass. If there is water, you can partially see what’s underneath.
- Farms will automatically spring up around roads.
- Farms are destroyed by water. (They’re not Rice Farms.)
- Roads and Walls can be destroyed if covered by water too long.
3 August 1995
- The terrain now has a hill on the left and a valley on the right.
- Erosion does seem to work, but I’m not sure if it’s realistic. There are ways to manipulate it. :)
- There are now different colored tiles for different altitudes: green is low; brown is medium; gray is high.
2 August 1995
- The terrain is now a bowl-shape instead of an inclined plane. This causes the water to flow into the middle.
- Simple erosion is implemented. Sediments will flow along with the water. To see the effect of this, just start the program and let it run for a while. The lake starts to fill up with dirt, and it gets wider. Or is the effect of having more water? :) I don’t know! Another way to see this is to force the river into some path, and later take away the walls. Some of the time you will see that the river has eroded away a path for itself and it will not return to its original path.
- Walls are 100 inches high instead of 1000 inches. This makes overflows much more likely.
29 July 1995
- There are now scrollbars that seem to work. The display is a little bit slow; I am working on speeding this up. (Note: The pageup/pagedown and lineup/linedown parts don’t work yet, but you should be able to drag the scrollbutton around.)
- The game is running a little slower than it should because the entire map is drawn instead of just the part that’s visible.
- The menu has a “Color Edit” option that brings up a color palette. You can drag a color from the palette to the game to change the color of the standard controls (titlebar (active & inactive), menu, system menu, scrollbar, and frame (active & inactive)).
- Use the left mouse button to toggle the terrain in one direction and the right mouse button to go in the other direction. This won’t be there for long, because the right button will be used to bring up a context-sensitive menu for the object(s) under the mouse. The most likely interface will be the user selecting a tool (road, wall, farm, etc.) and then selecting areas to build the item.
- The window can be resized and things should look right.