GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - marshallward/TiledSharp: C# library for parsing and importing TMX and TSX files generated by Tiled, a tile map generation tool

BranchesTags
Open more actions menu

Latest commit

 

History

280 Commits
280 Commits

Folders and files

NameName
Last commit message
Last commit date
TiledSharp.Test
TiledSharp.Test
 
 
TiledSharp
TiledSharp
 
 
docs
docs
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
CHANGELOG
CHANGELOG
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.rst
README.rst
 
 
TiledSharp.sln
TiledSharp.sln
 
 

Repository files navigation

TiledSharp

A .NET C# library for importing Tiled TMX tile maps

NOTE: This project is no longer being maintained. Please consider using the TiledCS project, which has a similar API and supports a greater number of features.

About TiledSharp

TiledSharp is a .NET C# library for importing TMX tilemaps and TSX tilesets generated by Tiled, a tile map generation tool. The data is saved as a TmxMap object, whose structure closely resembles the original TMX file.

As a generic TMX and TSX parser, TiledSharp does not render the maps or depend on any external framework beyond .NET, such as Windows, XNA/MonoGame, Unity, or PSM. However, it can be used as an interface between TMX data and external games.

Usage

To import a TMX file into your C# application:

  • Include a reference to TiledSharp. You can either incorporare it directory into your own project, or you can pre-compile it and include the DLL.

  • Import the TiledSharp namespace (optional):

    using TiledSharp;
  • Create a Map object using the constructor:

    var map = new TmxMap("someMap.tmx");

    TiledSharp supports both resource names and file paths, and should work as expected in most situations. For more details, please consult the wiki.

  • Access the TMX data using the Map fields. Principal classes can be accessed by either name or index:

    var map = new TmxMap("someMap.tmx");
    var version = map.Version;
    var myTileset = map.Tilesets["myTileset"];
    var myLayer = map.Layers[2];
    var hiddenChest = map.ObjectGroups["Chests"].Objects["hiddenChest"];

Map data fields correspond closely to the TMX file structure. For a complete listing, see the documentation.

Although TiledSharp can manage elements with the same name, it is not recommended. For more information, see the TmxList specification.

Examples

  • Github user Temeez has provided a simple example of a MonoGame project using TiledSharp:

    https://github.com/Temeez/TiledSharp-MonoGame-Example

  • Tesserae was an attempt to create a general TMX renderer for MonoGame. I still don't feel that it's ready for general use, but it may help others to develop their own renderers.

    An example game using Tesserae is available here:

    https://github.com/marshallward/DemoGame

Notes

TiledSharp parses XML files produced by Tiled, an open-source (GPL) tile map editor developed and maintained by Thorbjørn Lindeijer.

Licensing

TiledSharp is distributed under the Apache 2.0 License. The code can be used freely in any project, including commercial software, and does not place any restrictions on your own code. But any changes to TiledSharp must be documented explicitly.

Attribution is not necessary, but always appreciated.

Contact

Marshall Ward <[email protected]>

About

C# library for parsing and importing TMX and TSX files generated by Tiled, a tile map generation tool

marshallward.github.io/TiledSharp

Topics

tiled-map-editortmx

Resources

Readme
Apache-2.0 license
Activity

Stars

340 stars

Watchers

30 watching

Forks

88 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.