Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Adam Miles.  Transport Tycoon Deluxe (TTD):  Written by Chris Sawyer for Microprose in 1994.  Written almost entirely in Assembly language.  Designed."— Presentation transcript:

1 Adam Miles

2  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.

3

4

5  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.

6

7

8  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.

9  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

10

11  Textured Meshes  Positionable  Rotatable  Scalable  ‘Instanced’…

12  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).

13

14 World Chunking Frustum Culling Hardware Instancing

15  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.

16  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.

17  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…

18  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…

19  Grid-based system

20 Windows Z-Order Dragging Focus Resizing Visibility Hierarchy Controls Label Button Textbox Radio button Checkbox List box View Window Scrollbar Title Bar  TT3D implements:

21  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.

22

23  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.

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


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

Similar presentations


Ads by Google