Brad Wardell's Blog


Favorite gadget of the year nominations?

Published on Friday, December 4, 2009 By Brad Wardell In Personal Computing

So do you have a list of gadgets that you discovered this year that really struck you?

Here’s a list of some of the gadgets I”m using a lot now:

1. Verizon MyFy.  Game changer for me because I now get reliable Internet wherever I go.

2. Jing Pro. Makes it very easy to get videos and screenshots up.

3. Google iPhone app. Its voice recognition for searching is unreal.

What would be your list?

Elemental Beta 1C

Published on Thursday, December 3, 2009 By Brad Wardell In Elemental Dev Journals

image It’s still primitive. It’ll still cause psychological damage. But we have released a major update to Beta 1 for the beta team to start playing with.  Those of you who aren’t in the beta, fear not, we will be opening the beta for BETA 2 which is scheduled for February 25th currently (subject to change).

Here’s what’s new:

Elemental - Beta 1C Change Log

**********************************

** New Features **

--- Research System Overhaul ---

Overview: A new (and significantly improved) research system has been implemented, where players spend research points in one of 5 major categories, then get to chose from various breakthrough when a milestone is reached. Breakthrough techs have a random chance of appearing, but will increase in likelihood every time a milestone is hit.

+ Added Category and Rarity tags to the Tech Data XML.

+ Added TechnologyCategories enum to TechData.h, with entries for each of the five technology categories (civilization, warfare, magic, adventure and diplomacy).
+ Completed initial rough implementation of the new research system. Technologies are now researched in one of five hard-coded  tech categories: civilization, warfare, magic, adventure, and dipolomacy. You select one of these categories for research in the research sub window of the kingdom manager, and when a breakthrough occurs, you can chose from any one of the technologies belonging to that category, as long as the prerequisites have been met.

+ Made lots of changes to CTechData, and the TechDef XML. It no longer uses CTechBonus, as all technologies are defined as separate TechDefs, and the Infinite tag has been moved into the TechDef XML (for the moment, it will still read in any defined TechBonus, but it will not be used by the game). I’ve also added new tags for Rarity, Category (which must be set to either Civilization, Warfare, Magic, Adventure, or Diplomacy), and AppearanceChance.

+ Hooked up the Rarity and AppearanceChance tech data XML tags to code. If the rarity value is below 100, there is a chance it will not show up as a breakthrough when it’s tech category is researched, even if it’s prerequisites have been met. For every research milestone that it does not show up, it increases it’s rarity by the square root of the current rarity value, until there’s a 100% chance for it to show up. If the appearance chance is less that 100, there is a chance that it will not be added to the player’s tech tree at the start of the game.

+ Research sub wnd displays really simple entries for possible breakthroughs of selected tech category, tinted by the breakthrough rarity

+ Got the tech category details picture hooked up in the research sub window, along with the category description (currently
  using placeholder text), and the research progress bar.

+ milestones increase at a rate of 10 + (ulLevel * 15)
+ citizens produce 0.1 rp's
+ removed the cumulated tech investment from level calculations, gets bumped down to 0 for each new breakthrough
+ if no category is selected when the ResearchWnd is unhidden, it autoselected CIV

+ Implemented more features and polish on the breakthrough window: the masked picture frame with the tech category image, and the bottom part of the screen that gives details on the selected technology.

+ Updated CResearchSubWnd::SetTechData( ) to use the new flavor text system to set the descriptions for each technology category.

+ Fixed issue that was causing the research progress bar on the Research window to overflow.
+ Changed the color of the uncompleted portion of the progress bar on the Research sub window to mesh better with the rest of the screen.

+ Implemented Paul’s modification of the Research window, which changed the tech category image from a regular picture frame to a masked picture frame.

--- AI ---

Overview: The AI will now build cities, design units, defend their territory, research techs, and move around the map in a more intelligent manner. Significant under-the-hood work as well.

+ AI Designing Units

-> Added a pure virtual function called AIDesignUnit() that is meant to be overridden by your AISkeleton-derrived class.
-> Added a declarations and definition of AIDesignUnit()
-> added function AICompareToDesigns(), which takes a unit type pointer and compares it to all the other unit types designed by AI during that particular game.
-> Added a variable to keep track of the last turn that this AI successfully designed a unit
-> AI will not attempt to train units if net income is below 0.0

