Top Banner
Adam Miles
24

Adam Miles. Transport Tycoon Deluxe (TTD): Written by Chris Sawyer for Microprose in 1994. Written almost entirely in Assembly language. Designed.

Mar 31, 2015

Download

Documents

Myra Caswell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Adam Miles

Page 2: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Transport Tycoon Deluxe (TTD): Written by Chris Sawyer for Microprose in 1994. Written almost entirely in Assembly language. Designed for MSDOS, sprites, 8bit graphics,

MIDI. Earn money by transporting passengers and

cargo. Build road/rail networks, planes and ships. Compete against up to 7 AI players. World size fixed to 256 x 256 tiles.

Page 3: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 4: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 5: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

2D Clone of Transport Tycoon Deluxe.

OpenTTD: Disassembled TTD, rewritten in C. Uses original graphics files, legality in

question. Significant feature enhancements:

World size increased up to 2048 x 2048. “… an AI that is actually worthy of its name” LAN and Internet multiplayer. Customisable graphics.

Page 6: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 7: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 8: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

3D Clone of Transport Tycoon Deluxe.

TT3D: Completely rewritten from scratch. Fully 3D game world. Written in C# and Managed DirectX 9.0c. Larger map sizes – 512 x 512. Industries and Road Network.

Page 9: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Managed DirectX 9.0c – C#

Terrain Tilemap

Any size - non powers of 2 width/length if desired.

Chunked – draws only the terrain in your locality.

Texturing and Highlighting. Landscaping – per vertex height variation. ‘Pickable’:

Tile Vertex Side of a tile

Page 10: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 11: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Textured Meshes Positionable Rotatable Scalable

‘Instanced’…

Page 12: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

What does Hardware Instancing do? Draws many copies of identical objects – 1 draw call

Why use instancing? ‘Small Batch’ problem in DirectX 9. Every draw call goes via the CPU. Lots of draw calls maxes out CPU – low frame rate. A single draw call for all identical objects is the solution. Memory savings when compared to Shader Instancing.

How does it work? Multiple streams of data when rendering. Stream 0 = Mesh Data (Vertices). Stream 1 = Position Data (Vector4 – x, y, z. w is unused). Stream 2 = Rotation Data (Vector4 – x, y, z. w is unused).

Page 13: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 14: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 15: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

What is implemented in TT3D? Road/Tunnel Construction Depot/Station Construction

Vehicle Construction Maintenance costs

Pathfinding Landscaping Industries

Cargo Delivery Earn Money

GUI – Fully fledged Window and Control system.

Page 16: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Grid-based system Half / Full Straight Road Corner T-Junction Crossroads

3D Bi-directional Graph ‘Nodes’ are located on corners and junctions. Vehicles given a path to follow: Node ->

Node. Kept in its most optimal state. Allows for one-way streets.

Page 17: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

A* Pathfinding Provides ‘shortest-path’ capability on the graph.

How does it work? Uses a cost + ‘best-case’ heuristic. List of potential routes, explore the best

looking. When best-case for Route A becomes worse

than Route B, explore Route B. Repeat until such a time that:

Destination is found. All potential routes have been explored, no path at

all. In-game demonstration/explanation later…

Page 18: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Grid-based system Rules:

No vertex may be > 1 unit above/below a neighbour.

No vertex may descend below zero. Edge of the map must remain at zero.

Algorithm was recursive… Large pyramids resulted in stack overflow…

Redesigned without recursion. Can still get slow on very large pyramids.

Once again, demonstration/explanation later…

Page 19: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Grid-based system

Page 20: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

TT3D implements:

Page 21: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Provides functionality to view and render a “window” on another part of the world. Used on vehicle windows to follow them

around the world.

How does it work? Create a second camera. Render the world to a texture using the

new camera. Draw the texture to the screen Present the final image.

Page 22: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.
Page 23: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

Terrain Performance

Rewritten from scratch ~ 5 times. 1 draw call per tile… 1 draw call for the entire terrain.

Beginning to near theoretical limit of the GPU.

Road Network Maintaining the graph optimally. 3 dimensions: Tunnels/Bridges.

Page 24: Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed.

List is almost endless… Railways, Ships, Aircraft Towns Terrain generation Save Games Multiplayer – LAN / Internet AI / Computer players Lighting Artwork Etc…