1 / 24

Transport Tycoon 3D

Transport Tycoon 3D. Adam Miles . What is “Transport Tycoon”?. 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.

chenoa
Download Presentation

Transport Tycoon 3D

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Transport Tycoon 3D Adam Miles

  2. What is “Transport Tycoon”? • 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. Transport Tycoon Deluxe

  4. Transport Tycoon Deluxe

  5. OpenTTD • 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. Transport Tycoon 3D • 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.

  7. TT3D – 3D Engine • 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

  8. TT3D – 3D Engine

  9. TT3D – 3D Engine • Textured Meshes • Positionable • Rotatable • Scalable • ‘Instanced’…

  10. TT3D – 3D Engine: Instancing • 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).

  11. TT3D – 3D Engine: Instancing

  12. TT3D – 3D Engine: Performance

  13. TT3D – Gameplay • 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.

  14. TT3D – Road Network • 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.

  15. TT3D – Road Network: Pathfinding • 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…

  16. TT3D – Landscaping • 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…

  17. TT3D – Landscaping • Grid-based system

  18. TT3D – Graphical User Interface (GUI) • TT3D implements:

  19. TT3D – GUI: View Window • 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.

  20. TT3D – Challenges • 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.

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

More Related