-> AI will not train a unit that was designed more than 100 turns ago
-> Added function GetStat(index) which will return the value of the stat at index.  Still need to add code to sum up the modifiers
-> added functions for SigmaStat.  SigmaStat is all your stats summed up.  functions added are CalcSigmaStat(), and two variations of CompareMySigmaStatTo() which takes either another unit type pointer, or a ulong for the other sigma stat value.
-> changed AddUnitType to return a BOOL so you can tell if it failed or not
-> added stat copying to the copy constructor

-> added code (member variable and Get function) for a data driven approach as to whether or not a unit type can be trained/designed.  Previously, the internal names were checked in a hardcoded long if statement. Now we can just check a bool.
-> added code (member variable and Get/Set functions) for whether or not a unit type was designed by the AI.
-> added code (member variable and Get/Set functions) for what turn the AI designed the unit.  This is a runtime only variable, is not stored in the xml or read from xml.
-> Added <CanBeDesigned>0</CanBeDesigned> to all of the unit types in this file that we had hard-coded to filter out previously when allowing the user, or now the AI to design choose which units to train or design.
-> Player: added function called IsUnitTypeBuildable() that takes a PUnitType param and checks various things that the player has to be able to do to train the specific unit type (meet prereqs, etc...).  This function is basically a wrapper to code that I moved from inside the UnitDesignsSubWnd, except it checks the new unit type function pUnitType->CanBeDesigned(player) instead of going through a hard-coded list of unit type internal names that we want to exclude.
-> removed a hardcoded if statement that checked unit type internal names.  Replaced with pPlayer->IsUnitTypeBuildable(pUnitType)
-> Added code for training units.  We are back to picking a random unit type to train, with some extra checks for if it's possible.  As before, it picks a random index to check and then will iterate from that point, (wrapping back to start if needed) until if finds a unit type that is buildable (if any).
-> an AI city will attempt to train units once per turn, as long as their are no units already in the training queue.

+ AI Researching and Building Cities

-> removed the old and unused functions: FirstTurn(), PlanStrategy(), and ExecuteStrategy()
-> added the new functions from AISkeleton: AIManageResearch(), AIGetBestResearchCategory(), and AIManageTechBreakthrough()
-> AIManageResearch() is called once per turn.  It calls AIGetBestResearchCategory() if no category is selected.  
-> AIGetBestResearchCategory(), for now, just picks a random category and returns it
-> AIManageTechBreakthrough() is called only when the AI research reaches a milestone.  For now, it just picks a random available breakthrough, and then has a 50% chance of calling AIGetBestResearchCategory() to change research category. Otherwise it just stays with that is already selected.
-> Added code so that AI cities only have one imp placed at a time.  will wait until it is finished before queueing up another imp for construction
-> fleshed out AIChooseFutureCityLocations() so that AI prefers a location near a fertile land tile for it's first city, then near a shard or iron ore deposit for subsequent cities
-> AI will now scoop up known goodie huts, but only within a certain radius of friendly cities (20 tile radius for now).  If it can't find any and has no other dest set, it will just pick a random tile within the friendly city radius to travel to (so as to uncover more FOW)

--- Diplomacy Windows ---

Overview: The skeleton of the Diplomacy System has been implemented. You can speak to other races and establish various treaties with them. The most significant being the 'non-agression' treaty, allowing passage through other player's territory.

+ DiplomacyButtonEntryWnd.h/cpp/dxpack : entry with a button on it
+ DiplomacyItemEntryWnd: entry with a field for a label and a value (for bottom dialog)
+ DiplomacyScrollCategoryEntryWnd: Entry for the listboxes that look like scrolls, for category headers
+ DiplomacyScrollEntryWnd: Entry for listboxes that look like scrolls, for items without a specific value or quantity
+ DiplomacyScrollHeaderEntryWnd: Entry for listboxes that look like scrolls, header for the whole list
+ DiplomacyScrollItemEntryWnd: Entry for listboxes that look like scrolls, has label and value fields
+ DiplomacyTreatyEntryWnd: Entry for treaties list, with a label in the center and value fields on either side
+ DiplomacyWnd: main screen, has different modes: menu, info, trade, negotiate and hides/unhides parts as necessary
->Has prev/next functions to cycle through known players

+ Added Treaties
-> Treaties are completely data driven
-> Treaties can have calculations associated with them to affect values like trade income, change relations, or simply exist (like the non-agression pact) for specific code to check against
-> Treaties can specify required relations or min/max relations for a range.  
-> Specify -1 for an infinite duration, 0 for a single turn, and any other number for a limited duration

-> Checks for non-agression pact in move cost callback

+ Can get to Diplomacy Window from Conversation Window

+ Added some stats to the diplomacy info screens
-> Uses CDiplomacyInfoEntryWnd entries, which just use the CDiplomacyTreatyEntryWnd dxpack for now until a different one is made

