[Dtiled] Unfamiliar terms and trouble using it for Dgame

Jack via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 27 21:44:32 PST 2015


On Friday, 27 November 2015 at 19:22:50 UTC, Namespace wrote:
> On Friday, 27 November 2015 at 13:00:16 UTC, Jack wrote:
>> Greetings!
>>
>> I've been using Dgame for quite a while now and I have been 
>> learning quite a lot from using playing with it. Then I found 
>> Tiled that's a tool to draw tilemaps, and DTiled to implement 
>> it.
>>
>> Link [ http://code.dlang.org/packages/dtiled]
>>
>> I've spent about an hour in order to make it work in Dgame, 
>> basing my code in the examples, and I have a bit of trouble in 
>> using it, since I am just a newbie.
>>
>> I've learned about templates, and all the other doodads, but I 
>> have trouble translating the tutorial code in loading the map 
>> to work with Dgame.
>>
>> Can someone help me understand the code? I can't wrap my head 
>> around it.
>
> What exactly causes you problems?

Well to start, I just copied the code for loading the map and 
tried to build it, substituting the variables like Rect and 
others.

Then it went crazy all of a sudden:

http://dpaste.com/2D59A2B

The whole thing went mad, and I was sure I had my imports correct:

import dtiled.data;
import dtiled.map;
import dtiled.grid;
import dtiled.algorithm;
import dtiled.coords;

import Dgame.Math.Rect;
import Dgame.Math.Vector2;
import Dgame.Math.Geometry;
import Dgame.Math.Vertex;

And that's where I was left dumbfounded. I use the latest D 
compiler, and the latest dub. Dmd v.2.069.1 and dub v.0.9.24


More information about the Digitalmars-d-learn mailing list