• Manual
  • Scripting API
  • Asset Store
  • Extending Tycoon Tile
  • Custom Renderer
Search Results for

    Show / Hide Table of Contents
    • Getting Started
      • Quick Start
      • Core Concepts
      • Basic Usage
      • Example Contents
      • Version History
    • Extending Tycoon Tile
      • Custom terrain operations
      • Custom tools
      • Custom Renderer

    Creating Custom Renderer

    The standard renderer that is included in Tycoon Tile provides a basic starting point for your project. However, each project may have its own unique requirements in terms of visuals. Therefore, Tycoon Tile is structured to be easily extendable and allows you to implement your own renderer.

    TycoonTileRendererBase

    The TycoonTileRendererBase class provides a starting point for implementing your own TycoonTile terrain renderer. It contains a reference to the target map, is responsible for subscribing to map events and keeps track of which chunks need updating.

    There is one abstract method that needs to be implemented when inheriting from this base class, which is UpdateChunkMeshes. This method provides two parameters: the chunk positions of chunks that need updating and a dictionary with a chunk position to mesh mapping. One can add ChunkMesh instances to this mesh dictionary or add their own mesh class that implements the IMesh interace. The ChunkMesh class provides an easy wrapper that includes meshes for tile surfaces, tile cliffs and water meshes that are each rendered with their own material.

    Note that this dictionary is not cleared between updates, so it is recommended to check for key existance before adding new instances to the dictionary.

    In This Article
    • TycoonTileRendererBase
    Back to top Tycoon Tile documentation