+ Added a new popup when about to enter a city that you don't own and aren't at war with
-> Offers options to either attack the city, station in the city, or not enter the city
+ Enabled stationing units in friendly cities owned by other players, including letting you see your units you have stationed in any selected
city so that you can unstation them if you want

--- Conversation Windows ---

+ AI will pop up custom text and responses when you wonder into their territory

+ Can Declare War or Initiate Negotiations directly from this screen

+ Uses Flavor Text to calculate best conversation phrase

--- Cities ---

+ Can build roads between any cities now, not just within your kingdom
-> Once a road between two cities in different civs are built, they just trade 1 gold per turn with each other

+ Added more income info to the city details wnd, saying how much gold is received from buildings like inns (now all the values that make up the total are shown below the total)

+ "Research" city stat, modified by improvements, is now a multiplier on the research done by the city's population instead of a flat bonus

+ Added icons to city info card that display the resources the city is actively harvesting

+ city details lists research production and improvements being built
+ resources get traded at a 'passive' value of +1 and 'road' value of +2

--- UI ---

+ Added Info Note tool tip type
-> Added member m_bAllowResize to CInfoCardTextEntryWnd
-> If m_bAllowResize is set, it will resize the window to fit the text (shorter or taller)

+ When camera stops on main map, the mouse coordinates are checked for a tooltip

**********************************

** Gameplay Fixes **

- Trade -

+ Added an assert and debug message to catch times when caravans don't have a destination in hopes that that is why the caravan is freezing sometimes
+ Also added some evasive action to reset the destination to the last city the caravan was heading for if it has no destination
+ Fixed trade info display bug

+ Fixed a bug with trade after conquering a city

+ Fixed bug with IsCrossCivTrade in CCityTradeInfo, which caused caravans to not be created for trade routes between your own city

+ Fixed bug with caravans that caused them to not move at all once created, and made them able to handle setting bad destinations
-> Still have a weird teleporting behavior when setting their destination, but at least that can now be tested

+ Fixed a discontinuity between the resource amounts traded and the amount displayed in the city details wnd

--- Units ---

+ Overhauled movement code to move the players' data automaticially if off the screen, not all at the same time, etc.

+ Turn button waits for all units to move before allowing player to continue (fixes turn button spamming bugs)

+ Fixed bug where units would freeze if you pressed enter on the conversation popup or enter city popup

+ When a lone caravan is attacked, the caravan is automatically destroyed (no battle screen pops up), and a message box pops up saying which caravan
died and who killed it
+ Turn button doesn't freeze on loading a game and proceeding one turn anymore

+ Fixed bug where a unit's gfx stayed on the map after adding it to an army
+ Player only moves units that are “on the map”

+ Fixed a group of bugs with unit design that caused upgraded units to lose all production information, and caused some unit types to require more training time if upgraded, but not changed

+ OnEvent now sets waiting for event to be false

--- Cities ---

+ Fixed a crash when demolishing improvements that harvest something

+ Fixed some bugs with destroying improvements that were providing city or player stat bonuses

+ Removed a ref being added in SelectImprovement that never got removed

+ Build list updates after each improvement placement, so that newly reached tiles are taken into account, and no improvement is selected

+ Fixed lumber mill being able to be placed far away from any forest when you placed at least one improvement first

+ City context doesn't show a bunch of different values for food-per-turn anymore

+ No improvement selected when entering construction mode

+ added a check to the OnLeftClick() function, when trying to demolish an Improvement.  The check makes sure the Imp is owned by the local player.

+ Fixed inaccuracies in the available subtile count, as well as improved how subtiles get released when their improvements are removed.

