All Projects → IrishBruse → LDtkMonogame

IrishBruse / LDtkMonogame

Licence: MIT license
Monogame renderer and importer for LDtk Level editor

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Handlebars
879 projects
powershell
5483 projects

Projects that are alternatives of or similar to LDtkMonogame

ArcaneManagedFbx
C# and .NET Framework wrapper for the Autodesk FBX SDK written in C++/CLI (managed C++).
Stars: ✭ 36 (-16.28%)
Mutual labels:  monogame
documentation
The LibreELEC wiki on GitBooks https://libreelec.wiki
Stars: ✭ 30 (-30.23%)
Mutual labels:  wiki
wikibot
Some MediaWiki bot examples including wikipedia, wikidata using MediaWiki module of CeJS library. 採用 CeJS MediaWiki 自動化作業用程式庫來製作 MediaWiki (維基百科/維基數據) 機器人的範例。
Stars: ✭ 26 (-39.53%)
Mutual labels:  wiki
tiddlywiki-docker
Tools for running TiddlyWiki via a Docker container
Stars: ✭ 34 (-20.93%)
Mutual labels:  wiki
SemanticWikibase
Makes Wikibase data available in Semantic MediaWiki
Stars: ✭ 14 (-67.44%)
Mutual labels:  wiki
Transform
Base Monogame objects for managing relative transforms.
Stars: ✭ 19 (-55.81%)
Mutual labels:  monogame
fabrica-collaborative-editing
Plugin to make WordPress more Wiki-like by allowing more than one person to edit the same Post, Page, or Custom Post Type at the same time. When there are conflicting edits, it helps users to view, compare, and merge changes before saving.
Stars: ✭ 19 (-55.81%)
Mutual labels:  wiki
rurusetto
A wiki that contain all osu! rulesets
Stars: ✭ 31 (-27.91%)
Mutual labels:  wiki
L4D2-Comp-Stripper-Rework
Reworking Stripper:Source map changes for competitive L4D2 from scratch.
Stars: ✭ 26 (-39.53%)
Mutual labels:  wiki
eryajf.github.io
📝 大千世界,何其茫茫。谨此笔记,记录过往。凭君阅览,小站洛荒。如能收益,莫大奢望
Stars: ✭ 159 (+269.77%)
Mutual labels:  wiki
blue-book
My personal knowledge repository
Stars: ✭ 464 (+979.07%)
Mutual labels:  wiki
FreePhone
FreePhone es un proyecto de investigación sobre privacidad en dispositivos móviles. Con este repositorio pretendemos liberar toda la experiencia acumulada durante la creación de un smartphone casero.
Stars: ✭ 57 (+32.56%)
Mutual labels:  wiki
pw
Best websites a Programmer should visit
Stars: ✭ 27 (-37.21%)
Mutual labels:  wiki
TW5FontAwesome
⚑ Embedding Font Awesome in TW5
Stars: ✭ 41 (-4.65%)
Mutual labels:  wiki
hub
好用的工具、资源收集库, 好记性不如破键盘
Stars: ✭ 63 (+46.51%)
Mutual labels:  wiki
Texture-KR-Wiki
Texture (AsyncDisplayKit) Wiki - 한국어
Stars: ✭ 42 (-2.33%)
Mutual labels:  wiki
messages
A python package designed to make sending messages easy and efficient!
Stars: ✭ 38 (-11.63%)
Mutual labels:  wiki
kitsu-wiki
📑 The wiki frontend for Kitsu
Stars: ✭ 12 (-72.09%)
Mutual labels:  wiki
matic-docs
The official documentation for all Polygon products.
Stars: ✭ 181 (+320.93%)
Mutual labels:  wiki
teedoc
wiki and multi docs friendly static document site generator(doc generator), convert markdown and jupyter notebook to html website. wiki 和多文档友好的静态文档网站生成工具
Stars: ✭ 72 (+67.44%)
Mutual labels:  wiki

LDtkMonogame Wiki

Discord Link

Monogame renderer and importer for LDtk Level editor

Getting Started

The easiest way to start using LDtkMonogame is to import it into the project using NuGet package.

Make sure to import the namespace at the top

using LDtk;
// Optional
using LDtk.Renderer;

LDtk.Renderer is a premade renderer for the levels, you can create your own if you have more specific needs LDtkRenderer.cs is an example of how to make one. Or you can inherit it and extend it.

To get started loading ldtk files load the file in Initialize.

LDtkFile file = LDtkFile.FromFile("World", Content);
LDtkFile file = LDtkFile.FromFile("Data/World.ldtk");

Then load the world right after for now ldtk only supports one file but make sure to enable the multiworlds flag in the project settings under advanced.

LDtkWorld world = file.LoadWorld(Worlds.World.Iid);

The Worlds.World.Iid is generated from the ldtkgen tool and is recommended that you use it for static typing of entities and levels.
It is a class within in a class that represents the world name and the levels name and holds the iid you can use to load that specific level.

Create the renderer in Initialize.

LDtkRenderer renderer = new LDtkRenderer(spriteBatch, Content);
LDtkRenderer renderer = new LDtkRenderer(spriteBatch);

Prerender Levels

foreach (LDtkLevel level in world.Levels)
{
    renderer.PrerenderLevel(level);
}

Now to render the level and entities we loaded in Draw

GraphicsDevice.Clear(world.BgColor);

spriteBatch.Begin(samplerState: SamplerState.PointClamp);
{
    foreach (LDtkLevel level in world.Levels)
    {
        renderer.RenderPrerenderedLevel(level);
    }
}
spriteBatch.End();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].