www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DTiled: Tiled map loader

reply "rcorre" <ryan rcorre.net> writes:
Any D game developers out there looking to create a tile-based 
game?

DTiled aims to provide a quick and easy way to load maps created 
with Tiled
(http://www.mapeditor.org). For those that don't know, Tiled is 
an open-source
2D tilemap editor that is a great tool for indie developers.

At the moment, DTiled is a pretty thin wrapper around Tiled's 
JSON map format,
though it provides a few useful helper functions and may expand 
to provide a
higher-level API for inspecting tilemap data.

DUB:    http://code.dlang.org/packages/dtiled
Docs:   http://rcorre.github.io/dtiled/dtiled.html
Github: https://github.com/rcorre/dtiled

DTiled is focused on loading and inspecting tilemap data rather 
than rendering it, as I do not want to tie DTiled to a particular 
rendering engine.
The idea is that a developer can use DTiled to inspect the 
information exported from tiled and populate their own in-game 
map data.

Want to see it in action?
Check out this example, which uses DTiled to load a map and 
Allegro to render
it: https://github.com/rcorre/dtiled-example

Other than that example and some unit tests on the loaded data, 
DTiled is not
yet well-proven. However, I am trying to get back into gamedev 
and intend on
developing DTiled further as I use it.

If you give it a try, let me know what you think!
May 02 2015
next sibling parent reply "rcorre" <ryan rcorre.net> writes:
hmm ... apparently copy-pasting out of a vim buffer was not a 
good idea. Sorry about the weird line breaks.
May 02 2015
parent reply "Namespace" <rswhite4 gmail.com> writes:
On Saturday, 2 May 2015 at 19:17:51 UTC, rcorre wrote:
 hmm ... apparently copy-pasting out of a vim buffer was not a 
 good idea. Sorry about the weird line breaks.
Nice that you named Dgame on your repo. ;) As soon as it supports XML and CSV I would definitely use it. For my April/Mai game "Angry Snowball" (https://github.com/Dgame/AngrySnowball) I use currently a CSV format.
May 02 2015
next sibling parent reply "rcorre" <ryan rcorre.net> writes:
On Saturday, 2 May 2015 at 19:24:12 UTC, Namespace wrote:
 Nice that you named Dgame on your repo. ;) As soon as it 
 supports XML and CSV I would definitely use it.

 For my April/Mai game "Angry Snowball" 
 (https://github.com/Dgame/AngrySnowball) I use currently a CSV 
 format.
Unfortunately XML support is not a top priority for me, as I always use the JSON format. I normally have a build step that converts updated TMX file sto JSON files, which isn't a big deal since I already have a sort of content pipeline for music and art. It is a possibility but I'd need to find a good XML serializer. Orange looks good but isn't on dub, and I'd like to integrate it in a way that users who only want JSON don't need to pull in the XML dependency (and visa-versa). Out of curiosity, any reason for preferring the XML format? Not that I have a good reason for preferring JSON.
May 02 2015
parent "Namespace" <rswhite4 gmail.com> writes:
On Sunday, 3 May 2015 at 01:18:01 UTC, rcorre wrote:
 On Saturday, 2 May 2015 at 19:24:12 UTC, Namespace wrote:
 Nice that you named Dgame on your repo. ;) As soon as it 
 supports XML and CSV I would definitely use it.

 For my April/Mai game "Angry Snowball" 
 (https://github.com/Dgame/AngrySnowball) I use currently a CSV 
 format.
Unfortunately XML support is not a top priority for me, as I always use the JSON format. I normally have a build step that converts updated TMX file sto JSON files, which isn't a big deal since I already have a sort of content pipeline for music and art. It is a possibility but I'd need to find a good XML serializer. Orange looks good but isn't on dub, and I'd like to integrate it in a way that users who only want JSON don't need to pull in the XML dependency (and visa-versa). Out of curiosity, any reason for preferring the XML format? Not that I have a good reason for preferring JSON.
No, no reason. And at the moment I am using CSV, so CSV would be my top priority.
May 03 2015
prev sibling parent reply "tired_eyes" <pastuhov85 gmail.com> writes:
 Nice that you named Dgame on your repo. ;) As soon as it 
 supports XML and CSV I would definitely use it.
Everyone who starts a game in D calls it Dgame!
May 02 2015
parent "Namespace" <rswhite4 gmail.com> writes:
On Sunday, 3 May 2015 at 06:57:34 UTC, tired_eyes wrote:
 Nice that you named Dgame on your repo. ;) As soon as it 
 supports XML and CSV I would definitely use it.
Everyone who starts a game in D calls it Dgame!
That may be true, but I was referring to my framework.
May 03 2015
prev sibling parent "Dmitry" <dmitry indiedev.ru> writes:
On Saturday, 2 May 2015 at 19:16:03 UTC, rcorre wrote:
 Any D game developers out there looking to create a tile-based 
 game?

 DTiled aims to provide a quick and easy way to load maps 
 created with Tiled
Good! Thank you!
May 02 2015