+  Fixed tiles going "dead" after building and then removing improvements from them (the tile wasn't getting released from the city properly)
+ Fixed resources not reappearing after improvements built on them were destroyed (the graphics for the resources weren't getting regenerated properly).

+  Removed the inconsistent red highlight from the "Build Improvement" bar.

--- Player Data ---

+ Assigned m_ulMilitaryMight in CPlayer some value in CalculateMight, since it was completely unused

+ Fixed discrepancy between main game wnd display of kingdom income and the kingdom report wnd

+ Hooked up "TradeIncome" property in CPlayer, for supporting trade treaty calculations

+ Fixed Parriden sovereign sight stat at level 5, so leveling them up doesn't decrease the sight stat

+ Fixed how player class calculated some income values, which were inconsistent with the actual income added to the treasury each turn
-> This also fixed inconsistencies between the kingdom report screen and the city details/real life

+ Abilities now data driven (held in a MAP of ability strings, no longer a hard-coded array)

--- UI ---

+ Fixed minimap background stealing mouse messages in the main map

+ Fixed ALT+TAB issue where selection cursor's geometry was distorted after an alt-tab

+ Changed some stat displays in the UI to show only one number after the decimal point

+ Fixed inconsistencies between InfoCardSaveWnd unit type stats and UnitDesignWnd unit type passed in to it

+ Fixed bug where main ui context would not update for city stat changes if you selected the city through one of its improvements

+ Main UI player might pie chart doesn't show dead players anymore

+ Can't see the destination of enemy units when you select them

+ Health modifiers now display a heart icon instead of the starburst placeholder

+ Fixed asserts in UnitDesignsSubWnd from removed filter buttons
+ Added support for medallions to message box
+ Fixed bug where checking the "Hide Report Window" option in the Options screen did not disable the report window

+ Sovereigns now only update the context area if they belong to the local player

+ Fixed bug where you could not click on Medallion Boxes on some screens

- Research -

+ Fixed crash after earning multiple breakthroughs in the same tech track from missed AddRefs

+ Fixed bug where research screen would pop up in the middle of loading a game

--- Misc. ---

+ Added support for double consonants and double vowels to name generator

+ Default scale for tile design object is now 1.0f
+ Tile Designs now save both the scale and base scale of tile design objects to XML and read this in from XML
+ Made changes to Tile Editor screen to fix asserts caused by dxpack changes
+ When saving the image for a unit design, the file name is converted to a valid file name (no invalid characters allowed)

**********************************

** Engine Fixes **

- Memory Leaks -

+ A couple memory leak fixes, including the bad one that creeps up quickly when the game was just sitting there at the main map screen

- Misc. -

+ Updated version of ImpulseReactor and added in overlay. 

**********************************

Elemental Beta 1C Preview

Published on Thursday, December 3, 2009 By Brad Wardell In Elemental Dev Journals

Today Elemental Beta 1C should be going up.  This is the AI beta.  From a player’s point of view, it’s largely meaningless because the computer players are still very primitive.  But from a technical point of view, it’s a key milestone because hundreds of APIs have been written that can now be enhanced to make the AI more intelligent.

Here’s some examples of what’s been getting in:

Previous check-in(s)

// Building a City

· -if it's the first city, it looks for a tile location adjacent to a food tile.  When it finds one, it will build the city there

· -for any other city, it looks for a tile adjacent to a mineable resource (like, ore or a shard, etc..)

// After building a city

· -look for and grab nearby goodie huts in 'r' tile radius of the city (where r is 20 for now)

// City Build Mode

· -will leave early if no buildable tiles or subtiles

· -Will not queue up more than one imp at a time

· -randomly selects a buildable imp

· -attempts to find a tile or subtile within the city to place the imp on (might not fit anywhere)

· -Implications: an AI city will never have more than one imp under construction at a time.  It's possible that serveral turns will go by where an AI city doesn't have anything under construction (due to randomly picking an imp, and then seeing if it fits anywhere)

// Research

· -leave early if no cities (no cities = no population = no research points)

· -if not already researching a category, pick a random one

// Research Breakthough

· randomly pick one of the breakthrough techs

· 50/50 chance to continue with current category or pick a new category (new one will be random)

This Check-in

// Unit Design

· only do it every 't' turns (where t is 10 for now)

· assign random name (eventually we want to name based on battle strength, xml driven)

· Assign random weapons

· Assign random armor

· Assign random equipment

· if SumOfAllStats is greater than an existing design, save this design, including the turn number it was created

// City train unit

· leave early if already training a guy

· randomly pick a design and use it

· sure we aren't training guys that were designed x turns ago (where x is 100 for now)

// HIGHLIGHTS

+ AI now attempts to design a unit type every 10 turns.  Keeps it if it is better than at least one of that faction's previously designed unit types (during that game)

+ AI picks a random unit to train, so long as it wasnt designed more than 100 turns ago, otherwise a different one is choosen to be trained

// DETAILS OF CHANGED FILES

+ MainMapViewWindow.cpp

- checking in some changes I missed for the ability to use the debug shortcut keys in Release by specifing USE_DEBUG_KEYS

- fixed some else if statements that had the "else" and the "if" on different lines

+ AISkeleton .h/.cpp

- Added a pure virtual function called AIDesignUnit() that is meant to be overridden by your AISkeleton-derrived class.

+ AiBasic .h/.cpp

- Added a declarations and definition of AIDesignUnit()

- added function AICompareToDesigns(), which takes a unit type pointer and compares it to all the other unit types designed by AI during that particular game.

- Added a variable to keep track of the last turn that this AI successfully designed a unit

- AI will not attempt to train units if net income is below 0.0

- AI will not train a unit that was designed more than 100 turns ago

+ UnitType .h/.cpp

- Added function GetStat(index) which will return the value of the stat at index.  Still need to add code to sum up the modifiers

- added functions for SigmaStat.  SigmaStat is all your stats summed up.  functions added are CalcSigmaStat(), and two variations of CompareMySigmaStatTo() which takes either another unit type pointer, or a ulong for the other sigma stat value.

- changed AddUnitType to return a BOOL so you can tell if it failed or not

- added stat copying to the copy constructor

 

For the most part, the AI is just picking random stuff.  The way AI development works is that you create the plumbing and then refine over months.

Now, for those of you not in the beta, this is still very primitive stuff.  So don’t envy the beta group here as they’re suffering through lots of pain still and will continue to do so for at least another month and a half before the game remotely becomes “enjoyable” IMO.

We will be continuing to use the 2D sprite engine for the game until the beta group determines the game is enjoyable without having to rely on its state of the art engine that we have disabled presently.

Object Desktop 2010: Live Video Demo

Published on Thursday, December 3, 2009 By Brad Wardell In Personal Computing

Taking Windows 7 to the next level.

Part 1:

Part 2:

Object Desktop is Stardock’s premiere suite of desktop enhancement utilities.  While Windows itself is made for “everyone” Object Desktop is designed specifically for “power users” who want to get more out of their PCs.

This video demo goes over the basics of what Object Desktop can do.

Visit www.objectdesktop.com to get it.

24 Hour Impulses: The Concept

Published on Wednesday, December 2, 2009 By Brad Wardell In Personal Computing

Over the past few months we’ve been working on creating a system to send users “instant messages” via the Impulse tray program.  Now users who have “Show Promotions” enabled in their “Impulse Now” settings can receive balloon notifications from their system tray on special offers that come in.

Here’s how it works:

[Need a nice screenshot of a balloon showing up <g>].  Impulse has been working to put together a series of special promotions during the month of December. Anyone with Impulse installed and has the tray program running (which it is by default) and hasn’t turned off promotions will start receiving special offers.

These aren’t ordinary sales, however. They’re special deals we’ve put together with developers that only exist for 24 hours and are priced at a level we aren’t able to promote on our main websites.

The first test promotion was Galactic Civilizations for $0.99.  We will be doing some “warm up specials” over the coming week as we prepare for the Impulse “12 days of Christmas” where AAA titles will start to get steep discounts.

To participate, simply download and install Impulse (www.impulsedriven.com).  The tray program, Impulse Now, will automatically be installed (you can also load it immediately by typing impulsenow via the Start menu).

Demigod Epoch 3 starts next week

Published on Tuesday, December 1, 2009 By Brad Wardell In Demigod Journals

Next week Demigod will begin its third epoch. Part of that will likely include the availability of Oculus.

Each epoch means the zeroing out of the stats. You keep your Favor points but everything else resets. You can still access your epoch 1 and epoch 2 stats on the pantheon but it’s a great way for people to start with a clean slate online.

I’ve been playing Oculus online.  I have some suggestions on him but he’s a serious damage dealer to grunts though.

Playing with new private Impulse update

Published on Tuesday, December 1, 2009 By Brad Wardell In PC Gaming

image

The team is working on getting Impulse ready to handle pre-loads so that some of the upcoming large-scale titles can be installed onto people’s machines prior to release and then enabled on launch day.

One of the other features is the support for Windows 7 Jump Lists.  These features were originally planned to be all part of Impulse: Phase 5 but the desire to get pre-loading in for the holidays moved what we were working on up.

This should go to the public in the next couple weeks.

Sins of a Solar Empire still crazy fun

Published on Tuesday, December 1, 2009 By Brad Wardell In PC Gaming

I finally got a chance to play some serious Sins of a Solar Empire: Diplomacy today.  I’ll get more to into it over the coming days when Object Desktop gets released and the Elemental beta gets out the door.

But I was really pleased at how fun Sins of a Solar Empire continues to be. I’m biased but the game really has amazing depth. 

Now, the first thing I noticed about Diplomacy was the option for “faster” which I think will be one of the features that people like a lot since it really helps move the game along.

I’d like to see the Diplomacy tech tree fleshed out more. I’ll write more soon on that.