Archive

Archive for January, 2011

The French Arrive

January 30th, 2011 admin 1 comment

British Infantry watch French Infantry approach.

In these screenshots, each model represents 25 troops, and the map. The troops are therefore not in scale to the terrain.

Categories: Development Screenshots Tags:

Aerial view of Waterloo Battlefield

January 27th, 2011 admin No comments

Waterloo   Minimap view showing troop positions, roads and trees at 1130.

Categories: Development Screenshots Tags:

3D Map Creation

January 25th, 2011 admin No comments

The various 3D battlefields were achieved as follows:

Create Heightmap

This can be achieved using several methods. For historic maps you have a choice of using old maps that could contain survey errors versus using modern maps that are accurate, but don’t account for any terrain changes. For example the Waterloo battle field was dramatically “sculptured” building the Lion Mound in 1826, and the more recent building of modern roads. When overlaid the old map contours are significantly different to modern map contours, but the essential shape is the same, and apart from the Lion Mound should not produce too many game map errors.  In the end I decided to use the contours from a modern map, making changes / allowances for obvious changes since 1812. I used old maps for details of woodland and roads. IAlthough this game will support multiple 18th / 19th century battlefields I will use the Waterloo map as an example. 

I traced out the contour detail and then assigned a greyscale value to each of the contour heights.

Although I started with a 2048 x 2048 pixel map, which covered an area   5Km x 5Km it was obvious that the resulting mesh would be to great (for the XBox). Also the mesh needed ony to cover the actual battlefield ans so I reduced this to 256 x 192. I used L3DT to smooth out my heightmap.

The terrain mesh  was to be created from the heightmap and so a Content Processor was required to create the mesh. I found an excellent example of such a mesh creator on XNA Creators and used that as the basis for my content processor. Heightmap data is saved allowing later lookup to allow other model placement on the map. 

I could have overcome the mesh size limit by creating several mesh objects (eg 4 or 6) and adding them together but I feared further later problems in the HLSL code required to handle several adjoining objects and so opted for a single mesh object. For larger battlefields I will revisit this option. The mesh creator allows me to change terrain characteristics such vertical and horizontal scales independently.

So my final map model represents an area 5.120 Km wide x 3.83 Km deep, which covers all the significant areas of the Waterloo battlefield. My game scale is 1 pixel = 1 m, and with the zero located in the centre of the battlefield my camera travels from -2560 to + 2560 in the width and -1915 to +1915 in the depth.

To be continued….

Create Tree Map

Create Road Map

The roadmap is a greyscale image (lowcost) that defines the road network. A gausian blur (radius 2) was applied to the roadmap.

Roads drawn on 4096 x 4096 panel with white background using pen size of 20 (main road) and 10 (minor road) , hardness: 9, step: 20.

Create Hex overlay

The hexgrid is simply a texture repeated over the terrain map and optionally merged in the terrain shader. The hex texture can also be smoothed using a gausian blur.

Create Unit Position Map

Categories: Map Tags:

HexWorld: Waterloo Map

January 25th, 2011 admin No comments

Progress video.

Roads and terrain heights now working together. Darker clounds needed as it was not such a nice day.

Cursor added.

Camera simplified and updated to follow cursor.

New Infantry and Cavalry units introduced – though still not animated.

All game content now driven by XML files, allowing me to define a battlefield and Order of Battle with XML data.

Most of the previous videos/images were of the Strategic View. This video view is a Battle View showing zoomed in view of the Waterloo terrain. The concept is that a cluster of 7 hexagons (for example)  on the Strategic View will zoom into the Battle View. The Strategic View units will represent Division size units, while the Battle View units will represent Battalions.

Cursor glides over terrain.

Hexgrid is now optional:

Categories: Demo Video Tags:

XNA 3.1 and 4.0. Cheat Sheet

January 11th, 2011 admin No comments

Somebody has taken the time to list the differences between XNA 3.1 and 4.0.  This would have saved everyone many many hours if this was done a few months ago. Well done Nelxon!

http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/

Categories: XNA 4 Tags: