सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
टाइल्ड पैकेज एक डार्ट लाइब्रेरी है जो टाइल्ड मैप एडिटर से TMX फ़ाइलों को पार्स करती है, और उन्हें गेम डेवलपमेंट में उपयोग के लिए संरचित डेटा में बदलती है। यह फ्लेम गेम इंजन के साथ निरंतर रूप से एकीकृत है, जिससे विकासकर्ता विभिन्न प्लेटफॉर्मों पर टाइलमैप को कुशलता से लोड और रेंडर कर सकते हैं। पैकेज में लेयर, ऑब्जेक्ट्स और टाइलसेट जैसी विभिन्न टाइल्ड विशेषताओं का समर्थन है, जिससे यह 2D गेम्स के लिए आदर्श है। साफ और स्पष्ट API के साथ, यह डेटा हैंडलिंग के बिना मैप एकीकरण को सरल बनाता है।
उपयोग
गेम्स में 2D टाइलमैप लोड करना
Flame इंजन के साथ Tiled मानचित्र का एकीकरण
परतदार खेल स्तरों का निर्माण
TMX फ़ाइलों से टक्कर वस्तुओं का प्रबंधन
प्लेटफॉर्म या पहेली खेल बनाना
मुख्य विशेषताएँ
TMX फ़ाइल पार्सिंग समर्थन करता है
Flame गेम इंजन के साथ सुसंगत
क्रॉस-प्लेटफ़ॉर्म समर्थन
टाइलसेट और परतों का प्रबंधन करता है
वस्तु और टक्कर डेटा प्रदान करता है
इनके लिए उपयुक्त
Flame का उपयोग करने वाले 2D गेम डेवलपर्स
Tiled मानचित्र उपयोगकर्ता डार्ट एकीकरण की तलाश में
क्रॉस-प्लेटफॉर्म गेम प्रोजेक्ट्स
स्वतंत्र गेम निर्माता
गेम प्रोटोटाइपिंग
विचार योग्य बातें
TMX प्रारूप में Tiled मानचित्र फ़ाइलों की आवश्यकता होती है
केवल 2D टाइलमैप उपयोग मामलों तक सीमित
पूर्ण रेंडरिंग के लिए फ्लेम पर निर्भर
कस्टम Tiled प्लगइन के लिए कोई सीधा समर्थन नहीं है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Tiled Dart
A Dart Tiled library.
Install from Dart Pub Repository
To include the package as a dependency in your pubspec.yaml, run the following (or add it manually):
dart pub add tiled
Usage
Import the package like this:
import'package:tiled/tiled.dart';
Load Tmx Files
Load a TMX file into a string by any means, and then pass the string to TiledMap.parseTmx():
If your map references external files, like external tilesets (.tsx) or object templates
(.tx), you have to pass one or more ParserProviders that resolve these files. Every time the
parser encounters a reference to an external file, the first provider that canProvide the
referenced path is asked for a Parser of its contents through getSource.
The path is always relative to the map file, also for files referenced from other external files,
so a single provider can resolve any number of files, for example everything below a directory:
Parser.fromString creates an XmlParser or a JsonParser depending on the contents. Every file
is requested at most once per parsed map.
Objects that use a template inherit every value they do not specify themselves from the object of
the template, and their gid is translated to the tilesets of the map. When the map does not
contain the tileset of the template it is added to TiledMap.tilesets, like Tiled does when loading
the map.
The providers are passed to parseTmx or parseJson:
When the external files can only be loaded asynchronously, for example from an asset bundle, use
TiledMap.fromString instead. It parses either tmx or json and loads every referenced file, also
the ones referenced from other external files, with the given loader before returning the map: