Flixel Forums

development => help => Topic started by: XanderXevious on Mon, Sep 6, 2010

Title: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 6, 2010
DAME is a new free and powerful map editor.
Get DAME version 3.1.1 here! (http://dambots.com/dame-editor/)

DAME is coded using Flixel so if it displays in DAME then you know that it's going to work in your game *. And because it is an Adobe Air app it works (hopefully) on any platform that support Air. On my website you'll find installers using Air or native installers for both Mac and Windows if you need them.

Some things that DAME can do:

Click here to see more of its features including a couple of demo videos running through most of the features. (http://dambots.com/dame-editor/)

This has been my side project for a few months now in my goal of creating an editor that can help me make some really dynamic games. Please send me feedback, bugs, feature requests. I plan on doing a version 2 soon, so all feedback is welcome.

A simple sample 'game' made that was made using DAME. (http://dambots.com/games/claws/complexclaws.html)

Now works with BOTH flixel 2.43 and version 2.5
Title: Re: DAME - a new map editor made using flixel!
Post by: Retro-Rob on Mon, Sep 6, 2010
Oh, wow, full on tilemap editor... what does it meaan!?!?!  :D


This looks amazing, I just watched a demo vid and am installing it now.
Title: Re: DAME - a new map editor made using flixel!
Post by: Wing Eraser on Mon, Sep 6, 2010
Very very impressive!! I didn't tried yet, but I watched to movies. No other editors got the features you implemented. Good job!
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Sep 6, 2010
This looks superb, going to check it out right now!
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Mon, Sep 6, 2010
Hi, this is great! Is the background of the editor supposed to be white? In the examples the background shows up black. On my editor it shows up as white or transparent.

Thanks
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 6, 2010
Glad you're all liking it so far.

Is the background of the editor supposed to be white? In the examples the background shows up black. On my editor it shows up as white or transparent.

Yeah, by default it is actually white. You can change the default colour by going to the Edit menu and selecting Colors. There is an option to change it and a few other colours there. Currently the background colour is saved globally in DAME's settings and not per project. I could save it per project if you guys prefer?... It's one of the few things that didn't make the cut in the end. Let me know!

Also, there's some very basic help on the Help menu under Help Contents. It might help with a few things. I plan to make the help docs a lot better but documentation is not one of my strengths and even I was surprised how much there was to cover :D

Keep sending me any other questions.
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Mon, Sep 6, 2010
I know you said that for donations I could buy a comic, but you said you wouldn't get much of that.  If you could setup a donation thing through paypal or something I would definitely donate, this is awesome!
Title: Re: DAME - a new map editor made using flixel!
Post by: Vexhel on Mon, Sep 6, 2010
Very nice! I was just looking for an editor that would give me full control over every single sprite I put into the map. And the fact that you can customize the exporter is just amazing!
Just a little thing: I'm not satisfied with how the snap to grid works. I think the sprite should snap at the grid tile in which currently is the mouse cursor, and not at the grid tile which has its upper left corner nearest to the mouse cursor. The way it is now make it so that if your cursor is past the (horizontal/vertical) half of a tile, the sprite will snap to the adjacent tile to the right/bottom.
I'm not sure if it's a bug or an intented behaviour (and it definitely not a big issue), but since you asked some feedback, well there it is :D
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Mon, Sep 6, 2010
EDIT - Found out this is because I didn't rename my layer, so it defaulted to "Layer 2" in the editor :) Easy fix!  Might want to change the default name to Layer2 though or something.

Not sure if this is something I did wrong or not, but when I tried to compile my game, I am getting errors in the Map.as file,

public var layerGroup1Layer 2:FlxTilemap;

It is putting a space after the Layer *space* 2:FlxTilemap  which is throwing a compile error :)


         layerGroup1Layer 2.x = 0.000000;
         layerGroup1Layer 2.y = 0.000000;
         layerGroup1Layer 2.scrollFactor.x = 1.000000;
         layerGroup1Layer 2.scrollFactor.y = 1.000000;
         layerGroup1Layer 2.collideIndex = 1;
         layerGroup1Layer 2.drawIndex = 1;

Pretty much everywhere it was defined.
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Mon, Sep 6, 2010
Is there anything special I need to do to show the box around the text? I can't seem to get it to showup in the game, or is that only for viewing in the editor?

edit - Actually I can't get any shapes to show, just tested a box. Any ideas what could cause them to not show up?

Thanks
Title: Re: DAME - a new map editor made using flixel!
Post by: hamedn on Mon, Sep 6, 2010
DAME is a new free and powerful map editor.
Get DAME version 1 here! (http://dambots.com/dame-editor/)

DAME is coded using Flixel so if it displays in DAME then you know that it's going to work in your game *. And because it is an Adobe Air app it works (hopefully) on any platform that support Air.

(http://dambots.com/wp-content/uploads/2010/09/DAMEscreenshot1.jpg)

Some things that DAME can do:
  • It supports custom LUA exporters - and comes with 2 to get you started.
  • Draw directly on the tilemap and view the results immediately!
  • Tile Matrix to help block out simple tile patterns.
  • Move tiles and layers around with ease.
  • Place down sprites, polygons, splines, shapes and text, all with rotation and scaling functionality.
  • Copy n paste, Undo, Snap to grid all supported.
  • Multiple layers with realtime parallax scrolling.
  • Remembers your previous settings between sessions.

Click here to see more of its features including a couple of demo videos running through most of the features. (http://dambots.com/dame-editor/)

This has been my side project for a few months now in my goal of creating an editor that can help me make some really dynamic games. Please send me feedback, bugs, feature requests. I plan on doing a version 2 soon, so all feedback is welcome.

A simple sample 'game' made that was made using DAME. (http://dambots.com/games/claws/complexclaws.html)

* Ok, I did a few extras that flixel and even Flash don't inherently support like BMP file loading.

This looks absoluteley INSANEEEEE!!!

I will probably CERTAINLY use this for my next flixel game, if you add the following features:

-A Flixel slope class
-Something to change the rotation of objects
Title: Re: DAME - a new map editor made using flixel!
Post by: hamedn on Mon, Sep 6, 2010
I did some more playing around, but it's really hard to understand it :(

This needs some sort of documentation
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 6, 2010
Here goes...
EDIT - Found out this is because I didn't rename my layer, so it defaulted to "Layer 2" in the editor :) Easy fix!  Might want to change the default name to Layer2 though or something.

Not sure if this is something I did wrong or not, but when I tried to compile my game, I am getting errors in the Map.as file,

public var layerGroup1Layer 2:FlxTilemap;

It is putting a space after the Layer *space* 2:FlxTilemap  which is throwing a compile error :)
I've updated DAME so this should be fixed now. The exporter should cope with spaces and new maps won't get spaces added by default. DAME should give an auto update prompt the next time you run. If it doesn't, just reinstall...

Is there anything special I need to do to show the box around the text? I can't seem to get it to showup in the game, or is that only for viewing in the editor?

edit - Actually I can't get any shapes to show, just tested a box. Any ideas what could cause them to not show up?

Shapes will need to be rendered by your code - you could try using Flixel's bounding box drawing code. They're there primarily for triggers and such and not as actual visible gameplay objects but if you want to make them visible it's not too difficult. If you're interested, what I actually did in the DAME editor was render a Shape to the bitmap directly. The same goes for paths. Text should render, but you'd need to put in the Font embed calls in your code. Unfortunately I couldn't come up with a good way of doing it in the exporter and it working for ever type of font.

I did some more playing around, but it's really hard to understand it :(

This needs some sort of documentation
Try clicking on DAME's main menu bar, then on Help and then Help Contents. It should open up a help page in your browser, but might not bring it in front of any other windows (a flaw in Air development, I think :( ). In the Help menu there is also a Keyboard Shortcuts link. It will tell you what the main ones are. I really do plan on writing some better documentation soon. What's there is just the basics...

-A Flixel slope class
-Something to change the rotation of objects
You can rotate! Hold down 'R' while you have a sprite or sprites selected, then drag with the left mouse button to rotate. Hold down 'A' while rotating to rotate in 45 degree increments. (Maybe I need a better keyboard shortcut for that?) Hold down Alt to scale. If you also hold 'S' you'll scale uniformly. Check out the Help menu in DAME and Keyboard Shortcuts for all of them. If you've got any good ideas about what might make better shortcuts for some of the options send them my way. I like Alt for scaling, but windows beeps at me whenever I use it :-[
Slopes, though... I won't provide a slope class. There's one here (http://flixel.org/forums/index.php?topic=943.0) but it's old and needs porting to the latest flixel. I actually have tried porting it already. I just wasn't happy with how I went about it and want to have another go at some point... I'm struggling to come up with a good way of adapting the Tile Matrix to nicely handle slopes, though. So that may or may not come.

Just a little thing: I'm not satisfied with how the snap to grid works. I think the sprite should snap at the grid tile in which currently is the mouse cursor, and not at the grid tile which has its upper left corner nearest to the mouse cursor. The way it is now make it so that if your cursor is past the (horizontal/vertical) half of a tile, the sprite will snap to the adjacent tile to the right/bottom.
I'll try and fix that one. Yeah, the current snap to grid calculation is kind of weird and slightly unintuitive. Fix will be coming for that soon hopefully.


It's worth saying that I'm not really aiming to provide any code for your engines - Flixel is a great starting point but DAME is meant to simplify editing more than coding ;) The samples are there using only what Flixel provides as most of the techniques I use in the editor have to be optimized a lot if they were used in a real game - I had to rewrite a few things in the Flixel framework just for that.

Hopefully DAME can inspire you to start doing some really cool things and thanks for all the feedback. Keep on sending it my way!
Title: Re: DAME - a new map editor made using flixel!
Post by: hamedn on Mon, Sep 6, 2010
Thanks for the reply, I will check it out in detail later:

1 more question!

I see you have a "matrix" tool. Does that do some sort of autotiling, that would for example be able to draw the caution tape this image:

http://www.flashgamelicense.com/screenshots/ss_nxuhvmhx12161.png

I mean that little yellow and black stuff around the ground....
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 6, 2010
I see you have a "matrix" tool. Does that do some sort of autotiling, that would for example be able to draw the caution tape this image:

http://www.flashgamelicense.com/screenshots/ss_nxuhvmhx12161.png

I mean that little yellow and black stuff around the ground....

Yeah! Exactly what it does!
The idea behind the tile matrix is it tries to match tiles you paint with the best fit tile in the matrix based on all neighbouring tiles, with options for randomness. There are still some limitations with the current system and I hope to improve upon it in the future.
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Mon, Sep 6, 2010
Is this going to remain free?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Sep 7, 2010
Is this going to remain free?
Yes! DAME will always be free to use.
Title: Re: DAME - a new map editor made using flixel!
Post by: dan on Tue, Sep 7, 2010
Since you're keeping it free to use, any thoughts on releasing the code?
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Tue, Sep 7, 2010
Even though it's free, I bet it was a ton of work to do, I doubt he wants to release the code and have other people take credit for his work ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Sep 7, 2010
Even though it's free, I bet it was a ton of work to do, I doubt he wants to release the code and have other people take credit for his work ;)
Yeah, you said it, Bobby!
DAME should ALWAYS be free. But I think making it open source undermines some of the plans I have for future versions and the integrity of DAME itself. And yeah, it was a helluva lot of work so I want my credit! Oh, and I really don't want people to see my messy code  :-[

But this is the main thing. I really want to see people using DAME and I really want to encourage people to send feedback - good and bad - as I plan to regularly update and improve upon it and can only do so with your input - so the more you use it and tell me what works/doesn't work the more updates you'll get! I draw the line at writing complex classes for your engines in general, but if you want to include a new exporter then please send it in and if it's useful I'll make sure you get the credit. If you have an idea, let me know. If it's helped you make a cool game, let me know, and if you want I'll even include a link to your game on my website. It'd be nice to get a mention in the credits for your games ;D but you don't have to.

Some thoughts and questions actually, because I'm new to this:

(There are too many smileys in this post. I'm an addict...)
Title: Re: DAME - a new map editor made using flixel!
Post by: dan on Tue, Sep 7, 2010
Even though it's free, I bet it was a ton of work to do, I doubt he wants to release the code and have other people take credit for his work ;)

I understand that. There are a lot of good reasons to keep your code to yourself, I mean this was obviously a lot of work, but there are also a lot of good reasons to share it. I'm not an open source zealot, so I won't press the issue if he doesn't want to release it. I just think there's a lot that could be learned and shared among Flixel users if it was open.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Sep 7, 2010
I just think there's a lot that could be learned and shared among Flixel users if it was open.
True. I might release a Post Mortem document on it. Would that be useful?
And once things calm down a bit (in terms of bugs and so on) I'll also try and put out some useful code tips. There was a LOT of problems. First point - writing it in C or a 'normal' programming language would have been so much easier. I just wanted the benefits that Flixel has. But air/actionscript has a lot of hurdles to overcome. I think I levelled up in Google-ing skills alone!!
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Tue, Sep 7, 2010
Hi,

"Some thoughts and questions actually, because I'm new to this:

    * Should I add some kind of forum on my website?
    * Should I really add that 'donate' button? Wink
    * Is there a good license I can attach to it? I wanted to use GPL to 'ensure' it would always be free (even by me in case I suddenly turned evil or something!!) but not sure if I can because of using flex code and flixel code and so on and that it's not open source Undecided"

I think a forum for just DAME would be handy, as you could have multiple topics instead of just this long post, kind of hard to find each problem in one topic.

I would definitely donate to the project, I'm sure others would too.

No clue about licensing :) sorry.
Title: Re: DAME - a new map editor made using flixel!
Post by: dan on Tue, Sep 7, 2010
I might release a Post Mortem document on it. Would that be useful?

Extremely, I'd love to read it!
Title: Re: DAME - a new map editor made using flixel!
Post by: 3WG on Tue, Sep 7, 2010
Nice tools

I hope you will release slope soon (please oh please :-) i'm smiley addicted too)

Just one thing missing a Paypal donation button ...
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Tue, Sep 7, 2010
I don't see how he could program slopes into a map editor, that isn't really something that needs to be programmed into an editor, it needs to be directly in your game engine.
Title: Re: DAME - a new map editor made using flixel!
Post by: SysOp on Tue, Sep 7, 2010
This is outstanding!

The app seems to be great and intuitive enough to fill most of our mapping wishes, but what susprises me more, is the warm and cool attitude of the main developer :)

You are great dude. Hope I can see more people like you in the future =)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 8, 2010
Thanks SysOp!

Just being myself really :)

But it helps that the community here is really friendly. I've personally not seen any trolls yet...

Oh, and if you knew what I have planned or version 2 you'd really be excited, but that's a looong way off! I'm such a tease ;D
Title: Re: DAME - a new map editor made using flixel!
Post by: Loupax on Wed, Sep 8, 2010
I just had a Flixel-gasm... If I didn't put so much effort on making my current game in Tiled, I'd rewrite it! But looks like I found my editor for my next games... ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Wed, Sep 8, 2010
Getting it to work with Flixel's latest version was very simple too. Great editor all around :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Wed, Sep 8, 2010
This is exactly what I've been looking for!! I tried other editors with features I wanted, like the matrix or even just copy and paste, but setting them up and using them in general was clunky at best.


Also, as a libertarian capitalist, i highly respect your comment "And yeah, it was a helluva lot of work so I want my credit!" :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 10, 2010
Version 1.0.2 is now available!


It should auto update when you run DAME. Otherwise just reinstall from the website (http://dambots.com/dame-editor/). See first post on this thread for more.

Send me feedback for editor-only improvements or bugs and it make make it into the next update...
Title: Re: DAME - a new map editor made using flixel!
Post by: OmegaStorm on Fri, Sep 10, 2010
Haven't checked 1.0.2 yet, but in 1.0.1, I noticed it doesn't auto associate the project files and you have to manually type .dam when saving.
Title: Re: DAME - a new map editor made using flixel!
Post by: TestSubject06 on Fri, Sep 10, 2010
yeah i just noticed that with 1.0.2

I also can't get the Complex exporter to work at all. i just get this error immediately:

TypeError: Error #1034: Type Coercion failed: cannot convert org.flixel::FlxTilemap@54dfeb9 to org.flixel.FlxSprite.
   at game::MapBase/addTilemap()
   at game::Level_Map0_0()
   at game::PlayState/createLevel()
   at game::PlayState/create()
   at org.flixel::FlxGame/switchState()
   at org.flixel::FlxG$/set state()
   at game::LoadState/fadeDone2()
   at org.flixel.data::FlxFade/update()
   at org.flixel::FlxGame/update()

Yet i dont see anywhere within addTilemap() that sprite is used at all. ive had this error since i downloaded it and i have absolutely no idea whats going on.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 10, 2010
yeah i just noticed that with 1.0.2

I also can't get the Complex exporter to work at all. i just get this error immediately:

TypeError: Error #1034: Type Coercion failed: cannot convert org.flixel::FlxTilemap@54dfeb9 to org.flixel.FlxSprite.
   at game::MapBase/addTilemap()
   at game::Level_Map0_0()
   at game::PlayState/createLevel()
   at game::PlayState/create()
   at org.flixel::FlxGame/switchState()
   at org.flixel::FlxG$/set state()
   at game::LoadState/fadeDone2()
   at org.flixel.data::FlxFade/update()
   at org.flixel::FlxGame/update()

Yet i dont see anywhere within addTilemap() that sprite is used at all. ive had this error since i downloaded it and i have absolutely no idea whats going on.

I think I know what might be happening... Are you using the SimpleClaws project as the template? It's probably trying to call onSpriteAddedCallback and pass in the tilemap as a sprite, which would cause the crash. Basically, if you use this in your PlayState it will crash for flixelComplex:
Code: [Select]
protected function onSpriteAddedCallback(sprite:FlxSprite, group:FlxGroup):void

It should look like this:
Code: [Select]
protected function onObjectAddedCallback(obj:Object, layer:FlxGroup, level:BaseLevel, properties:Array):void
The SimpleClaws template is meant for use with the flixelSimple exporter and is designed for games where each project contains just the data for one level, the sprites are not rotated or scaled and there is nothing else.

The complexClaws template is the beast! It's meant for use with flixelComplex and will support multiple levels per project, custom properties, rotations, scaling and all of the stuff that's cool but comes with lots more overhead, hence the separation into two different templates.

If you use the PlayState.as file from ComplexClaws that should work...

Let me know how it goes and I'll add a readme to the templates or better yet, add some info to the exporter window itself to make that more clear.

I noticed it doesn't auto associate the project files and you have to manually type .dam when saving.
Is that one bug or two? Ie. are you talking about .dam files not loading when you double click on them as well as the saving bug?

For the saving issue that's an annoying problem with Adobe Air (groan). You can't set a file filter for save dialogs but you can for open dialogs. I don't know why... For now I'll add a fix so that it appends .dam to the filename when the project file save name has no extension.


Let me know about both of those issues and I'll patch up the version with the extra info for the exporting and the saving extension fix. I'll also try and add some better documentation as well.

*EDIT* I just noticed that the flixelComplex exporter doesn't handle scaling (probably because flixel doesn't update scaled collisions automatically). I'm going to remedy that in the next update and try and handle scaled collisions.
Title: Re: DAME - a new map editor made using flixel!
Post by: TestSubject06 on Sat, Sep 11, 2010
Thats it! i was using a modified simple Claws playstate that supports loading a levelID as well as a bunch of other cool new stuff. but yes it was using
Code: [Select]
protected function onObjectAddedCallback(sprite:FlxSprite, layer:FlxGroup, level:BaseLevel, properties:Array):voidSo that's sweet. but you told a lie in your above post.

Quote
The complexClaws template XanderXevious is the beast!
fix'd
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Sep 11, 2010
Happy To Help, TestSubject!

Also, there's a new version 1.0.3 with some bug fixes and improvements:

You shouldn't need to do anything in existing projects to cope with scaling. An update and a re-export should be all you need. If you called the function addSpritesToLayer in your own code (non exported code) you'll probably not need to modify the parameters, but if you do then all that was added was a scaleX and a scaleY param.
That should be the last update to the flixel exporters hopefully.
Title: Re: DAME - a new map editor made using flixel!
Post by: TestSubject06 on Sat, Sep 11, 2010
Wow, a piece of the update custom-tailored to idiots like me.
:D  ...  :|  ...  D:
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Sat, Sep 11, 2010
I've got a few requests, if you're open for taking them.

Here's what I would like to see:

Smaller Requests

- Right-Click on a Group in the tree and select "Resize all maps" to edit W/H of each map in that group.

- Right-Click on a Map in the tree and select "Clear map". Also, Right-Click on a group to select "Clear all Maps"

- A keyboard key that auto-selects the tile underneath the mouse cursor in paint mode.

- Ability to scale size of tiles in the tile Pallet for visual and selection help. Using an 8x8 tile strip makes it pretty hard to select tiles.

- Ability to reload the tileset, maybe with a keyboard shortcut or a button on the tile pallet title bar?
Bigger Requests

- A Stamp tool, where the user can create pre-set combos of tiles to place down

- Inside corner tiles for the Matrix tool... Possibly a button that says "Inside Corners" that reveals a 2x2 second grid?

- Ability to either run multiple instances of DAME or to open multiple maps and tab between them

- Ability to zoom out further than 1:1, which would help a lot in viewing a big map all at once
Title: Re: DAME - a new map editor made using flixel!
Post by: mignick on Sun, Sep 12, 2010
Quote from: Garmichael link=topic=2333.msg14536#msg14536 [b
Bigger Requests[/b]
- A Stamp tool, where the user can create pre-set combos of tiles to place down

second!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Sep 12, 2010
I'm always open to requests. No promises, though!

Let's see now...
- Right-Click on a Group in the tree and select "Resize all maps" to edit W/H of each map in that group.
This is possible - I guess so you want all maps in that group resized to the same dimensions? I can do that.

- Right-Click on a Map in the tree and select "Clear map". Also, Right-Click on a group to select "Clear all Maps"
Again, it's easy enough. Right now you can acheive the same effect by selecting the map in Selection Mode, doing Select All (Ctrl+A) and then hitting Delete. But I can still add the menu shortcut.

- A keyboard key that auto-selects the tile underneath the mouse cursor in paint mode.
Any preferences for which Key to use? :)

- Ability to scale size of tiles in the tile Pallet for visual and selection help. Using an 8x8 tile strip makes it pretty hard to select tiles.
Already there! Right click on the palette for the menu and select Zoom and your flavour of zoomage. 50%, 100% and 200%. I can add a 400% if you wish?

- Ability to reload the tileset, maybe with a keyboard shortcut or a button on the tile pallet title bar?
I'll look into this, and possibly for sprites as well...

- A Stamp tool, where the user can create pre-set combos of tiles to place down
This is possible. I might just hijack the TileMatrix for this since it's already possible to save/switch matrices in there. Something like that anyway.

- Inside corner tiles for the Matrix tool... Possibly a button that says "Inside Corners" that reveals a 2x2 second grid?
I'm not sure how you want this exactly... Is it basically having something like the outer corners, but for the next tiles in, or for the central-most tiles? If it's the next tiles in are there sides as well, or just corners? It seems possible but if you can give me a good example I can figure out how to properly do this. I need to know what should happen on all the cases, ie if you painted a huge 10*10 block where would the inside corners be? Likewise, if you only painted a 3*3 or a 3*4 what would you expect to see?

- Ability to either run multiple instances of DAME or to open multiple maps and tab between them
Unfortunately Air forbids the opening of 2 instances of the same app at a time. The multiple maps thing is possible, though. I'll task it up but it might take a while in coming through...

- Ability to zoom out further than 1:1, which would help a lot in viewing a big map all at once
This is the biggy and has been on my TODO list for a long time already... Because I use Flixel to render everything it means that zooming can only be done efficiently by scaling the entire screen buffer bitmap, so to zoom out to 50% would require the buffer to be initialized to 4 times the size so it fits the screen :( The only alternative is to somehow alter the flixel rendering code so it renders everything much smaller but then all the calculations get screwed up for positioning etc... It's possible - I just haven't figured out how to do it yet...
Title: Re: DAME - a new map editor made using flixel!
Post by: OmegaStorm on Sun, Sep 12, 2010
.dam automatically added to filenames when doing a save as

Yeah, that will help keep new users from being confused. Before it would save it as a file without an extension and Windows wouldn't know what program to associate it with and DAME could'tn find it to open it. (Unless you actually typed .dam when saving, of course)

- Ability to reload the tileset, maybe with a keyboard shortcut or a button on the tile pallet title bar?
I'll look into this, and possibly for sprites as well...

Yes, this would help quite a bit. If you make changes to a tileset that is in use while DAME is open right now, you have to close it and reopen to get the new version of the tileset to show.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Sun, Sep 12, 2010
Thank you for considering my suggestions!

I just quoted your responses as to not have a quote heavy post.

Quote
This is possible - I guess so you want all maps in that group resized to the same dimensions? I can do that.
Yep!


Quote
Any preferences for which Key to use?
I was thinking Space Bar since I would use this feature a lot.

Quote
Already there! Right click on the palette for the menu and select Zoom and your flavour of zoomage. 50%, 100% and 200%. I can add a 400% if you wish?
Oh, very cool! I hadn't noticed this. A 400% would be pretty nice though.




About the inside corners... Check out this image I mocked up below. I used a 3x3 matrix to create the three shapes on the top image, and then manually added tiles to alter them to create the three shapes on the bottom image. I hope its obvious to spot the differences since explaining them is hard to put into words.

(http://develteam.com/flash/insidecorners.JPG)

For Shape A, all I did was add the inside corners. To make this image, I used 4 additional tiles than the 9 that were used to create the matrix.

For Shape B, I used 8 additional tiles than the 13 previously mentioned tiles.
4 of them are the "double outside corners" and 4 are the "double inside corners"

For Shape C, I used 1 additional tile, which is the center "quad-inside corner"

I didn't mock up a Shape D since I don't have the tiles made up, but that would be 4 additional tiles for "triple-inside corners".

Im not sure where the tiles that go in these spots could be placed on the matrix. I can imagine the logic your matrix would have to use to figure out which tile to place, but building a UI for how this would look like would be tricky.

Maybe set it up like a list in a new window that the user has to click a button to open, with a checkbox to toggle "Use Extra Tiles?"

A list something like this:

(The underscores represent drag-to boxes like you have in your matrix UI now)

Single Inside Corners: _ _ _ _
Double Inside Corners: _ _ _ _
Triple Inside Corners: _ _ _ _
Quad Inside Corner: _
Double Outside Corners: _ _ _ _




I know this is quite a task and if you're not that interested in spending a ton of time to do it, that totally understandable. However, if it is easy to at least allow the Single Inside Corners like shown in Shape A, that would speed up my production immmmmmmmmensely!


Thanks again for considering my suggestings :) :) :)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sun, Sep 12, 2010
I've been using DAME a lot today and am really liking it so far!

A couple of things I've noticed:

1) I could really do with a keyboard shortcut for prev/next TILE. Ideally the , and . keys (like in Mappy / Flash IDE)

2) I managed to get it into a "locked" state a few times, I was trying to cut and then paste a selection of tiles in the map. They cut fine, but wouldn't paste, and when I tried to switch tool it was stuck and I couldn't draw a tile again. So I saved, quit and ran it again and all was well.

3) I'm working on a game that uses 8x8 tiles, I could really do with more zoom levels. The map is mostly ok, although another 200% would help :) but the tile panel would really benefit from a few more zoom levels.

4) Any chance of configuring the width of the grid overlay? Again in 8x8 tile mode it's really chunky and covers quite a bit up.

Really nice work though, there are heaps of things I like about this editor, so just take the above as suggestions for enhancements, not as criticism :)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sun, Sep 12, 2010
Oh and I second the need for inside edges!!! My map uses them everywhere and I'm manually painting them all right now :)

Also being able to grab brushes / segments would be wonderful. That's one thing Mappy does do very well.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Sep 12, 2010
Thanks for the diagrams, Garmichael - they're very helpful! This certainly seems like a useful feature to include so I'll see if I can find a good way of doing it. The hard part is making it user-friendly...
*EDIT* - I think I've figured out how to do it keeping it generic and not as specific as the list method... futureproofs it for if I ever do non-square tiles... ;)

1) I could really do with a keyboard shortcut for prev/next TILE. Ideally the , and . keys (like in Mappy / Flash IDE)
On it's way :D

2) I managed to get it into a "locked" state a few times, I was trying to cut and then paste a selection of tiles in the map. They cut fine, but wouldn't paste, and when I tried to switch tool it was stuck and I couldn't draw a tile again. So I saved, quit and ran it again and all was well.
I've not been able to repro this so it must be something unique about the sequence of actions you perform or the shape of the selection (possible due to the way I optimise the tile selections). Was it just 'cut' or 'copy' as well? And all done within the same layer? Very odd that it wasn't a 'crash' crash as it still let you save.

3) I'm working on a game that uses 8x8 tiles, I could really do with more zoom levels. The map is mostly ok, although another 200% would help :)
It should be easy. But for some reason zooming in more causes the whole screen to glitch up. :'( If I ever find a way around it (and the zoom out) I'll try and do something.

4) Any chance of configuring the width of the grid overlay?
I'll think about that one... :)

Oh, and the tile palette zooming (now with added 25% and 400%) is done on mine and ready for the next version sometime this week...
Title: Re: DAME - a new map editor made using flixel!
Post by: TestSubject06 on Mon, Sep 13, 2010
Found a bug, or at least an inconsistency with minimizing.

When you minimize with a window open such as the tile matrix or the Tile selector, those stay open and floating around while DAME is minimized.
figured i'd point that out
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 13, 2010
Thanks for letting me know.
Added to the bug list!
Title: Re: DAME - a new map editor made using flixel!
Post by: TestSubject06 on Mon, Sep 13, 2010
Oh, before i go to bed tonight, is there a way to import a list of sprites into the map file? like really repetitive sprites like my character, repetitive enemies, etc...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 13, 2010
Not yet, but I'll add it to the TODO list as that sounds like a good idea...

You can currently copy a sprite entry and then just change the image file from there - slightly less tedious than creating a new one from scratch.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Wed, Sep 15, 2010
Is anyone else running into a bug where when you have multiple matrixes set up, switching between them or switching to Paint Tile mode and back to Matrix Mode, matrixes copy over one another?
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Wed, Sep 15, 2010
Have been using this more tonight, found another couple of issues :)

1) You can't press DELETE to remove a Sprite unless the "movement arrows" icon in the toolbar is selected. If the "paint icon" is selected, the current sprite cannot be deleted.

2) Prev/Next item doesn't outline the item, so it's really hard to see what it's focused on!

I would really like to see the ID of the tile as I mouse-over it in the Tile panel. At the moment I need to place it onto the map to read it out of the ID value.

It's going well though! Working much better than Mappy :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 15, 2010
Is anyone else running into a bug where when you have multiple matrixes set up, switching between them or switching to Paint Tile mode and back to Matrix Mode, matrixes copy over one another?
Can you explain this a little bit more please? Right now my focus for the next update is to add all the new extra features for the tile matrix and fix any remaining bugs with that so would be good to clean as many problems like this in one go!

2) Prev/Next item doesn't outline the item, so it's really hard to see what it's focused on!
I never considered selecting the items as you navigate with that, but it actually sounds like just the perfect thing to do. Thanks for telling me about that one!!
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Fri, Sep 17, 2010
Sorry for the late reply, boss. I've been meaning to take a video of the bug and post it via youtube. But I just got Starcraft 2 and I've been doing that a little too much. :S


Anyway, here are the steps I took to create the bug:

1. Open DAME (from the main icon, not a map file already made)
2. Right click in the Layers box and add a new group with only "Map" selected. Hit Okay.
3. For the map, choose a tileset (my tileset path, in case it matters, is C:\Documents and Settings\brightg\Desktop\HeroShipF\_assets\tiles_solid2.png.
4. Click the Matrix button
5. Add 9 tiles to the matrix boxes.
6. Paint the matrix.
7. Select the check mark icon to 'set' it.
8. Click the + icon on the matrix window and name it whatever.
9. Click the + icon to make another matrix and name it whatever.
10. add 9 tiles to the matrix boxes. Make sure its not the same configuration as the first matrix.
10. Paint the matrix to the board.
11. Select the check mark icon to 'set' it.
12. Switch between the two matrices with the drop down menu.
13. Notice that both matrices are identical.


Sometimes, it will only happen if you switch to the tile painting tool between steps 11 and 12.



If anyone else can verify this bug, that'd be great.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Fri, Sep 17, 2010
Oh no. I just ran into a pretty critical bug.


I have to do some more research to discover why it's happening, but here's WHAT is happening.

I have some files on my desktop: Area_1.dam, Area_2.dam, Area_City.dam

I then opened Area_2, adjusted it to a new map and saved it as Area_3.dam.

I opened Area_1.dam and it was the stuff I put into Area_3.dam!
Then I opened Area_2 and Area_City, and they were ALSO what I had put in Area_3.

I figured it was because I opened Area_2, edited it, and then Save-as it to Area_3.

So I started from scratch and made a quick tilemap and saved it as Area_4.dam, and guess what? Area_1, Areal_2, Area_3, and Area_City are ALL clones of Area_4!

:S
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 17, 2010
Are the actual files themselves all clones of eachother (ie if you look at them in notepad) or is it the loading of them that is the issue?
Are you running DAME from scratch each time?
Are you loading through recent files or file open or clicking the icons?

*EDIT* I'm able to get a repro following those exact steps so I'll try and get a fix done ASAP...

Ok... Until the fix comes in it looks like the bug only occurs when you do File->Save As then click File->Open. All File->Open operations seem to fire off a save on the file being opened :( However, opening through the recent files list doesn't appear to do any harm...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 17, 2010
Fix for the save cloning should be incoming tomorrow. The bug does only occur if you do File->Save As followed by File->Open. It's due to a rogue save event handler not being removed.

8. Click the + icon on the matrix window and name it whatever.
9. Click the + icon to make another matrix and name it whatever.
I think that's the problem... When you click + it's actually meant to just save the current visible matrix, so here you just saved the same matrix twice.
Title: Re: DAME - a new map editor made using flixel!
Post by: TestSubject06 on Fri, Sep 17, 2010
Does 400% tile zoom for the tile sheets come tomorrow too?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 17, 2010
Yeah.
Along with the new addition to the tile matrix allowing you to place down inside corners or any other combination of tile connection you need.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Sep 18, 2010
Ok. New version is done with an important bug fix and a MAJOR new addition to the tile matrix, amongst other things:


I'll try and update the help documentation for the new tile matrix features soon. In the meantime, the defaults should keep you going for now!!

Oh, and the complex sample is updated too, so that it uses lots of non-standard tiles generated by the new tile matrix sytem.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Sep 20, 2010
That's a really nice update! Is there any way you could save the window size / location and zoom states to the map files? Every time I open it I have to reset them all :)

Also I noticed 2 small bugs:

1) It will often forget/reset the Map layer collision index value. In my game this is set to 20, but very often it resets to zero. I cannot duplicate the exact steps needed to make it reset yet, sorry. But I think it's something to do with the Export process.

2) When I loaded my map into the new version one of my sprites had been totally swapped with a different one. All instances of this sprite had been changed. This happened to be in 1.0.3 as well, so I don't think it's to do with the update. Again I've no idea what triggers it, sorry - but I feel like perhaps my map file is becoming corrupted as it gets pretty large.

Great work though, really appreciated - I'm using this as my primary map editor for my new game, and really enjoying it.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 20, 2010
I'll keep my eyes open for those bugs, photonstorm.

If the sprite bug happens again could you check the .dam file in notepad to see if it was still referencing the sprite correctly? Also, if it referenced correctly in the file (or your project is too huge to go hunting it down :))try reloading the .dam file (or the backup file) to see if it still happens. My guess is that somehow the asynchronous file loading is getting confused when there are lots of file load calls going on. Incidentally, how many sprites are there in your project?

I've added the tool window size/location/state remembering task to my TODO list.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Sep 20, 2010
I've only got a handful of sprites.. 12 in total, split across 2 folders. I'll check that file reference thing for you next time it happens though!

I'm running on a pretty slow laptop while my main PC is being rebuilt, so if indeed the map loads while all the other little bits load in, it very well could be a race condition going on.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Sep 20, 2010
I've checked the XML file and it has saved the incorrect positions. Also the collision index value is nowhere to be seen.

Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Mon, Sep 20, 2010
I just now got a chance to play with the new version. Very slick!! This will definitely speed up the map making process. Thanks!



I am still getting the problem with Matrices copying over each other. I have five matrices set up, and only the first two remain in tact. The other three keep turning into either the first or second one. I will research this more.


Edit: Ooookay, I get how the Matrices work.

You make one, then click the + to save what you SEE to a NEW entry, which is what you said previously but I just didn't get what you meant.

What are the up and down arrows supposed to do?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 20, 2010
I've checked the XML file and it has saved the incorrect positions. Also the collision index value is nowhere to be seen.
Ok. The collideIndex was an oversight by me. :-[ I'll make sure it saves both the draw and collide indices in the next update.
For the sprites...
I'm a little confused... Are the sprite positions not being saved correctly or the sprites being swapped around when you load, or both? And when the sprites are swapped is it the sprite entries in the list or the actual sprites placed on the map that are wrong, or both?
In the .dam XML file the sprite entries store an idx value and then each sprite on the layers references the idx value. So I'm wondering if the idx values match up in the file or they have been saved out in the entries incorrectly.
It's more likely that there is an issue somewhere with loading and not saving (until, of course you save with a corrupt load). But even now looking through the code it looks like it does actually wait for all the sprites to load before placing down any in the layers. ???

*EDIT* I need to look more into this but did you at any point delete any sprite entries or folders in the list? It's possible there's a flaw in how I decide the idx value to use and somehow when you remove and then add a sprite it uses an idx that was already in use, meaning that when you load it then it will probably just pick the first sprite with that idx. It's also possible that it could get confused if you add an entry and then undo. Is there a chance you did any of those things?

What are the up and down arrows supposed to do?
The up arrow will take the contents of the current matrix and store it in whatever matrix you have selected in the list, kind of like saving it.
The down arrow will take the matrix in the list and copy it back into the current matrix - mainly there because I noticed there were issues when you only have 1 matrix.
It should be a lot easier to make changes to matrices now.

Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Mon, Sep 20, 2010
Ahh, handy!

Regarding the Special Tile Connections menu...

I notice that as I change matrices, the special tile connections remain the same. I have two matrices that use the inside corners, but they use different tiles for those inside corners. How can I set it up so Matrix_A uses one row while Matrix_B uses another? I'm a bit confused about the logic of saving sets, and defining which set a matrix uses.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 20, 2010
Right now tile connections are just saved globally and not with the sets. I plan on saving it with the sets too in the next update or 2.
As for the logic. Here's how it is:
It's probably not so difficult to change that interface/behaviour so it you'd rather it be done a different way I'm open to suggestions as it's always harder to predict how things will be used in the real world.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Sep 21, 2010
I'm a little confused... Are the sprite positions not being saved correctly or the sprites being swapped around when you load, or both?

They are not moving location, they are just being swapped for the wrong sprite.

*EDIT* I need to look more into this but did you at any point delete any sprite entries or folders in the list? It's possible there's a flaw in how I decide the idx value to use and somehow when you remove and then add a sprite it uses an idx that was already in use, meaning that when you load it then it will probably just pick the first sprite with that idx.

Yes I did this. I have 2 Sprite folders (items and aliens) and it's swapping from one to the other on load. I opened the dam file in Notepad and I can see that the two groups of sprites share idx numbers, so what you described above is almost certainly what is happening.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 22, 2010
I`ve got a fix for the sprite swapping coming up in the next update. There should be a few other small additions people have requested rolled up with it too. Will be coming up next week. Just having some internet issues at the mo preventing me from uploading it...
Title: Re: DAME - a new map editor made using flixel!
Post by: Socapex on Wed, Sep 22, 2010
Added to the software list on the wiki. Looking real good. Finally a cross-platform tilemap editor. Thanks
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Thu, Sep 23, 2010
Btw. you do know that Flash BUilder has an "exe" export function for AIR applications, for those idiots who don't know how to download Adobe Air first?

Just a thought. Not needed though. Definitely going to try DAME as soon as I get home, was looking at a map editor anyway. Used FLAN so far, which is -okay- but no more than that.  (it's for a new game I'm working on: http://dev.nimja.com/shadow )
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Fri, Sep 24, 2010
^ If the application is an .exe, do I still need the required version of Air to use it? I have a very old version of Air so I'm currently using a combination of Command Prompt, the latest Flex SDK, and a modified version of the DAME .air file which is very troublesome.
Title: Re: DAME - a new map editor made using flixel!
Post by: farzher on Fri, Sep 24, 2010
C:\Users\Farzher\Documents\Programming\flashDevelop\FlxPlatformer\src\FlxPlatformer\BaseLevel.as(78): col: 43 Error: Type was not found or was not a compile-time constant: TextData.

If I delete this function it stops complaining: public function addTextToLayer(textdata:TextData, layer:FlxGroup, embed:Boolean, properties:Array, onAddCallback:Function ):FlxText
Title: Re: DAME - a new map editor made using flixel!
Post by: !8bit!man on Fri, Sep 24, 2010
Cool
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sat, Sep 25, 2010
C:\Users\Farzher\Documents\Programming\flashDevelop\FlxPlatformer\src\FlxPlatformer\BaseLevel.as(78): col: 43 Error: Type was not found or was not a compile-time constant: TextData.

If I delete this function it stops complaining: public function addTextToLayer(textdata:TextData, layer:FlxGroup, embed:Boolean, properties:Array, onAddCallback:Function ):FlxText

Add the TextData class from one of the samples into the folder with the rest of your game classes.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Sep 25, 2010
C:\Users\Farzher\Documents\Programming\flashDevelop\FlxPlatformer\src\FlxPlatformer\BaseLevel.as(78): col: 43 Error: Type was not found or was not a compile-time constant: TextData.

If I delete this function it stops complaining: public function addTextToLayer(textdata:TextData, layer:FlxGroup, embed:Boolean, properties:Array, onAddCallback:Function ):FlxText
Thanks for posting the bug. I've noticed an issue with the exporter, so I'll modify it for the next update coming up this week.

Btw. you do know that Flash BUilder has an "exe" export function for AIR applications, for those idiots who don't know how to download Adobe Air first?

Just a thought. Not needed though. Definitely going to try DAME as soon as I get home, was looking at a map editor anyway. Used FLAN so far, which is -okay- but no more than that.  (it's for a new game I'm working on: http://extra.nimja.com/test/shadow.html )
I use Flash Develop so I'm not sure how to do create an EXE with that, but I'll look into it. That's a good idea!

And your game looks pretty cool. I look forward to seeing what you can create using DAME :)


The next version update is nearing release! The incoming feature list is pretty huge:

As always keep on letting me know of any suggestions, bugs, or if you're just having fun using it.
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sat, Sep 25, 2010
This is more related to programming than DAME itself, but in the onObjectAddedCallback function in the PlayState, is there a better method than having to do something like:

Code: [Select]
//EXAMPLE
if (obj is Item)
{
    if (obj is Coin)
        items.add(obj as Coin);
    else if (obj is BiggerCoin)
        items.add(obj as BiggerCoin);
    //... etc
}

It would be nice to have something more flexible and dynamic than having to add another 2 lines for every new class I make.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Mon, Sep 27, 2010
C:\Users\Farzher\Documents\Programming\flashDevelop\FlxPlatformer\src\FlxPlatformer\BaseLevel.as(78): col: 43 Error: Type was not found or was not a compile-time constant: TextData.

If I delete this function it stops complaining: public function addTextToLayer(textdata:TextData, layer:FlxGroup, embed:Boolean, properties:Array, onAddCallback:Function ):FlxText
Thanks for posting the bug. I've noticed an issue with the exporter, so I'll modify it for the next update coming up this week.

Btw. you do know that Flash BUilder has an "exe" export function for AIR applications, for those idiots who don't know how to download Adobe Air first?

Just a thought. Not needed though. Definitely going to try DAME as soon as I get home, was looking at a map editor anyway. Used FLAN so far, which is -okay- but no more than that.  (it's for a new game I'm working on: http://extra.nimja.com/test/shadow.html )
I use Flash Develop so I'm not sure how to do create an EXE with that, but I'll look into it. That's a good idea!

And your game looks pretty cool. I look forward to seeing what you can create using DAME :)


The next version update is nearing release! The incoming feature list is pretty huge:
  • Brushes for tilemaps like Mappy, but featuring a preview window.
  • Special tile connections can be saved and swapped using the tile matrix list.
  • Eyedropper tool and keyboard shortcut to make the tile under the cursor the current tile.
  • Using Find Previous and Find Next will select the items it finds.
  • Tile palette position saved along with zoom.
  • Quite a few bug fixes!

As always keep on letting me know of any suggestions, bugs, or if you're just having fun using it.


Woo! Can't Wait! :)

Do you think you could squeeze in the "resize all maps" option, too?
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Sep 27, 2010
Can't wait for the new release! My game wouldn't even be half as complete as it is without DAME :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Sep 28, 2010
And your game looks pretty cool. I look forward to seeing what you can create using DAME :)

Thanks. There's a V2 and V3 as well now. http://dev.nimja.com/shadow/3

This is still with autotiling, as I'm doing some quick tests, but it will definitely change to DAME soon. Got some major plans MUHAHAhAHA! *insert more evil laughter here*

Just a thought, but no idea if it has been implemented yet. Use the numbers above the keyboard to select a specific tile? Like 0= empty, 1 = tile 1, 2= tile 2, etc. The current map is still built with FLAN. Was gone all weekend, so no DAME(s) for me ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Sep 28, 2010
After trying it for an afternoon...

Suggestions:

Btw. Props for the special connection options. It's simple but it works marvelously. Though personally I'd like to see the connector thingies to be a bit bigger. But that's nitpicking.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 29, 2010
I'm just testing the latest version. Hopefully I can iron out the major bugs for that before the release...

An option to close/hide the Matrix editor.
You can actually double click the title bar to 'minimize' it to just the title bar, but I could add some other buttons to completely hide it.

Naming a matrix did not work?
Can you tell me what you did exactly? When you create a new matrix it should give you the popup with a default name. So you changed the name, clicked ok and it was still the default?

Option to import an autotiles/autotiles_alt set and add them to the tiles, including Matrix support.
I'll think about it :) But that's a useful suggestion so it's on the TODO list.

Use the numbers above the keyboard to select a specific tile? Like 0= empty, 1 = tile 1, 2= tile 2, etc.
In the next version I'm actually adding the prev/next tile keyboard shortcuts. I think the numbered shortcut is a good idea but I'm not completely sold... However, I am thinking of extending the LUA scripts system used for the exporters to allow you to write your own scripts and assign keyboard shortcuts to different actions, built-in or custom. Easy to do but opens up the door for tons of customising.

This is more related to programming than DAME itself, but in the onObjectAddedCallback function in the PlayState, is there a better method than having to do something like:

Code: [Select]
//EXAMPLE
if (obj is Item)
{
    if (obj is Coin)
        items.add(obj as Coin);
    else if (obj is BiggerCoin)
        items.add(obj as BiggerCoin);
    //... etc
}

It would be nice to have something more flexible and dynamic than having to add another 2 lines for every new class I make.
Can't you just do this?
Code: [Select]
if (obj is Item)
{
    items.add(obj);
}
I don't think you need to cast as the derived class when you add to the list. The polymorphism should cope fine by just adding it as the base class. You only need to do an as cast if you need to specifically use the derived type.

Do you think you could squeeze in the "resize all maps" option, too?
I'll try to squeeze it in...
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Wed, Sep 29, 2010
I've thought of one really useful thing as I've been sat in DAME for several hours tonight - I'd love to be able to set any tile as the "erase / right-click" tile!

Also the matrix mess up for me quite a lot. Often I'll try to pick matrix1 and find it scrambles it totally from what it was. I'm going to leave this part alone until the next version :)

Possible bug: Properties set for the Group don't ever get written to the AS files anywhere (couldn't see them in the Level or BaseLevel files). But custom properties added to MAP layers did work fine. Still not sure exactly how to extract them though? What would be extremely useful is if instead of going into properties, they were added as public vars to the class instead (especially useful for the Group itself).

Re: Custom keyboard commands - I'd love to be able to set the F keys to switch between my Layers. Also a keyboard toggle between Layers and Sprites would be really useful! I click that a LOT!

Really nice work though mate, have made this thread a sticky :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 29, 2010
I'd love to be able to set any tile as the "erase / right-click" tile!
Will be in uber update for the next version!

Also the matrix mess up for me quite a lot. Often I'll try to pick matrix1 and find it scrambles it totally from what it was.
I'm not sure if any fixes in the next version address that, but once it's released I'd like to know if it still occurs. One way the matrix could scramble is if you add/remove tiles. Have you done any of that? The next version will be better at associating matrices with tilesets and should prevent unwanted scrambling. Either way, let's see if this bug still occurs in the next version and take it from there...

Properties set for the Group don't ever get written to the AS files anywhere.
More of an oversight by me than a bug :) I'll try and fix that for the version after this one. The public vars idea sounds good. I'll see what I can do...

And glad the thread has been stickyfied!

Oh, and the resize all maps in group feature WILL be in this next version. I've also improved it so if you resize and change the placement options you can choose to keep the tiles in the same screen space they occupied with the original size.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Wed, Sep 29, 2010
You can actually double click the title bar to 'minimize' it to just the title bar, but I could add some other buttons to completely hide it.
That's good to know, I assume it works for others as well. Perhaps a '-' next to an 'x'

Can you tell me what you did exactly? When you create a new matrix it should give you the popup with a default name. So you changed the name, clicked ok and it was still the default?
Never got any popup with a name dialog. My matrix was unnamed (list with matrix names was empty)

Also a 'rename' function for a matrix would be nice to.

I wonder if it would be a good idea to make a sort of 'common' file. Like if you make multiple maps with the same tilesets/sprites (you know, like almost any game has at least for a few levels) that you can use a 'settings' file that is shared accross multiple files. So you have 'map' files and 'setting' files. This would make it possible to switch between maps but if you design new tiles/sprites that you don't have to define them in every map but can just use them.

Not an easy feature though.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Sep 30, 2010
New version 1.0.6 is released!!!

Here's what's in it:

Bug Fixes:

Since there are so many new things in this update, I've done lots and lots of testing on this and it all should be safe and backwards compatible, but let me know if anything bad slipped through.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Sep 30, 2010
THANK YOU!!! I don't know how many times I've had to re-type the collideIdx while making my game :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Sep 30, 2010
Never got any popup with a name dialog. My matrix was unnamed (list with matrix names was empty)
Hmm... That is extremely bizarre. The code that adds the matrix to the saved list only ever gets called when you click OK on the popup that lets you enter the name, so not sure how what you're seeing is possible. Is it still showing this behaviour in the new version:1.0.6?
Title: Re: DAME - a new map editor made using flixel!
Post by: paul k on Thu, Sep 30, 2010
Thanks Xander for the great editor!  Wow, loads of features here - love the tile matrices.

Paul
Title: Re: DAME - a new map editor made using flixel!
Post by: kacamac on Thu, Sep 30, 2010
Sorry for a possibly dumb problem but I'm stumped. I made my stage just fine and it loads up great when I run my swf but when I try to use the code to put my player sprite in it breaks the game. No errors given just freezes up for some reason.
Code: [Select]
//override public function addSpritesForLayerGroup1Layer2(onAddCallback:Function = null):void
{
addSpriteToLayer(Player, Group1Layer2Group , 600.000, 114.000, 0.000, false, onAddCallback );"Player"
}

So yeah, where ever that is included the game breaks, commented out the game and stage load fine.

I'm no flash expert but I'm guessing it has to do with how my player is called up? I usually insert him like this:
Code: [Select]
player = new Player(30, 20, bullets.members)
So I tried putting new Player(X:Number, Y:Number,Bullets:Array) into the assign sprite data into the Constructor Text field.

Then put Bullets as a property and bullets.members as a value. I'm probably messing this part up completely and I guess that's whats messing me up? Any help would be great :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Sep 30, 2010
I think you're on the right lines with the constructorText, kacamac. The syntax is more like this:

Code: [Select]
new Player(%xpos%,%ypos%,bullets.members)

If you look at the Help Contents for DAME and go to Exporters page there is a (mostly) complete list of all the keywords you can use in case you need any others.

Anyway, I'm not sure how you'd reference the bullets if they're generated outside of DAME, but probably the simplest way is to store the bullets somewhere that you can access via a static function, i.e. so you can change the code to something like new Player(%xpos%,%ypos%,PlayState.Bullets.members) or even calling a function like PlayState.GetBullets() from within that constructor

Of course that still requires you to add the import statements in the generated files. I will probably adapt the exporter in the next version so that a small amount of custom code for imports can be added to the top of the files. I think that will give the most flexibility...

However, a better solution would be to not require that the player be constructed with the bullets. Rather in the onAddCallback in your playstate, or wherever you have placed it, just do something like:

Code: [Select]
if ( obj is Player )
{
    Player.Init(bullets.members);
}

This way you won't be relying on any external data in the exported code. If your Player absolutely 100% needs the bullets in the constructor, then perhaps have the Player query the PlayState to get the bullets.

Personally, I'd do it in the onAddCallback, and just use the constructors for simple values that are basic types.

If that still doesn't fix it, have you tried putting in trace calls to see how far it's getting?
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Thu, Sep 30, 2010
Hmm... That is extremely bizarre. The code that adds the matrix to the saved list only ever gets called when you click OK on the popup that lets you enter the name, so not sure how what you're seeing is possible. Is it still showing this behaviour in the new version:1.0.6?

With version 1.0.6

It gets even weirder. Just tried to add a new tile matrix manually, and I DID get the name popup, but it doesn't respond to pressing OK, pressing Enter, pressing ESC or anything else. Even clicking close on the main window didn't work anymore, as the window is modal.

(edit: Closing via the taskbar did work, so the program didn't crash)

Windows XP, SP3. Clean AIR install, nothing special otherwise.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 1, 2010
With version 1.0.6

It gets even weirder. Just tried to add a new tile matrix manually, and I DID get the name popup, but it doesn't respond to pressing OK, pressing Enter, pressing ESC or anything else. Even clicking close on the main window didn't work anymore, as the window is modal.

(edit: Closing via the taskbar did work, so the program didn't crash)

Windows XP, SP3. Clean AIR install, nothing special otherwise.
Very weird ??? But I'd like to narrow this down and fix this quickly so...

Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 1, 2010
Very weird ??? But I'd like to narrow this down and fix this quickly so...

  • If you just open DAME and do this with no maps or projects loaded does this still happen?
  • After clicking OK on the popup window, does the window still remain 100% modal?
  • There should be blue outlines around the selected controls in the popup. Enter key should work straight away but maybe you need to tab then Enter to work? (When you tab the blue outline around the OK button will glow brighter).
  • Does it always happen, regardless of what name you give the matrix (empty, default, your own name)?
  • Have you tried deleting all the existing matrices first?
  • Are all the other popup windows working properly? I.e. Trying to add new layers and groups, exporter, about box... And if you try to rename layers does that work?
  • You said you tried a clean AIR install... Is that version 2.0.3 direct from Adobe Air or from the DAME install button itself? Did you try reinstalling DAME also?
  • Is anyone else getting this problem, and if so what computer setups do they have?

Found out what happens.


Different issue that I found:
If you make a second (complex) matrix, (that is again similar to autotiles),  it dissapears as soon as you go to another tool. Only the first named matrix is saved. THe second matrix name DOES stay, but not the actual selected tiles....
*sniffle* I did 2 tests before I confirmed this.

To reproduce (all in the same map layer):

Have tried this with the second matrix being simple (3x3 grid) and complex (autotile setup, which is 3x3 + 4 tips + 3 extra (hor, ver, single)

Of course since I have a design that basically uses 2 different autotile strips, I'm rather stresstesting the matrix functionality ;)

Also, is there a way to zoom in the tile-window?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 1, 2010
So for those 2 cases you never press the + button? Just modifying the existing matrix? Or are you able to add named matrices now?
For the + button renaming matrix issue (if it still happens) does that still occur? Also, one more thing to ask when tracking that particular one down... Are you able to move the rename popup window and type in the edit box once it opens?
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 1, 2010
So for those 2 cases you never press the + button? Just modifying the existing matrix? Or are you able to add named matrices now?
For the + button renaming matrix issue (if it still happens) does that still occur? Also, one more thing to ask when tracking that particular one down... Are you able to move the rename popup window and type in the edit box once it opens?

No, the second issue is with the + button. I have 2 names. (btw. a rename function would be nice)

Found another issue:
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 1, 2010
No, the second issue is with the + button. I have 2 names. (btw. a rename function would be nice)

Found another issue:
  • Make a matrix (with +) Name it Test1 and fill it in.
  • Make a second matrix (with +), name it Test2
  • Result: Test1 = empty, Test2 contains the tiles you selected in Test1. Verified this with a new file.

After a bit more testing: It appears Matrices aren't saved or assigned properly when closing the window or creating a new matrix. Oh, and got the official AIR version. I'm a developer myself ;-) As http://dev.nimja.com/shadow/4 displays.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 1, 2010
I'd also like an answer on this question:
Is there a way to zoom in the tile-window?

Seriously. Working with 8x8 autotile strips is no fun. Just a zoom of 2x would already make my life so much easier. Why not make it zoom the same way as the tilemap?

Ideally, the tilemap window should be resizable and zoomable with the mouse-scroll (or ctrl+ / ctrl- for those poor people with no scrollmouse)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 1, 2010
Zooming tiles in tile palette can already be done through right clicking on there and selecting Zoom and the scale you want. You can go up to 400%.

Ok... I think I know what's going on in most cases... The actual behaviour is that when you press + it saves a new matrix containing the contents of the main matrix window. This doesn't autosave it, though. Ie you can modify it but it will not change the saved one. You need to press the up arrow to upload it back to the saved matrix listed. Though everything should still be saved with the file.

With that understanding, are there still issues with the matrices? I will try and reproduce any remaining issues with old and new files.

I can also change the behaviour of this if people prefer so that it always autosaves, as somebody else also reported similar confusion about that.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 1, 2010
Zooming tiles in tile palette can already be done through right clicking on there and selecting Zoom and the scale you want. You can go up to 400%.

Ok... I think I know what's going on in most cases... The actual behaviour is that when you press + it saves a new matrix containing the contents of the main matrix window. This doesn't autosave it, though. Ie you can modify it but it will not change the saved one. You need to press the up arrow to upload it back to the saved matrix listed. Though everything should still be saved with the file.

With that understanding, are there still issues with the matrices? I will try and reproduce any remaining issues with old and new files.

I can also change the behaviour of this if people prefer so that it always autosaves, as somebody else also reported similar confusion about that.

Ah, so if I understand it correctly, currently to 'save' a matrix, you need to press Arrow Up.

Yeah, this is a bit counter intuitive. Matrices should just be auto-saved to their respective name in the list. So if you make a new one, you get a clean matrix.

But... While we're at it, I would suggest making Matrices slightly simpler. Just use a single dropdown. With three buttons next to it.


It shouldn't be too hard to do for you and provide the clearest interface for people.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Fri, Oct 1, 2010
Just got a chance to play with the new version...

Thank you for your hard work on such an AMAZING! editor!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 1, 2010
But... While we're at it, I would suggest making Matrices slightly simpler. Just use a single dropdown. With three buttons next to it.

  • Button: New (make a new empty matrix), don't even pop-up a name, just name it "matrix(n)"
  • Button: Copy (make a copied matrix of the current one)
  • Button: Delete
  • Dropdown is used to select the current matrix (and autosaved if you change anything)
  • Name is edited by clicking in the dropdown to edit the current Matrix's name.

It shouldn't be too hard to do for you and provide the clearest interface for people.

Yeah,that sounds pretty simple. Thanks for your input. I'll try and do that for next week's version update.

Here's what may be incoming for 1.0.7:

Also, I imagine that most of the bugs, usability issues and minor tweaks will be out of the way by version 1.1.0 (so, within a month to perfection)... With that in mind, I pose a question to everyone who is using it so far.


What cool new features would you like to see added to DAME next?

I can't make any promises on any suggestions (some, like zooming the map out are unfortunately pretty difficult with flixel as a basis), but I'd like to see where to invest my time the most. I have some amazing ideas that I know you'll love and those are most definitely version 2 features that I'm keeping secret for now :o but I'm sure there are some ideas like the tile brushes and the tile matrix connections that fit in with the philosophy of DAME, make editing easier and can probably be implemented within a week.

I'll start the ball rolling with one idea of my own...


So, any ideas need to be backed up with a good argument like that, or a few votes to be considered. Again, I can't promise anything, but if it's fairly generalised (ie don't be too specific to one type of game), it's not too much effort and it will help lots of people then it will stand a good chance!
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Fri, Oct 1, 2010
Kinda like the level editor from the engine running Biolab Disaster?
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Fri, Oct 1, 2010
I have couple related ideas, if you're not sick of hearing them yet. :P


A custom output generator for sprites



The next idea is related.

A sprites-only export option
Like it sounds, it would be useful to have an option that exports just a .txt or .as file of nothing but the placed sprites.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 1, 2010
Kinda like the level editor from the engine running Biolab Disaster?
Something like that I imagine.

I'm never sick of hearing ideas, Garmichael:) Let's see...
  • In each sprite definition, put in a list where we can add custom variables and set default values for the variables.
It's there. The big properties list when you add a sprite or right click to edit it. In the complex sample look at the coin :)
  • In each sprite definition, put a textarea field where we can type exactly how we want the output code for that sprite to look. Using %variable% type syntax to tells the output code to use the value for that variable in place. Maybe have some reserved keywords like %layer%?
That's there too in the constructor text of the sprite. Again, coin is good example. There are lots of parameters that you can find out about if you click on Help->Help Contents->Exporters.
  • When you select an instance of the sprite placed down, a window or something allows you to set the variables for that individual sprite.
There already underneath the layers/sprites tab when a sprite is selected. You can modify the values already added to differ from their defaults, or add new ones. Basically, the complex sample really demonstrates this - the coins all spin by default, but some were modified to not spin and a moving platform was given an id that is referenced by the trigger shape. If you've not checked it out, it's sample 2 in the help menu.
A sprites-only export option
Like it sounds, it would be useful to have an option that exports just a .txt or .as file of nothing but the placed sprites.
This I only have half done. You can choose to export only the map files, but not just the .as file. I can do it, but would it be just the .as file as it is?
Or have you been just using the simple sample 1 as the basis? It's easy to do for that I think.

PS. Maybe another useful addition would be Tip Of The Day?? I know there are so many features in DAME that it's hard to document everything, and even then not everyone tries all the samples and looks at all the help pages - though I'm one of those people who just tells Tip Of The Day to shut up permanently when I get it.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Fri, Oct 1, 2010
:[ !!

I saw some of this stuff before but didn't know what it was and didn't think to find out :S I feel like a dork.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 1, 2010
Don't worry about it!

Just make a great game!
Title: Re: DAME - a new map editor made using flixel!
Post by: paul k on Sat, Oct 2, 2010
@garmichael, I doubt even Xander can keep track of all of these features.  ;-)

@XanderXevious, for your wide-open request for suggestions, how about a "Run" mode, as in addition to the current "Edit" mode.  Meaning that the sprite classes and full playstate code would be instantiated and run.  DAME is so flixel-specific, that it seems like that could be a next (very big) step.


Paul

Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Oct 2, 2010
@XanderXevious, for your wide-open request for suggestions, how about a "Run" mode, as in addition to the current "Edit" mode.  Meaning that the sprite classes and full playstate code would be instantiated and run.  DAME is so flixel-specific, that it seems like that could be a next (very big) step.
Thanks for your suggestion. It's funny you mention that... That is actually the only feature in my original concept for DAME that I abandoned. :( Problem is I quickly realised that it's the difference between a game editor/engine hybrid and a map editor. The classes all have their own specific code - eg how can I distinguish between a player, an AI, a collectible, a platform, and all the variations? Then some people make a platform game, others a shooter, others a top down adventure. If I even cater for just one particular genre then it would encourage people to not be so creative in that genre because the majority of users tend to stick to default settings for anything, and to either not bother with other genres or to not use my editor at all.

In the end, I decided that I want the best 2d map editor that doesn't limit the type of game you create. And in fact, DAME isn't even flixel specific - it's made with flixel and comes with flixel exporters but there are features that extend the scope way beyond flixel. For example, support of .bmp files and custom exporters. There's no reason why you couldn't use this to make almost any 2d game on any platform really.

Anyway, there are some things that I could implement in a 'run' mode. I know that it could be extremely useful and it's something I keep thinking about, and have been toying over for the last 6 months. Just need to find the right way of doing it. Don't be surprised if you see something that's somewhere in between 'run' and 'edit' somewhere down the line!
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sat, Oct 2, 2010
Some changes/fixes I'd like to request:

-When I have multiple instances of the same sprite selected, it would be nice if changing the properties in the properties window changed that property for all of the sprites and not just one of them.

-I have a lot of 8x8 sprites that I will be using often. I place many of them en masse and often have to move all of the sprites in such masses at the same time. However, I can't find a free spot in any of the sprites that will let me move them after being clicked because of the marquees and the small size of the sprites. I rarely use the rotation and resize features, so a useful feature to have would be an option to toggle those options so I can easily move my sprites.  :)


As for a cool feature I would like to see... DAME has so many features it's hard to come up with one, but I would absolutely love a built-in sprite creation tool.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Oct 3, 2010
Thanks for your suggestions, bowl of rice.

All of those seem like they'd be really useful. I can definitely put the first 2 simple ones for a version update soon. Expect the marquee toggling in the next one for certain.

The sprite creation tool sounds like something that would definitely be a cool feature to add in the future. I know I've struggled to use tools like GraphicsGale. As with the tilemap drawing, don't expect anything to rival Photoshop!!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Sun, Oct 3, 2010
The sprite creation tool sounds like something that would definitely be a cool feature to add in the future. I know I've struggled to use tools like GraphicsGale. As with the tilemap drawing, don't expect anything to rival Photoshop!!

Some suggestions for this tool (making it relatively simple)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Oct 4, 2010
A nice big bug found tonight:

I've got an existing map with a tile set. I want to add an extra 10 tiles to the start of the set (so they fall within the non-collide index value). I highlight the first tile, right-click and "Insert copy after this tile" and it duplicates it. I repeated that 10 times.

Saved it all, checked my tileset and it had only inserted 1 extra blank tile into the PNG, but the map data had all udpated so when I loaded it back into Dame it was all screwed because the indexes had shifted by 10.

:)

Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Oct 4, 2010
Also I'd really like to be able to remap a tile, or select two in the set and swap their locations :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 4, 2010
I've got an existing map with a tile set. I want to add an extra 10 tiles to the start of the set (so they fall within the non-collide index value). I highlight the first tile, right-click and "Insert copy after this tile" and it duplicates it. I repeated that 10 times.

Saved it all, checked my tileset and it had only inserted 1 extra blank tile into the PNG, but the map data had all udpated so when I loaded it back into Dame it was all screwed because the indexes had shifted by 10.
Very nice bug!
I've been able to get a repro and it appears that it only accepts the first change. Does the same if you delete a bunch of tiles too...

It will be fixed for the next version. As a temporary fix, it appears that if you select "View Raw Image Data" in the tile palette's menu and then click the save button from within there the correct image is saved.

And the swap thing sounds like it could be useful. I'll add it to the TODO list of doom...

Thanks for the input on the sprite editor, Nimja. sprite editing does seem like a major contender for the 'cool' feature list!
Title: Re: DAME - a new map editor made using flixel!
Post by: Lo.wang on Mon, Oct 4, 2010
I suggest to use Famfam icons in your app.
http://www.famfamfam.com/lab/icons/silk/

FlashDevelop also uses these and there released under Creative Commons licence so you can them freely in anywhere.

Edit : whoops *Can use them freely.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Oct 5, 2010
Thanks for the input on the sprite editor, Nimja. sprite editing does seem like a major contender for the 'cool' feature list!

My pleasure. I've made editors before. There's even an oldy online at http://emotipedia.com/

It shames me now to see it, but it's cute. Even got updated with PNG export.
Title: Re: DAME - a new map editor made using flixel!
Post by: Vexhel on Wed, Oct 6, 2010
More suggestions :)
1) At the moment, DAME is quite CPU intensive (expecially for people like with with old computers :)), even when minimized. I'm wondering if you could make it so the rendering/update of the map is skipped if the program is minimized. That would help a lot since I usually test my game with DAME still opened, and that causes me very low fps.
2) Change the cursor when the flood fill or eyedrop tools are selected.
3) Make it possible to close or minimize the tiles palette, or make it "dockable" to the top or left panel.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 6, 2010
1) At the moment, DAME is quite CPU intensive (expecially for people like with with old computers :)), even when minimized. I'm wondering if you could make it so the rendering/update of the map is skipped if the program is minimized. That would help a lot since I usually test my game with DAME still opened, and that causes me very low fps.
Adding it to the upcoming version.
The other features will be in future updates.

As for the next version it's incoming, and somehow it's another uber update. I'm just testing it thoroughly. I'm also going to make a practice of leaving older versions available somewhere just in case anything goes horribly wrong :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 6, 2010
Ok, Version 1.0.7 is now out. As with the last update, this one is huge!
The important feature is that tile matrices now are properly tied to the item in the dropdown. No need for those weird buttons to save/load it! The first time you use this version it will create one new matrix entry for you containing what was in the matrix. After that it will be automatic.
Plenty of other features/tweaks/fixes, so scroll down to see if there is something cool...


I hope you'll find the matrix magnet useful. If you have a map already drawn but want to use the tile matrix on it, it was previously a pain to get the new tiles to join up with the existing ones. Now just drag the neighbouring tiles into the matrix with the magnet selected so that they get considered in all matrix calculations and the matrix will do its job. Simple!

Also, added a donate button to my website ;D
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Oct 7, 2010
Wow, awesome :) I'm going to be really annoying and ask for another feature! (sheepish grin) - could you save the colour settings to the DAM files? (if you don't already). As I've got a green background for one level and a black for another, etc :)

Also - check your PayPal account!
Title: Re: DAME - a new map editor made using flixel!
Post by: Vexhel on Thu, Oct 7, 2010
(http://www.evilscience.co.uk/wp-content/uploads/2008/07/excellent-frog.JPG)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 7, 2010
Thanks!
 ;D

And I'll aim to include colour saving per project in the next update.
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sat, Oct 9, 2010
Great update, I'm creating maps faster than ever before now. Really loving the marquee toggling. If the game I'm making pulls money through sponsorships or whatnot, I'll be sure to donate. Thanks!

Some more suggestions:

-Still waiting for being able to edit a property of a group of selected instances of a sprite all at once.
-Custom rotation, width, height, x, and y inputs for sprite instances within the editor.
-Ability to paint sprites like tiles if snap to grid is enabled.
Title: Re: DAME - a new map editor made using flixel!
Post by: paul k on Sun, Oct 10, 2010
Xander, or anyone, can you tell me how to handle tile images (50 x 85) that are taller than than my map grid (50 x 50)?  Idea being to have each tile row overlap the row above.  I'm playing with the PlanetCute tileset from Lost Garden (http://www.lostgarden.com/2007/05/cutegod-prototyping-challenge.html (http://www.lostgarden.com/2007/05/cutegod-prototyping-challenge.html)) to help explain the situation.

DAME is working great, but I'm just not seeing how to set up overlapping tiles.

thanks!
Paul
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sun, Oct 10, 2010
Ah, I'd like to restate the need for custom input boxes. With the rotating marquee, it's impossible to make a 8x8 sprite have an angle of 90, 180, or 270 degrees and it's messing up my code. If there is already a method to do so, please tell me. Thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sun, Oct 10, 2010
PLEASE could you map Ctrl-D to "Select None" :) (like in Photoshop, I press it all the time in Dame with no effect!)
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sun, Oct 10, 2010
^ Yes yes yes! Also, when copying and pasting an instance or instances of a sprite, I would love it if the property values were carried over as well.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sun, Oct 10, 2010
About sprites.. it'd be great if you could right-click a sprite and be able to change it for any other sprite. Or select all sprites of just that type (anywhere on the map) for easy deletion, or just a right-click "Highlight" like you have with tiles, that'd be good.

Also, and this is a bigger request, but I think a really useful one - could you please make it so that a layer can be LOCKED. When locked you cannot select, drag, drop or modify anything on that layer.

Another option - set a Layer as a "Guide" layer. If you do this nothing on that layer gets exported! (really useful combined with my request below)

Another biggie :) Could you please add a "Picture Layer" type. It basically lets you load up a picture, for which you can modify the alpha value and scrollFactor. I see this being useful in two ways. First for static backdrops where you don't want to have to create one single sprite just for use as the background. Second, as a means for you to "trace" tiles - you'd load up the picture, set the layer to be a Guide, alpha it down slightly, and then draw over it using a normal tile layer. Just a quick way to map something that may only exist as a picture and not tile set/data.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 11, 2010
Thanks for all the suggestions. There are a lot and pretty much all of them will be added in a future update! So I'll run through them briefly in a vague order of which ones will likely get done first.


I'll try to get the first few features in with the next version coming out this week. If you feel something should be bumped up and there are enough voices with a good justification then I'll be listening...

Also, the next version will include:
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Oct 12, 2010
For some reason when I'm adding String variables to my Sprites (placed on the map) as I type the sprite  will often reverse itself! I can't seem to duplicate exactly what does it, but could it be that because the sprite is selected, the keyboard shortcut for rotate/mirror is being triggered as I enter the String name/value?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Oct 12, 2010
The shortcut is 'f'. I added that long before I ever got around to implementing the properties so didn't notice that one. The next version will change the shortcut to Ctrl+F.

... And it's done. Lots of keyboard shortcuts changed around in the next version.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Wed, Oct 13, 2010
Good work! Happy to see this moving forward so smoothly!

All hail the mighty XanderXevious
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Wed, Oct 13, 2010
I've made 2 handy things today, a 'custom' autotile function and a XML exporter for DAME. The first will be in another thread, the latter...

ps. Attachments do NOT work... :(

What does it do?
Example map output:
Code: [Select]
<map name="Map">
  1,2,3,4,5,6,5,4,3,2,1,0,0
  1,2,3,4,5,6,5,4,3,2,1,0,0
</map>

Example sprite output:
Code: [Select]
<sprite type="Platform" x="576" y="240">
  <properties>
    <width>40</width>
    <height>2</height>
    <moveX>112</moveX>
    <moveY>0</moveY>
  </properties>
</sprite>

Installation instructions:
Set custom exporter path: File -> Specify Custom Exporter Path
Create the files in your own specified path
create (text) file: simpleXML_settings.lua
Code: [Select]
-- Display the settings for the exporter.

DAME.AddHtmlTextLabel("Simple XML output (map and sprites) with some classinfo and properties.")
DAME.AddBrowsePath("Output dir:","OutputDir",false)
DAME.AddTextInput("Level Name", "", "LevelName", true, "The name you wish to call this level." )

return 1

create (text) file: simpleXML.lua
Code: [Select]
groups = DAME.GetGroups()
groupCount = as3.tolua(groups.length) -1

DAME.SetFloatPrecision(0) --Integers for the win...

tab1 = "\t"
tab2 = "\t\t"

-- Values from the settings.
outputDir = as3.tolua(VALUE_OutputDir)
levelName = as3.tolua(VALUE_LevelName)

-- the output file (XML)
output = ""

-- Output tilemap data
-- slow to call as3.tolua many times.

function getMapCSV(mapLayer, layerSimpleName)
-- get the raw mapdata. To change format, modify the strings passed in (rowPrefix,rowSuffix,columnPrefix,columnSeparator,columnSuffix)
return "<map name=\""..layerSimpleName.."\">"..as3.tolua(DAME.ConvertMapToText(mapLayer,"","\n","",",","")).."</map>\n"
end

spriteLayers = {}

output = output.."<maps>\n"
for groupIndex = 0,groupCount do
group = groups[groupIndex]
groupName = as3.tolua(group.name)
groupName = string.gsub(groupName, " ", "_")

layerCount = as3.tolua(group.children.length) - 1

-- Go through each layer and store some tables for the sprite types.
for layerIndex = 0,layerCount do
layer = group.children[layerIndex]
isMap = as3.tolua(layer.map)~=nil
layerSimpleName = as3.tolua(layer.name)
layerSimpleName = string.gsub(layerSimpleName, " ", "_")
layerName = groupName..layerSimpleName
if isMap == true then
--Maps get easily added to the XML, in order of layer.
output = output..getMapCSV(layer, layerSimpleName)

elseif as3.tolua(layer.IsSpriteLayer()) == true then
table.insert( spriteLayers,{groupName,layer,layerName})
end
end
end

-- End maps, start sprites.
output = output.."</maps>\n<sprites>"

-- add the sprites.
propertiesString = "<properties>%%proploop%%<%propname%>%propvalue%</%propname%>%%proploopend%% </properties>\n"
-- Loop over sprite layers, and add the individual sprites using the createtext...
for i,v in ipairs(spriteLayers) do
layer = spriteLayers[i][2];
infoText = "<sprite type=\"%class%\" x=\"%xpos%\" y=\"%ypos%\">\n"..propertiesString.."</sprite>\n"
output = output..as3.tolua(DAME.CreateTextForSprites(layer,infoText,"Avatar"))
end

-- Save the file!
DAME.WriteFile(outputDir.."/"..levelName..".xml", "<level>\n"..output.."</sprites>\n</level>")

return 1
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 13, 2010
That's great, Nimja!! It's cool to see people starting to take advantage of the custom exporter facility!

I'm planning on adding some more versatility to the tilemap export too, hopefully in the next version, to allow keywords in each tile entry. That would allow you to, say, do <tile id="5" x='1" y="2"/><tile id=.... or other similar things if you wanted. (Basically at the moment all you get is the tile id in each entry.)

Just a note: when installing Nimja's exporter files, or any other ones, please please please make sure to place it in your custom exporters directory and not the DAME program files directory where the existing exporters are. I'm not certain and I may be wrong, but I think Air may wipe the folders clean whenever a new version is installed and I don't want people to be scratching their heads as to why their favorite custom exporter is suddenly missing! If you haven't set the custom exporters path, it can be done from the File menu.

Might it be useful for me to add an exporter wizard? Something that will ensure the exporter path is set to something valid and the files are in the correct directory.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Oct 14, 2010
I thought of a really useful feature last night:

A "screen size" grid. My current game for example has a screen size of 160x144 working on an 8x8 grid. I'd love to know how much of my map fits into the screen. But if I set the grid size to 160x144 then of course the snapping and tiling goes wonky :)

I don't know if it should be displayed like a really big grid (maybe) or just appears as an outline in the top left of the map, but remains fixed in place, so you can scroll the map itself behind it? I guess it'd make sense for it to work like a big grid overlay, but independent of the actual grid overlay.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Thu, Oct 14, 2010
That's great, Nimja!! It's cool to see people starting to take advantage of the custom exporter facility!

I've modified the post with better installation instructions (as per your reply). I didn't know about the custom exporter path. I've done LUA before. Thank you GMOD for teaching me odd stuff.

Well a CSV export works fine, as that is what Flixel needs. Making a CSV reader, discarding 0's is just as easy. Besides, the overhead with XML is HUUUUGE for a level of 100x100 for example.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 15, 2010
New version Released!!


Also, in those exporter keywords you can now choose if you want to export only visible tiles, which is pretty useful if doing long-winded xml. I've included a small xml example (not as fully fledged as Nimja's :) ) to demonstrate. Also help files have been updated for that. If enough people want, and with Nimja's permission, I can include Nimja's exporter in a future version along with a sample...

The 'coolest' new features I think are really the minimize to status bar button for the tool windows and the ability to set exact coordinates, angles and scaling for multiple sprites.

Finally, I've updated the webpage with links to exe and dmg installers for Windows and Mac, mainly for those of you who don't already have Adobe Air.

Finally finally, I've added a page to the Flash Game Dojo here:
http://flashgamedojo.com/wiki/index.php?title=DAME_Editor (http://flashgamedojo.com/wiki/index.php?title=DAME_Editor)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Fri, Oct 15, 2010
Another superb update :) Just installed mine and about to let rip on some more levels with it! The copying sprite properties will be awesome.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Fri, Oct 15, 2010
Ack, just found a bug! For some reason the export (I'm still using FlixelComplex) now puts a comma at the start of every line in the CSV:

,0,37,etc

Which means my whole map is shifted right by 1 tile because Flixel treats the first entry as being tile 0.

Is there a way to edit the exporter to fix this? It only happened in tonights update.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Fri, Oct 15, 2010
Also could you help me understand how you use the Constructor Text for a Sprite please? I set the constructor text to be:

%xpos%,%ypos%,1

(where 1 was a custom parameter I needed)

Now I expected in the Level_Level1.as file that when it had an entry like:

addSpriteToLayer(null, Lazer, lazersGroup , etc etc

That it would have actually created this:

addSpriteToLayer(null, Lazer(xpos value, ypos value, 1), lazersGroup , etc etc

So basically the params got passed to the class in the constructor.

However what it did was this!

addSpriteToLayer(xpos value, ypos value, 1, Lazer, lazersGroup , etc etc

Which of course created all kinds of compiler errors because addSpriteToLayer was then farked :)
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sat, Oct 16, 2010
Like this:

new Sprite(%xpos%, %ypos%, %prop:exampleproperty%)

No semicolon. Also, when putting string properties of a sprite into the constructor text, the exporter doesn't add quotes around the string. So I have to do this:

new Sprite(%xpos%, %ypos%, "%prop:string%")

Also, having the same problem with the CSVs being shifted over one value.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Oct 16, 2010
I've fixed the error with the commas in the tilemap export. Get the latest version for that.
Sorry about the inconvenience :(

Btw. If ever there is a life threatening error in a new version, don't forget I now keep backups of the good versions from 1.0.6 on my website at the bottom of the page. Of course, I'll always try and do updates for emergency fixes like this very quickly. :)

Bowl of rice is correct about the constructor text. In the exporter it will do addSpriteToLayer(%constructorText%,...) so the constructorText is responsible for constructing the object entirely when it is used.

One thing you can do for string values to avoid needing to use the quotes is to use %propvaluestring%, as it does in the complex exporter. When this is used it will use quotes only if the data is a string and omit them if it is any other data type. However, that only works when in a loop and you don't know the type you are dealing with. In the case you demonstrated that is the correct way to deal with it, as you are outputting a specific type called string. When dealing with a specific type %prop:type% then it is down to you to add the quotes or not as I found in my tests that there are actually cases when you don't want them.
Title: Re: DAME - a new map editor made using flixel!
Post by: ravenx99 on Sat, Oct 16, 2010
Here's a new one for you.  I'm running DAME on Linux and it won't open .dam files.

I just installed v1.0.9 today, on AIR v2.0.4.

DAME runs fine, as far as I can tell (I don't know what the empty application screen should look like).  I can "File->Save as" and it will save my project file just fine.  But when I try to open it (or any of the sample files), I get a dialog saying,

"Error. Failed to load file."

Any clues? Thanks.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Oct 16, 2010
Here's a new one for you.  I'm running DAME on Linux and it won't open .dam files.

I just installed v1.0.9 today, on AIR v2.0.4.

DAME runs fine, as far as I can tell (I don't know what the empty application screen should look like).  I can "File->Save as" and it will save my project file just fine.  But when I try to open it (or any of the sample files), I get a dialog saying,

"Error. Failed to load file."

Any clues? Thanks.
It's most likely using the wrong file path separators or something like that. I had to do a trick to get it to work on Mac, but I never had access to Linux before to test that.

I will send you a message with a link to a temporary version containing an attempt at a fix for this if you are interested. Hopefully it will work first time...

*EDIT - Check your messages to try the version with a potential fix
Title: Re: DAME - a new map editor made using flixel!
Post by: ravenx99 on Sun, Oct 17, 2010
I will send you a message with a link to a temporary version containing an attempt at a fix for this if you are interested. Hopefully it will work first time...

That was quick, thanks!  As noted in PM, no change.  I've installed on two different boxes, running different versions of Debian Linux (current stable and testing), with two different desktop environments and get the same result.

I've poked at this for a couple hours, trying to determine if it's a problem with AIR on the Linux system, but I'm finding it hard to troubleshoot.  Doing a system call trace on the running program (to see what filename it's trying to open, if any) locks up my entire desktop. :(
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Sun, Oct 17, 2010
Also, in those exporter keywords you can now choose if you want to export only visible tiles, which is pretty useful if doing long-winded xml. I've included a small xml example (not as fully fledged as Nimja's :) ) to demonstrate. Also help files have been updated for that. If enough people want, and with Nimja's permission, I can include Nimja's exporter in a future version along with a sample...

But of course! I don't share it here for it to be ignored ;) (or to go: niener niener niener, look at what I've done, but you can't use it, so by all means, include it in future versions)

Odd thing I noticed: When exporting the sprite angle, I've never changed it (so it should be 0), but it exported 0.020 unless I set the precision to 0. Obviously.

Might want to look into that.

It'd getting repetitive, but: Many thanks for the updates!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 18, 2010
My guess is that the extra 0.02 degrees is just an accidental rotation (It's happened to me a couple of times when rapidly placing down sprites). Not sure how I can elimate that (perhaps by disallowing rotations on the first placement?) but you should be able to remove it by selecting all sprites and using the new Set Sprite Coords and Orientation Tool (Ctrl T). I could always have an option to remove small errors in angle, say anything between -0.05 and 0.05, but it might remove angles that people want. Maybe on a checkbox on the export page?

I'm thinking you'll all like the next update. For version 1.1 I'll be including a new tool that lets you set up game logic even quicker. Hopefully I can get it fully linux compatible for that as well...
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Mon, Oct 18, 2010
when exporting my sprites, I get code like:

         addSpriteToLayer(obj = Enemy_Bounder(576.000, 544.000);, Enemy_Bounder, EnemiesGroup , 576.000, 544.000, 0.000, false, 1.000, 1.000, generateProperties( null ), onAddCallback );//"Enemy_Bounder"

I only need/want code like:

new Enemy_Bounder(576.000, 544.000);


How do I set this up? I put obj = Enemy_Bounder(576.000, 544.000); as my constructor...  what else do I have to manipulate?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 18, 2010
If you're using the exporters provided then you will always get an addSpriteToLayer call. The constructor text is there to allow you to allow you to pass in parameters to the constructor of the object in this exporter.

To get that to work properly the constructor text will need something like:
Code: [Select]
new Enemy_bounder(%xpos%,%ypos%)

and you will get

addSpriteToLayer( new Enemy_Bounder(576.000, 544.000), Enemy_Bounder, EnemiesGroup , 576.000, 544.000, 0.000, false, 1.000, 1.000, generateProperties( null ), onAddCallback );//"Enemy_Bounder"

Though that code will always happen without the need for constructorText if the class for the Bounder is set to Enemy_Bounder already.

If you need any additional functionality, such as not having the addSpriteToLayer call then the best solution is to create a copy of the exporter and settings file for flixelComplex and modify the script directly.

I think I will add a parameter to the exporters in the next version anyway to allow you to control the behaviour of the constructor text, or even a second constructorText parameter, so you can choose to control which bit gets shown exactly.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Mon, Oct 18, 2010
Okay, so I figured out how to do this once I realized I could make my own LUA exporter.

Since I've never used Lua before, this took a while. I just took your export files and trimmed out all the stuff I didn't want and edited what I needed. It's probably not perfect. But it works.

Here's what I got, in case anyone wants to use it:

SimpleSprites.lua
Code: [Select]
groups = DAME.GetGroups()
groupCount = as3.tolua(groups.length) -1
DAME.SetFloatPrecision(3)

as3Dir = as3.tolua(VALUE_AS3Dir)
levelName = as3.tolua(VALUE_LevelName)

spriteLayers = {}

for groupIndex = 0,groupCount do
group = groups[groupIndex]
groupName = as3.tolua(group.name)
groupName = string.gsub(groupName, " ", "_")
layerCount = as3.tolua(group.children.length) - 1

-- Go through each layer and store some tables for the different layer types.
for layerIndex = 0,layerCount do
layer = group.children[layerIndex]
isMap = as3.tolua(layer.map)~=nil
layerSimpleName = as3.tolua(layer.name)
layerSimpleName = string.gsub(layerSimpleName, " ", "_")
layerName = groupName..layerSimpleName
if as3.tolua(layer.IsSpriteLayer()) == true then
table.insert( spriteLayers,{groupName,layer,layerName})
end
end
end

fileText=""

-- create the sprites.

for i,v in ipairs(spriteLayers) do
creationText = "%constructor:null% \n"
fileText = fileText..as3.tolua(DAME.CreateTextForSprites(spriteLayers[i][2],creationText,"Avatar"))
end

-- Save the file!
DAME.WriteFile(as3Dir.."/SpritesOnly_"..levelName..".as", fileText )


return 1


SimpleSprites_settings.lua
Code: [Select]
-- Display the settings for the exporter.
DAME.AddHtmlTextLabel("This Exporter only makes sprites, and only uses the contructor text to do it. Note: Blank constructor text = no code.")
DAME.AddTextInput("Level Name", "", "LevelName", true, "The name you wish to call this level." )
DAME.AddBrowsePath("AS3 dir:","AS3Dir",false, "Where you place the Actionscript files.")
return 1


Here is a sample output:
Code: [Select]
new Enemy_Bounder(544.000, 512.000);
new Enemy_Bounder(800.000, 512.000);
new ExitRegion(640.000/32, 512.000/32, 15, 22, area_city, 2);
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 18, 2010
As mentioned before, don't forget to put any exporters you make in a custom exporters path (menu:File->Specify Custom Exporters Path) so they don't get overriden in the next update!!!
Title: Re: DAME - a new map editor made using flixel!
Post by: sergeminator on Mon, Oct 18, 2010
Hi Xander! your map editor rocks. I have been trying out for a couple of hours your app and it has some really cool features. Its my first time working with fixel and in a 2D flash game and this looks like a very helpful tool, however I had a couple of questions.

The Lua exporters don't seem to work out of the box, not even with the couple of samples included. They all give me a luaDoString:244 error on something called 'GamePackage' or 'levelName' depending on the one I try. I'll take a deep look into the lua code later but just thought I would mention it since its kind of confusing and frustrating that the samples won't work.

In the roll over help text on the Lua Exporters combo box it says that if lua settings file is not provided then something called VALUE_Location will be present. As a newbie I have no idea what this means, I'm guessing some default value for whatever is produced after exporting? Just thought a clearer message would help newbies like me not getting stucked in the exporting step.

Thanks for sharing your hard work dude!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Oct 19, 2010
Hi Sergeminator,

The errors you're getting seem strange...

Has anyone else had errors like that using the default exporters?? As far as I know they should work ok out of the box and all you need do is specify the output directories.

As far as the LUA error message goes - it is actually provided by LUA - there's nothing I can do about what it says... But what it is saying is that at line 244 there is an error in the LUA script, probably about a missing variable, which again seems odd as those variables all get populated at the beginning of the exporter script... Is your exporter window generating all of the required UI elements? There should be text boxes to input the GamePackage or levelName amongst others.

I noticed a possibility of the VALUES I provide to Lua not getting sent over due to a timing issue. I've never seen it happen, but it might fix things in the next version, which should come through wednesday or thursday, depending on how many new features I decide to squeeze through in it.

Title: Re: DAME - a new map editor made using flixel!
Post by: Alberton on Tue, Oct 19, 2010
Same here! Just downloaded the DAME but cannot export a thing. Same error messages as above.
Title: Re: DAME - a new map editor made using flixel!
Post by: sergeminator on Tue, Oct 19, 2010
Hi Sergeminator,

The errors you're getting seem strange...

Has anyone else had errors like that using the default exporters?? As far as I know they should work ok out of the box and all you need do is specify the output directories.

As far as the LUA error message goes - it is actually provided by LUA - there's nothing I can do about what it says... But what it is saying is that at line 244 there is an error in the LUA script, probably about a missing variable, which again seems odd as those variables all get populated at the beginning of the exporter script... Is your exporter window generating all of the required UI elements? There should be text boxes to input the GamePackage or levelName amongst others.

Thanks for the fast reply Xander! The error was caused by missing fields in the exporter popup in the DAME UI like you said. The way you can repro this is by not setting any path in "Specify Custom Exporters Path" in a fresh installation of the editor. When I was opening the exporter popup before setting the Custom Exporters Path it showed in a very small sized window (probably 100x100) that I had to expand and didn't showed any fields to set the output directory for the AS3 code and the CSV files (only the combo box to choose the script and the export, ok and cancel buttons). This was the same for all the lua scripts that I selected in the combo box.

Another bug that I had when trying out for the first time the editor is that I couldn't draw tiles when following the "editing maps" help instructions with the drawing tool. This was caused by not insterting a blank tile before my first actual real tile. This also caused the Tile Matrix tool to draw incorrectly incomplete matrices without showing that first (0 position) title. Hope this helps some other newbie like me. I think this should be easy to avoid if the help instructions specified about that blank tile.

Thanks again for all your help!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Tue, Oct 19, 2010
Hi Xander, your editor is great, and I'm currently using it to make a platformer.  Could you explain how to use paths?  Such as how to associate a sprite with a path in the editor and code.  So far, the only thing I've been able to go off of has been the small platform example.
Title: Re: DAME - a new map editor made using flixel!
Post by: Alberton on Wed, Oct 20, 2010
I made a new map and let DAME to make a new tileset. But the new tileset has only 2 tile (0 and 1), how can I add more tile to the tileset made by DAME?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 20, 2010
Hi Xander, your editor is great, and I'm currently using it to make a platformer.  Could you explain how to use paths?  Such as how to associate a sprite with a path in the editor and code.  So far, the only thing I've been able to go off of has been the small platform example.
Have you attached the sprite to a path? This can be done by right clicking on the sprite, select attach to path and then select the path. The only exporter that handles attachments is flixelComplex, or your own ones if you wish to get dirty and write your own exporter without having to rely on the provided projects! To use flixelComplex it is good to use sample 2 ( the complex claws example) as a map base and to take the code base as a template for your project, or at least a guideline.

I made a new map and let DAME to make a new tileset. But the new tileset has only 2 tile (0 and 1), how can I add more tile to the tileset made by DAME?

Right click on the tile in the tiles palette window and choose what you want to do (add copy/new before/after).
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Wed, Oct 20, 2010
Hi Xander, your editor is great, and I'm currently using it to make a platformer.  Could you explain how to use paths?  Such as how to associate a sprite with a path in the editor and code.  So far, the only thing I've been able to go off of has been the small platform example.
Have you attached the sprite to a path? This can be done by right clicking on the sprite, select attach to path and then select the path. The only exporter that handles attachments is flixelComplex, or your own ones if you wish to get dirty and write your own exporter without having to rely on the provided projects! To use flixelComplex it is good to use sample 2 ( the complex claws example) as a map base and to take the code base as a template for your project, or at least a guideline.

Whenever I right click on the sprite, it only gives me the options to "attach to shape," "detach from shape," and "copy GUID."  It's an animated sprite, and it's sprite layer is in the same group as the path layers with paths.  I started out using the simple exporter, but now I'm using the complex one.  Is there something I have to do to make the "attach to path" option appear?  ???
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 20, 2010
Is there something I have to do to make the "attach to path" option appear?  ???
Ah sorry. Yes in the current version it's actually incorrectly worded as "Attach to shape". I'm correcting the wording of that menu option in the upcoming version.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Wed, Oct 20, 2010
Is there something I have to do to make the "attach to path" option appear?  ???
Ah sorry. Yes in the current version it's actually incorrectly worded as "Attach to shape". I'm correcting the wording of that menu option in the upcoming version.

Okay, quirky stuff, but it's working.  I tried "attach to shape" but it wasn't doing anything.  I had to watch your video to realize that one has to select "attach to shape", click on the path layer, and then area select both items to get them to attach.  Thanks for the help, now I know how to do it.  :D
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 21, 2010
Version 1.1.0 has arrived!!!

It has some more cool features:


If you wish to make use of the new Links feature then you'll find both the flixelComplex exporter and ComplexClaws sample have been updated. You should be able to use the new version of the exporter with your old code, but it will give you a warning in your addObject callback when it tries to use a link. To fix, just make sure your callback returns either the object passed in or the object that gets created (ie a FlxText object created when you pass in TextData) so that the links have references to the correct object.

It's hopefully bug free, but if anything horrible goes wrong you can reinstall the previous version here (http://dambots.com/games/dame/DAME_1_0_9.air) and post a message here on this thread or a personal message to me and I'll work with you to get a fix as soon as possible.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Thu, Oct 21, 2010
Cool, I updated and haven't encountered any bugs.  Though, I'm having trouble coming up with script for following the paths.  The sample only has straight movement between two nodes.

Code: [Select]
public class Platform extends FlxSprite
{
[Embed(source = '../../data/bloodPlatform.png')] private var ImgPlatform:Class;

public var path:PathData = null;

public var direction:Number = 1; // -1 or 1
public var speed:Number = 0.2;

private var stopTime:Number = 0;

public function Platform(X:Number,Y:Number)
{
super(X, Y);
loadGraphic(ImgPlatform, true, true, 32, 32 );

solid = true;
fixed = true;
moves = false; // We handle movement.
}

override public function update():void
{
super.update();

if ( stopTime > 0 )
{
stopTime -= FlxG.elapsed;
return;
}

if ( path != null )
{
path.childAttachT += FlxG.elapsed * direction * speed;
if ( path.childAttachT < 0 || path.childAttachT > 1 )
{
path.childAttachNode += direction;
if ( path.childAttachNode >= path.nodes.length - 1 )
{
path.childAttachNode -= direction;
path.childAttachT = 1;
direction = -1;
}
else if ( path.childAttachNode < 0 )
{
path.childAttachNode -= direction;
path.childAttachT = 0;
direction = 1;
}
else
{
path.childAttachT -= direction;
}
}
x = path.nodes[path.childAttachNode].x + path.childAttachT * (path.nodes[path.childAttachNode + 1].x - path.nodes[path.childAttachNode].x);
y = path.nodes[path.childAttachNode].y + path.childAttachT * (path.nodes[path.childAttachNode + 1].y - path.nodes[path.childAttachNode].y);
refreshHulls();
}
}

public function StopMoving():void
{
if( stopTime <= 0)
stopTime = 5;
}

}

}

When this code is used with a path with more than two nodes, it properly switches between them, but the movement statements don't move in a desirable manner.  The platform moves faster when it has more distance to cover so that it always progresses to the next node in the same window of time.  I was creating a different statement that would make it move at a set pace, when I realized that the example statement and my statement would only work on straight paths and not the curved ones.  So far I haven't come up with anything that works correctly on a curved path.  :(
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 22, 2010
Hey Nejuf,

Constant speed on curved paths is a bit challenging  :)
Basically, I believe the t value on a bezier equate to a value 0 to 1 along each segment. You would need to estimate the length of each section so that you can change the rate at which that value changes. Something a bit like this pseudo-code should point you in the right direction, though there are definitely much more efficient ways of doing this and you'd be wise to prestore the lengths in an array on startup.:
Code: [Select]
// Calculate length of current segment
for i = 0 to 1, i+=0.1
{
    len += Dist(GetPointOnBezier(segmentNumber, i),GetPointOnBezier(segmentNumber, last_i))
    last_i = i
}
speed = 10 // pixels per second.
t += ( speed / len )* elapsedTime; // will need to limit this or work out when you've crossed to a new segment
newPos = GetPointOnBezier(segmentNumber,t)
I hope that makes sense. Sorry, I just woke up 5 minutes ago so currently my brain is caveman-like :D
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 22, 2010
The only way to do it is to store (or calculate on the fly, but that is costly) the length of each segment, then use that as a base for equal movement.

It's one of those things that give programmers nightmares ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Sat, Oct 23, 2010
Thanks for the suggestion, that definitely helps me out.

I did encounter a problem on my netbook running windows 7.  The computer can be screwy sometimes, so it could be machine specific.  Whenever I try to export a map, including the samples, the export window doesn't display properly (all export types) like shown in this image:
(http://i55.tinypic.com/35mns6e.jpg)

It was doing this with an old version of the software and continued to do it after I uninstalled it and put in the latest version.  As far as I can tell, clicking on the "Export" button doesn't have any effect.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Oct 23, 2010
As far as I can tell, clicking on the "Export" button doesn't have any effect.
A few other people have reported the same issue with the export window but so far I've been unable to reproduce it myself, despite numerous install/uninstall attempts. I doubt it's machine specific... I'll do my best to track it down...

When this happens does closing the exporter window and reopening it make a difference or does this happen all the time?
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sat, Oct 23, 2010
Xander - I get the "Export does nothing" all the time, but I don't believe it's DAMEs fault (although it could report the fact back). It happens when I've got FlashDevelop open at the same time. If the file is in the Project window, or if FD has opened it (maybe to check the content) then FD locks it, and DAME can't write to it. Close down FD and Export works perfectly (don't even have to restart DAME). So I usually edit in DAME with FD shut, then open FD again to work on the game for a bit, close it down when I need to re-export from DAME, etc etc.

Annoying, but I can't see a way around it. It's the same reason why you often can't delete files that have been opened at some point in FD. It just seems to lock them up.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Oct 23, 2010
Ah, that makes sense. I'll see if there's any way of at least trapping this error and displaying a message.

Nejuf, as for the exporter settings not showing up I've sent you a message with a link to a test version with extra error handling and a potential fix. Let me know what the results are.
Thanks.

Oh, and if anyone else if regularly having the same problem with the exporter settings never showing then send me a message and I can work with you by sending over a few test versions as well. I'd really like to get this bug fixed quickly as it's a huge blocker for some users!
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Sat, Oct 23, 2010
I export to my desktop instead of my working directory because of this. The problem I get is when overwriting map files, I get a 'this file is in use' error. Instead of shutting down FD, I just open my task manager and shut down the two java instances and it works fine.
Title: Re: DAME - a new map editor made using flixel!
Post by: paul k on Sat, Oct 23, 2010
I did see an empty Export dialog the first time I opened it, maybe two weeks ago, but haven't seen that since. 

Just now I changed the export paths while testing and found that hitting the Export button didn't do anything.  Restarting DAME (it'd been running overnight) fixed things and export worked great.

Paul

Win 7, Adobe AIR 2.0.4.13090 and DAME 1.10
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Oct 24, 2010
New version released!! (already?!)

This one includes more requests by you guys:


Also, I added some error messages for the exporter to trap the rogue bug about the empty exporter window.

I'm aiming for some real nice new features in upcoming versions.

Here's a request from me:

Can anyone who regularly gets the bug about the exporter settings being empty get in touch so I can send over a few test versions and try and figure this thing out? I can't reproduce it at all and it's the only huge bug remaining. Thanks :)

Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Mon, Oct 25, 2010
Ah, that makes sense. I'll see if there's any way of at least trapping this error and displaying a message.

Nejuf, as for the exporter settings not showing up I've sent you a message with a link to a test version with extra error handling and a potential fix. Let me know what the results are.
Thanks.

Oh, and if anyone else if regularly having the same problem with the exporter settings never showing then send me a message and I can work with you by sending over a few test versions as well. I'd really like to get this bug fixed quickly as it's a huge blocker for some users!

While I applaud your low-use of message popups. Make a message field to say "Export successful" with a timestamp. It helps people be sure that the button did something.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Mon, Oct 25, 2010
I've also modified my post about the exporter: http://flixel.org/forums/index.php?topic=2333.msg15460#msg15460 (http://flixel.org/forums/index.php?topic=2333.msg15460#msg15460)

This because the propvaluestring put "quotes" around everything. Which is superfluous for XML.

I must say though, with my own XML exporter, making the levels is a breeze. :)

Thanks again!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 25, 2010
While I applaud your low-use of message popups. Make a message field to say "Export successful" with a timestamp. It helps people be sure that the button did something.
That makes sense. I'm going to be including a log window for the exporter in the next version that should make things really clear.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Oct 26, 2010
While I applaud your low-use of message popups. Make a message field to say "Export successful" with a timestamp. It helps people be sure that the button did something.
That makes sense. I'm going to be including a log window for the exporter in the next version that should make things really clear.

Perfect. LUA errors should go in there too, as it helps people to review the line number that way without blocking the app (with a modal popup).

That reminds me:
Feature Request
The possibility to share settings between maps. Basically, to save the map, sprite settings in a seperate file, that shares between maps. ie. Instances of maps and sprites are saved in the .dam file, and the setup (assigning sprite maps, etc.) is done in a .set file or something.

Either that, or, making a single setting for multiple 'groups' which means you can export each 'group' as a complete level. (right now, when I start a new group, it asks me to redefine everything again)
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Mon, Oct 25, 2010

The possibility to share settings between maps. Basically, to save the map, sprite settings in a seperate file, that shares between maps. ie. Instances of maps and sprites are saved in the .dam file, and the setup (assigning sprite maps, etc.) is done in a .set file or something.

Seconded. I'm especially interested in some way to export the sprite definitions and be able to import them to another map. So I dont have to redefine all my sprites, I've been opening one map then going Save As to make it a new map, but I'm constantly forgetting to save it as the new map before doing a regular save. It's pretty frustrating! :P
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Oct 26, 2010
To be honest, I wouldn't mind at all if DAME worked with Groups as if they were seperate levels. Which would mean you have all your levels in one file, easily organized.

It would mean some reprogramming(probably), but ideally:
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Oct 26, 2010
I agree with this - right now I have 3 different DAM files, one per level. And if I make a "global" change in one, I manually do it to the other 2 files too. Would be very happy to have one Group per Level. Although I did think that was possible already and I'm just too deep into my game to change now?!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Oct 26, 2010
Feature Request

Right now, scaling objects is quite iffy I like things to align to the grid, but right now it's difficult to have an object in the right place like that. If you really want to, I can supply code that does it ;)

If you need a reference, try resizing your window in your OS, or basic scaling in Photoshop.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Oct 26, 2010
I'm already in the process of implementing import/export for various settings.

But yeah you can already do the one group per level thing - that's been around since version 1! Assuming you used the ComplexClaws you shouldn't need to do much else - that's what the sample does in its own very basic way! The flixelComplex exporter will work perfect for that too - that's pretty much the reason I did 2 exporter samples for flixel: One for simple games where everything is loaded at once and another for complex ones where you can stream areas in or switch between them as you want. Theoretically, using flixelComplex you can even have multiple groups active at once and stream in/out other groups, all of which are defined in the same map. Also, now that you can select which groups/layers export you can make the exporter only export the current group you're working on. Of course, if you've got your maps all in separate projects then you'll have to rely on importing settings for now.

And the onion skinning is there too (or you can just untick a group to hide everything containing within it).

But no worries about the import/export. In fact, I'm probably just going to allow you to a load a project as a settings file, so you just tick the things you want to import, as well as allowing you to export just specific sets of data as a .dams file or whatever I call it.
Either that, or, making a single setting for multiple 'groups' which means you can export each 'group' as a complete level. (right now, when I start a new group, it asks me to redefine everything again)
Just so I understand, what specific settings do you want sharing for this? You mean things like number of layers, scroll factors, x and y position? Or are you thinking something else entirely?

When I finish adding features to DAME I'll need to make a huge game demo in one project to demonstrate the full breadth of features and how you can optimise the who thing without needing to split up projects.
Title: Re: DAME - a new map editor made using flixel!
Post by: dmonkoff on Tue, Oct 26, 2010
Hello there.
I'm kinda new here, so my question may seem a bit stupid, but I hope that you'll help me with it.
Here's the problem:
I've tried to do my own flash just to test features of DAME and flixel, but I got some errors, so I tried to compile and run the examples. The problem is that when I try to run SimpleClaws this happens:

VerifyError: Error #1014: Class mx.core::ByteArrayAsset could not be found.

   at flash.display::MovieClip/nextFrame()
   at org.flixel::FlxPreloader/onEnterFrame()[E:\flixel\org\flixel\FlxPreloader.as:153]

and then, after I press continue this appears:


ReferenceError: Error #1065: Variable Level_Test_CSV_Main is not defined.

   at flash.display::MovieClip/nextFrame()
   at org.flixel::FlxPreloader/onEnterFrame()[E:\flixel\org\flixel\FlxPreloader.as:153]

same errors were in my testing flash.Can you help me?
I'm using flixel v2.35
P.S sorry for my bad language, I'm not from english-speaking country, so it's not really easy.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Oct 26, 2010
I'm not sure about this error. But have you tried searching the forums here as it looks like more of a Flex thing? Maybe this thread might help you out:

http://flixel.org/forums/index.php?topic=1360.0 (http://flixel.org/forums/index.php?topic=1360.0)

It's possible it's a Flex4 thing to do with the embeds (are you using Flex 4?) - I only have Flex3. Let me know if you find a solution and what it is, then I could possibly patch the samples.

PS. Your English is pretty good :)
Title: Re: DAME - a new map editor made using flixel!
Post by: ravenx99 on Tue, Oct 26, 2010
dmonkoff, your English is a lot better than many US natives on the net.  If you hadn't said anything, I'd never have suspected.

I've complied SimpleClaws using the Flex 4 SDK (on Linux) with no problems.

Okay, I just reproduced your runtime error with:

$ mxmlc -sp=/opt/flixel MainGame.as

This works...

$ mxmlc -sp=/opt/flixel -static-link-runtime-shared-libraries MainGame.as

I've found that when the Preloader is used, mxmlc doesn't always throw the warning about runtime libraries.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Wed, Oct 27, 2010
But yeah you can already do the one group per level thing - that's been around since version 1! Assuming you used the ComplexClaws you shouldn't need to do much else - that's what the sample does in its own very basic way! The flixelComplex exporter will work perfect for that too - that's pretty much the reason I did 2 exporter samples for flixel: One for simple games where everything is loaded at once and another for complex ones where you can stream areas in or switch between them as you want. Theoretically, using flixelComplex you can even have multiple groups active at once and stream in/out other groups, all of which are defined in the same map. Also, now that you can select which groups/layers export you can make the exporter only export the current group you're working on. Of course, if you've got your maps all in separate projects then you'll have to rely on importing settings for now.

I am aware of this, it's about something else.

Right now, layers each have their own settings. For Map layers, this is not a big deal (select spritesheet), but I'd like my  maps to share a single spritesheet, or perhaps a few. Like 3 lava levels, 5 jungle levels, etc.

For Sprite layers, this gets more complicated, as you don't (often, if at all) define unique sprites for that single level. And you shouldn't, a game should mostly work with common objects. For example, I have a 'trigger' sprite, that can do various things, like show text, or be the end of a level. A sprite layer, having no true settings of its own, should just use the 'project sprites'. So you define a list of sprites, and that list is shared accross all sprite layers.


Things that should be shared for Map Layers

Things that should be shared for Sprite Layers
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 27, 2010
Ok. I'll have a think about that... At the very least, I'll implement a Copy Layer menu option as well as a Copy Layer Template option.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Wed, Oct 27, 2010
You know what would be useful? Having the Collision Index stored with the tile set, not the level! :) I've got 4 levels and I have to keep updating it one by one, yet in reality it's defined by the tileset I'm using. I don't know how you'd reflect this though.

Also (not checked if a new version fixed this) but could you make it so the right-click menu appears on the tile window even if you don't click a tile? If I zoom out by accident I have to try right-clicking really tiny 2x2 sized tiles to get it back again! :)
Title: Re: DAME - a new map editor made using flixel!
Post by: dmonkoff on Wed, Oct 27, 2010
Thanks!
I've downloaded flex SDK 3.5 and all worked fine with it.
Now excuse me, I must go to improve my skills in sprites...
P.S
By the way, great editor, I really liked it  :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Wed, Oct 27, 2010
You know what would be useful? Having the Collision Index stored with the tile set, not the level! :) I've got 4 levels and I have to keep updating it one by one, yet in reality it's defined by the tileset I'm using. I don't know how you'd reflect this though.

There's a drop down for "sprites" in the "sprite" tab.  Perhaps the tab could become "assets," and encompass not just sprites, but also tilesets, each with their own settings like the sprites.
Title: Re: DAME - a new map editor made using flixel!
Post by: knight1080 on Wed, Oct 27, 2010
Hey all,

I've got a basic level built a test run for a project I am working on. Since it consists of just a background and a test layer with platforms on it (both inside one group), I am using the simpleClaws.lua exporter. When I click to export, I get this error:

luaDoString:83: attempt to concatenate a nil value
stack traceback:
   luaDoString:83: in main chunk

Any idears?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 27, 2010
Knight1080,

That could happen if you haven't set all the paths in the exporter settings window. In this case just make the as3 directory and the csv directory point somewhere.

*It should be a lot easier for me to figure out some of these random bugs in the next version in a couple of days as I'm including error logging in the exporter so when you get errors you'll be able to send the log to me, but right now I'm just stabbing in the dark. Also the next version will have fixes for some bugs that occur in the exporter currently...
Title: Re: DAME - a new map editor made using flixel!
Post by: knight1080 on Wed, Oct 27, 2010
/facepalm.

Yerp, thanks a bunch. It's been a long day.   ;D
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Oct 28, 2010
Oh I found a new bug / oversight last night. I had several Tile Brushes created. I then added about 20 blank tiles into the middle of my tile set, using the right-click "add blank tile" setting, and put new tiles into them. The map updated itself properly, but the Tile Brushes were all now out of sync.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Thu, Oct 28, 2010
And I must apologize, Sprites are already organized globally. Fail me for not seeing that ;)

Rewritten my XML exporter to output 1 XML per level.
simpleXML_settings.lua
Code: [Select]
-- simpleXML_settings.lua - created by Nimja.com
-- Output each group as a seperate level, with maps and sprites split up.
DAME.AddHtmlTextLabel("Simple XML output (map and sprites) with some classinfo and properties. Level names are based on the group name.")
DAME.AddBrowsePath("Output dir:","OutputDir",false)
return 1

simpleXML.lua
Code: [Select]
-- simpleXML.lua - created by Nimja.com
-- Output each group as a seperate level, with maps and sprites split up.

--Generic settings
DAME.SetFloatPrecision(0) --Integers for the win...

-- Values from the settings.
outputDir = as3.tolua(VALUE_OutputDir)

-- To translate objects from values to XML.
propertiesString = "<properties>%%proploop%%<%propname%>%propvalue%</%propname%>%%proploopend%%</properties>\n"
spriteString = "<sprite type=\"%class%\" x=\"%xpos%\" y=\"%ypos%\" width=\"%width%\" height=\"%height%\">\n"..propertiesString.."</sprite>\n"

--Get the name for an object, simplified.
function getName(obj)
return string.gsub(as3.tolua(obj), " ", "_")
end

--Actual loop
groups = DAME.GetGroups()
groupCount = as3.tolua(groups.length) -1

for groupIndex = 0,groupCount do

group = groups[groupIndex]
groupName = getName(group.name)

layerCount = as3.tolua(group.children.length) - 1

--Get properties from the group
properties = as3.tolua(DAME.GetTextForProperties(propertiesString, group.properties));

--Other things for the XML
maps = ""
sprites = ""

-- Go through each layer and store some tables for the sprite types.
for layerIndex = 0,layerCount do
layer = group.children[layerIndex]
isMap = as3.tolua(layer.map)~=nil
layerName = getName(layer.name)

if isMap == true then
--Maps get in the maps xml data.
maps = maps.."<map name=\""..layerName.."\">"..as3.tolua(DAME.ConvertMapToText(layer,"","\n","",",","")).."</map>\n"
elseif as3.tolua(layer.IsSpriteLayer()) == true then
--Sprites get in the sprite xml data.
sprites = sprites..as3.tolua(DAME.CreateTextForSprites(layer,spriteString,"Avatar"))
end
end

--Put together the output
output = "<level>\n"..properties.."<maps>\n"..maps.."</maps>\n<sprites>\n"..sprites.."</sprites>\n</level>"

-- Save the file! (uses groupName.xml as filename)
DAME.WriteFile(outputDir.."/"..groupName..".xml", output)
end
return 1

Edit: Updated the XML generation to be much nicer and smoother. Makes more sense now.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Thu, Oct 28, 2010
Xander, how do you get group properties in the exporter?

I'm assuming something similar to:

Code: [Select]
as3.tolua(DAME.CreateTextForGroupProperties(group.properties, "<properties>%%proploop%%<%propname%>%propvalue%</%propname%>%%proploopend%%</properties>\n")
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 28, 2010
Xander, how do you get group properties in the exporter?

Actually, there's an example of that in the flixelComplex exporter. Just use the same GetTextForProperties function as with layers. eg:

Code: [Select]
as3.tolua(DAME.GetTextForProperties( "<properties>%%proploop%%<%propname%>%propvalue%</%propname%>%%proploopend%%</properties>\n", group.properties))
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 28, 2010
Oh I found a new bug / oversight last night. I had several Tile Brushes created. I then added about 20 blank tiles into the middle of my tile set, using the right-click "add blank tile" setting, and put new tiles into them. The map updated itself properly, but the Tile Brushes were all now out of sync.
Hmmm... I just double checked that and I can't reproduce this at all ???. It should auto correct itself as long as the graphics for the tile brush match the layer you're editing, so sounds like a bug. Had you just created the brushes? Does this always happen for you with old brushes and ones you just create? Is there anything special about what you did, like using Undo when you did this?
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 29, 2010
Xander, how do you get group properties in the exporter?
Code: [Select]
as3.tolua(DAME.GetTextForProperties( "<properties>%%proploop%%<%propname%>%propvalue%</%propname%>%%proploopend%%</properties>\n", group.properties))
Thanks, Merci, Danke, Dankjewel and Domo arigato gozaimasu
Bug - Group properties not saved
Group properties do NOT get saved. Both ctrl+s and save through the menu apparently do not make properties be saved.

Other things (sprites, maps, and such) do get saved and I can see that. All defined group properties are gone.

Bug - 'disabled' Sprites selectable
This is a funny one. Have 2 groups with a sprite layer in each. Have a bunch of sprites on each layer but not overlapping. Deselect group 1 (so you don't see it), select the sprite layer in group 2. Now use the selection tool to select a large area. You can select sprites on a different layer than the active one.
Manually unchecking the (already hidden) sprite layer does work, but it does not respect the group already being unchecked.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 29, 2010
Thanks for letting me know about those bugs.
Both were easy fixes and will be included the next version...
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 29, 2010
Thanks for letting me know about those bugs.
Both were easy fixes and will be included the next version...

Didn't think they'd be difficult ;) Glad you're fixing them quick too. It'll make my level building more easy. There's a big version update coming for Shadow, with some cool stuff! (in about 2 hours)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 29, 2010
New Version Released!
This one has mostly bug fixes and some tweaks rather than major features, though the importing is pretty useful :)


Click here to get the latest if you haven't already got DAMe installed:
http://dambots.com/games/dame/DAME.air (http://dambots.com/games/dame/DAME.air)

As I've changed the exporter file handling let me know if you get any problems with this update. And as always, the previous version is available to rollback to if you encounter serious problems here (http://dambots.com/games/dame/DAME_1_1_1.air), and you can find even older versions on the dambots website.

Exporting should be a lot more stable and you'll be notified of any files that failed to export in the error log.

FYI, here's the list of things I intend to add to version 1.1.3, assuming crazy halloween bugs don't suddenly show up:


Happy Halloween!! :o
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Oct 29, 2010
  • When scaling with marquees keep opposite handles anchored.

Thanks like always for the quick updates. And that one scaling option will make my life so much easier ;)

In my game, I use it to set the size of triggers and moving platforms, so I get a visual representation of the object in question. The current scaling makes it a lot harder to stay on the grid and get a perfect size.
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Sat, Oct 30, 2010
Xander, I just had a problem with DAME (I don't think it was related to the new release, but I'm not sure). I started it up, installed the new release, and tried to open a map I made the other day. I forgot that I moved my tileset image and deleted the folder it had been in when I initially made the map. DAME reported that the file was missing, and I tried to edit the layer properties of my map layer to point to the new location of the tileset. While I could select the new image and update the info, the dialog box just hung there when I clicked OK. If I remember right I could cancel out of the dialog but I couldn't get it to accept my changes.

I solved the problem by recreating the original file structure with the tileset in it. Then I could load in the map and redirect the map layer to the new file location just fine.

It's not really a big deal, but I thought I should let you know what happened.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Oct 31, 2010
Thanks Bonemonkey,

I was able to reproduce it and it will be fixed in the next version. :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Nov 1, 2010
Yet another new version!

Cool features found within:


So to use the new function to move and resize maps in real time, select the map, enter "Select/Move" mode, then click the new icon on the right to "Move/Resize Map". Once you're in this mode borders will appear around the edge of your map. If you click on any of the boxes you can resize the map by dragging. If you click in the map itself you can drag to move it around. If you have snap-to-grid enabled you will move the map but in steps dictated by the tile dimensions, so the tiles will still be aligned to their old alignment.
Title: Re: DAME - a new map editor made using flixel!
Post by: paul k on Mon, Nov 1, 2010
Move/Resize maps is very nice - another great release!
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Nov 2, 2010
Very nice work! I was using DAME for around 4 hours last night finishing the last level of my game, it's a truly brilliant map editor (hence my donation.. anyone else reading this, I'd strongly  suggest you donate too!)

Can I make a small suggestion? Now might be the time to stop adding features and work on the UI a bit. I feel that the icon toolbar is very under-used, and could contain shortcuts to lots more useful features. Also the gradient window title bars and overall colour scheme could benefit massively from a rethink. I also think there are several very powerful features hidden in quite obscure menus (game size overlay for example!) and it'd be nice to see these broken out, maybe a new menu added.

You have an incredible map editor, maybe it's time to make it look that way too? :) (if you need help with doing that I work with an incredible pixel artist who I'm sure would be up for assisting).
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Nov 2, 2010
Actually I found a problem, although it's not a bug, more a UI thing (and a feature request!)

I think when selecting a Sprite that the "Locked" and "Export" checkboxes applied to that sprite alone, because they appear below "Selected Object properties". But they apply to the whole Layer! which threw me a bit until I realised what I had done :)

In the end I had to make a "not for export" layer specifically to hold these things, rather than being able to say "don't export this sprite". Maybe that could be added into the Sprite Edit panel somewhere? For my game it worked because I've got no complex layering going on, but I can see how in the future it might be annoying to have to group "non exportables" like this.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Nov 2, 2010
Hmm I've got the following bug again, this happened in the previous version too:

For some reason the Select tool gets "locked" so that when you try to drag a sprite it resizes / scales it instead, and it's impossible to actually move ANY sprite from this point on. I'm not sure how to reproduce it, but it did it again to me literally just then. I had a sprite on a layer, I selected it, cut it, pasted it onto a new layer and tried to move it and it was stuck in the "resize" mode. Only quitting DAME and restarting fixed it. Sorry I can't be any more specific.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Nov 2, 2010
You're right about the "Selected Object properties" thing. It's a bit misleading and I had completely missed that when I added those tickboxes, so I'll have to split that into 2 sections, one for the layers and the tickboxes and layer properties and one just for the object properties grid.

I'm not 100% sure about the need to decide if a sprite exports or not. I'm curious to know why you'd want that feature as I fear it could get pretty confusing! I could probably add an option to the sprite entries, or individual objects themselves if I can visually mark them up as different to the other objects in the layer, but I'd like to know the context so I can design with that in mind as maybe the reason for having a non-exportable could lead to a different and more specific solution.

I can't reproduce the select tool getting locked in resize mode bug at all or see any way the code could fail. Two important questions that might help narrow down the bug: When this happens was it in resize mode at all when you cut it? Do you have the resize/rotate marquees enabled on yours? And is the resize cursor active all the time (ie it resizes even when the mouse isn't held) or it's just that when you click it just decides to resize?
*Edit - if you pressed Alt at all (the resize button) it is possible due to the way flixel handles keyboard input. I can repro it but only if I trigger a breakpoint when the key is pressed, so at least that looks like it's flixable :-[

Still no luck for me in the tile brushes bug either. You're getting some really unique and obscure bugs that I'm struggling to reproduce :)

As for the future of DAME... I agree about not adding any more features for a while. In fact, I've pretty much added everything I'd planned for before version 2, so I'd love to hear any suggestions you have to improve the accessibility/usability of it with regards to menus, button layout or even colour scheme! Though, what's wrong with orange?! ::) The main thing is, I've no idea what hidden features people are using a lot and would like to associate with keyboard shortcuts or buttons so that's where your feedback is really important!

And yes, please donate! ;D
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Nov 2, 2010
re: Resize lock bug

The sprite was outlined with the dotted lines when I cut it. I had the "movement" tool selected in the toolbar. Yes I have the marquees disabled because I'm working with an 8x8 tile set. It happens quite frequently. I'm editing lots of Sprite properties at the same time if that helps. I noticed another bug tonight where I was changing the text for a sprites String property and all of the sudden the map started scrolling! Basically keyboard short-cuts were active, so cursor key left/right through the text (to edit something at the start) was making the map scroll, and delete erased my sprite. Somehow it allowed keyboard short-cuts again.

When I clicked out of this, all sprites were then in resize mode. Clicking back on the Paint icon painted just fine, but going back to the move tool made them all resize instead of move. So I quite and restarted and it's back to normal.

I'll try and see if I can reproduce, but it's not easy!

I've not created any more tile brushes, so ignore that one for now. If I spot it in my next level I'll shout :)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Nov 2, 2010
Oh and re: the "sprites that shouldn't export" - I have a few sprites which I use as visual guides or references, for example a player size sprite that I never want to export, but I have in various places to help me check height/width of passage-ways. Think of them as sprite guides.

So yeah, maybe that's something in its own right? :) A "guide layer" and "Add new guide sprite" - which doesn't have any properties at all other than the sprite itself, and it never exports.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Nov 2, 2010
Ah yes, the arrow keys to move the view shortcut. I'll remove that in the next version unless anyone has any objections. It was really just a stop-gap (for people without middle mouse buttons!!) until I got the scroll bars working so it's not really needed anymore.

* And I think I've fixed the resizing bug on my version.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Nov 2, 2010
I'm going to throw out a question or two to you lovely peeps...


If I did this then you'd be perfectly free to choose to include it or not (no obligation) and also free to mess with resolution and colour, as long as the logo itself remains in-tact. Though, you could also adapt the texturing too to fit in with your game's visuals so it's not out of place. And I'm certainly not imagining a full screen thing or a preloader - more something small and unintrusive that you can put in your credits or wherever you feel is appropriate for your games.

I'm just looking at ways to promote the editor and spread the word beyond this community, so really interested to hear what you guys think on this subject!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Wed, Nov 3, 2010
Well I was tempted to make a logo for you, but what I'd suggest is making a pixel-art variant of the DAM logo with an E added and "level-editor" above it. And below it your link in 6pixel font. This will allow it to be placed virtually anywhere and people could still put text next to it to promote it more.

I'm talking about 92 x 32 max. Remember, most games are rather low-res :P
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Wed, Nov 3, 2010
I wouldn't put a "MADE with DAME" logo in my game, because it wasn't made with DAME :) It's not the DAME part I dislike, it's the "made" part. I don't want people to think it was some kind of game making package.

If you created a nice small pixel art button that just said DAME or something indicating it was a level editor, then yes I'd consider it (it'd have to be well designed!) - remember most Flixel games are zoomed in by a factor of 2 or more, and lots use pixel art style graphics, so you'd want to try and be keeping-in with this.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 3, 2010
All valid points!

Something like this perhaps? (Note: I did knock this up in only 10 minutes so not a final thing!)

(http://dambots.com/games/dame/DAME_banner.png)

Seems to scale up well at a x2 zoom too and is under the size constraints at 90x30 pixels.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Wed, Nov 3, 2010
it's... ok... :)

I won't use it in my current game, but I have put a shout out for dame in the credits and end sequence, and will do so on the web site when it's live.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 3, 2010
Awesome! Thanks!

I can't wait!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Thu, Nov 4, 2010
If it was included, I would probably put a DAME logo somewhere in the game or credits.

Is there any particular reason map layers can't have 1 height?  It always resets to 2 if I try to enter 1.

Sometimes sprites don't display correctly in the editor.  Some parts of the sprite look "cut-off" and sometimes they are not visible entirely.  They can be selected and resized, but their visibility issue doesn't go away.  The problem only ever begins when loading up a project that had the sprites placed.  It is also unique to the instance of the sprite, and doesn't seem to be related to the layers.  It's hard to say, but I think the "cutting-off" works its way up from the bottom right.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Nov 4, 2010
Hi Nejuf,

I guess there's no reason the minimum map height can't be 1. At the time I never even considered anyone would ever want a map 1 tile high. I'll add the fix in the next verison.

The sprites cutting off thing is strange. When you say it's unique to the instance of the sprite do you mean that if, say, you have a coin sprite then it is only coin sprites that are cut off (and they are all cut off the same way) or that some coins are cut and others aren't?

I've not heard of this bug before and can't think why it would do that unless somehow the sprite dimensions had been changed. Since it uses the flixel system of defining the size of each frame if the frame size changed externally (ie sprites had been resized after placing in the editor) then that would need to be updated. The only other possibility is that the frame size was somehow 'lost' by DAME. Can you confirm that the values in the sprite entry are corrected, and try changing them (to a different value and then back again) to see if it makes a difference? If that is the case then can you tell me what dimension your image file is and also what dimension the frame is for the sprite?

Again, feel free to PM me if you would prefer :)

Thanks.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Thu, Nov 4, 2010
The reason I want to make the height 1 is because I have a map layer with tiles that are more than half of the height.  I only want one layer of them, but with 2 as the height it extends the level bounds beyond that of the rest of the maps.

With the cutting off, some coins are cut and some aren't.  However, looking back through my level, it seems that only the sprite instances that have been resized do this.  I tried changing the width settings of the sprite and resizing the instances, but it did not make them more visible.
Title: About paths and groups
Post by: Nejuf on Thu, Nov 4, 2010
So I have multiple groups, and I'm using them like levels.  However, I have to load the levels in the order their groups appear in the editor (top to bottom) because of the way the addSpritesForLayer... function is created when there are sprites attached to paths.

Say I have:
Group1
  Pathlayer (2 paths)
  SpritelayerA (1 sprite attached to the second path)

Group2
  Pathlayer (2 paths)
  SpritelayerB (2 sprites attached one to each path)

The addSpritesForLayer functions then look like:

In Level_Group1,
public function addSpritesForLayerSpritelayerA():void
{
  paths[1].childSprite = addSpriteToLayer(. . .);
  paths[1].childAttachNode = 0.000;
  paths[1].childAttachT = 0.000;
  addSpriteToLayer(...);
}

In Level_Group2,
public function addSpritesForLayerSpritelayerB():void
{
  paths[2].childSprite = addSpriteToLayer(. . .);
  paths[2].childAttachNode = 0.000;
  paths[2].childAttachT = 0.000;
 
  paths[3].childSprite = addSpriteToLayer(. . .);
  paths[3].childAttachNode = 0.000;
  paths[3].childAttachT = 0.000;
}

So if in my PlayState I do:
level = new Level_Group2(true, OnObjectAddedCallback);

I will get an error when the level is built because there is no information at paths[2] and paths[3], and Group2's paths have been added to paths[0] and paths[1].

What I want to be able to do is load up any level without first having to load every prior level in the list.  Do I need to make a custom exporter to do this?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Nov 4, 2010
Ok. I see the problem with the paths. I will make a fix to the exporter in the next version so that each group resets its path counter. Either that or I will replace it with a map so that it doesn't cause a problem to have gaps before the sprites in the group you're loading.

The minimum width and height will also be changed so that you can set it as low as 1x1 in the layer properties. However, you can already do that in a different way using the real-time resizer tool if you have the latest version :) Just don't edit the layer properties until you have the next version or it will most likely reset!

As for the the sprite cut off... Can you give me an idea of the original dimensions of the sprite source image along with the dimensions of the frame, and the scales of the sprites that don't work? Are they rotated? Are they normal sprites or tile sprites? You can find the exact values of each sprite instance by selecting it and choosing the menu option "Set Sprite Coords and Orientation". The shortcut should be Ctrl+T.
The more info I have the better on this, so please send me a private message (as I imagine this data will be quite huge) with whatever you can, ie the numbers in the sprite entry itself, and lots of the values for the sprites that don't work along with some of the ones that do. If you can include a .dam file (minus assets and reduced to the bare minimum if you are worried about sending me your levels before release) and/or a screenshot of the bug that would also be very helpful in solving this issue.
Title: Scrolling bug
Post by: Nejuf on Thu, Nov 4, 2010


The path and map dimension changes you mention should fix my problems with them.  :)

I will send you some more detailed information about the cut sprites and explore the trigger, today or tomorrow.  ;)


Bug:

I've been encountering a bug with the scroll bars.  There are times when I have the bottom scroll bar pushed all the way to the right, but there are still more map areas beyond it and out of view.  I thought initially it had to do with zoom, but I figured out that it must be an issue with sprite layers that have a scroll factor because when I toggle the visibility of said layers, the scroll bar changes positions and works correctly when the scroll-factored layers are not visible.

Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Fri, Nov 5, 2010
*cough* Bug/feature notice *cough*

I really hate doing this after your update, as it is most definitely fantastic to scale using opposite corners. But... Can you make it snap to grid?

Pwetty please, Mistah?  :-X
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Nov 5, 2010
I'll try and get the sprite scaling to allow for snapping in the next version!

The scroll bars should only account for the dimensions of the current selected layer. But with groups selected it just sets a generic min and max scroll dimension. Is that what you're seeing, Nejuf? Though, I have just noticed it doesn't update the sccroll dimensions if you Paste a copy of a sprite instead of painting one :) What scroll factor are you using and what is the coordinate of a sprite on that layer that it will not account for?
Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Sat, Nov 6, 2010
Is there a .isImageLayer() or something along those lines you can use for detecting image layers, as well I can't find anything in the help about a createTextForImage() class for grabbing the scroll and image information of an image layer.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Sat, Nov 6, 2010
I'll try and get the sprite scaling to allow for snapping in the next version!

The scroll bars should only account for the dimensions of the current selected layer. But with groups selected it just sets a generic min and max scroll dimension. Is that what you're seeing, Nejuf? Though, I have just noticed it doesn't update the sccroll dimensions if you Paste a copy of a sprite instead of painting one :) What scroll factor are you using and what is the coordinate of a sprite on that layer that it will not account for?

Oh, I get it now, it's just the sprite layers.  Though I don't know if adjusting the scroll bars to a sprite layer is very effective because to place sprites past the default view, I would either have to place a sprite and drag it past the edge in order to extend the scroll bar, or use the arrow keys to move the view.  :-\
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Nov 7, 2010
Sparky - Image layer exporting will be provided in the next update (probably tonight or tomorrow). It won't be supported in the provided flixel exporters but I'll update the help documentation accordingly.

Nejuf - It's also map layers too! The extents of the scroll bars actually go one screen size beyond the furthest sprites in all dimensions. I'm not keen on allowing any further as it would make it harder to actually find the extents of all the sprites on the selected layer, also I'm removing the arrow key moment as it is conflicting with editing of property entries. Or maybe I'll just make it work with a secondary key like Shift or something...

Anyway, you have many solutions for this. First, a group layer automatically sets the extents to -10000 and 10000, more than enough for most projects, so you can find a good location with that. I will increase it to 30000 unit pixels either way, but any more and the scrolling is too fiddly. Secondly, if you are using tilemaps, then the scrollbars will fit that too (plus one screen size either way). Thirdly, even though arrow key movement is out, the middle mouse is still available as a means to navigate your view. There is a little known and probably pointless side-feature of the mouse dragging. Hold 'd' while pressing the mouse and the view will accelerate based on the distance to the original drag location.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Sun, Nov 7, 2010
Okay, I will get used to the different movement methods.  Though I'll probably never use middle mouse features because the middle button on my mouse is funky and other times I'm using a touchpad with no middle button.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Mon, Nov 8, 2010
Xander, small thing. When a layer (or its parent) is un-ticked, deselect everything on that layer. It's a bit confusing to still see selection outlines once a group/layer is deselected
Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Mon, Nov 8, 2010
Perfect.
I look forward to the update, we've got our own export script already whipped up, we just wanted to try using the image class for large backgrounds and didn't see the option, was starting to think I went crazy.

Great job on hooking in the LUA exporter, it was a snap getting a formatted level file in just the format I wanted. If things turn out well on this project, I'll be sure to use DAME again and donate.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Nov 8, 2010
New Version of DAME - mammoth set of tweaks and bug fixes included:


Mostly of the reported bugs and tweak requests from last week, plus a few more, are included here. Paths should export correctly over multiple groups now without needing to load previous levels, menus are more streamlined with two new headings, and some options that were hidden away now directly available in the menus with keyboard shortcuts.
I hope I didn't miss anything, or mess anything ;) So let me know if something is amiss and I'll fix as quick as I can, and as always, the previous version is available on the editor website for emergencies!

*I've had a few comments about people missing the arrow keys for navigation. I'll update this in the next couple of days so that the shortcut will probably be Ctrl+Arrow keys.
Title: Re: DAME - a new map editor made using flixel!
Post by: 3WG on Wed, Nov 10, 2010
Hi,


For two hours i tried DAME but it seems that on my PC i can't see the TILES windows ?

Did anybody have the same issue ? Or i'm the only guy on this little blue planet called earth that run in this problem ?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 10, 2010
Did you minimize it? If so then it would appear as an icon on the right of the status bar that you can click to restore, though that doesn't get saved. Is it only on this version or has it been like that for all versions of DAME for you? Are you able to see the Tile Matrix window when you select a tilemap and click on the matrix icon? If not, do any other windows show up at all?

One other possibility - maybe the saved coordinates of the tiles window got screwed up. What values for x, y, width and height do you have in your settings file in the tileWindow node in C:\Users\<USERNAME>\AppData\Roaming\DAME.dambots\Local Store\settings.xml
Maybe change them to something reasonable or delete the settings file before you restart DAME to see if that fixes it?

I've not had any reports about this bug from anyone else. If anyone else does have this problem please let me know!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 10, 2010
A new version is out, with just a couple of minor tweaks to address usability.


Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Fri, Nov 12, 2010
I'm having issues editing layer info in this latest patch.
When I make changes, they aren't saving.
For example, I can't change the tileset, I can make the change, and sometime I can click ok and then nothing happens and when I go to edit again its back to the previous settings.

Other time I click ok and nothing happens, and I can click it all I want and nothing happens. I can click cancel okay though
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Fri, Nov 12, 2010
Question:

I am trying to set up a sprite of an enemy which needs the player passed in as one of the parameters. The player is instantiated in DAME. How can I take that instance of the player sprite and pass it into the enemy via the enemy's constructor text?

E.g. new Enemy(%xpos%, %ypos%, %thisplayer:Player%)

Also, is there a way to pass in map layers?
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Fri, Nov 12, 2010
The latest version has been working great for me, except sometimes saving seems to quit working.  I've tried ctrl+s, save, and save-as, but the saving only works when I do save-as and save it as a new file (just doing save-as and saying it is okay to overwrite the current file doesn't work).  The reason I know it is not saving is because of the counter at the bottom and closing DAME and opening the file shows that the saving didn't happen.  It happens regardless of whether or not Flashdevelop is running.

*Doesn't seem to be an all-the-time thing.

I also found out that sometimes, the file error window while trying to export can be so big that I cannot close it.  I can't do anything in the editor while that error window is open, so I have to close the program.  :-\
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Nov 13, 2010
I'm having issues editing layer info in this latest patch.
When I make changes, they aren't saving.
I'll have the bug fix in the next update. Looks like it's the changes to tile width and height that aren't updating.

...sometimes, the file error window while trying to export can be so big that I cannot close it.  I can't do anything in the editor while that error window is open, so I have to close the program.  :-\
I'll add a limit to the size of error windows in the next version.

The latest version has been working great for me, except sometimes saving seems to quit working.  I've tried ctrl+s, save, and save-as, but the saving only works when I do save-as and save it as a new file (just doing save-as and saying it is okay to overwrite the current file doesn't work).
This is worrying... I'll PM you with some questions to track this one down.

Question:

I am trying to set up a sprite of an enemy which needs the player passed in as one of the parameters. The player is instantiated in DAME. How can I take that instance of the player sprite and pass it into the enemy via the enemy's constructor text?

E.g. new Enemy(%xpos%, %ypos%, %thisplayer:Player%)

Also, is there a way to pass in map layers?
To do anything this complex you would really need to write your own custom exporter. It could be simple enough to create a modified version of the existing exporter with extra functionality that is dependant on your setup. Otherwise, if you'd rather stick with the sample exporters, then I recommend your Enemies just ask the PlayState for the player and the map layers. You could also pass in the map layer name as a property, so if you add a string property called map then %prop:map% should output whatever you have for that sprite.
But I personally recommend creating a custom exporter in this instance.
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Sat, Nov 13, 2010
To do anything this complex you would really need to write your own custom exporter. It could be simple enough to create a modified version of the existing exporter with extra functionality that is dependant on your setup. Otherwise, if you'd rather stick with the sample exporters, then I recommend your Enemies just ask the PlayState for the player and the map layers. You could also pass in the map layer name as a property, so if you add a string property called map then %prop:map% should output whatever you have for that sprite.
But I personally recommend creating a custom exporter in this instance.

It makes me very sad that I just now found out that you could simply ask the playstate for the instantiations... On the bright side I learned something extremely valuable and now understand static variables!  :D

I have a couple more questions:

What are the Layer Properties for? Is it possible to use them to set a tilemap layer's collideBottom to false?

Also, can I pass a simple string into the necessary parameters of my enemy sprite via constructor text?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Nov 13, 2010
Layer properties are for whatever you want :)

But yes, you could use them to set the collideBottom of the layer to false if you wish.

You should be able to pass a string into the params via constructor text. If your string is called str then you would just put "%prop:str%" into the constructor text.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Nov 13, 2010
A new version is up:

Title: Re: DAME - a new map editor made using flixel!
Post by: boogaga on Sat, Nov 13, 2010
Your editor seems very interesting, but I encountered a problem: I downloaded flixel sample and then tried to export SimpleClaws level, but DAME did not generate code in level file, I've got only
Code: [Select]
public class Level_Level1 extends BaseLevel
{
//Embedded media...

//Tilemaps

//Sprites


public function Level_Level1(addToStage:Boolean = true, onAddSpritesCallback:Function = null)
{
// Generate maps.

//Add layers to the master group in correct order.


if ( addToStage )
{
FlxG.state.add(masterLayer);
}

mainLayer = layerLayer1;

boundsMinX = 9999999;
boundsMinY = 9999999;
boundsMaxX = -9999999;
boundsMaxY = -9999999;

}


}
Maybe I just did something wrong, but I don't know what it is.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Nov 13, 2010
Hi Boogaga,

Please send me the full output log at the bottom of the export window so I can see what is wrong.
Thanks
Title: Re: DAME - a new map editor made using flixel!
Post by: boogaga on Sat, Nov 13, 2010
Actually, I found additional problems: when I try to open early created file, I don't see layers, only file name and nothing else. I attached screenshot: http://i.imgur.com/C7Lw0.png
This project file contain only one layer with tiles and no sprites.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Nov 13, 2010
I'm not at all sure what's going on there, Boogaga. I'd say the best solution is to PM me with a zip containing the .dam file and the sprites to see what's going wrong. It could be Mac specific or it could be something specific to the project setup.
Feel free to just give me low-res versions of the sprites if you're worried about giving them out. They can even be single colour images, as long as they're the correct dimensions and filename.
Title: Re: DAME - a new map editor made using flixel!
Post by: boogaga on Sun, Nov 14, 2010
I've checked again: after opening file I added new layer with tiles, and managed to save it. So it seems that file just was not saved (but I checked the time of last changes in file and it was at the time I saved file).
Maybe I should have rebooted computer after installation of update, I don't know. I will also check exporting again and write if I get any problems.
Edit: checked the exporting and it seems that now everything works fine. I get wrong level files only if I export map to the empty directory or to the directory without SImpleClaws PlayState file. As I understand, this is predictable way of working, am I right?
Please check Recent files menu item, for me it does not show anything after restarting of DAME.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Nov 14, 2010
New version released with one critical bug fix.

Title: Re: DAME - a new map editor made using flixel!
Post by: 3WG on Mon, Nov 15, 2010
Quote
One other possibility - maybe the saved coordinates of the tiles window got screwed up. What values for x, y, width and height do you have in your settings file in the tileWindow node in C:\Users\<USERNAME>\AppData\Roaming\DAME.dambots\Local Store\settings.xml
Maybe change them to something reasonable or delete the settings file before you restart DAME to see if that fixes it?


It works for me . Thanks

Another question ...

How can i set the exporter to use LevelName as file structure for the CSV files actually based on the same template i need to export every level with the same Base Class, and just LevelClass that changes and CSV files named like the "LEVEL NAME"

Any solution ?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Nov 15, 2010
I would suggest using complexClaws sample as a template where each group is effectively a level, and using the flixelComplex exporter for that. There's still a base class, but each group will be exported as its own level class.
Either that or writing your own custom exporter :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Tue, Nov 16, 2010
Is there a way to create a new level and keep the Sprites from another level?
Would be really handy when making multiple levels when you have a large selection of sprites
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Nov 16, 2010
I assume you mean having one sprite layer but sharing it for multiple levels all within the same DAM file?

For that you would definitely need to write your own custom exporter. But it is possible. The custom exporter system basically allows you to decide how to arrange your data and how to interpret it.
Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Wed, Nov 17, 2010
No, but let me try to clarify.

In the game we're using the editor for, we end up with upwards of 15 layers and many groups to keep things organized.
In the sprite panel we also have about 80+ Sprites.

For each level we would have to re-import all the sprites to my understanding. Which is frustrating if there is many custom arguments.
What would be nice is the ability to create a new Set of layers or "level" without redoing all the imports.

Using multiple groups is annoying because we already use the multiple groups for organizational purposes on the maps.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 17, 2010
I'm not sure I fully understand the problem or what you're asking for here.

When you talk of creating a new level, do you mean in the same .dam file or a new one? (ie one level per file or many per file). It sounds like you are using one file per level.

If it's one file per level, then you have a main menu option. File->Import. That should import everything in one go that you need, depending on what options you select. If it's not then tell me what is needed.

If all levels are within the same file, this is easily done by just right clicking on the layer or group and selecting Duplicate or Duplicate Empty. You can then drag the layer around/reorginise it as usual and it should be a complete duplicate of the original layer.

If you are talking about having a sprite layer that is shared for multiple levels, then that is definitely something that is more for a custom exporter, as the concept of levels is not something that the editor understands, only the exporters.
Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Wed, Nov 17, 2010
Didn't notice the import function.
That looks like it will do everything I need.
Thanks.
Title: Re: DAME - a new map editor made using flixel!
Post by: Placeable on Sun, Nov 21, 2010
This editor is great and in my opinion the best one out there. I have tried quite a few editors but none that fit my liking until I came across DAME. 

I made my own LUA code for the exporter and can now create NPCs (with their own unique dialog, name etc), Transitions (linked to other areas and their transitions), Treasures (z0mg with random or fixed loot), Custom Events (this one got messy with spaghetti code :)) with the Editor!

Thanks a bunch creator I love you and then some.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Nov 21, 2010
Thanks Placeable! Spread the word and the love!
.
.
.
There's a new version in town!
Just minor bug fixes in version 1.1.8:


And for the record, in case anyone ever tries the same... Asynchronous file saving (not loading, that works perfectly) in actionscript is extremely unreliable. Was the cause of countless exporter bugs and file save bugs, with no completion checking and it wouldn't always finish, sometimes leaving the files open. Save yourself loads of trouble and do it synchronously. >:( Rant over.

Thanks to Nejuf for spotting the bugs and trying out a few test versions to help me fix it!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Mon, Nov 22, 2010
I agree, DAME is great. I've made 'triggers' (I used to do HL1 maps once upon a long time ago) based on an area and various variables. There is a 'finish level' trigger, a 'say something' trigger, etc. A tip for would-be mapmakers, use a 25% transparent PNG for your triggers, as it helps to see where they are without having to disable them to look through them, as triggers can be placed over other objects.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Nov 22, 2010
Alternatively, if you are ok with having triggers on a separate layer, use shapes for your triggers. In the color settings you can modify the color and opacity of all shapes.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nimja on Tue, Nov 23, 2010
Alternatively, if you are ok with having triggers on a separate layer, use shapes for your triggers. In the color settings you can modify the color and opacity of all shapes.

Hmm... That's an option, but it feels a bit more clunky than using simplistic sprites with colors for my current triggers. Right now, I'd have to make several layers for each 'type' of trigger. Which, when you have 4+ types (not uncommon) would become difficult.

Also, I only use straight, rectangular triggers. Which reminds me, how about an option for disabling rotation altogether? So you never make accidental mistakes. Just like the disabling of the handles, just more specific.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Nov 23, 2010
The option is already there, in the sprite entry. Added a few versions ago.
Look for Can Rotate and Can Scale.
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Wed, Nov 24, 2010
since I noticed there were polygonal editing in there, I wonder if it might be adapted to make an adventure game (graphic adventure).  I don't know if you've seen this http://www.gamesafoot.com/2010/11/18/sausage-3/ (http://www.gamesafoot.com/2010/11/18/sausage-3/) but basically right now I'm using Inkscape and I've not decided about how to load animations and so on.  SVG files store the path info and I load it in.  If I could make games that aren't tile-based, and could read the path and sprite data, I could probably make my game with Dame.

I was about to look into using python for a code generator, reading the svg file and making as3 code for rooms, but if I could do it with this, then it's already written (even if for tile-based games)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 24, 2010
You should be able to handle doing all that with DAME. It's certainly not limited to tile-based games, and as a fan of adventure games I'd love to see DAME being used for something like this :)

DAME can't read in SVG files right now, but all the path and sprite editing can be done in DAME. You would need to write your own custom exporter probably so that it fits in with your engine. You can even add properties and links so that you could have the data know that an item can be used with another item, or that one item is a switch that opens a door.

As a start look at the flixel Complex exporter, and the Complex Claws sample. The exporter exports shapes, polygonal paths, sprites, text, object links and properties. The sample is tile-based but there is no reason you couldn't just remove the tilemaps and use everything else. Ideally, I recommend writing your own custom exporter so that it's optimised for your needs, though there's no harm in using the sample ones if you feel they work well.

I actually like the idea of reading in SVG data into DAME and converting into paths. I hadn't considered it before but it's something I'll probably look into in the near future.
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Wed, Nov 24, 2010
I wasn't even intending to use DAME for svg, I was simply talking about using it as is to edit/create rooms in a non-tilebased way, so instead of inkscape I would be using DAME and whatever it outputs to :-)

Thanks, downloaded it, and I will start playing around with it next monday.

Keith
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Wed, Dec 1, 2010
So a couple of quick questions.  What file format does it save natively (I would assume some sort of xml?)  Is there a way to create a non-tiled backdrop in one of the layers? 

Also the flashpunk sample didn't seem to work right, for one reason being that the flashpunk lib wasn't there that I had to put manually, but now it won't run because for some reason it doesn't recognize "system_font" as some sort of attribute -- which means i need to copy fonts directly into my project folder.
Title: Re: DAME - a new map editor made using flixel!
Post by: Garmichael on Wed, Dec 1, 2010
I've been working on my game like a busy bee thanks to this editor.

Anyway, I have a little feature request...Would it be possible to set an option to make every Nth grid line an alternate color? Where the number of grid lines and the color are selectable by the user...

Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 1, 2010
So a couple of quick questions.  What file format does it save natively (I would assume some sort of xml?)  Is there a way to create a non-tiled backdrop in one of the layers? 

Also the flashpunk sample didn't seem to work right, for one reason being that the flashpunk lib wasn't there that I had to put manually, but now it won't run because for some reason it doesn't recognize "system_font" as some sort of attribute -- which means i need to copy fonts directly into my project folder.

The files are saved in a custom file type (.dam), which is xml. You can have a look at it and if you poke around it's quite easy to figure it out. I've not got around to explaining the DAME file format yet in any help docs, but I will eventually.
You can create an image layer to acheive what you want - each layer always has to contain different data, but it's up to you how you want to export it. The samples exporters don't inherently export image layers, so you would need to create your own exporter for that. It's not too difficult. Alternatively, create a sprite layer and add sprites (can just be 1 per layer) - sprite layers will get exported in the sample exporters. There is plenty of help on writing your own exporter if you need it.

As for the flashpunk sample, I did what I could to make an exporter that works, but you do need to plunder the actual flashpunk sample project for the font and to see how to handle it. Unfortunately, this is mainly because the FlashPunk text class sets everything to private and does nothing, so I had to create a completely new version in order to get a WYSIWYG text object, which also disallowed me the option of having access to the fonts that FlashPunk uses. The font needs to be remapped in the PlayState from system_font to whatever the font is called. Again, look at the sample AS project to get an idea.

Also, just to avoid confusion for all the Flixel people here, if you are using FlashPunk with DAME and have problems with the exporter, could you post any further queries on the FlashPunk forums instead of here? If you want, the thread is:
http://flashpunk.net/forums/index.php?topic=1011.0 (http://flashpunk.net/forums/index.php?topic=1011.0)

Out of curiousity, are you using both FlashPunk and Flixel together? Why aren't you just using the Flixel exporter? ;) The Flixel ComplexClaws sample and exporter is mostly identical to the FlashPunk sample. Sorry, I'm just a little confused about the posting here :D

Would it be possible to set an option to make every Nth grid line an alternate color? Where the number of grid lines and the color are selectable by the user...

I'll think about it... It's easily possible. I don't want to overload the UI with too many options, though. Does anyone else second this request? If it gets 2 votes it will definitely go in and soon!
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Thu, Dec 2, 2010
I'm actually using flashpunk not flixel but the main DAME thread is here (although I will check the one you linked to on the flashpunk forums) :-)

I just wanted to see how the flashpunk one worked.  I'll probably be either reading the dam file directly or build an exporter for my room format.

I think I will do a sprite layer for the stuff like backgrounds in my adventure game engine.  The biggest deal will be embedding images, which I assume an exporter can create the code for?
Title: Re: DAME - a new map editor made using flixel!
Post by: britlee on Fri, Dec 3, 2010
this stuff sound a lot better.
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Fri, Dec 3, 2010
What is a group, and what is it used for.  Why do I need a group to create any layers?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Dec 3, 2010
The sample exporters don't export the images, but you can write an exporter that would parse the image data from the sprite entries. I don't know if anyone has dealt with exporting database sprite entries in any custom exporters so far, so if there is any extra functionality you need let me know.

A group is just a container for layers. It can be used as you like. In the flixelSimple sample the concept is that there is only 1 group for the entire project and all required layers are within. In the Complex (and flashpunk) sample, the concept is that each group can be a level, and the layers in each group are the different types of elements within it. In the end, it is the exporter that defines the meaning of groups.

In your case, you could say that each group represents a different screen. You could spatially arrange all the screens in a map-like fashion if you like, or you could have each screen start at the same location and turn on the one you are currently editing.
Title: Re: DAME - a new map editor made using flixel!
Post by: Uhfgood on Fri, Dec 3, 2010
Xander - sounds good... Assuming I can output any text in as code, I should be able to make it write out embed calls right (based on image name)?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Dec 4, 2010
You should be able to do that, Uhfgood.

As I said, if you have any problems or requests with the exporter let me know and I can make changes quickly.
Title: Re: DAME - a new map editor made using flixel!
Post by: Yinan on Mon, Dec 6, 2010
We found a little bug that is extremely weird...
If you use DAME with Windows 7 and export using the complex flixel export (or whatever its called, i dont use DAME but my friend does, he makes the graphics, i the programming ^^), everything is fine.
But when he then transfers the csv files to me (Windows XP) i suddenly have 2 emptry lines at the end of the csv files. This creates a nasty white line in the actual game.

Dunno if this has something to do with DAME or just maybe with FileTransfer from Windows 7 to Windows XP, but i thought i schould mention it.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Dec 6, 2010
Hi,

I checked through and it looks like the exporter appends 1 more new line than is needed so I'll quickly make the change now.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Dec 6, 2010
A new version is out

Don't get too excited! It's just bug fixes and a couple of very small additions...


Uhfgood, this should help you with exporting your Embed calls.
Yinan, this should fix the bug you had with the tilemap having an extra blank row.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Mon, Dec 6, 2010
I'm having an issue with level bounds when using varying scroll factors.

My camera uses:
Code: [Select]
FlxG.followBounds(BaseLevel.boundsMinX + 1, BaseLevel.boundsMinY + 1, BaseLevel.boundsMaxX - 1, BaseLevel.boundsMaxY - 1);
Basically what I want is to ignore the bounds create by layers with a scroll factor other than 1 (they're background).  Could I change the way bounds are determined in the exporter or would that break things elsewhere?  If it would break things how else could I fix it without hard coding level dimensions?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Dec 6, 2010
I think it should be ok for you to change the exporter to ignore layers with different scroll factors. Make sure this isn't done to the actual exporter but done using a copy (if you don't already use your own) in your custom exporter location (set from the File menu). Just copy both xml files with the exporter name already there.

There is one other way around it. In the callback for when each object is added you can keep track of the object's location (I think it should have the scroll factor assigned already at that point but I may be wrong...) and work out the bounds you need to check there. It would add a very little bit of overhead to your startup time, so it's better to use an exporter.

As always, having your own exporter suddenly gives you much more control about how your engine works!
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Mon, Dec 6, 2010
I don't think doing things in the ObjectAddedCallback would help in this case because the item with a scrollfactor is a map layer, so it wouldn't show up in this function would it?

I'd prefer to avoid using a custom exporter, but I'll consider it.

Also, is there a keyboard shortcut for switching between the brush tool and selection tool?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Dec 7, 2010
The callback does go to the callback. I think almost everything gets a callback, for maximum flexibility. If it doesn't then each layer is stored in its own FlxGroup and each FlxTilemap is also stored in the level class file so you can just check it there if you know the map name. Or you can just check the masterLayer (in the BaseLevel.as file) and iterate through each layer. That's one other alternative for object parsing too as all the sprites get added to layers with inherit scroll factors so you should just be able to check the groups for the scroll factors and skip any children automatically.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Tue, Dec 7, 2010
I see, with that I should be able to make it work, thanks.  :)

And is there a keyboard shortcut for switching between or to the brush and selection tools?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Dec 7, 2010
There's no keyboard shortcut. I can add one if you can think of a good keyboard combination to use that isn't in use already :)

It would probably make sense to provide shortcuts to switch to each one of the different edit modes but it's getting pretty crammed with shortcuts already.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Tue, Dec 7, 2010
How about "v" for selection and "b" for the brush?  V is to the left of b, while the selection icon is to the right of the brush icon, but in Photoshop the brush tool is b and main select/move tool is v.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 8, 2010
I can't really use v or b unless it's in combination with another key, and Ctrl+V is used for paste and Ctrl+B is used to open up the Brushes tool.
Maybe those keys with alt might work...
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Wed, Dec 8, 2010
alt+v/b would probably be fine, but why does it have to be a combination?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 8, 2010
Mainly because it prevents accidental things happening. I had a lot of weirdness when I had single key shortcuts in an earlier version.
Title: Re: DAME - a new map editor made using flixel!
Post by: St.Penguin on Thu, Dec 9, 2010
Hi,
I've used the complex flixel exporter to get a simple tilemap into my project.
I want an object to repeatedly spawn randomly in the map. Thus, in my update loop I'm trying to have the game check to see if the spawned object is overlapping with a tile piece, and if so, to call a function to kill the object and try again.
However, my traces indicate that it's stuck in an infinite loop of spawning new hoops (the object...akin to a coin or ring) every update because it's always overlapping. Even after setting specific coordinates where there is nothing (instead of random), it says it keeps overlapping.

The code I'm using to check for the overlap is:
FlxU.overlap(_hoop, currentLevel.hitTilemaps, FixHoop);

I figured that would work out just fine, since I'm using
FlxU.collide(currentLevel.hitTilemaps, _player);
to check for player collisions with the tilemap.

Could you possibly point out where I went wrong?
Thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: Gregory on Fri, Dec 10, 2010
DAME looks pretty cool so far!

One thing that caused me a bit of confusion when writing a custom exporter: the documentation for DAME.CreateTextForSprites is misleading.  It implies that the entire defaultConstructor parameter is replaced with any custom constructor test for a sprite type.

What really happens, as far as I can tell, is that defaultConstructor is used regardless.  However, you can use the %constructor:DEFAULT% keyword, listed later, to access the customized constructor text for a certain sprite.  Unfortunately, the default value doesn't allow keywords to be nested within, which means you need the slightly roundabout approach in the sample exporters, where defaultConstructor calls a function with one of the parameters being %constructor:null%.  That function must then check if the object was instantiated by the custom constructor and, if not, construct it itself.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Dec 10, 2010
Yes, I can see how that can be confusing. Part of the problem comes from the fact that the custom constructor in the sprite is used for the part that comes after the "new" call, whereas what I think you want is to be able to override the entire line.

I'll try and resolve some of that ambiguity and give you access to 2 constructors in the sprites. One that will override the entire defaultContructor if set, and the other is the current one that can be used by the "new".

I can't allow keywords in the %contructor:DEFAULT% the way it is, though I can change it to something like %constructor%DEFAULT%constructorend% and allow keywords in there.

I'll try and get a new version out with those changes over the weekend.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Dec 12, 2010
DAME has been updated!

Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Sun, Dec 12, 2010
Thanks, the shortcuts make things faster for me  :D
Title: Re: DAME - a new map editor made using flixel!
Post by: St.Penguin on Tue, Dec 14, 2010
Xander.
Wondering if you could clarify how to integrate adding objects manually via code. In my example, I am trying to add hoops (coins, essentially) at random locations in the level. Thus, I need to be able to continuously spawn a new object at a random location, check it for collisions, etc.
I saw you mention in another thread that sprites can be added manually in the generated level class, via the addSpriteToLayer function in its appropriate layer create function (and judging from the examples, this sprite is then added to the PlayState groups via callbacks) However, how would I use said function to be called dynamically from the PlayState?

In my current code, as you may guess, the hoop sprite doesn't appear (assuming it's buried under layers).

If I'm missing a thread or anything that explains this in any depth already, my apologies and please point me in the right direction.
Here's my relevant code:
In my update loop in PlayState, if a hoopSpawned variable is false, it executes
Code: [Select]
private function SpawnHoop():void
{
trace("HOOP SPAWNED");
var x:int; var y:int;
x = FlxU.random() * (FlxG.width - 50) + 50;
y = FlxU.random() * (FlxG.height - 50) + 50;
_hoop = new Hoop(x, y);
        trace("X = " + _hoop.x + " Y = " + _hoop.y);
_hoopSpawned = true;

while (FlxU.collide(_hoop, currentLevel.hitTilemaps))
{
trace("HOOP OVERLAP, SPAWNING NEW");

_hoop.kill();
x = FlxU.random() * (FlxG.width - 50) + 50;
y = FlxU.random() * (FlxG.height - 50) + 50;
_hoop = new Hoop(x, y);
                trace("X = " + _hoop.x + " Y = " + _hoop.y);
}

}

As always, thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 15, 2010
Hi St. Penguin.

It looks like when you create the hoop you don't add it to any layers so it will probably get deleted as soon you exit that function anyway. Also, I can't say how your hoop sprite is set up in its constructor but its posible not everything is being done there in terms of setting up sizes etc, as that could cause the collide function to fail...

I answered a lot of questions about this here (probably the thread you saw already):
http://flixel.org/forums/index.php?topic=2738.msg17191#msg17191 (http://flixel.org/forums/index.php?topic=2738.msg17191#msg17191)

But basically, make sure you add the sprites to the correct layer so they are visible. Either call the addSpritesToLayer function I provide with the exporter or do it manually using flixel's functions. ie: layer.add(obj,true);

If your hoop is the same size as tiles and you are happy to position them aligned with tiles I would suggest not using collide to test for a safe spot. Depending on how crowded your tilemap is that could fail an awful lot and provide a major performance bottleneck. A better way 'might' be to just call currentLevel.hitTilemaps.getTile(X,Y), where x and y are in tile units and not world coordinates and you would check if the returned tileId is a collidable tile index. If it fails then fan out in a spiral or something like that until you find free space. That's only a suggestion, and it could be that your map will work just fine using collide though :)
Title: Re: DAME - a new map editor made using flixel!
Post by: St.Penguin on Wed, Dec 15, 2010

Xander, thanks for the quick reply! You're a gentleman, scholar, and (so I'm told) an excellent marksman.

Also, I can't say how your hoop sprite is set up in its constructor but its posible not everything is being done there in terms of setting up sizes etc, as that could cause the collide function to fail...

I dare say it's probably not. I've included it below.

Quote
Either call the addSpritesToLayer function I provide with the exporter or do it manually using flixel's functions. ie: layer.add(obj,true);
currentLevel.masterLayer.add worked like a charm!

Quote
If your hoop is the same size as tiles and you are happy to position them aligned with tiles I would suggest not using collide to test for a safe spot. Depending on how crowded your tilemap is that could fail an awful lot and provide a major performance bottleneck. A better way 'might' be to just call currentLevel.hitTilemaps.getTile(X,Y), where x and y are in tile units and not world coordinates and you would check if the returned tileId is a collidable tile index. If it fails then fan out in a spiral or something like that until you find free space.
Actually, I'm not worried about performance in this project, but upon further testing, it appeared that my code was not working anyway. Colliding the hoop with hitTilemaps always returned false. Possibly due to a constructor error as you suggest above.
Regardless, your suggestion makes sense to me, and I'd be happy to implement it but currentLevel.hitTilemaps.getTile is not a valid function. I'd guess this is because hitTilemaps is actually a group so it does not have that tilemap function.
How would I go about using this function then? From what I can see, the tilemap itself is loaded in the level (Level_Stage for me) file, but I can't access those properties/methods, only those in BaseLevel.

Hoop class (based off of the Coin class):
Code: [Select]
public class Hoop extends FlxSprite
{
[Embed(source = "assets/hoop.png")] private var ImgHoop:Class;
public function Hoop(X:int, Y:int)
{
super(X, Y);
scale.x = 1;
scale.y = 1;
loadGraphic(ImgHoop, true, false, 16, 16, false);

addAnimation("spin", [0, 1, 2, 3], 15);
play("spin");
}

}

Thanks again, your timely personal help is always appreciated.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 15, 2010
ah yes, I forgot it's a group and not a tilemap...

The tilemap should get passed to the onObjectAddedCallback, if you've set up your playstate with one (if not then please take a look at the sample AS project playstate file for more info on that), so you can get a handle on it there along with any properties you've associated with the map in DAME. Alternatively you can just seach hitTilemaps.members for the actual tilemap. It should be something like this:
Code: [Select]
var tilemap:FlxTilemap = currentLevel.hitTilemaps.members[0] as FlxTilemap;
if( tilemap )
{
    // do some magic here!
}

Hope that works!
Title: Re: DAME - a new map editor made using flixel!
Post by: klembot on Thu, Dec 16, 2010
Hm, I'm not sure if it exactly related to the update, but I upgraded to 1.2.0 last night and I noticed today that DAME is using ~60% of my CPU, even when it's sitting idle. I don't recall it being this much previously... I have a 2 Ghz processor, so this seems kinda high to me?
Title: Re: DAME - a new map editor made using flixel!
Post by: St.Penguin on Thu, Dec 16, 2010
ah yes, I forgot it's a group and not a tilemap...

The tilemap should get passed to the onObjectAddedCallback, if you've set up your playstate with one (if not then please take a look at the sample AS project playstate file for more info on that), so you can get a handle on it there along with any properties you've associated with the map in DAME.

Aye, my callback functions were not set up properly. This makes accessing all those pesky objects and properties in the map much easier!
Thanks for all the help Xander, I'm sure I'll be bugging you again later  ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: increpare on Sun, Dec 19, 2010
Used this today and yesterday for ludum dare.  It's pretty interesting, though not quite for me a pleasure to use yet (regardless of whether it saves me time or not).

Feedback:

Didn't take me too long to set up initially, but got stuck for a bit once I realized I needed to switch to FlixelComplex + change things over.

processor usage is really high (80% all the time), even when running in the background, which can be a bit of a pain.
found a bug in FlixelComplex.lua

Code: [Select]
fileText = fileText..tab3..as3.tolua(DAME.GetTextForProperties( propertiesString, layer.properties ))..";\n"
should be

Code: [Select]
fileText = fileText..tab3.."properties = "..as3.tolua(DAME.GetTextForProperties( propertiesString, layer.properties ))..";\n"

Other things I would like, of varying degrees of importance (entering the domain of pure desire - take it or leave it ;) ).

more responsive ui (it's a bit cludgy)
being able to view the sprites palette and layer palette at the same time
automatically exporting when I save (or a shortcut for exporting)
keyboard shortcuts for selecting tiles (1-9 or whatever)
support for AUTO tilemaps


Anyway, it's cool, and I hope you keep working on it and making it cooler and cooler :)


EDIT: also, the export settings don't seem to be saved right now - when I reload the project I have to reconfigure that panel?

Also, I added new default properties to a sprite after finding I was adding them to lost of instances of that sprite, and when I reloaded the map, I found duplicates of properties with the default value had been inserted where ones already existed (they did not appear before-hand).
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Dec 19, 2010
Hi,

Thanks for spotting the bug in the exporter. I'll make the change right away and upload it soon.

May I ask what the specs are for the computer you are using it on, since you say it's unresponsive? I only have my own laptop to test it on (as well as feedback from others) so it's good to know what the limits are. I do eventually plan to port this to C++, which would make it significantly faster (or wait and see what the new 3d accelerated Flash can do for me). If you minimize it then it should go into sleep mode and use less CPU.

You should be able to view the sprites and layer palette together. Could you explain? If you select the sprites tab while on a map layer both will be visible, though you can only edit one or the other.

The shortcut for the exporter is Ctrl+E but you'd have to tab through the controls if you want to keyboard select the Export button from there. However, it could be useful to do an export using last settings shortcut.

The only shortcuts for tiles currently are to use the left and right arrow keys to move to the previous and next tiles. I may add support for selecting numbered ones, but obviously I would need to also find a way to number the tiles in the first place. It's a good idea, though so I'll try and find a way to implement something like that.

AUTO tilemaps are only supported via the tile matrix. I don't really know what other auto tilemap system there is, so perhaps you could tell me?


Exporter settings should be saved. Can you give more info? Ie, when you open the exporter window what do you get? Does this bug happen when you close the exporter and reopen it or only from a fresh start of DAME? Does it open to the correct exporter, and can you send me a message containing the full output from the log at the bottom of the exporter window? That may help me figure out why they aren't saving for you.

And yes, I am working on making it much cooler (and probably more CPU intensive for all I know, but I do try and make optimisations now and then). Version 2 is about 30% done and already 180% cooler. 8)
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Sun, Dec 19, 2010
quick question, can't quite access the help documentation. I haven't tested if this is repeatable on other computers. I'm clicking help > help contents using  OS X 10.5.8 and nothing is popping up. Haven't looked through this entire thread so I'm not sure if this is a known issue or not. Sorry if it is.

Is it possible to get access to source for this? What's the license on it?
Title: Re: DAME - a new map editor made using flixel!
Post by: increpare on Mon, Dec 20, 2010
quick question, can't quite access the help documentation. I haven't tested if this is repeatable on other computers. I'm clicking help > help contents using  OS X 10.5.8 and nothing is popping up. Haven't looked through this entire thread so I'm not sure if this is a known issue or not. Sorry if it is.

Is it possible to get access to source for this? What's the license on it?
You can get them by rooting through the application bundle - right click on the application -> show package contents, then navigate to Contents/Resources/Help
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Dec 20, 2010
DAME is freeware but not open source. You can publish games you make using it and not have to pay me a cent.
It's possible that there is a small compatibility issue with the help on Macs. I'll look through and see if anything jumps out...
Title: Re: DAME - a new map editor made using flixel!
Post by: increpare on Mon, Dec 20, 2010
Oh also, the 'recent' files thing seems not to be saved between sessions on osx (but it seems to remember the last directory I had accessed when I go to open manually).

If you need any help testing stuff on osx, lemme know.
Title: Re: DAME - a new map editor made using flixel!
Post by: increpare on Mon, Dec 20, 2010
one other thing that I noticed (on OSX)

when I select 'export', the dialog often doesn't come up immediately, but I do see a scrollbar flicker in the right-hand-side of the window.  If I change the selection in the layers or sprites menu, it will appear.  This was a big bug, in that I couldn't export until I figured it out, but now that I have I don't notice it at all.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Dec 20, 2010
one other thing that I noticed (on OSX)

when I select 'export', the dialog often doesn't come up immediately, but I do see a scrollbar flicker in the right-hand-side of the window.  If I change the selection in the layers or sprites menu, it will appear.  This was a big bug, in that I couldn't export until I figured it out, but now that I have I don't notice it at all.

This happens to me as well (on Windows 7, not OS X). Exactly the same, but it's not consistent. It'll happen say 1 in every 3 Exports. Usually when it starts happening I close DAME down, re-open and it exports fine first time. I get the "stuttering" scrollbar too.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Tue, Dec 21, 2010
one other thing that I noticed (on OSX)

when I select 'export', the dialog often doesn't come up immediately, but I do see a scrollbar flicker in the right-hand-side of the window.  If I change the selection in the layers or sprites menu, it will appear.  This was a big bug, in that I couldn't export until I figured it out, but now that I have I don't notice it at all.

This happens for me as well.  It's been like that for a while.  I kind of just dismissed it as well, but then when I went back to edit a bunch of old text boxes, it became very frustrating.  It appears, not always, but often when any of the pop up windows are called (edit text, export, etc.)  It does, however, not do it with the tiles and matrix windows.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Dec 21, 2010
I think it's creating the window but it decides to send it behind DAME. (Can anyone actually confirm that? Probably by moving the DAME window in some weird place before opening a popup or shrinking it to see if the popup created but behind the DAME window, ie partially obscured.)

It's unfortunately an annoying thing that Air doesn't support modal windows, so the only way to do it is to hack around the system and essentially fight what Air wants to do with the windows.

Anyway, I actually can't reproduce it on mine at all, but I'll do my best to fix it once I know what's happening exactly.
:)
Title: Re: DAME - a new map editor made using flixel!
Post by: Survivor on Wed, Dec 22, 2010
Dame seems to be a good map editor.But for a newbie pretty hard to grasp.I really miss some "Getting Started" video tutorials for beginners :(
Title: Re: DAME - a new map editor made using flixel!
Post by: Doradon on Wed, Dec 22, 2010
Hey Xander,
Awesome editor, it's exactly what I've always wanted in a map editor and more (can't wait to see what you add next). I have a problem though.

I'm writing a custom exporter but whenever I parse the map layers and try to place the positions of a tile, the x position is always wrong.

The tile xml is written like this:
<tile ", "", "", "id=\"%tileId%\" x=\"%xpos%\" y=\"%ypos%\"/>

The id comes out fine, aswell as the ypos, but xpos shows a wrong position. I've narrowed it down to it's showing the x index of the tile multiplied by the width of the map layer in tiles (as set in the layer info). So if the layer is 25 tiles wide, and the tile I want is in X: 1 and Y: 1, the xpos will be 25, and the ypos will be 1.

I'm sure I'm doing something wrong, but if you know what's going on, please do let me know, it's kind of made me hit a brick wall >_<

Thanks mate, keep up the awesome work.
 - Doradon.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 22, 2010
Survivor - I'll try and get a wiki set up over the Christmas period including a tutorial video.

Doradon - Thanks for spotting the bug. I was passing in the real x position of the tile instead of the unit. I'll make the change in the next version, coming very soon.
Title: Re: DAME - a new map editor made using flixel!
Post by: Survivor on Thu, Dec 23, 2010
@XanderXevious
Thank you very much!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Dec 26, 2010
I've managed to get a 100% repro for the exporter window not showing up and the scroll bars flickering. It turns out that it only happens when the scrollbars aren't visible but actually should be :s

Anyway, I'll try and get a fix done and bundle that along with all the other fixes in the next couple of days...
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Sun, Dec 26, 2010
Hi, it's been a while. Haven't been working on my game because of school, and eventually I lost interest. However, I've started working on it again, and I'm pleased to see the new features that have been added to DAME. Thanks for your hard work!

I've just completed a solution to DAME level switching within one play state for a platformer. If anyone is interested, I could post it.

Also, seems that there is a small glitch when editing shared properties of multiple sprites. If you enter the character "-" then the editor glitches up a little bit. Copy-pasting the character in is fine, however.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Dec 26, 2010
Thanks.
A bug fix for that will be in the next update.
Title: Re: DAME - a new map editor made using flixel!
Post by: ericr on Sun, Dec 26, 2010
I can't figure out how to specify a tilemap to be 'collidable' or rather be added to the hitTilemaps group.

Here's the problem:
In my level class contructor, for the addTilemaps call, the 'hits' boolean seems to be always false (when exported). I have no idea how to set this parameter to be true from the editor and exported correctly. I can go ahead and change the parameter by manually editing it so that the hits parameter is true and then everything works fine. But that's a pain to do everytime I want to update my level.

Is there an option I missing when editing the layer details?

Thanks,

- Eric
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Sun, Dec 26, 2010
I can't figure out how to specify a tilemap to be 'collidable' or rather be added to the hitTilemaps group.

Here's the problem:
In my level class contructor, for the addTilemaps call, the 'hits' boolean seems to be always false (when exported). I have no idea how to set this parameter to be true from the editor and exported correctly. I can go ahead and change the parameter by manually editing it so that the hits parameter is true and then everything works fine. But that's a pain to do everytime I want to update my level.

Is there an option I missing when editing the layer details?

Thanks,

- Eric

From the main panel there are checkboxes when you select a layer such as "Export" and "Has Hits."  Make sure the "Has Hits" one is checked.
Title: Re: DAME - a new map editor made using flixel!
Post by: ericr on Sun, Dec 26, 2010
From the main panel there are checkboxes when you select a layer such as "Export" and "Has Hits."  Make sure the "Has Hits" one is checked.

Oh wow. I didn't even see that. When you go to Edit Layer a dialog box pops up with "Layer Properties" which is exactly the same name as the main panel on the left. I had no idea it was even there.

Thanks again.

- Eric
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Dec 28, 2010
New version 1.2.1 is up and there is now a wiki for DAME!!

It's a bit sparse at the moment but I've uploaded all the help files, added some extra tutorials and some placeholders. Please feel free to add to it, including any tutorials, examples, custom exporters or requests.

Title: Re: DAME = SICK!!!!
Post by: x8105 on Wed, Dec 29, 2010
On a roll with a huge asset list complete for a unique game type...
                   ***Just fleshing it out***
Questions...
1. Are the tile collision boxes pixel or tile based?
**** I saw the starting collision tile option. I am attempting to make 15,30,45,60,75 degree elevation changes rather than square blocks.

2. Also does anyone have any info, knowledge or knowhow on the ease of exporting to the Android OS or iPhone / iPod Touch?

3. Is there a way to increase the Game Region to a custom size?

4. Job plug... Anyone interested in coding with royalties?
*****my programmer / Coder is very busy with what he has on his plate, and I am starting the asset lists for another 4 games.

Suggestion...
Animated sprite option in DAME.

Comments.
First time at 2d level design... a bit of a learning curve...
but I am in LOVE with DAME.

Preview... Working on a Desert, Snow, and a few surprise Scenes next.
(http://golfrags.loverags.com/images/ss/dame_test.jpg)

ps. XanderXevious - We'll kick you Royalties as soon as it is launched and we see revenue generated. Rewarding talent and useful contributions!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 29, 2010
Looking good...

Tell me, what do you want for animated sprites exactly?

You can add animated sprites already, but they don't actually animate. I'm looking at the whole sprite suite of features to see what can be done to improve it for version 2 so if there is something specific you'd like implemented now is a good time to ask :)

Also, for any flixel or non-DAME specific questions I suggest posting to a new thread. Anything else can quickly get lost here since it's quite a busy thread already!!
Title: Re: DAME - a new map editor made using flixel!
Post by: x8105 on Wed, Dec 29, 2010
- Agreed... it is busy in this thread. -
My need for animated sprites in game... the starting color of the orbs...and the color they fade to. each one has a little different effect. Some strategically placed. I have 64 levels to plot and the ability to see the sprite as it animates, will allow for easy recognition. And... add a little life to the editor... Allow for animated screen capture before the codes finished.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 29, 2010
That makes sense.

It definitely won't make it into any version 1 updates, but as I said I'm looking into improving the whole sprite toolset for version 2, which is coming early next year, and the ability for DAME to preview animations sounds quite useful.
Title: Re: DAME - a new map editor made using flixel!
Post by: x8105 on Wed, Dec 29, 2010
(whines) I gotta wait a whole year?!?!?! j.k   :o   XD
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 29, 2010
nope.

"early next year".

We're still 2010 :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Doradon on Wed, Dec 29, 2010
I'm not sure if this has been mentioned already (or if it already exists), but it would be useful if there were keys that can be used to navigate the tile window. So for example I can have my mouse pointer aimed at the layer grid, and press the up arrow to make the editor select the tile above the current one in the tile window etc.

Having to move my mouse back and forth from the tile window to the layer window gets a bit much (when making really big maps).

p.s. Thanks for the v1.2.1 update to the custom exporter :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 29, 2010
Well, you can use the left and right arrow keys to select the previous and next tiles and press SPACE to select the tile id under the cursor. Does that cover it?

It's in the keyboard shortcuts but I should probably add it to the new DAME wiki as well...
Title: Re: DAME - a new map editor made using flixel!
Post by: Doradon on Wed, Dec 29, 2010
Ah, the space bar one is awesome. Sorry about that.
But the left/right arrow keys don't do anything for me, do I have to have a certain option selected?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Dec 29, 2010
Oops, my mistake :-[

It's the comma and period keys
Title: Re: DAME - a new map editor made using flixel!
Post by: goog on Thu, Dec 30, 2010
Hey there!

I am currently trying to learn how to use this editor, but I am having a problem that I can't figure out.

Here is the project that I am working on. It is very simple (using the flixelSimple exporter) - I am just trying to figure out how to use the editor in conjunction with flixel (which I am relatively new to).

link to .zip: http://www.mediafire.com/?x49miiw8f34w62k

I wish I could give some more information regarding what is going wrong, but if you just test the movie you will probably have more of an idea of what is going wrong than I do.

Any help would be appreciated. And thank you very much for making this!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Dec 30, 2010
Hi,

You just need to make sure your Player class takes in an x and y parameter in its constructor.
Title: Re: DAME - a new map editor made using flixel!
Post by: goog on Thu, Dec 30, 2010
Did making that change enable you to run it smoothly?

I made the change, but still no go. It continues to error at the same spot (the spot of code where attempts to add the sprite to the layer).

edit: woops, nvm, it works. I still had a breakpoint enabled at that spot :).

Thank you very much! Can't wait to show a final product!
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Mon, Jan 3, 2011
Hi, I took a shot at adding image layers into the exporter output. I'm having some problems getting it working fully.

Basically I'm trying to get the following line to output:
Code: [Select]
Background= new ImageLayer( 1, 2, .75, .75,'Background');
this corresponds to:
Code: [Select]
(Layer Name as object) = new ImageLayer( xPos, yPos, scrollx, scrolly, Layer Name);

My understanding is that I need to write something along the lines of

Code: [Select]
fileText = fileText..tab3..imageLayers[i][3].."= new ImageLayer( "..as3.tolua(DAME.CreateTextForImageLayer(imageLayers[i][1],%xpos%"))
where xpos would also be the other variables I would like.

I think I've got it all setup with the correct layer passing in, I'm just unsure about how to correctly use the DAME.CreateTextForImageLayer method to get the formatting I'd like.

Earlier I thought I had it working but it turned out to be just a lucky coincidence that it wasn't throwing errors. Any help would be great, I'm having a spot of trouble making sense of the docs for this. Debugging is also a bit tricky.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Jan 3, 2011
Hi,

It looks like you're missing a " before %xpos%.

If you pass in something like this what happens?

Code: [Select]
fileText = fileText..tab3..imageLayers[i][3].."= new ImageLayer( "..as3.tolua(DAME.CreateTextForImageLayer(imageLayers[i][1],"%xpos%, %ypos%, %scrollx%, %scrolly%", null))..imageLayers[i][3]..");\n"

Just as long as all the keywords are wrapped up in quotes it should work fine. Also you probably need to ensure that the baseDirectory parameter is passed in ( not sure Lua will allow it otherwise ), either as null or an empty string like this: "".
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Jan 3, 2011
Version 1.2.2 is out.

Nothing major:
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Mon, Jan 3, 2011
Thanks for the quick reply. No errors with running that, but it only generates:

Code: [Select]
Background= new ImageLayer( Background);
so DAME.CreateTextForImageLayer didn't really return anything useful.

I've uploaded the full class so you can get a full look at what's going on; http://snipplr.com/view/46472/problem-with-dame-exporter/ (http://snipplr.com/view/46472/problem-with-dame-exporter/).
It's really long, so sorry in advance for that.

On a side note, is there another way to generate AS3 code without each line concatenating the one before it? There's huge blocks of that, couldn't help but think that took alot of time.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Jan 3, 2011
Ok. Try this instead:

Code: [Select]
fileText = fileText..tab3..imageLayers[i][3].."= new ImageLayer( "..as3.tolua(DAME.CreateTextForImageLayer(imageLayers[i][2],"%xpos%, %ypos%, %scrollx%, %scrolly%", null))..imageLayers[i][3]..");\n"

I just changed imageLayers[1] to imageLayers[2] as [1] indexes the group and [2] indexes the layer.

That should fix it.
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Mon, Jan 3, 2011
awesome.
It needed ..",'"..imageLayers[3].."');\n" after the null, but that totally worked otherwise. Thanks alot eh. I stared at that for a long time.
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Tue, Jan 4, 2011
small thing bug.
when I edit a sprite, I seem to be unable to use command C and V to copy paste text in the constructor/creation text inputs. It works with a right click, but that's it.
I'm on a mac btw.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 4, 2011
Hmmm...

That seems like an Adobe Air bug to me as I'm not doing anything to enable/disable copy/paste in Flex controls and it works fine on Windows, for me at least. Maybe Ctrl+C/V works on Mac?... Assuming Mac has those keys. Can anyone else with a Mac confirm if Command C and V work at all?

Do all the shortcuts work for the menus? Just searching on Google for bugs about this it seems like a common bug from a while back. Maybe depends on the keyboard language you have? ???

Do Copy and Paste work in any other text controls? (eg properties in main window, layer/sprite rename window etc).
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Thu, Jan 6, 2011
Nah, doesn't work in the other dialogues.

Another question; do I have the ability to set per-tile properties somehow? That'd be very useful for me.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Jan 6, 2011
No per-tile properties yet. It's something I'm working on introducing at some point...
Title: Re: DAME - a new map editor made using flixel!
Post by: zachgold on Thu, Jan 6, 2011
How much work's required for that?
I was thinking it might be alot of changes to FlxTilemap. I don't fully understand how that class works with FlxTileblock (or if it does at all). Ideally I'd be able to extend FlxTileblock with custom classes and whatever properties I want would populate that as well.

For the application, I'd change it so that clicking on individual tiles pops up properties for the tile in the bottom right area like it does for sprites. The layer properties would be good moving into the layer info dialogue I think.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Jan 6, 2011
It's quite a bit of work... (Also, I don't really know much about FlxTileblock. It all seems to be FlxTilemap as far as I know).

With the work I'm currently doing for version 2 there are going to be lots of useful features like that, so I'd rather put them all in at once than do them bit by bit. This will also involve looking at the UI to see if things can be shuffled around a bit to improve the usability.

Version 2 has an ETA of February/March and I'll reveal more about upcoming features soon once. I'm just trying to get the major features done first and then do the smaller ones like that. It's also possible I might roll out a small beta test for anyone who is interested...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jan 8, 2011
New version: 1.2.3 up

Just one hotfix to stop .dam and settings xml files becoming very big and slowing down the load and close operations.
Title: Re: DAME - a new map editor made using flixel!
Post by: Rybar on Mon, Jan 10, 2011
XanderXevious, you have outdone yourself.  This level editor is simply amazing!

For anyone who hasn't given it a go yet: The Tile Matrix + special connections setup is enough by itself to make switching from whatever you're using now a no-brainer. Level editing is fun again! Haven't dove into it much past getting intimately familiar with the tile matrix, but I love everything I've seen so far. Looking forward to future versions!
Title: Re: DAME - a new map editor made using flixel!
Post by: FreakyZoid on Tue, Jan 11, 2011
Hey, just wanted to drop you a thanks - I used Dame to make the levels on my game (http://flixel.org/forums/index.php?topic=2959.0), and it was very simple to use.

One thing that would have been really useful would be to be able to set the zoom level of the tile palette. My game uses 8x8 tiles and it was hard to see them clearly at 1:1.

Thanks again!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 11, 2011
Thanks,
I'm glad you like it.

FreakyZoid, you can already set the zoom level! Right click on the tile palette and you will find an interesting menu that allows you to do wonderful things with tiles that most tile editors shy away from. Of course, it lets you do basic things like zoom in and out as well up to 400%.
Also, congratulations on finishing your game. It's very well done and hurt my brain... which is a good thing! :) Good work! I will also add a post about your game on my website if you don't mind.
Title: Re: DAME - a new map editor made using flixel!
Post by: FreakyZoid on Tue, Jan 11, 2011
D'oh! If only I'd realised!

I'd be more than happy for you to post about my game, glad you liked it  :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 11, 2011
New version 1.2.4 is up.

Only fix this time is for the %pxpos% keyword not exporting correct value in custom exporters.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jan 15, 2011
Version 1.2.5 is up with a couple of small additions and tweaks:


With the 2 new functions and the new option it should allow you to make files more portable over multiple machines.

Also, last update for a couple of weeks...
:)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Jan 20, 2011
Xander - here are 3 suggestions which would help me massively atm :)

1) Generate level from PNG. Give it a PNG file and it will build a tile-map set and level data from it (making sure not to duplicate tiles already extracted). I guess the user should set the tile height/width for you :)

2) Generate JUST level data or JUST a tileset from a PNG (as in step 1). Mapping to the currently load tile set.

3) The most important information in DAME for me is the stuff shown in the status bar (tile ID, x, y, etc) but the font is tiny and it's hard to read. Make this much bigger and put it somewhere else perhaps? :)

You're still doing sterling work, so please keep it up!
Title: Re: DAME - a new map editor made using flixel!
Post by: bowl of rice on Fri, Jan 21, 2011
An alternative location for the sprites tab or a docking system would be absolutely awesome. I find myself switching between tabs frequently to change sprites so this would be a really useful feature for me.
Title: Re: DAME - a new map editor made using flixel!
Post by: Placeable on Sun, Jan 23, 2011
Heya

Been messing with matrices now and it works great except I can't get the Magnet tool to work:

Magnet - Drag already painted tiles into the matrix

I highlight the already painted tiles on my layer but I can't "drag" them to the matrix itself.  I've tried hitting confirm as well but to no avail.

Am I missing something here?  Would help me A LOT, since I don't feel like painting all those tree crowns again >_>

Thanks!

EDIT: On second thought perhaps I misunderstood the Magnet tool.  I'm under the impression that I can highlight already painted tiles on a layer and "convert"/copy them to a matrix to speed up building?

If this is not the case you should really add a feature like that :)
Title: Re: DAME - a new map editor made using flixel!
Post by: chinchin on Tue, Jan 25, 2011
Hi, I'm new here, and I'm pretty new to Flixel and DAME.

I'm currently working on a basic platform-game, but I'm stuck at something with DAME.

Here's the problem:

When I draw the map in DAME, everything exports perfectly. I embed the CSV into my Playstate.as and it works accordingly. After that, I tried to put some sprites of bushes in the level, but somehow, after debugging in FlashDevelop, it doesn't show any of the sprites. I already gave the bush sprite a class called 'bush', which refers to this line in the code I think. Even though I don't know if this is necessary at all:

Code: [Select]
[Embed(source = "../media/bush.png")]public var bush:Class;
So I think there must be something I've got to do in DAME itself, but I'm totally clueless, as there are no tutorials/guides of how to export the sprites layer with the level layer together.

My question is:
How do I display the sprites correctly? What are the steps to do this?

Thanks if you can anwser this! :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jan 29, 2011
I just got back from a break so apologies for any delays in responses...

Photonstorm: I'll PM you for more info on this. It sounds useful but I'm not sure exactly how the PNG->map importer should work.

An alternative location for the sprites tab or a docking system would be absolutely awesome. I find myself switching between tabs frequently to change sprites so this would be a really useful feature for me.

This seems feasable. I'll look into it for version 2.


Placeable: The magnet adds tiles to the matrix without repainting them. In other words, if you add some edge tiles on your map with the magnet then the neighbouring tiles you add in normal mode will be middle tiles and not edge tiles, but the edge magnet tiles will not refresh or change as you change the areas under the matrix or the tile ids in the matrix itself. I'm not sure I understand your request so perhaps you could elaborate a bit?


Chinchin: I'm not really sure what's going on there...

It is absolutely necessary in Flixel to have at least one sprite class for your sprites that extends FlxSprite. The best thing to do is ensure that the sprite is set up correctly; Check that the class of the sprite in DAME is also "bush"; check it is created at the correct location; check the layer order is good, possibly don't create the tilemap to see if the sprite is being drawn under the tilemap; look at the samples provided with DAME to see what is different; failing that maybe provide a link to a zip containing your AS project so either I or someone else can help you.
Title: Re: DAME - a new map editor made using flixel!
Post by: chinchin on Mon, Jan 31, 2011
Thanks, XanderXevious. I solved the problem already. Looked more carefully at the ComplexClaws sample and finally understood it. :)

But I bumped into another problem. Hope you can help again!

I want to have parallax scrolling backgrounds for every level. I assume I have to put the code in the Level_.as DAME generates, but have no idea what to put there.

Before using DAME, I had this code in my Playstate:

Code: [Select]
add(new FlxBackdrop(bg02, 0.8, 0, true, true));
add(new FlxBackdrop(bg01, 1.2, 0, true, true));

Help?  ???
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Feb 2, 2011
I don't know what FlxBackdrop is but I presume that's for single images and you are using an image layer in your DAME project? If so, then that is something you will need to write a custom exporter for (The reason being that image layers are non-standard in Flixel and I don't want to impose one way of implementing them).

You can just copy the existing exporter you are using and adapt it for whatever requirements you need. Alternatively you could just have your backdrop as a sprite and add some constructor code in the sprite settings to override the default behaviour.

You can find a lot of info about writing your exporter on the help pages/DAME wiki.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Thu, Feb 10, 2011
I'm new to using a tile editor and really have no idea what I'm doing. Just did my best to follow what I found on the wiki and samples.

I keep getting the error: unable to resolve 'mapCSV_TestGroup_TestMap.csv' for transcoding
and: Unable to transcode mapCSV_TestGroup_TestMap.csv.

Is there anyway to tell what I'm doing wrong? How to fix this?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Feb 10, 2011
It's most likely some problem with the path names in the Embed call for the csv files. It could be related to using a different version of Flex and so the Embed calls are not correct. I think they might have changed for Flex4, but not certain.

Did DAME actually create the csv file and is it in the correct location?

If you search on the forums for 'unable to transcode' you'll find this is a common problem (for different reasons) and should find something to help you.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Thu, Feb 10, 2011
Oh yeah things were in the wrong spots. ^^;
Now in my Level_TestLevel.as I get the error: Access of undefined property layerTestLayer.
Code: [Select]
mainLayer = layerTestLayer;No idea why, but just commenting that line and everything works. :P

Thanks for the assist. ^^
Title: Re: DAME - a new map editor made using flixel!
Post by: FunkyDelPueblo on Fri, Feb 11, 2011
I was really excited to use this, and it looks like a great tilemap program, but I'm running into a pretty major roadblock--I can't place any tiles. I've tried going through the tutorial on the Dame Wiki several times, with several different tilesets in different image programs, and the tile are loaded and recognized, but when I click to paint them in the actual map...nothing! I quickly skimmed through the thread to see if anybody else has had similar issues, but I couldn't find anything. Any thoughts on what I'm doing wrong?
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sat, Feb 12, 2011
I'd put money on it being the fact your map layer is 1x1 in size.

Right click your map layer and edit it and set the map size to like 100x100

(this issue catches me out even now! Personally I think dame should default to a much bigger size - I mean who needs a 1x1 map?!
Title: Re: DAME - a new map editor made using flixel!
Post by: FunkyDelPueblo on Sat, Feb 12, 2011
...and now I feel super silly  :-X many thanks
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Sun, Feb 13, 2011
I have a question:

I'm making the entities of my game FlxGroups, so that I can tie multiple sprites to one entity. I would love to use DAME to add these entities to my world but from what I've learned you can only add sprites.

Is it possible to add FlxGroups as a sprite or do I have to do some code rewriting or a custom exporter?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Feb 14, 2011
I have a question:

I'm making the entities of my game FlxGroups, so that I can tie multiple sprites to one entity. I would love to use DAME to add these entities to my world but from what I've learned you can only add sprites.

Is it possible to add FlxGroups as a sprite or do I have to do some code rewriting or a custom exporter?

You'd need to create your own custom exporter, which can just be a new version of the existing one you use.

Personally I think dame should default to a much bigger size - I mean who needs a 1x1 map?!

Point noted. I'll try and get a small update out soon with a couple of minor tweaks like that just to keep you guys happy until the great version 2 release!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Feb 17, 2011
Version 1.2.6 is out!

Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Fri, Feb 18, 2011
Nice one :)
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Fri, Feb 18, 2011
Found a bug (well, more an annoyance) in 1.2.6. May have been in earlier builds too, not sure.

1) Create 2 Layer Groups
2) Create a Map inside Group 1
3) Duplicate (or Duplicate empty, doesn't matter) the Map
4) Rename it Map 2 and drag it into Layer Group 2
5) Now duplicate Map 2.

The duplicate appears inside Layer Group 1, instead of Group 2. It's just annoying as I've got lots of maps in this project (60 and counting!) split into Groups of 10 maps each. And when I duplicate one I have to go hunting back to the start to find it and drag it into the correct Group :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sat, Feb 19, 2011
Anyone else having this problem since the update? My uppermost tile. My tile-0 always comes out as invisible. :/
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sat, Feb 19, 2011
Hmm I don't no, but the first tile in my tileset is always blank anyway! So it'd be hard for me to tell :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Feb 20, 2011
The duplicate appears inside Layer Group 1, instead of Group 2. It's just annoying as I've got lots of maps in this project (60 and counting!) split into Groups of 10 maps each. And when I duplicate one I have to go hunting back to the start to find it and drag it into the correct Group :)
Duly noted!

Anyone else having this problem since the update? My uppermost tile. My tile-0 always comes out as invisible. :/
Is the draw idx in your layer set to 0? The default is 1 (so that there will always be a blank tile).

I ran a test and set the draw idx to 0, changed the first tile to a visible tile and saved and reloaded and it all worked fine.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sun, Feb 20, 2011
Oh thanks. Another case of me just being a noob. ^^; If it helps any I really love this tile editor and have been using it a lot.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sun, Feb 20, 2011
Good ol me. I've bumped into another problem. For what ever reason now when ever I start a new layer it becomes completely full of what ever the first tile is. Which would be fine, but I'm trying to create a second layer which then completely overshadows the previous one. And I can't delete these tiles. Deleted tiles just become the first tile.

My first project has like 5 layers and I didn't have this problem at all. >.<

Edit: Realized what I was doing wrong. I need the first tile to be my blank tile. ^^;
Title: Re: DAME - a new map editor made using flixel!
Post by: FunkyDelPueblo on Sun, Feb 27, 2011
Have there been any documented issues with Saving/Opening files on OS X? I can supposedly save files fine, and import from CSV files, but when I try to open .dam files, the background will change to the color of that file, but no layers are shown in the layers pane...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Feb 28, 2011
Hi Funky,

Nobody has told me about any errors like that. It could be that your project file is corrupt. Does this happen even if you create a new project and just add one layer to it?
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Wed, Mar 2, 2011
Quick question: For different levels of my game, do I have to make a new .dam file? Or am I missing something that lets me make different levels in one DAME file, perhaps?
Title: Re: DAME - a new map editor made using flixel!
Post by: Titch on Wed, Mar 2, 2011
Well you could probably modify the export script so that it exports groups as separate levels. I did this for a project I'm working on so I could keep multi-part levels all grouped together in one .dam file, but my export script uses XML as it's output rather than the Flixel exporter.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Mar 3, 2011
Quick question: For different levels of my game, do I have to make a new .dam file? Or am I missing something that lets me make different levels in one DAME file, perhaps?

The game I'm working on at the moment has 60 levels all in one DAME file. I just use a new Map each time in dame, so my left-hand panel has lots of maps in. Actually they are grouped, 10 levels per group, but same end result :)
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Thu, Mar 3, 2011
Quick question: For different levels of my game, do I have to make a new .dam file? Or am I missing something that lets me make different levels in one DAME file, perhaps?

The game I'm working on at the moment has 60 levels all in one DAME file. I just use a new Map each time in dame, so my left-hand panel has lots of maps in. Actually they are grouped, 10 levels per group, but same end result :)

I tried doing that, but I realized that it exports information for every group in the level class. Doesn't that make your level class very cluttered? Or is that only preventable by doing what Titch said, and having the custom exporter take care of that?

I don't feel I'm experienced enough to have it do that xD
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Mar 3, 2011
Sure, the lua scripts are really easy to use.
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Thu, Mar 3, 2011
Sure, the lua scripts are really easy to use.

I've written my own exporter but only one with very simple modifications to the default one. I'll take up the challenge, though.

Is there a way to detect in the exporter LUA if a group is visible or not? That way the un-checked (not visible) groups will not be exported.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Mar 3, 2011
Groups can have "Export" set on them directly - just tick the box (or not!). I don't recall if setting the group itself to not export excludes its contents however. Should be quick enough for you to experiment and find out :)
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Thu, Mar 3, 2011
Groups can have "Export" set on them directly - just tick the box (or not!). I don't recall if setting the group itself to not export excludes its contents however. Should be quick enough for you to experiment and find out :)

I unchecked the groups, but they were still exported... D:
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Mar 4, 2011
I unchecked the groups, but they were still exported... D:

Can you confirm that you unchecked the correct box? I just looked at the code and tried it to be sure and the export does indeed ignore any groups if they are unchecked for export.

You need to uncheck the tick for Export (which is in the Group properties underneath the layers tab). I'm guessing that you might have actually just ticked the box next to the group itself, which controls group visibility.
Title: Re: DAME - a new map editor made using flixel!
Post by: NateTheGreatt on Sat, Mar 5, 2011
I unchecked the groups, but they were still exported... D:

Can you confirm that you unchecked the correct box? I just looked at the code and tried it to be sure and the export does indeed ignore any groups if they are unchecked for export.

You need to uncheck the tick for Export (which is in the Group properties underneath the layers tab). I'm guessing that you might have actually just ticked the box next to the group itself, which controls group visibility.

Oh, I'm an idiot.

Thank you.
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Tue, Mar 8, 2011
I have a question about paths in DAME...

When I make a closed, curved spline and attach an object to it, I'm not getting any movement in my game. The code in the Platform class in Complex Claws works fine with linear paths, but looking at it I don't see anything in there to handle the tangents of curved paths(correct?).

DAME obviously is capable of keeping a sprite on a curved path since it does so perfectly when I drag an attached sprite in the editor - Xander, do you have a tangent-ready code block I can use to replace the original platform movement code?

Or if I missed something simple, that would be cool, too. :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Mar 8, 2011
Hi Bonemonkey.

One of the reasons I don't include any bezier movement code with the sample exporters is because curve movement is a lot more open to interpretation than linear movement, for example should it accelerate based on slope; should it move at a constant speed or constantly through each segment...

But I can provide you with the very basic code that you can find anywhere on the internet, and this is the code I use, that returns the position on a curve given a t value (0-1) for that segment and the anchors and tangents for that segment:

Code: [Select]
public function GetPositionOnBezierSegment(t:Number, Anchor1:FlxPoint, Control1:FlxPoint, Control2:FlxPoint, Anchor2:FlxPoint, Out:FlxPoint = null):FlxPoint
{
var square:Number = t * t;
var cube:Number = t*t*t;
var inv:Number = 1 - t;
var inverseSquare:Number = inv * inv;
var inverseCube:Number = inv * inv * inv;

Out.x = (inverseCube* Anchor1.x) + (3 * t * inverseSquare* Control1.x) + (3 * square * inv * Control2.x) + (cube * Anchor2.x);
Out.y = (inverseCube* Anchor1.y) + (3 * t * inverseSquare* Control1.y) + (3 * square * inv * Control2.y) + (cube * Anchor2.y);
return Out;
}

With that, then all you need to do is provide the right t value and track which segment you're on.
Title: Re: DAME - a new map editor made using flixel!
Post by: klembot on Tue, Mar 8, 2011
It'd be nifty if there could be a preview of the game screen -- i.e. I edit in a fullscreen DAME window, but my game is in a 640x480 window. It'd be handy to be able to tell what will be visible to the player from a given point in a level. I think I could fake it by resizing the window carefully and toggling to maximized, but it's a little fiddly to do so.

I'm thinking something similar to how Photoshop darkens the area around a crop, only it would move with the cursor.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Wed, Mar 9, 2011
klembot - it can do this (I asked for it several versions ago!) - look for the game size in the colour settings or somewhere, but it's in there!
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Wed, Mar 9, 2011
Thanks for the curve movement code block, Xander. It isn't quite as intimidating as I'd feared it would be (he foolishly says before trying to implement it!).
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sat, Mar 12, 2011
Anyone else having this problem? I can't save. Using save or save as seems to work. Save as will even prompt me asking if I'm sure I want to overwrite the project that already exists. I'll say yes, but when I go to close DAME it asks if I want to save my changes. If I say yes, nothing happens. It only closes if I choose no.
I can't even save something by naming it something new.

Edit: Even tried uninstalling/reinstalling, but same problem.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Mar 12, 2011
Anyone else having this problem? I can't save. Using save or save as seems to work. Save as will even prompt me asking if I'm sure I want to overwrite the project that already exists. I'll say yes, but when I go to close DAME it asks if I want to save my changes. If I say yes, nothing happens. It only closes if I choose no.
I can't even save something by naming it something new.

Edit: Even tried uninstalling/reinstalling, but same problem.
Hmmm... does this happen if you start a new project? If it doesn't then there's probably something corrupt in that file. Perhaps if you restore your last project backup file (just remove the .bak - also perhaps name it something else for good measure) and try from there? Also make sure the file hasn't been somehow changed to read only.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sat, Mar 12, 2011
Hmmm... does this happen if you start a new project? If it doesn't then there's probably something corrupt in that file. Perhaps if you restore your last project backup file (just remove the .bak - also perhaps name it something else for good measure) and try from there? Also make sure the file hasn't been somehow changed to read only.

Seems I can start new projects just fine. Can save and seem to have no errors. The three projects I'm currently using for my game are apparently all corrupt and so are the backup files. ^^;
I have no idea how that happened. Well I'm gonna look at the old projects because I can still see everything fine and just completely re-tile them one by one into new projects. Hopefully those don't get corrupt. ><
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Mar 13, 2011
If you can send me any of the corrupt files I can look into it.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sun, Mar 13, 2011
Your email is hidden from me on your profile so I just uploaded it:
http://www.mediafire.com/?35sbxucd652fizs

I can't edit the sprite map locations and include it so you can see them, due to that whole not being able to save thing. But yeah if you try to add anything you should get the same error of not being able to save.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Mar 14, 2011
Thanks. I looked into it and I can provide a fix in the next version, later in the week.

It looked like it was caused by some sprites that were somehow associated to a missing sprite entry. I don't know what caused that but I can make sure that it will let you save correctly in that case.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Mon, Mar 14, 2011
Oh awesome! Thanks for looking into it and working on this! I'm definitely glad I decided to use DAME for making my levels. So much awesome support.
:D
Title: Re: DAME - a new map editor made using flixel!
Post by: Fjornyr on Tue, Mar 15, 2011
Hi i've been using DAME and it's awesome. It took me a while to understand how everything works but now i'm starting to make some maps and i'm starting to get it and it's great. i'm still figuring out how to use the clases i export in my flixel projet but i guess i'll take look at the flixel complex sample and try to get the idea.

I'm having a Bug: 
-make a new file in dame, a simple one with a group and a map layer
-set the tileset path for my layer in E:\Tiles\mis tiles\tiles.png
-paint some tiles just fine
-save my .dam file in C:\DAME\test_1\myMap.dam
-close dame
-when i reopen the dam file no matter how(by File->Recent Files->; double clicking the dam file; from File->Open...) it tells me: "Failed to load 1 images:
C:\DAME\test_1\null" 
if i go to the layer->edit layer info and reload the tileset path everything is just painted how i left it. everything is saved even the tilematrix.
what i've noticed is it always looks for the tileset in the same path the .dam file is saved and it pretends to call it null
So my incredibly cheap fix was to do just that, i took my tiles.png renamed it null (no extension) and placed it in the same path that the dam file, and surprise! everythig worked just fine, no reloading tileset.
Since i found a solution it doesn't really bothers me anymore but it's bug.
i'm using dame1.2.6 ; windows 7

congratz  for the amazing work in all this, now i'll go to look the samples and try to understand how the exporter works
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Tue, Mar 15, 2011
.dam files are just XML files. Open it into FlashDevelop or Notepad++ and you can edit the path in there! Probably easier than renaming your PNGs to null :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Fjornyr on Tue, Mar 15, 2011
Quote
.dam files are just XML files. Open it into FlashDevelop or Notepad++ and you can edit the path in there! Probably easier than renaming your PNGs to null Smiley
didn't know that, thanks for the advise. i'll stick to my way though. it seems it's a saving problem. editing the dam with notepad++ works fine for the next time i open it but when i save and quit, i look at the dam and it has saved null for the path again.   
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Mar 15, 2011
Hi Fjornyr,

A fix will be in the next update.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Mar 15, 2011
DAME 1.2.7 released.

Title: Re: DAME - a new map editor made using flixel!
Post by: Fjornyr on Tue, Mar 15, 2011
DAME 1.2.7 released.

  • Fixed bug where opening a dam file from the OS once DAME was already open caused file corruption.
  • Fixed an issue where DAME could sometimes fail to save certain projects.
  • Fixed saving bug caused by referencing images in different drives to the .dam file.

Wow that was fast! ;D  thanks a lot Xander. Seeing how much dedication you're putting on DAME makes me think how lazy i'm being on the game i'm trying to make.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Mar 15, 2011
IMPORTANT HOTFIX!!

If you got 1.2.7 make sure to update to 1.2.8.

1.2.7 had an issue that meant paths/shapes wouldn't save. If you had any of those in your map, updated to 1.2.7 and saved make sure to restore to your .bak file.

Sorry about any inconvenience.
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Thu, Mar 17, 2011
Erg, I wish I'd requested this before the latest release...when placing sprites, it would be nice if you could tap the arrow keys to nudge them 1 pixel at a time in a given direction. This would help to finely position sprites that are decorative or have odd dimensions. Photoshop utilizes this feature for moving selections and it is surprisingly helpful.

Also, it would be nice if we didn't have to toggle off "snap to grid" when using this functionality (just thinking ahead to potential hiccups).

Anyway, awesome editor - keep up the good work!
Title: Re: DAME - a new map editor made using flixel!
Post by: Fjornyr on Thu, Mar 17, 2011
Erg, I wish I'd requested this before the latest release...when placing sprites, it would be nice if you could tap the arrow keys to nudge them 1 pixel at a time in a given direction. This would help to finely position sprites that are decorative or have odd dimensions. Photoshop utilizes this feature for moving selections and it is surprisingly helpful.

Also, it would be nice if we didn't have to toggle off "snap to grid" when using this functionality (just thinking ahead to potential hiccups).

Anyway, awesome editor - keep up the good work!

I second that, it would be a nice feature, Flash and GIMP use this to.
Also, i have one question: are there somewhere in the exported code the sprite's x/y offsets and width/height of the bounds or i have to write a custom exporter?
If it is not in the default exporter i think it would be a nice feature to add since it's already in the edit sprite options and at least i always end up using some offset for almost all my sprites and it would be easier than write it on each constructor.
Title: Re: DAME - a new map editor made using flixel!
Post by: nitram_cero (2bam) on Fri, Mar 18, 2011
Wow, so good to find out that somebody has time, will and experience to create a good full-featured 2D map editor.

Nice work :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Mar 20, 2011
Thanks nitram_cero! You'll be seeing some really cool features in DAME 2.0. Check my twitter for more info if you're curious :)

Fjornyr - You'd have to write a custom exporter for that since the ones provided don't export the actual sprite entry data themselves. There's a helluva lot I could put in the default exporters, but my reasoning for not doing it is because if I exported everything I'd inflate your code base, increase your swf size unnecessarily, and I'd also be writing a fully featured game framework myself, which would detract from working on the editor. If someone has the time to write that kind of exporter then I'd be happy to include it, but I've learnt even with the ones I included that you can't please everyone all of the time!!

You can set the position of sprites using either the context menu "Set position" or in Main menu: Modify->Set Sprite Coords and Orientation. I might look at making that window dockable in DAME 2.0. I could use a shortcut to move the selections, but I think it would have to be a combination of arrow keys and another non alphanumeric key (shift and control are already taken). Or maybe you enter a mode where you can move them. It's tricky balancing all of these keyboard shortcuts!
Title: Re: DAME - a new map editor made using flixel!
Post by: Fjornyr on Sun, Mar 20, 2011
Fjornyr - You'd have to write a custom exporter for that since the ones provided don't export the actual sprite entry data themselves. There's a helluva lot I could put in the default exporters, but my reasoning for not doing it is because if I exported everything I'd inflate your code base, increase your swf size unnecessarily, and I'd also be writing a fully featured game framework myself, which would detract from working on the editor. If someone has the time to write that kind of exporter then I'd be happy to include it, but I've learnt even with the ones I included that you can't please everyone all of the time!!

mmm... see your point you're right, it's just that writing a custom exporter was so scary at first but then i looked for a way to modify the default ones and it was much easier. i still don't understand much about lua, and i think i couldn't write a custom exporter from scracth but i managed to add what i wanted to the flixelComplex exporter. I don't know if it's the best way to do it but here's what i added in case someone's interested:

I changed the addSpriteToLayer method and added 4 parameters:

Code: [Select]
baseFileText = baseFileText..tab2.."public function addSpriteToLayer(obj:FlxSprite, type:Class, layer:FlxGroup, x:Number, y:Number, angle:Number, flipped:Boolean = false, scaleX:Number = 1, scaleY:Number = 1, offsetX:Number = 0, offsetY:Number = 0, offsetWidth:Number = 0, offsetHeight:Number = 0, properties:Array = null, onAddCallback:Function = null):FlxSprite\n"
baseFileText = baseFileText..tab2.."{\n"
baseFileText = baseFileText..tab3.."if( obj == null )\n"
baseFileText = baseFileText..tab4.."obj = new type(x, y);\n"
baseFileText = baseFileText..tab3.."//Add offsets: >>>\n"
baseFileText = baseFileText..tab3.."obj.offset.x = offsetX;\n"
baseFileText = baseFileText..tab3.."obj.offset.y = offsetY;\n"
baseFileText = baseFileText..tab3.."if(offsetWidth != 0)\n"
baseFileText = baseFileText..tab3.."{\n"
baseFileText = baseFileText..tab4.."obj.width = offsetWidth;\n"
baseFileText = baseFileText..tab3.."}\n"
baseFileText = baseFileText..tab3.."if(offsetHeight != 0)\n"
baseFileText = baseFileText..tab3.."{\n"
baseFileText = baseFileText..tab4.."obj.height = offsetHeight;\n"
baseFileText = baseFileText..tab3.."}\n"
baseFileText = baseFileText..tab3.."//offsets <<<\n"
baseFileText = baseFileText..tab3.."obj.x += obj.offset.x;\n"
baseFileText = baseFileText..tab3.."obj.y += obj.offset.y;\n"

        .........

       

and this corresponding line later:

Code: [Select]
creationText = creationText.."addSpriteToLayer(%constructor:null%, %class%, "..spriteLayers[i][3].."Group , %xpos%, %ypos%, %degrees%, %flipped%, %scalex%, %scaley%, %boundsx%, %boundsy%, %boundswidth%, %boundsheight%, "..propertiesString..", onAddCallback );//%name%\n"
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Mar 20, 2011
Cool. If you wish to add any modifications or new exporters there's a page on the DAME wiki that might be a good place to put it:

http://damehelp.dambots.com/index.php/Exporters (http://damehelp.dambots.com/index.php/Exporters)

Oh, and I should probably update the exporters to make this clear, but when you update DAME the default exporters get replaced with what's in the air package. So, if you just modified the default ones a better way is to set the custom exporter path (from the File menu) and then create copies of the exporter and exporter settings files and then modify those. Obviously name them something different to avoid confusion!
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Mon, Mar 21, 2011
I just came across a bug: I imported a group with three sprite layers from another project into my current one, and then duplicated the one sprite layer and dragged the duplicate into an existing group. That worked fine. But when I try to delete the duplicated sprite layer, clicking the "yes" option in the dialog box does nothing. I can only close the dialog box by selecting "no."

I did just try moving the duplicate layer back to the original group, and once it's back in there it can be successfully deleted.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Mar 21, 2011
Thanks for reminding me about that bug, Bonemonkey. Somebody else actually reported it but my note somehow got lost.

I'll try and look into it soon.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Mar 22, 2011
DAME 1.2.9 Released!!

This one's finally got a feature so many of you have requested for ages.


Enjoy!
Title: Re: DAME - a new map editor made using flixel!
Post by: manders on Sun, Mar 27, 2011
OMGOMGOMG

Are those new tile editing features I spy in DAME 2?
Hope it fills the hole between ASESprite and Pixothello :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Mar 28, 2011
Yes,

And I haven't even begun to reveal half of the upcoming features of DAME 2 yet...

;)

But I should really show some videos as stills don't do it justice... The new real-time tile drawing features are really cool, and the copy and paste using the system clipboard is pretty awesome. I was able to mash up existing corner tiles into a new round perfect tile in about 10 seconds, then stretch it to make a whole new bunch of tiles, all the while seeing the effect it would have on the rest of the tilemap in real-time.
Title: Re: DAME - a new map editor made using flixel!
Post by: paala on Thu, Mar 31, 2011
I have 2 problems with dame:
1.In flashpunk demo the player does not fall out of moving platform, in complex claws for flixel does. Why?
2. closed shape for path does not seems to function!
when the sprite attached to it reaches the initial point, it starts reverse way same path.
Isn't supposed to continue the moving in the same direction?
Please answer!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Apr 1, 2011
Hi Paala.

It seems those are more problems with the samples than DAME ;)

1. Flashpunk's collision handling code was much simpler than Flixel's so I had to write most of it from scratch and put in better collision responses for moving platforms. Flixel already had good collision handling so I didn't add any custom handling. Even the handling I implemented in the Flashpunk sample is not perfect. I'll leave it up to the users to figure out how to implement it.
2. Again, the samples are just that - samples. It's not much more work to implement a closed path. Just account for the transition from the last node to the first. The reason I didn't add it in the samples: Because the sample game doesn't actually use any closed loops!

My intent in making DAME was always to make a flexible tool and not my own framework - mainly because DAME is not limited to creating games in any particular codebase. It's down to users and the community to program their games.
Title: Re: DAME - a new map editor made using flixel!
Post by: paala on Fri, Apr 1, 2011
Thank you for the answer.
1.I was weird for me why the flashpunk demo has that collision code implemented and flixel does not. Maybe in a future release you will add it to flixel too.
2. I think the purpose of closed shape is to have a continuosly moving of the platform, not back and forward.
I modified the code  in platform.as, and it works:
3 lines modified path.childAttachNode -= 4; //direction;// total number of attachet nodes
                  path.childAttachT =0 //1;//
                  direction =1 //-1;


Code: [Select]
path.childAttachT += FlxG.elapsed * direction * speed;
if ( path.childAttachT < 0 || path.childAttachT > 1 )
{
path.childAttachNode += direction;
if ( path.childAttachNode >= path.nodes.length - 1 )
{
path.childAttachNode -= 4; //direction;// total number of attachet nodes
path.childAttachT =0 //1;//
direction =1 //-1;
}
else if ( path.childAttachNode < 0 )
{
Title: Re: DAME - a new map editor made using flixel!
Post by: Artofacks1 on Mon, Apr 4, 2011
I did the following.

1. Start new project
2. Create Map
3. selected my pixel png 32X32
4. opened tilematrix and tiles windows
5. drag tiles to tilematrix
6. tried coloring on the stage while Tilematrix tool is selected but I dont see anything painting.

Did I miss a step?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Apr 4, 2011
Do you only have one tile in the tilemap? You need to set the draw index to 0 on the layer properties then that tile will always be visible.
Title: Re: DAME - a new map editor made using flixel!
Post by: Titch on Mon, Apr 4, 2011
First, just want to say how awesome Dame is. I'm using it for two of my projects at the moment and for the most part it's portability and useablity have been great. I've got a meaty xml exporter script (that sadly I can't share since it's part of my work for an agency :/ ).

Couple of features I would really love to see if Dame 2 is in the works.

- Detachable sprites pane. I lose count of the number of times I realise I can't draw something because I don't have either the tile layer or sprite layer selected since the sprites pane sits in front of the panel frame. Possibly put the sprites and tiles stuff in the same window and have the content toggle when you switch between the two?

- A little optimisation for tile matrix's. They are a god send in themselves (being able to convert ranges back into matrix format would be nice, or save out matrixs in raw form, but I know my limits). Drawing additively is fine, but subtractively carving areas out makes Dame really start to chug.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Apr 6, 2011
DAME 2 is in the works and nearly finished!

If you check out my twitter you'll see all the features I've announced so far, and one of those is that the main windows are now dockable so you can arrange the layout how you like.

While I'm at it, also announced so far have been isometric tilemaps, stacked tilemaps, repeating tilemaps, animating tiles, properties per tile, being able to select/copy/paste/scale while in the tile drawing mode, line drawing on tiles and that's pretty much it so far. More to be announced soon...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Apr 16, 2011
DAME 1.3.0 up!

Exporters now cope with Flixel 2.5 as well as 2.43. Just select the Flixel version in the drop-down box.

Also, the samples have all been updated. If you choose ComplexClaws or SimpleClaws those will be the flixel 2.43 and lower versions. If you choose ComplexClaws 2.5 or SimpleClaws 2.5 then you'll have all the code for flixel version 2.5
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Sat, Apr 16, 2011
just updated to 1.3.0, but the layer order displayed is reversed when open the mapfile created by previous version
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Apr 17, 2011
just updated to 1.3.0, but the layer order displayed is reversed when open the mapfile created by previous version
I diffed all my changes and can't find anything that could do that as all I changed was with the exporter.
The most likely explanation is that the settings got reset when Air reinstalled.
Go to View->Show Top Layers First to switch it around. I should probably make that a value saved in the DAM project files actually.
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Sun, Apr 17, 2011
yes, you are right. thx a lot
Title: Re: DAME - a new map editor made using flixel!
Post by: Loupax on Wed, Apr 20, 2011
At last I found the time to try Dame for good! It's really great! I want to inform  you for two little things...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Apr 20, 2011
In flixelSimple exporter, the custom constructor text doesn't seem to work.
flixelSimple really is simple! They're more examples of exporters at different ends of the scale of complexity. Generally, I recommend flixelComplex and only flixelSimple for the absolute basic game.
You should totaly add an "unsigned" custom property... It's neat to draw sprites in grayscale and apply a tint on them, but with integer values it just doesn't work!
Are you not able to convert the values to uint in your code? Anyway, I could add this easy enough in a future version.
Title: Re: DAME - a new map editor made using flixel!
Post by: Loupax on Thu, Apr 21, 2011
Actually I just realised it's not necessary! I can add the attribute as String and give values in the form 0xffffff and so on... It works like a charm!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Apr 24, 2011
Version 1.3.1 out.

All it contains is a slight change to the sample Flixel 2.5 projects to make them compatible with the ongoing updates to Flixel.
Title: Re: DAME - a new map editor made using flixel!
Post by: bakana on Thu, Apr 28, 2011
I just downloaded DAME and made my first very simple map in it.  It's so simple and straightforward!  I have run into a weird snag, and the problem seems so simple I'm sure I'm overlooking something really basic, but nothing on the Wiki or the forum seems to mention it.

For some reason I can't export anything from DAME.  The Output Log generates no errors (so none of the other exporting problems I found in this thread seem to be the same), but simply no files appear where they are supposed to.  I've tried various directories, as well as just the C:\, but the same thing happens.  I'm just trying to export a CSV file, and have tried both csvtilemap.lua and flixelsimple.lua with the "export only CSV" box checked.  (I've also, just for the sake of it, tried it without the box checked). It seems no matter what settings I use, or what directory I export to, no file is created.  For reference, here's the log:

Quote
Looking for exporters: file:///C:/Program%20Files/DAME/lua/Exporters
Last exporter was: file:///C:/Program%20Files/DAME/lua/Exporters/flixelSimple.lua
examine: 223 files.
Found last exporter!
Load settings: file:///C:/Program%20Files/DAME/lua/Exporters/flixelSimple_settings.lua
Settings file loaded. Running Lua script.
Settings created with 12 controls

Export pressed at Thu Apr 28 20:12:36 GMT-0400 2011
Load lua.

I'm on a Windows XP machine, using flixel 2.5.
Title: Re: DAME - a new map editor made using flixel!
Post by: Sparkky on Thu, Apr 28, 2011
I've noticed in the last couple months DAME has gotten really laggy, especially when we are using a lot of layers.
Its not uncommon for our level designer to hit 4-5 fps when dealing with our maps now.
Is there any particular things that cause really bad lag in the editor that we should know of?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Apr 29, 2011
I've noticed in the last couple months DAME has gotten really laggy, especially when we are using a lot of layers.
Its not uncommon for our level designer to hit 4-5 fps when dealing with our maps now.
Is there any particular things that cause really bad lag in the editor that we should know of?
I'm not aware of any 'new' lag issues. How many layers are you dealing with and what type of layers? There are general lag issues that have always been there so it's possible you've just hit a limit. Currently they can only be fixed by turning off the visible of layers/groups. It's something I'm looking into fixing properly. It would be very helpful to know the specifics. If you wish to send me the dam project (no need to send me any actual sprite assets as I'm more interested to know what level sizes/numbers of objects/types of objects break it), that might be helpful.
Title: Re: DAME - a new map editor made using flixel!
Post by: thechaosengine on Sat, Apr 30, 2011
I'm new to Flixel and DAME and I'm having a blast figuring all this stuff out, but I'm getting pretty frustrated right now with trying to get multiple levels to work in a project. All the basic game tutorials out there deal with one level/map. All the tutorials, discussions and snippets I've found about multiple level stuff tend to deal with simple tilemaps, not so much integrating the workflow with editors like DAME.

I've been looking into the ComplexClaws sample to see if I couldn't adapt the trigger to load a new level, but I've broken my game beyond belief now. I hate to take the easy way out, but would anyone be willing to explain how you'd load a level, have an exit trigger a new level, and then how you'd load that up?
Title: Re: DAME - a new map editor made using flixel!
Post by: bakana on Sat, Apr 30, 2011
I'm still trying to figure out the same stuff myself.  I turned up this thread, which is from an earlier version of Flixel, but links to some tutorials that may be promising:

http://flixel.org/forums/index.php?topic=781.0

Specifically they link to this tutorial at github (https://github.com/AdamAtomic/flixel/wiki/Tutorial%3A-Multiple-Rooms), which, while it doesn't use DAME, does use some fairly complex mutli-layer levels, so it might be useful for figuring out a structure that could incorporate DAME's code to go through multiple levels.
Title: Re: DAME - a new map editor made using flixel!
Post by: thechaosengine on Sun, May 1, 2011
I'm still trying to figure out the same stuff myself.  I turned up this thread, which is from an earlier version of Flixel, but links to some tutorials that may be promising:

http://flixel.org/forums/index.php?topic=781.0

Specifically they link to this tutorial at github (https://github.com/AdamAtomic/flixel/wiki/Tutorial%3A-Multiple-Rooms), which, while it doesn't use DAME, does use some fairly complex mutli-layer levels, so it might be useful for figuring out a structure that could incorporate DAME's code to go through multiple levels.

Thanks, I've seen that thread and tutorial before, adapting that to DAME-made levels seem daunting though! I've been looking at every step to see how it translates to the data DAME spits out, but being new to coding in general I'm not sure I'm even looking at it correctly. To me it breaks down like this:

Step 1: Making the maps. In the GitHub tutorial they're just textfiles, we have the DAME levels.

Step 2: Embed the maps. The tutorial does this in PlayState, we put them in their own AS files. Those vars the tutorial puts in PlayState look like the ones we have in the level files and PlayState ourselves. The only one I can't see an equivalent of is "private var Rooms:Array" so we might want to slap that one into PlayState, considering this becomes a function in part 5.

Step 3: Items. Pretty straightforward, these classes (Loot, Player, and Door) are the same as what I have in my projects.

Step 4: Room class. While the way the functions are built up are different, it looks to me like it does what BaseLevel does, taking the data and rules from the level classes to create the actual levels. BaseLevel has no "public var RoomNo:uint" like the tutorial has though, and that seems like a key factor when it comes to switching levels.

Step 5: Back to PlayState. Here's where it gets interesting, the tutorial gives us a function to define rooms. This is what we've made the var for in step 2. I'm not sure on how to convert that function to contain the data DAME has given us though. The same goes with the next function, ChangeRoom. "if (mapItems.length > 0)" looks like stuff that's been defined in Room.as, so it seems logical that we'd have to pull that info from BaseLevel.as. The code the tutorial gives for creating the tilemap and throwing in the items looks like they've all been handled for our DAME stuff already in the level and BaseLevel.as files, but I'm probably missing something there. Could you just replace all of that in our case with something that just pulls all the level info from those classes we have?  This step wraps up with adding some stuff to the PlayState init, which makes sense. Considering that I'm already lost at this point, it doesn't tell me much though.

Step 6: Collisions and such. Pretty standard stuff again.

The furthest I've gotten myself is making it possible to switch levels by changing one line of code in my PlayState init from "currentLevel = new Level_Level1(true, onObjectAddedCallback);" to "currentLevel = new Level_Level2(true, onObjectAddedCallback);" so I'm thinking there HAS to be a way to tell the game to change that on its own through an event that happens in game. That's why I was looking at having the trigger do it, but that seems way over my head.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, May 1, 2011
There aren't too many tutorials on how to write code to load multiple levels with DAME, but mainly because I've seen so many people use different methods for this.

The complex Claws sample does show one method of doing this. If you look at it, basically it sets up a large box shape with a custom property called "target" that contains the value "Area2". (You can see the property defined when you go into selection mode and click on the shape). In the code all the shapes are loaded and those who have a target property will load the group whose name contains the value in the properties when it detects an overlap between the player and the shape. The section of the map to the right does not exist on start up and will only load once you enter that shape. You can of course put whatever data you want in the properties and make it do whatever you want.

If you wish to fully switch levels then I've not looked into that myself. I imagine one way would be to switch to a new play state, passing in the desired room to the play state's constructor or storing in a global value somewhere.
Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Sun, May 1, 2011
^ Yep, that's how I do it. When I load the playstate, I check for a flag in my Registry (see Photonstorm's Flash Game Dev Tips (http://www.photonstorm.com/archives/1136/flash-game-dev-tip-1-creating-a-cross-game-communications-structure)) that says that we should be switching levels. If not, then I go ahead and load the correct level from the save file and grab the player properties from the save as well. When the player enters a door, I store the player's current properties like health, but with the new x and y coordinates in the Registry, set the aforementioned "switch level" flag to true, and store the string of the new level. Then I reload the playstate. It sees that that we are making a level transition and loads the new level and player properties from the Registry.

Works perfectly.
Title: Re: DAME - a new map editor made using flixel!
Post by: thechaosengine on Sun, May 1, 2011
^ Yep, that's how I do it. When I load the playstate, I check for a flag in my Registry (see Photonstorm's Flash Game Dev Tips (http://www.photonstorm.com/archives/1136/flash-game-dev-tip-1-creating-a-cross-game-communications-structure)) that says that we should be switching levels. If not, then I go ahead and load the correct level from the save file and grab the player properties from the save as well. When the player enters a door, I store the player's current properties like health, but with the new x and y coordinates in the Registry, set the aforementioned "switch level" flag to true, and store the string of the new level. Then I reload the playstate. It sees that that we are making a level transition and loads the new level and player properties from the Registry.

Works perfectly.

That sounds like a great way to go about it! I've been looking at Photonstorm's dev tip on using a registry but my attempts to adapt the examples given to switching levels aren't going anywhere. Would you be willing to share what your Registry and PlayState look like to get a game to switch between 2 levels? I'd really appreciate it.
Title: Re: DAME - a new map editor made using flixel!
Post by: berrinsun on Tue, May 3, 2011
Quote
Would you be willing to share what your Registry and PlayState look like to get a game to switch between 2 levels? I'd really appreciate it.

I'd really appreciate it too, I've been having trouble with switching levels...
Title: Re: DAME - a new map editor made using flixel!
Post by: osro on Wed, May 11, 2011
I'm not sure is this already mentioned here, but when running DAME on OSX the tiles panel won't show up whatever I do.

On Windows computer it pops out right when I click the Map layer.

Also on OSX DAME seems to eat almost all CPU resources and feels very laggy.
On Windows it takes around 50%.

OSX
http://imageshack.us/photo/my-images/685/screenshot20110511at614.png/

Windows
http://imageshack.us/photo/my-images/695/dameusage.jpg/ < that usage it's almost all from DAME's process.

And those are just after you have started DAME from scratch.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, May 15, 2011
Hmmm... I've not heard of the tiles panel not showing in a long while. A bug was fixed with that on a much older version. Is it just the tiles panel, or do other windows not show at all? (tile matrix, brushes etc?)

When version 2 comes out (very soon, I promise!) Some of these windows will be handled with a new system, so it's possible it will be fixed. Of course it's also equally possible a million new bugs will be introduced!

I am aware of CPU issues, but none that occur as soon as you open DAME - only when dealing with huge projects - I take it that you get the lagginess even when starting DAME with an empty project? What is your RAM/CPU speed on Windows? Are you on the latest versions of Air?
Title: Re: DAME - a new map editor made using flixel!
Post by: osro on Sun, May 15, 2011
Hmmm... I've not heard of the tiles panel not showing in a long while. A bug was fixed with that on a much older version. Is it just the tiles panel, or do other windows not show at all? (tile matrix, brushes etc?)

Just the tiles panel not showing up. And this happens only on OSX.

I am aware of CPU issues, but none that occur as soon as you open DAME - only when dealing with huge projects - I take it that you get the lagginess even when starting DAME with an empty project? What is your RAM/CPU speed on Windows? Are you on the latest versions of Air?

Air version is 2.6.0.19140 on both.

Mac is 2.4Ghz Core 2 Duo / 4GB RAM
Windows machine is i5 560 / 4GB RAM

Ye, straight from the start with empty project.
Title: Re: DAME - a new map editor made using flixel!
Post by: lnBetween on Fri, May 20, 2011
Is it just me or when we zoom out completely using the mouse scrolling wheel the image becomes a mess?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, May 21, 2011
It's not just you - zoom out beyond 100% is unreliable because I have to render the scene 4 times due to it being very slow to draw huge scenes in Air. It will be worse the more complex your scene is (ie multiple layers of different types). So by rendering it 4 times, split over different frames, it will cope most of the time, but as more is visible it also has to process a lot more objects. Until Molehill goes public that will always be the case.

That's why the 'use at own risk' comment is next to the allow zoom out menu option and it's not turned on by default.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Jun 1, 2011
DAME version 2 is finally out!

It's gone through beta testing but keep backups just in case.

New features are:


As a safety measure after the update, version 1.3.1 is still available from this link:

http://dambots.com/games/dame/DAME_1_3_1.air (http://dambots.com/games/dame/DAME_1_3_1.air)

If you have any bugs then post them here or send me a message and I'll do my best to fix them...
Title: Re: DAME - a new map editor made using flixel!
Post by: Gilda on Wed, Jun 1, 2011
Dame seems to delete my matrix when I save and close it, well I can see the matrix there in the .dam file with I open it with notepad, but it doesn't seems to read it. :/
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Jun 1, 2011
Can you send me a private message with the .dam file?

Strip out what is unnecessary if you wish - and I shouldn't need any assets either.

Thanks.
Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Wed, Jun 1, 2011
Just wanted to let you know that your work does not go unappreciated. When my game is finished and (hopefully) makes some sponsorship money, I'll be sure to donate. Thanks for all of your hard work!
Title: Re: DAME - a new map editor made using flixel!
Post by: Gilda on Wed, Jun 1, 2011
Can you send me a private message with the .dam file?

Strip out what is unnecessary if you wish - and I shouldn't need any assets either.

Thanks.

Oh it seems to of worked this time, I think it might of been me moving a file from DAME to DAME2.
Title: Re: DAME - a new map editor made using flixel!
Post by: goshki on Wed, Jun 1, 2011
I haven't used DAME earlier (or rather - I tried but failed though) but today I gave it another shot and... well, I must say, I am amazed! I did a quick test of stacked tilemap layers with tiles with heights and it went pretty straightforward. Great tool! :D
Title: Re: DAME - a new map editor made using flixel!
Post by: Vexhel on Thu, Jun 2, 2011
Very nice!
I can't seem to be able to attach a sprite to a path anymore tho...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Jun 2, 2011
Very nice!
I can't seem to be able to attach a sprite to a path anymore tho...
Well spotted! I'll have a fix coming soon. I'll also try and add some documentation for the tile stacking too since there's nothing on that yet.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Jun 2, 2011
Version 2.0.1 released.

Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Fri, Jun 3, 2011
Spotted a bug, addTilemap() in BaseLevel switches around the collide index and draw index when calling loadMap().
Title: Re: DAME - a new map editor made using flixel!
Post by: xhunterko on Fri, Jun 3, 2011
Some feature requests since I seen you didn't have any last I checked:

Ability to create a line of tilemaps. (for walls and floors)

Ability to export as png.

Ability to have negative collide indexes. (for scenery and backgrounds for those of us who like to export txt files for tilemaps and for foreground scenery usage)
Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Fri, Jun 3, 2011
About that third one, couldn't you just insert a blank tile before your first one and set the collide index to 0? You don't even have to touch the tilesheet file because you can do it in DAME without modifying the actual file.

Also, I believe the plural is indices.  ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sat, Jun 4, 2011
Hey. Anyone else have a problem of objects you dynamically create with DAME(like coins, platforms, etc) going through the update() function twice in one game loop?

I'm sure it's an easy fix I just can't figure out where in baselevel.as it calls for my object to update @.@
Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Sat, Jun 4, 2011
In your objectAddedCallback (or something like that), are you adding any of your sprites to another group (like coins to coinGroup)? If you are, then you should know that these groups are for reference only (for collision checks and stuff). If you actually add those groups, anything in there will be rendered and updated twice because the sprites you added in those groups were already added for you.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jun 4, 2011
Spotted a bug, addTilemap() in BaseLevel switches around the collide index and draw index when calling loadMap().
I'll fix that in the next update.
Some feature requests since I seen you didn't have any last I checked:

Ability to create a line of tilemaps. (for walls and floors)

Ability to export as png.

Ability to have negative collide indexes. (for scenery and backgrounds for those of us who like to export txt files for tilemaps and for foreground scenery usage)
Title: Re: DAME - a new map editor made using flixel!
Post by: xhunterko on Sat, Jun 4, 2011
Quote
About that third one, couldn't you just insert a blank tile before your first one and set the collide index to 0? You don't even have to touch the tilesheet file because you can do it in DAME without modifying the actual file.

Actually, that's what I'm doing. A blank tile with a collide set to 0. And the player still acts as if it's trapped in a tile. *shrugs*

Quote
Export as png is still on the cards, but it's a big feature to do! I'd like to implement it soon as it would be good for adding mini-maps, etc...

Good to hear!

Quote
You can already draw vertical and horizontal lines. Just hold down X when you paint to do a horizontal one, and hold down Y when you paint to do a vertical one. Alternatively, using the Tile Matrix is another way to do them.

I must've missed that in the documentation cause I didn't know that! Also, what I'm trying to say is, you know how you draw a line in a paint program? That's what I'm trying to say I think. In mappy, you just clicked on a tile, then move your mouse to the tile you want the line to end at, and then hit L, and a line of tiles is automatically drawn.

As for getting the numbers to read as negative, what I'm doing now is either having 0-1 at it works fine.

Thanks for replying!

EDIT: Do I really have to download an external exe and then install that to get every new update?
Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Sat, Jun 4, 2011
Quote
Actually, that's what I'm doing. A blank tile with a collide set to 0. And the player still acts as if it's trapped in a tile. *shrugs*

This is a bug, I reported it a few posts ago. It's easy fix by yourself, so worry no more!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jun 4, 2011
EDIT: Do I really have to download an external exe and then install that to get every new update?
Hmmmm.... it should just auto-update when a new version is available unless you turned off auto updates. Or click on the Help menu and choose to update. That only works if the .Air method of installing works for you, though. If you can't install apps from a .Air file then I imagine your only option is to install from an exe.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sun, Jun 5, 2011
In your objectAddedCallback (or something like that), are you adding any of your sprites to another group (like coins to coinGroup)? If you are, then you should know that these groups are for reference only (for collision checks and stuff). If you actually add those groups, anything in there will be rendered and updated twice because the sprites you added in those groups were already added for you.

Yeah that's exactly my problem. ^^; But if I don't add it to the group then I can't really control my object. Any suggestions?
Title: Re: DAME - a new map editor made using flixel!
Post by: choifish on Sun, Jun 5, 2011
Add the objects to the groups, just don't add the groups themselves after creating them. You'll be able to use the groups as normal, but nothing in there will be updated and rendered again.
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sun, Jun 5, 2011
Awesome. That fixed it. Thank you very much.
Title: Re: DAME - a new map editor made using flixel!
Post by: Haighstrom on Tue, Jun 7, 2011
I think you should change how the saving works in relation to external assets. I was just playing about to see what's what and in the course of using the "Draw on Tiles" I managed to ruin a spritesheet I made, because DAME wrote over it without me realising (and I have no backup of it).

I only saved the project and exported it to see the format of the export. I thought DAME would either export the drawing actions undertaken in some kind of XML file, or at least save a separate copy of the spritesheet i'd edited.

You should have a specific warning that exporting/saving will write over the assets you have imported "Do you wish to overwrite X.png?"

Thanks
Haighstrom
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jun 7, 2011
DAME 2.0.2 released:

Title: Re: DAME - a new map editor made using flixel!
Post by: Hendrik on Thu, Jun 9, 2011
Anyone know of any good tutorials for this? Or at least how to export your map and get it working in Flixel?
I just can't seem to get my in DAME designed map to work. I know there's the example projects, but I find them kinda vague tbh.

[edit]It seems I didn't search well enough and hadn't see the tutorial page of the dambots site. http://damehelp.dambots.com/index.php/Tutorials[/edit]
Title: Re: DAME - a new map editor made using flixel!
Post by: Titch on Tue, Jun 14, 2011
Loving Dame 2 stuff. Especially the detchable panels. Very helpfull.

Two features I would still really love to see

1. One button export, I tweak my levels -alot- and it's kind of a pain to have to keep opening that export menu. A quick button or keyboard shortcut would be awesome.

2. A way to revert a fixed tilemap back to a matrix, or swap baked tilemaps using matrices (So I have an area of the level done using a grass tile matrix and I want to swap it for a rock one).
Title: Re: DAME - a new map editor made using flixel!
Post by: jcsopko on Fri, Jun 17, 2011
I've searched around and haven't found anyone discussing DAME level loading with Box2D/Flixel so I'm diving into it myself. I haven't read through much of the documentation so I'll probably start there and then just wade through the exported code opposed to the Lua exporter code because I'm unfamiliar with Lua. Anyone have any suggestions, resources, interest? I'll probably report back once I get it working.
Title: Re: DAME - a new map editor made using flixel!
Post by: agrajag on Mon, Jun 20, 2011
I've looked at a few, and can tell DAME is undoubtedly the best tilemap editor/creator out there. I love it, my one issue with it is all the orange used in the interface. I know it doesn't actually effect it in any way, but really, why do you need all of that vile orange  smeared over a great application? It feels so unnecessary where a neutral gray could be used and work in most any situation.
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Mon, Jun 20, 2011
So change the theme to the silver one ;)
Title: Re: DAME - a new map editor made using flixel!
Post by: agrajag on Mon, Jun 20, 2011
Ahhh. *facepalm*
That looks so much better, thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: Venks on Sat, Jun 25, 2011
Question is there a way to move multiple sprites at the same time? I continually find myself placing multiple sprites a few too many y-units up. And then have to click and ctrl+t each one separately. Is there a more efficient way to do this?
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Sun, Jun 26, 2011
Drag a box around them to multi-select them. Or click one, then ctrl-click another (pretty sure it's that)
Title: Re: DAME - a new map editor made using flixel!
Post by: smikeless12 on Thu, Jun 30, 2011
I am not sure what to say,but can say that i am enjoying the thread.
Title: Re: DAME - a new map editor made using flixel!
Post by: bourik on Thu, Jun 30, 2011
I have seeing that we can have animated tiles in Dame :
Quote
-Tiles can be animated.

but wich Class in Flixel can do this?

I have try with the class FlxAnimTileMap by cjgammon (http://blog.cjgammon.com/?p=293) but it can handle only one type of animated tile per tilemap.
I am trying to have my walls animated but i don't know how to do this.

Does someone know how?

chears

(i hope you understand my poor english, sorry for that)
Title: Re: DAME - a new map editor made using flixel!
Post by: HandTurkeyGames on Mon, Jul 4, 2011
Is one able to change the frame of a sprite to be different than the one in the sprite entry?
Title: Re: DAME - a new map editor made using flixel!
Post by: bourik on Tue, Jul 5, 2011
I found something!
I have created a Sprite for each animated tile. I update them, when the pixels is changed i copy it in the pixels of the tilemap at the right place.

thanks to this post : http://flixel.org/forums/index.php?topic=493.0

Have a nice day.
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Wed, Jul 20, 2011
I'm getting really sick of DAME eating up -> 150% <- CPU when it's just sitting idle. Is there any good reason for this?
Title: Re: DAME - a new map editor made using flixel!
Post by: photonstorm on Thu, Jul 21, 2011
That'd be Flixel updating the canvas each frame. I don't really notice it tbh (very fast PC) but I'd imagine if you just made the visible window smaller it might help. Not sure if it stops rendering when minimised. I'd hope so.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jul 23, 2011
It does stop rendering and updating when minimised.

I've got a fix upcoming that should do the same when DAME is not the window in focus. I'm just testing it out at the moment.
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Mon, Jul 25, 2011
Yay, I look forward to it, Xander, thank you for vigilant maintenance.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jul 26, 2011
DAME 2.0.6 uploaded.

This just includes the one change - now DAME will go idle and not hog the CPU when it is no longer the in-focus application.

Since I've only been able to test it on Windows 7, if anyone has any issues specifically with this update let me know and I'll quickly look at it.
Title: Re: DAME - a new map editor made using flixel!
Post by: osro on Tue, Jul 26, 2011
Quickly tested on OSX 10.6.8.

Just empty project :
Focus 40 - 50% CPU
Idle 6-12 % CPU
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Tue, Jul 26, 2011
That was fast! I'll try it out tonight :) Thank you
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Jul 27, 2011
XanderXevious, great!
Keep up the great work!
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Fri, Jul 29, 2011
DAME 2.0.6 uploaded.

This just includes the one change - now DAME will go idle and not hog the CPU when it is no longer the in-focus application.

This might even slow down global warming! Thank you :)
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Mon, Aug 1, 2011
can dame editor save the map as Image file ?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Aug 2, 2011
can dame editor save the map as Image file ?
Still not yet - it's complicated. I.e. what should it do when the map has parallax scrolling? It can only work by removing all parallax but that might not give the desired output.
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Tue, Aug 2, 2011
parallax is too complicated, just save the visible layers to image file is enough. 
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Tue, Aug 2, 2011
[bug] In Map Layer window, the Tilemap Type dropdown menu shows the symbol for the first click, then it is disappear when click again.

[feature] Set Sprite Coords and Orientation Window can be docked
Title: Re: DAME - a new map editor made using flixel!
Post by: foosety on Fri, Aug 5, 2011
Hi,

First of all I want to say how awesome DAME is  :-*

Anyways I'm using the FlxComplex exporter for my new platforming game.
I'm having this problem: When I create a level that has different width or height in tiles than the other levels my game just freezes up.
Any idea on what is doing this? I thought it shouldn't be problem having different level boundaries.

Also I have a suggestion:
Allowing to see the level map boundaries even when placing sprites. I place a lot of sprites in my game and it gets annoying switching
back and forth between the map layer and placing my sprites just to make sure I didn't go out of bounds.

Thanks so much
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Sun, Aug 7, 2011
[bug] All title bar's text is truncated in mac compared to window
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Aug 25, 2011
I've just uploaded version 2.0.9 with a few squashed bugs:

Title: Re: DAME - a new map editor made using flixel!
Post by: John Hutchinson (Johntron247) on Thu, Aug 25, 2011
Awesome!!!  I've been waiting patiently for a couple of those.  I knew you'd get to it when you could.  Thanks man!
Title: Re: DAME - a new map editor made using flixel!
Post by: KunoNoOni on Sat, Aug 27, 2011
First I want to say what I great project DAME is, I really love using it :)

But I was wondering if there was a way to turn off the tiling effect that I'm getting. my level is 40x30 and is tiled 5x5 filling the entire screen. It's distracting and I hope there is a way to fix it.


-KunoNoOni
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Aug 28, 2011
But I was wondering if there was a way to turn off the tiling effect that I'm getting. my level is 40x30 and is tiled 5x5 filling the entire screen. It's distracting and I hope there is a way to fix it.

Can you explain further? I'm afraid I really don't understand what the specific problem is. If you can provide a screenshot too it might help. Thanks.
Title: Re: DAME - a new map editor made using flixel!
Post by: KunoNoOni on Sun, Aug 28, 2011
Would be happy to provide a screenshot :)

You can faintly see the white outline of my workspace for my level. This is the tiling I was talking about. Very distracting.

(http://williamlagamba.haunted-house.org/DAMEpic.png)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Aug 30, 2011
Ah.... I think it's because you've got "Repeat X" and "Repeat Y" ticked in the layer properties.
Title: Re: DAME - a new map editor made using flixel!
Post by: KunoNoOni on Tue, Aug 30, 2011
BINGO! Ah thank you!! that is sooooo much better! :)


-KunoNoOni
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Wed, Aug 31, 2011
will DAME support to export .tmx ( www.mapeditor.org ) in the near future ?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Sep 1, 2011
will DAME support to export .tmx ( www.mapeditor.org ) in the near future ?
Sorry no - they're pretty different ways of defining the data and I'm sure Tiled doesn't plan on adding support for .dam files in the near future either :D
However, before the end of the year I'm going to try and make DAME open source, so after that anything's possible...
Title: Re: DAME - a new map editor made using flixel!
Post by: h0lon on Fri, Sep 2, 2011
Hi. Im new to the whole AS3 and Flixel programming stuff and now Im doing some tutorials but I kind of hit a wall. So I need some help.

I made my own Map with DAME and FlashDevelop showed some errors while compiling. So Ive tried to compile the sample files - just to see if it works at all. And guess what: Even with them FlashDevelop showed me an error in the FlxG.as!

The important part:

"C:\Users\Rene\Desktop\SimpleClaws 2.5\src\org\flixel\FlxG.as(969): col: 11 Error: Access of undefined property result.
return result;
^
Build halted with errors (fcsh)."

Im using the latest Flixel master. I cant imagine that I have done anything wrong - everything a have done is inserting Flixel to the src.

So. Whats the problem here?

UPDATE: Forget the Error I mentioned. I found out that I have actually caused this one while trying to fix one other and then forgot about it. Now I redownloaded everything, put the latest Flixel Master to the SimpleClaws 2.5 and ComplexClaws 2.5 src Folder, tryed to comile it and now I get:

Code: [Select]
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\com\PlayState.as(16): Error: exception during transcoding: Cannot embed local font 'Arial' as CFF. The CSS @font-face 'local()' syntax is not supported. Please specify a path directly to a font file using the 'url()' syntax. For [Embed] syntax the 'systemFont' attribute is not supported. Please specify a path directly to a font file using the 'source' attribute.
[Embed(systemFont='Arial', fontName='ArialFont', mimeType='application/x-font')] private var fontArial:Class;
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\com\PlayState.as(16): col: 3: Error: unable to build font 'ArialFont'
[Embed(systemFont='Arial', fontName='ArialFont', mimeType='application/x-font')] private var fontArial:Class;
^
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\com\PlayState.as(15): Error: exception during transcoding: Cannot embed local font 'Verdana' as CFF. The CSS @font-face 'local()' syntax is not supported. Please specify a path directly to a font file using the 'url()' syntax. For [Embed] syntax the 'systemFont' attribute is not supported. Please specify a path directly to a font file using the 'source' attribute.
[Embed(systemFont = 'Verdana', fontName = 'VerdanaFont', mimeType = 'application/x-font')] private var fontVerdana:Class;
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\com\PlayState.as(15): col: 3: Error: unable to build font 'VerdanaFont'
[Embed(systemFont = 'Verdana', fontName = 'VerdanaFont', mimeType = 'application/x-font')] private var fontVerdana:Class;
^
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\org\flixel\system\debug\VCR.as(248): col: 10 Error: Call to a possibly undefined method load through a reference with static type flash.net:FileReference.
_file.load();
^
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\org\flixel\system\debug\VCR.as(264): col: 31 Error: Access of possibly undefined property data through a reference with static type flash.net:FileReference.
var data:ByteArray = _file.data;
^
C:\Users\Rene\Desktop\ComplexClaws 2.5\src\org\flixel\system\debug\VCR.as(329): col: 11 Error: Call to a possibly undefined method save through a reference with static type flash.net:FileReference.
_file.save(data, DEFAULT_FILE_NAME);
^
Build halted with errors (fcsh).

The font thing wont be as big of a problem. But the other part even more... Shouldnt the smaple work out of the box without to edit anything?

 
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Sep 3, 2011
I think the problem is to do with the flex version. Which version of Flex are you running? Also which version of Flixel are you running?

The font issue is usually because you just need to change the embed call to work with the correct version of Flex. They changed the way embeds work between versions, which often causes confusion.

The VCR thing is usually because of a conflict between Flex and the latest Flixel. I think when I had that error it was because I wasn't on the latest flex but was on the latest flixel, so I just had to comment out the lines in Flixel to fix it.
Title: Re: DAME - a new map editor made using flixel!
Post by: h0lon on Sat, Sep 3, 2011
I have downloaded the latest Master of Flixel (2.55 I think) and Flex SDK 4.5.1 wich is the latest too... I really dont get what is going wrong here as nobody else has encountered that problem before and I have done nothing else than importing Flixel to the samples source...  |-I

Update: After hours of thinking and trying out different versions and stuff I recognized something in the project settings: It was somehow set to Flash Player 9.  I feel very dumb right now.  :P
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Mon, Sep 5, 2011
Are there any known Issues about the Flicker effect from flixel?

I've re-wrote the FlixelSimpel exporter to add my enemies to the scene, but now the Flickering effect doesnt work. The other actions in that function are triggered like sound and damage in that case but the sprites dont flicker =/

Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 7, 2011
Are there any known Issues about the Flicker effect from flixel?
I don't really know anything about this. I suggest positing it as its own separate topic in Help as you'll get more help that way, since it's more flixel than DAME related.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Sep 11, 2011
New Version 2.1.0

Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Sun, Sep 11, 2011
I wish it was easier to export to csv's...
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Sep 11, 2011
I wish it was easier to export to csv's...

How much easier do you want it?
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Mon, Sep 12, 2011
Well, One awesome way would be to just click a button, and boom! It's in my file, and it's ready for flashbuilder/whatever...
Title: Re: DAME - a new map editor made using flixel!
Post by: yuewah on Wed, Sep 14, 2011
Tiled map editor supports to store tile layer data as base64 (gzip, zib compressed), how can I write dame exporter to do it ?
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Thu, Sep 15, 2011
DAME is working really well in its current form, but I have a couple bugs/requests:

- I can't seem to manually drag the edges of my rectangular shapes past a scale of 50. Using Ctrl-T, I can type in higher scales, but I can't drag to them interactively.

- While we're on the subject, it seems kind of strange that Ctrl-T doesn't give you the width/height of a rectangular shape, just the scale. Maybe nitpicky, but sometimes I'd like to know the width and/or height of a shape without having to count grid blocks or doing the math (the scale seems to be that 50 pixels = 100%, which doesn't relate to any of my game tiles).

- It would be nice if the positions of the dividers separating the Layers/Properties and the bars separating the Layers/Map would be retained when you save the map file. I think it used to be this way, but I can't remember for sure.

- The icons for sprites are shrunken versions of the actual sprite image, which is cool, but I've got a couple that are far wider than tall and the end result is that the name of the sprite is pushed so far right that I have to give up map space just to see it! Actually kind of funny, but it might be a good idea to code a maximum width on the sprite icons.

- Lastly, it'd be nice if you could check/uncheck visibility for a layer without automatically switching to it. A lot of times I'll be working on a lower layer and want to toggle the visibility of upper layers without leaving the current layer.
Title: Re: DAME - a new map editor made using flixel!
Post by: Nejuf on Thu, Sep 15, 2011
Well, One awesome way would be to just click a button, and boom! It's in my file, and it's ready for flashbuilder/whatever...

ctrl+E, then click Export . . . this updates all the files including csv
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Fri, Sep 16, 2011
Quote
ctrl+E, then click Export . . . this updates all the files including csv

Hmm... That's cool.

Just wish there was a dame version that was nice and simple...no sprite things, no moving platforms, that kind of thing. Make it less glitchy, and kinda slow. That would be nice. :D

Tiled is not slow at all... And it looks less complicated, no orange/silver/whatever windows. :)

Sorry about the whining, I really want to love DAME, I really do. It's just a bit hard for me to love a program that is laggy.  :-\
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Sep 16, 2011
Is it possible to have a foreground layer? like one on TOP of everything? (to enhance the 3Dness of parallax scrolling)
Title: Re: DAME - a new map editor made using flixel!
Post by: eriihine on Sun, Sep 18, 2011
>>Remembers your previous settings between sessions.

where are these settings stored and how do I reset the dame window positions ?

My problem is that the tile window is now off screen and I can not access it. I had two monitor setup, but one of the monitors broke and now tile window is at wrong coordinates.

I tried uninstalling Dame and Air, but that did not reset the settings. I assume these are stored in a sperate file somewhere - where excatly ?

Thanks for your help...
Title: Re: DAME - a new map editor made using flixel!
Post by: eriihine on Sun, Sep 18, 2011
^^

Managed to "fix" my missing tile window problem by borrowing a second monitor and then moving the lost window back to primary monitor area  :D

It would be nice if in future Dame version there would be an option to reset to default settings.

Never the less ... I really like using Dame editor - Excellent peace of SW :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Mon, Sep 19, 2011
- Lastly, it'd be nice if you could check/uncheck visibility for a layer without automatically switching to it. A lot of times I'll be working on a lower layer and want to toggle the visibility of upper layers without leaving the current layer.
Yes, definitely this! I keep wanting to hide layer A so I can more easily work on some other layer B which I have selected. I uncheck layer A's checkbox and can now see layer B clearly, so I start drawing... except it's now drawing on the invisible layer A! It'd be sooo much easier to use if this happened. I can't actually think of any sensible use case for being able to draw on a level that's not displayed.

Otherwise, though, I'm very happy with DAME's integration with Flixel. Thanks for the excellent free product!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Sep 21, 2011
New Version of DAME 2.1.1


I am looking at all your bugs/requests! Sorry I can't respond to each one and some of them aren't as easy to fix as I'd like them to be.
Title: Re: DAME - a new map editor made using flixel!
Post by: tyrannosaur_jet on Thu, Sep 22, 2011
I've been absolutely loving DAME.

I do have one major bug, though, that seems to be cropping up even in 2.1.1: on OSX, the Tiles palette frequently disappears and refuses to reappear no matter what I do. I've been using it on Windows extensively, and no such problem exists; it's just on OSX.
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Fri, Sep 23, 2011
Is anyone using the flxComplex.lua exporter? I've recently added properties to some of my sprites, so switched to using flxComplex rather than flxSimple in order to export these properties. But I'm finding that now none of my tile layers are colliding by default.

The problem seems to be with the Ha****s properties of a DAME layer. Each layer has a Ha****s property, but that seems to default to false. And I can't find any way within DAME to specify that the layer should Ha****s = true. Two of my layers have a collideIndex of 75 and one of them collideIndex of 1, but in all cases Ha****s seems to be false, which means the code exported from DAME doesn't add those layers to the hitTilemaps group.

For the moment I'm hacking the code after export from DAME to alter the generated addTilemap calls, changing the "hits" parameter from false to true for the layers in question. But obviously I have to redo this hack every time I re-export my level.

Can anyone tell me how to change the Ha****s property of a DAME layer? I've searched all through the DAME website and wiki, but without any useful results.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 23, 2011
There should be Has Hits checkbox on the properties pane.
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Fri, Sep 23, 2011
All I see is a "HasHeight" checkbox, which says it's the one to use for if you're stacking several tiles on top of each other. That doesn't sound like the same thing at all as a tile being used for collisions. (The only other checkboxes are Repeat X, Repeat Y, and a greyed-out Preserve Tile Positions.) Is my installation of DAME missing something?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 23, 2011
You're looking in the layer info... You should be looking in the properties panel... It's titled "Properties", appears on the main window, I think usually under the layers panel, and when you have sprites and map layers selected it displays a data grid for you to edit properties. The Has Hits checkbox is above it, along with checkboxes for Locked and Export
Title: Re: DAME - a new map editor made using flixel!
Post by: TattooGeek on Sun, Sep 25, 2011
IMAGE LAYER export missing

Hi,

I have setup an image layer and map layer in a group, the image is behind the map and displays correctly in the preview.
When I export the map the code for the image layer is missing from the generated class, it doesn't even import the jpg.

Have I missed some setting some where? or is it not possible to have the image layer and map layer together like this?

I am exporting using flixelSimple.lua and using DAME v2.1.1

thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Sep 25, 2011
Image layer export is possible. You just need to write a custom exporter to do that since image layers aren't a feature that is a in Flixel by default.

Use DAME.CreateTextForImageLayer in your exporter. See The Exporters page in the DAME help docs for more info.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Sep 30, 2011
A small bug.
I wanted to have a big image as my background. (following photonstorm's tutorial) I created a Map Layer with these settings:

http://up.iranblog.com/images/sun5fugpwhvotgbpckj.png

(note that I didn't have a blank tile in my first tile sheet, since there is no tile sheet and it's just a normal image)
(also note that draw index is to zero because I didn't want to waste space and have a 640x479 blank tile)

But whenever I open the map, background is not visible. I have to open edit layer and just press OK, background materializes (appears).

It's no big deal but I would love to see DAME excel.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Sep 30, 2011
Hmmm... ok, will look into it...
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Fri, Sep 30, 2011
A small bug.
I wanted to have a big image as my background. (following photonstorm's tutorial) I created a Map Layer with these settings:

http://up.iranblog.com/images/sun5fugpwhvotgbpckj.png

(note that I didn't have a blank tile in my first tile sheet, since there is no tile sheet and it's just a normal image)
(also note that draw index is to zero because I didn't want to waste space and have a 640x479 blank tile)

But whenever I open the map, background is not visible. I have to open edit layer and just press OK, background materializes (appears).

It's no big deal but I would love to see DAME excel.

I had the same problem too, drawindex 0 doesn't work for background tiles. I don't know why, the export code was correct - drawindex was set properly to 0. Thus, it could be that it is not a DAME problem.
Workaround: use drawindex = 1 and waste space on a 640x479 blank tile ;)

Awesome tool btw.! Many thx to XanderXevious for DAME!!!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Oct 2, 2011
New Version: 2.1.2

Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Sun, Oct 9, 2011
Great Tool!

* Feature Question
Is there a possibility to reload the image files without loading another opening another map and reloading the current one?
Usually, I build my level and then I notice a tile is missing. I start drawing that tile, but of course in doesn't show up
in the "Tiles" - a "reload/refresh Tiles" button/menu item would be awesome for me or did I miss that feature/option somewhere?


* "bug" Report
I just noticed a very small bug(?), sometimes when I hit "export" it only shows:
Code: [Select]
Export pressed at Sun Oct 9 15:03:19 GMT+0200 2011
Load lua.
and nothing happens, then I have to hit it again and it works - so it is not even annoying (just confusing the first few times)

Code: [Select]
Export pressed at Sun Oct 9 15:03:25 GMT+0200 2011
Load lua.
Lua file loaded.
Execute Lua script.
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Mon, Oct 10, 2011
* Feature Question
Is there a possibility to reload the image files without loading another opening another map and reloading the current one?
Usually, I build my level and then I notice a tile is missing. I start drawing that tile, but of course in doesn't show up
in the "Tiles" - a "reload/refresh Tiles" button/menu item would be awesome for me or did I miss that feature/option somewhere?
There is. Right-click in the Tiles window and select "Refresh image" or similar.

(DAME is an awesome tool, with an impressive feature set for a free program. But it is very bad for usability/discoverability; often very useful features like this are buried in a right-click menu on some non-obvious part of the tool.)
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Oct 11, 2011
I wonder if it is just me, but when I address my tiles in DAME, but when I address my tiles or images in DAME, I end up with bugs in embedded images in my levels or base level files.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Tue, Oct 11, 2011
There is. Right-click in the Tiles window and select "Refresh image" or similar.

(DAME is an awesome tool, with an impressive feature set for a free program. But it is very bad for usability/discoverability; often very useful features like this are buried in a right-click menu on some non-obvious part of the tool.)

ahh thx!
Title: Re: DAME - a new map editor made using flixel!
Post by: Alex on Wed, Oct 12, 2011
I'm loving DAMe but I've run into one issue with writing an LUA exporter

I want to get the field tileset from a tilemap (actually just the filename itself would be even better) but there's no hook in the DAME lua to get that information.

I tried this in case it was omitted from the documentation:

mapData = as3.tolua(layer.map.tileset)

I didn't get an error but the string was empty.

anyone have any suggestions on how to get that information? I can add it by hand but it's the only thing keeping my level design process from being completely automated :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 13, 2011
I want to get the field tileset from a tilemap (actually just the filename itself would be even better) but there's no hook in the DAME lua to get that information.

Use layer.imageFile

For example, if you look at the lua files for the simple exporters they do this:

Code: [Select]
fileText = fileText..tab2.."[Embed(source=\""..as3.tolua(DAME.GetRelativePath(as3Dir, layer.imageFile)).."\")] public var Img_"..layerName..":Class;\n"
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Oct 13, 2011
I think no one saw my post here!

I wonder if it is just me, but when I address my tiles in DAME, but when I address my tiles or images in DAME, I end up with bugs in embedded images in my levels or base level files.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 14, 2011
I think no one saw my post here!

Can you be a bit more specific? What bugs exactly and what do you mean by addressing tiles in DAME?
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Oct 14, 2011
Can you be a bit more specific? What bugs exactly and what do you mean by addressing tiles in DAME?

When I locate my files in DAME and draw with them to make a map, after I export my level, in exported AS3 files, the embeded location of that tileset that I drew the level with is something corrupted or missing. Hope I'm cleared myself here.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Sun, Oct 16, 2011
is there a possibilty for plugins in DAME?
e.g. for implementing a "procedural level generator" like here with Ogmo: http://vimeo.com/30484721
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 17, 2011
When I locate my files in DAME and draw with them to make a map, after I export my level, in exported AS3 files, the embeded location of that tileset that I drew the level with is something corrupted or missing. Hope I'm cleared myself here.
Hi, sorry but I'm still in the dark as to the exact error. What do you mean by corrupted or missing? That the tilemap reference is not correct in the exported level file? Can you provide a code sample to demonstrate what is going on and list all the parameters you've used for the exporter? Which exporter are you using?

is there a possibilty for plugins in DAME?
e.g. for implementing a "procedural level generator" like here with Ogmo: http://vimeo.com/30484721
Not until I open source it later this year.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Oct 18, 2011
1)For example here is what I get when I export with FlxSimpleExporter

      [Embed(source="../csvdir/mapCSV_Level1_Map.csv", mimeType="application/octet-stream")] public var CSV_Level1Map:Class;
      [Embed(source="***GetRelativePath - invalid arguments : source:String = C:\Users\<USER>\Desktop\as3dir, dest:String = C:\Flash\Plattformer\WIP\trunk\src\data\background\MarioTileset_16x16.png***")] public var Img_Level1Map:Class;

2) Another thing, what's the difference between the MainLayer and MasterLayer? Especially in terms of SimpleExporer.
Title: Re: DAME - a new map editor made using flixel!
Post by: Kimikaze-N00B on Tue, Oct 18, 2011
Aahh,this looks great! I like to think of it as my table,placing the action figures to make a scene ~♪
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 19, 2011
1)For example here is what I get when I export with FlxSimpleExporter

      [Embed(source="../csvdir/mapCSV_Level1_Map.csv", mimeType="application/octet-stream")] public var CSV_Level1Map:Class;
      [Embed(source="***GetRelativePath - invalid arguments : source:String = C:\Users\<USER>\Desktop\as3dir, dest:String = C:\Flash\Plattformer\WIP\trunk\src\data\background\MarioTileset_16x16.png***")] public var Img_Level1Map:Class;

2) Another thing, what's the difference between the MainLayer and MasterLayer? Especially in terms of SimpleExporer.
1. It looks like the <USER> in your as3dir is causing a problem. Is C:\Users\<USER>\Desktop\as3dir how it appears in the window? Do the path and file exist? Perhaps try setting it again?
2. The MasterLayer is only required if you are using isometric tilemaps. It lets you export the position of sprites relative to the tilemap. It also will draw shapes aligned to the tilemap. It's irrelevant when using any of the sample exporters and is purely there if anybody needs positions aligned to an isometric tilemap instead of their draw coords. The Main Layer in the exporter is just the name of the layer which you use for collisions.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Oct 20, 2011
1. It looks like the <USER> in your as3dir is causing a problem. Is C:\Users\<USER>\Desktop\as3dir how it appears in the window? Do the path and file exist? Perhaps try setting it again?
2. The MasterLayer is only required if you are using isometric tilemaps. It lets you export the position of sprites relative to the tilemap. It also will draw shapes aligned to the tilemap. It's irrelevant when using any of the sample exporters and is purely there if anybody needs positions aligned to an isometric tilemap instead of their draw coords. The Main Layer in the exporter is just the name of the layer which you use for collisions.

Hi Charles,

1- Yes, the path is valid and is my desktop. (Obviously that <USER> is name of my username)
You are right, something probably related to security or so is messed up so DAME cannot write to my desktop, I exporeted somewhere less important and it worked fine ;)

2- I'm asking it because I'm using
Code: [Select]
currentLevel.mainLayer.getTile(x, y) to access my tiles and seemed strange to me to call it that way, I think I'm missing something here and I think it has to be something like
Code: [Select]
currentLevel.getTile(x, y).

And in exported DAME's Level_Level1.as it asks me to set something for "mainLayer", which I put layerLevel1Map every time manually.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Oct 21, 2011
2- I'm asking it because I'm using
Code: [Select]
currentLevel.mainLayer.getTile(x, y) to access my tiles and seemed strange to me to call it that way, I think I'm missing something here and I think it has to be something like
Code: [Select]
currentLevel.getTile(x, y).

And in exported DAME's Level_Level1.as it asks me to set something for "mainLayer", which I put layerLevel1Map every time manually.
Ok, yes, my confusions... It's been a while since I've looked at the simple exporter ( I always recommend the complex one as it's more versatile ). The masterLayer in that is just a FlxGroup containing all of the layers. It's just a container so that the entire level can be accessed from one group.
The mainLayer is just assigned by the exporter to be the tilemap which will have the hits. As this is the simple exporter it just assumes there is one tilemap to test collisions against, whereas the level is the wrapper for the entire level. So just put Level1Map in the text box in the exporter ( I think - or maybe you need to put layerLevel1Map... ) and you should be good to go.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Oct 22, 2011
Ok, yes, my confusions... It's been a while since I've looked at the simple exporter ( I always recommend the complex one as it's more versatile ). The masterLayer in that is just a FlxGroup containing all of the layers. It's just a container so that the entire level can be accessed from one group.
The mainLayer is just assigned by the exporter to be the tilemap which will have the hits. As this is the simple exporter it just assumes there is one tilemap to test collisions against, whereas the level is the wrapper for the entire level. So just put Level1Map in the text box in the exporter ( I think - or maybe you need to put layerLevel1Map... ) and you should be good to go.

I'm using simpleExporter because the complex one well, is complex and as we talked before, I couldn't find a good tutorial to understand how it works. To be honest with you, I don't have idea where some loading codes in my project came from.


Back on the topic, the reason I was asking you was because when I export my level with simpleExporter, in level file (like Level_Level1.as) there is a property called "mainLayer" that is always set to "layer" (line 43):

mainLayer = layer;

and I manually have to rename that "layer" to "layerLevel1Map". So I wanted to know where in DAME I should set this that my exported level would not need this manual edit.

Thanks.

I found it, you should put Level1Map in layers window. I think it's combination of your group name + tile layer.
And it's strange that mainLayer is not used anywhere in any place, probably used in complexExporters.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Sun, Oct 23, 2011
is there a way to prevent/show/see duplicate sprites in one tile?
I noticed that I placed some diamonds (sprite) over each other, but I have no way to identify if there is a duplicate sprite in a tile - except manually checking each sprite...
am I missing a feature/option?
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Mon, Oct 24, 2011
I think if you select a sprite layer, you can see a list of all the sprites in that layer, and their coordinates. You have to look for duplicates, but then you can delete them.

This is what I had to do when I accidentally dragged a sprite to several hundred pixels off the left of the map.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Oct 24, 2011
Yeah, I similarly invisible other layers and try to CTRL+A and see how many is selected.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Mon, Oct 24, 2011
I think if you select a sprite layer, you can see a list of all the sprites in that layer, and their coordinates. You have to look for duplicates, but then you can delete them.

This is what I had to do when I accidentally dragged a sprite to several hundred pixels off the left of the map.
I tried that for 5 minutes, how do you do that?
selected the layer, selected sprites... nothing, checked view for any lists of sprites or something else... couldn't find anything :(
ahh just found the property panel extended to the the bottom, but nothing is displayed in there. Did you set properties for your sprites?
 
Title: Re: DAME - a new map editor made using flixel!
Post by: Erp on Tue, Oct 25, 2011
DAME is stuck initializing for me. Does anyone know how I can fix this? I have already removed it and installed it.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Oct 25, 2011
DAME is stuck initializing for me. Does anyone know how I can fix this? I have already removed it and installed it.
Do you have the latest AIR framework?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Oct 25, 2011
I think if you select a sprite layer, you can see a list of all the sprites in that layer, and their coordinates. You have to look for duplicates, but then you can delete them.
That feature doesn't exist (unless I've developed amnesia), but it's a darn good one. I think I'll add it. Probably on the context menu for the layer on the layer panel to bring up a nice popup that list all sprites with their coordinates, type, lets you move to them in the view by double clicking, and has an option to delete them.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Tue, Oct 25, 2011
That feature doesn't exist (unless I've developed amnesia), but it's a darn good one. I think I'll add it. Probably on the context menu for the layer on the layer panel to bring up a nice popup that list all sprites with their coordinates, type, lets you move to them in the view by double clicking, and has an option to delete them.
thx, good to know I didn't miss it ;) so I can stop searching.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Oct 25, 2011
And just like that there's a new version of DAME with the Object Finder!

Look on the Layers Tab for any sprite/path/shape layer.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Wed, Oct 26, 2011
And just like that there's a new version of DAME with the Object Finder!
thx! Works great! Just found 6 duplicates in my level!

Code: [Select]
Look on the Layers Tab for any sprite/path/shape layer.I didn't really get that, so for others: on the Layers Tab for any sprite/path/shape layer CLICK the right mouse button and select "Object Finder" from the context menu.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Oct 26, 2011
It's always great to see new versions of DAME!

I'm having a question regarding DAME:
I have a patrol enemy which always starts going left, then if collides when anything, turns around. So I wanted to have some enemies to start their movement by going right, instead of default which is left. So would you tell me steps of adding such property to that sprite (as it is called in DAME) and how to handle it in my code?

tnx!
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Wed, Oct 26, 2011
How odd!  ???  Don't know how I managed to hallucinate that feature. I'm sure I did manage to somehow get a list of all the sprites in a layer. Possibly I just exported it and looked in the generated code. I don't remember.

For making your sprites have a different direction, I'd suggest you give them a property, "facing", and set that to the numbers which Flixel uses for its constants LEFT or RIGHT. (Defined in FlxObject: LEFT is 1, RIGHT is 0x10 = 16.) As I recall the exporter doesn't automatically assign those properties to the generated sprites, but you can do it in the spriteAddedCallback. It's a little fiddly to translate the properties from the format they get exported into... I do it like this:

Code: [Select]
        public function spriteAddedCallback(objectAdded:Object, layer:FlxGroup, level:BaseLevel, scrollX:Number, scrollY:Number, properties:Array):Object
        {
            if (objectAdded is AlexSprite) {
                (objectAdded as AlexSprite).applyProperties(properties);
            }

And in AlexSprite.as:
Code: [Select]
public function applyProperties(props:Array):void
{
props.forEach(applyOneProperty);
}
public function applyOneProperty(nameAndVal:Object, index:Number, array:Array):void
{
var name:String = nameAndVal["name"];
var value:* = nameAndVal["value"];
this[name] = value;
}
Title: Re: DAME - a new map editor made using flixel!
Post by: Erp on Wed, Oct 26, 2011
DAME is stuck initializing for me. Does anyone know how I can fix this? I have already removed it and installed it.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Oct 26, 2011
How odd!  ???  Don't know how I managed to hallucinate that feature. I'm sure I did manage to somehow get a list of all the sprites in a layer. Possibly I just exported it and looked in the generated code. I don't remember.

For making your sprites have a different direction, I'd suggest you give them a property, "facing", and set that to the numbers which Flixel uses for its constants LEFT or RIGHT. (Defined in FlxObject: LEFT is 1, RIGHT is 0x10 = 16.) As I recall the exporter doesn't automatically assign those properties to the generated sprites, but you can do it in the spriteAddedCallback. It's a little fiddly to translate the properties from the format they get exported into... I do it like this:

Code: [Select]
        public function spriteAddedCallback(objectAdded:Object, layer:FlxGroup, level:BaseLevel, scrollX:Number, scrollY:Number, properties:Array):Object
        {
            if (objectAdded is AlexSprite) {
                (objectAdded as AlexSprite).applyProperties(properties);
            }

And in AlexSprite.as:
Code: [Select]
public function applyProperties(props:Array):void
{
props.forEach(applyOneProperty);
}
public function applyOneProperty(nameAndVal:Object, index:Number, array:Array):void
{
var name:String = nameAndVal["name"];
var value:* = nameAndVal["value"];
this[name] = value;
}

Thanks, while I'm reading it, would please tell me that do I have to have two separate sprites set in DAME and set property for each class or is it possible to have one single enemy class and put the property for each instance? Like right click and set facing property for that exact instance, rather than for the whole class.

tnx again.
Title: Re: DAME - a new map editor made using flixel!
Post by: KunoNoOni on Wed, Oct 26, 2011
Quick Question. Does DAME support Hex Tiles?


-KunoNoOni
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 26, 2011
As I recall the exporter doesn't automatically assign those properties to the generated sprites, but you can do it in the spriteAddedCallback.
Actually it does! Just look for the flipped parameter in AddSpriteToLayer!
It's in all versions of Simple and Complex exporter.
Oh, I forgot to mention. To actually flip selected sprites use Ctrl+F, or go into the Modify main menu and select flip sprites.

Thanks, while I'm reading it, would please tell me that do I have to have two separate sprites set in DAME and set property for each class or is it possible to have one single enemy class and put the property for each instance? Like right click and set facing property for that exact instance, rather than for the whole class.
For modifying the facing read my first reply above. For properties in general, you can set properties in the sprite class and then override/add them for any instance as you desire.

Quick Question. Does DAME support Hex Tiles?
It can, sort of. If you set up a tilemap as staggered isometric you will get the staggered pattern commonly used for hex tilemaps, but DAME doesn't recognise the hexagonal tile shape so it will think the tiles are isometric. If you just want to lay down tiles, though, that should work. You'll probably actually need to set it as a custom isometric tilemap type and play around with the values. The standard staggered iso tilemap type probably makes a few assumptions that wouldn't work the way you want them.
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Wed, Oct 26, 2011
How odd!  ???  Don't know how I managed to hallucinate that feature. I'm sure I did manage to somehow get a list of all the sprites in a layer. Possibly I just exported it and looked in the generated code. I don't remember.
don't worry, human memory is full of such "bugs".
If you are interested in this topic I can recommend: Daniel Schacters Seven Sins of Memory: http://books.google.com/books/about/The_Seven_Sins_of_Memory.html?id=m8qMjPF1NYAC
Although, after that book you probably will take nearly all stories - even your own - with a grain of salt... and probably think twice calling someone a liar.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Oct 26, 2011
Thanks, Charles, it was awesome!
Title: Re: DAME - a new map editor made using flixel!
Post by: Erp on Wed, Oct 26, 2011
Is there a troubleshooter for DAME?
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Oct 26, 2011
I wanted to add a scrolling background to my game, so I added a new Map Layer with these config:
(http://img254.imageshack.us/img254/7981/unledugn.png) (http://imageshack.us/photo/my-images/254/unledugn.png/)

Uploaded with ImageShack.us (http://imageshack.us)
Note that my background is just a simple picture, like normal photo and doesn't have a blank tile with same size.
but when I export my game, while loading it gets an error at FlxTilemapBuffer's line number 72 at this:
Code: [Select]
_pixels = new BitmapData(columns*TileWidth,rows*TileHeight,true,0);saying that "ArgumentError: Error #2015: Invalid BitmapData."
and I think the problem is columns and rows are zero.

What am I missing?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Oct 26, 2011
I think the problem is columns and rows are zero.

What am I missing?
That sounds about right. What does your exported csv file look like for that map? I guess it should be just one line with 0, maybe an extra blank line in there.
Title: Re: DAME - a new map editor made using flixel!
Post by: cian0 on Wed, Oct 26, 2011
Hands down to this oh so wonderful work. I was able to finish a prototype with less than a week with this. Thank you master. No, really, thank you so much, you are amazing. One question, can this map editor be used alongside game engines for other platforms? (Android, iOS, etc)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 27, 2011
Hands down to this oh so wonderful work. I was able to finish a prototype with less than a week with this. Thank you master. No, really, thank you so much, you are amazing. One question, can this map editor be used alongside game engines for other platforms? (Android, iOS, etc)
Thank-you very much  :D
And yes, it can. If you are using DAME for more than just tilemaps you would likely need to write your own lua exporter, but one of the reasons I made DAME was so that I could use it for more than just Flash games in the long run.
Title: Re: DAME - a new map editor made using flixel!
Post by: Morgan on Thu, Oct 27, 2011
Hi there

How do you pan around the map? Ive seen it done in the tutorial video. Something like grabbing the spacebar for the hand tool in photoshop, illustrator?

Cheers
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 27, 2011
How do you pan around the map? Ive seen it done in the tutorial video. Something like grabbing the spacebar for the hand tool in photoshop, illustrator?
You can use the scrollbars, or you can use the middle mouse button, or you can use Ctrl+arrow keys. If you hold D while using the middle mouse method the panning will be accelerated. There are also many shortcuts to move around to the center of layers, to next/previous objects, and you can place bookmarks allowing you to return to favourite locations.
Title: Re: DAME - a new map editor made using flixel!
Post by: Morgan on Fri, Oct 28, 2011
thanks for the reply

hmm panning using the middle mouse doesnt work on my set up (mac osx, logitech G5 mouse). i realise there is scroll bars but they are clumsy compared to a proper pan. a hot key to pan with left mouse would be perfect.

but this in no way detracts from what is an awesome tool. thanks!!
Title: Re: DAME - a new map editor made using flixel!
Post by: datorum on Sat, Oct 29, 2011
hmm panning using the middle mouse doesnt work on my set up (mac osx, logitech G5 mouse). i realise there is scroll bars but they are clumsy compared to a proper pan. a hot key to pan with left mouse would be perfect.
just tried it - under Mac OSX too - doesn't work for me either.
coding flash is the only "serious" thing I do on Windows, because FlashDevelop is awesome and free. Don't know if it worth installing bootcamp though, if you don't have it already.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Oct 31, 2011
Hi,
I have two problems with DAME:
1- I have a spawner class with this signatre:
Code: [Select]
public function Spawner(type:Class, x:uint = 0, y:uint = 0, MaxSize:uint = 10, MinSize:uint = 4, InitSize:uint = 3, Facing:uint = FlxObject.RIGHT)
but when Base_Level wants to create it, it calls with
Code: [Select]
var obj:FlxSprite = new type(x, y);
and it arises a bug. How can I tell DAME to use that signature when calling Spawner's constructor?

2- How can I prevent code generated for level with DAME to have these "masterLayer.add(something)" lines in it? Do I have to tinker with the exporter? If yes, what I should remove from it? I'm asking this because I handle these myself in my code.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Oct 31, 2011
1. When you edit the sprite details you can specify the Constructor Text. You can put any code, or some of the special DAME exporter syntax (you can see in the exporter help pages) in there. E.g. in the samples I do:

new Coin(%xpos%,%ypos%,%prop:spins%)

where the spins property is a boolean property common to that sprite.

2. If you have the latest exporter (though I'm not sure if I did this for the simple one) then you need not add the masterlayer to the FlxG.state. If you have that flexibility then you'll see references to an optional parentObject parameter, which could just be another FlxGroup that does nothing if you want. Otherwise, yes, you would have to tinker with the exporter. If you do, do not modify the existing exporter. Copy it to a custom exporter directory, give it a new name, and specify the directory in the file menu. That way it won't be overriden when DAME updates next, because Air does like to wipe everything clean in the program files for every update.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Nov 1, 2011
Thanks Charles for the fast reply:

1. When you edit the sprite details you can specify the Constructor Text. You can put any code, or some of the special DAME exporter syntax (you can see in the exporter help pages) in there. E.g. in the samples I do:

new Coin(%xpos%,%ypos%,%prop:spins%)

where the spins property is a boolean property common to that sprite.
I tried changing that exporter custom text but when I export with simple exporter, I still get the same code. Please take a look at the generated code:

override public function addSpritesForLayerLevel1Enemies(onAddCallback:Function = null):void
      {
         addSpriteToLayer(Spawner, Level1EnemiesGroup , 32.000, 32.000, 0.000, false, 1, 1, onAddCallback );//"Spawner"
         addSpriteToLayer(Spawner, Level1EnemiesGroup , 256.000, 32.000, 0.000, true, 1, 1, onAddCallback );//"Spawner"
      }

and BaseLevel's code is still the same.

2. If you have the latest exporter (though I'm not sure if I did this for the simple one) then you need not add the masterlayer to the FlxG.state. If you have that flexibility then you'll see references to an optional parentObject parameter, which could just be another FlxGroup that does nothing if you want. Otherwise, yes, you would have to tinker with the exporter. If you do, do not modify the existing exporter. Copy it to a custom exporter directory, give it a new name, and specify the directory in the file menu. That way it won't be overriden when DAME updates next, because Air does like to wipe everything clean in the program files for every update.

umm, I think I lost you on the half way of your explanation! :)
I'm using the latest version but I don't know how to tell DAME not to generate code for as you said "then you need not add the masterlayer to the FlxG.state" or add my objects to other groups.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Nov 1, 2011
Ok. I just double checked and you'll definitely need to write your own exporter to do both of those. The simple exporter really is just the bare bones get something up and running exporter. It's why I always recommend the complex one, which has hooks for both of the things I mentioned in my previous reply, and in terms of sprite creation is a lot more flexible with what you can do without modifying the lua. But people always say they want it so I can't stop including it unfortunately :)

It wouldn't be too hard to modify your own exporter but I suggest looking at the complex exporter to see the differences. The big difference is that the complex one allows you to pass in the pre-created sprite object to the base level code instead of the base level always constructing it, meaning that the level code actually has the call to new WhateverClass(...) instead of the baselevel. Then it uses %constructor:null% to work out what to pass in. The null part is the default argument to the base level's creation code. If the base code gets passed in null it will create the object itself as usual. But the level code will pass in the creationText instead if it finds it. You would need to modify the addSpritesToLayer function and the code that calls addSpritesToLayer to be a bit more like the complex exporter.

As for the auto adding... Just remove that or modify it as you like in the exporter.

But remember not to do any of these changes to the provided exporter lua files directly. Always put them in a custom folder and work from those instead. Read the Exporter help docs for more info on all the syntax, but you shouldn't need to stray too much. It can be very powerful once you do start to write your own exporter, though.
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Thu, Nov 3, 2011
Hey, just came across this...

I though I would be clever and create a non-export sprite layer to hold a reference image of my player sprite in the middle of the screen (the player is basically centered throughout the game). My plan was to set the scrollfactors for this layer to 0 and place the sprite in the center of the view left unaffected by the Game Region Overlay. That way I could better judge distances to the player and his view of the level.

When I set the scrollfactors to 0, though, the grid disappeared and I could no longer scroll by holding middle-mouse. So I then used the scrollbars, and that brought the grid and scrolling back, but the layer's scrollfactors got reset to 1. By fiddling around, I got what I wanted, but it's temperamental.

It easier to see what happens when you try it yourself, but it seems the problem is tied mainly to turning the Game Region Overlay on/off when a zero scrollfactor (sprite?) layer is active.

*UPDATE*
I just had the same problem again, only this time it was when I clicked on the player sprite on the zero scrollfactor layer (Game Region Overlay was not on) and pressed Ctrl-T to edit some values. So, again, the grid disappeared and I couldn't scroll with MMB. Also, the view jumped to near the origin, probably trying to center the sprite.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Nov 6, 2011
Right now layers with scroll factors of 0 aren't reliable. I'll try to look into it but it would need some kind of special hack to get it to work so that it's independant of the rest of the layer scrolling.
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Thu, Nov 17, 2011
Im totally confused right now...

I've modyfied the Simple exporter to do what I need, works fine... wasn't too comfortable with the complex setup somehow my monsters didn't find the tilemap and the player and stuff...

SO now I want to switch levels...

Do I have to create 2 .as files for each level??? One "BaseLevel" and one for the Level content???

The way I thought of it was that as it says in the exporter "All levels extend one Base Level..." but that doesn't work because of the virtual functions at the end of base level... they have the names of the main group... or am I supposed to make a new group per level and have all levels in one DAME file? Cus If I name the main group the same way, then the .csv's get overwriten and ow I'm frustrated =(

PLZ HLP!

EDIT:

Ok, now I've had a couple of headaches but tryed another approach with the Complex Exporter... got the level up and running again, but now as I said, I cant get my monsters to find the floor for tilemap checks:

Code: [Select]
var tm:FlxTilemap = (FlxG.state as PlayState).currentLevel.hitTilemaps;
or

Code: [Select]
var tm:FlxTilemap = (FlxG.state as PlayState).currentLevel.hitTilemaps as FlxTilemap;
I cant get the tiles, because they're a Group ?!?


Next Edit:

Ok, screwed the tilemap check and using an overlap check I found here on the forums to handle that. It works for some of my enemies... BUT

Now the creeps that I spawn through a spawner don't move at all?! What could that be? Any Ideas, if anyone reads this at all =(
Title: Re: DAME - a new map editor made using flixel!
Post by: Alextfish on Mon, Nov 21, 2011
It sounds like your problem has moved away from DAME. I think your current approach - using overlap rather than level tile - is more sensible, so I'd advise you to stick with that approach, and start a separate thread providing full details. At a guess I'd say the code for these "creeps" is still trying to access some tile-based details.

There are occasional circumstances where you do need to access the level tiles, perhaps if you're destroying platforms or suchlike. In that case, the way I do it is to access Registry.level.hitTilemaps.members[0]. (Like most people, I only work with one layer for collisions; if you're using multiple tilemaps with Has Hits for some reason, you'll need to be more clever than just going[0].)
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Mon, Nov 21, 2011
It sounds like your problem has moved away from DAME.

Yeah, I wasn't too sure about it, because it worked before I started using the complex exporter...

My Problem with the creeps was that I set their group to active = false (stupid me, but I had to do that to get them to work with my previous approach for some reason)

Nevertheless, thanks, and it was a part of your code I found btw Alextfish, so thanks for posting that one, I still have to refine it though and I'll make a thread for that as soon as I'm back on the track...
Title: Re: DAME - a new map editor made using flixel!
Post by: bobbybaker82 on Tue, Nov 29, 2011
Is there a max filesize for the tilesheet? I have a pretty big one, (it falls within the boundaries for flash 10) but when I try to load it in, and put it on a map, nothing shows up in the tiles area. Any ideas? I opened an existing map I had, and put my new sheet into it, while the tile selection area didn't update, it did allow me to click on it and paint with the new tiles  but I couldn't see what I was choosing.

Thanks
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Nov 30, 2011
Hi,

1- When using Complex Exporter, how would one change levels? (or as DAME calls them Groups), I tried this
currentLevel = new Level_Level2(true, onObjectAddedCallback);
but it loaded the new level OVER my current one and didn't update the hitTiles, so player and enemies were colliding with previous level's hitTiles.

2- How would I get current level's bounds? BoundsMaxX is static and stored in BaseLevel.as and is constant in levels, do I have to cast something to current Level_Level1 or something?

-tnx!
Title: Re: DAME - a new map editor made using flixel!
Post by: Deathcraft on Wed, Nov 30, 2011
1- When using Complex Exporter, how would one change levels?

Hi! I think you should try loading new FlxState instead. Then, in that new state you should load new level from DAME. Previous level will be killed with all of previous state content. Thats how I do it anyway. I'm new to all this development stuff :)

As for level bounds I'm also interested. Level.height seems not working for me.

Also, want to thank the author of this incredible program (DAME).  :)
Title: Re: DAME - a new map editor made using flixel!
Post by: foosety on Thu, Dec 15, 2011
Not sure if this is a bug or if I am doing something wrong, but when I add a string property to my sprite
I use this for construction text new
Code: [Select]
ArrowTrap(%xpos%,%ypos%,%prop:DIR%)
However when it generates the code I am getting

Code: [Select]
addSpriteToLayer(new ArrowTrap(190.000,228.000,LEFT),...
but I want this
Code: [Select]
addSpriteToLayer(new ArrowTrap(190.000,228.000,"LEFT"),... where the value of my string property is wrapped in " ".

If I'm using a string property it should send a string in not just the name right?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Dec 16, 2011
@foosety - Just wrap up your property with quotes like this:
Code: [Select]
"%prop:DIR%"
Properties are handled 2 ways in the exporter:

By default when you access them by name it understands that you know exactly what you want from them and will not wrap them up, allowing you to do this if you wish (allowing you to create enums, constants, and different ways of wrapping strings in other languages).

If you're in a property loop (as with the default way of accessing properties in the flixel exporters) then you can use propvaluestring to ensure that any strings it finds are wrapped up with the characters you have specified (defaulted to "") and other variables won't be. This is because in the loop you are not accessing the properties by name and therefore don't know what you'll encounter next.
Title: Re: DAME - a new map editor made using flixel!
Post by: foosety on Fri, Dec 16, 2011
Oh I see how it works now. Thanks  :)
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Dec 18, 2011
Hi,

I have multiple properties for an Anim Sprite class and in the code it just gives me an array called "properties", do I have to loop through all the cells to find one specific one each time? Is there anyway to get value of a property easier? like properties["myPropertyName"] to get it's value or something?

-tnx for this great tool, it's way stronger that I thought!  :-*
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Dec 19, 2011
Aside from my question, I have two requests:

1- Please make double clicking on items or groups in Layer (left list) open a window accordingly, for example double clicking on a layer open the "Edit Layer Info". Same thing for Sprites tab, when double click on a sprite, opens it's edit window.

2- I forgot! I'll edit this post and put it back :p

Thanks for this great tool ... my game would take (more) ages without it's precious help.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Dec 21, 2011
I have one more suggestion,

When I work on my game, I open both DAME and FlashDevelop at the same time and obviously my project is open in FlashDevelop which includes .CSV files that lovely crimson DAME generated. Problem is sometimes when I export my levels from DAME, they cannot be overwritten because somehow they are locked or so in FlashDevelop, even though I didn't open those files.

I know it's not DAME's problem per se, but I thought maybe you can unlock those files somehow.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Dec 26, 2011
I have multiple properties for an Anim Sprite class and in the code it just gives me an array called "properties", do I have to loop through all the cells to find one specific one each time? Is there anyway to get value of a property easier? like properties["myPropertyName"] to get it's value or something?
There is an easy way. Use %prop:myPropertyName%
You can find all the info about it in the Properties section of the Exporters page in the help files.

1- Please make double clicking on items or groups in Layer (left list) open a window accordingly, for example double clicking on a layer open the "Edit Layer Info". Same thing for Sprites tab, when double click on a sprite, opens it's edit window.
That sounds like a brilliant and simple idea. I'll look into it for DAME 3

Thanks for this great tool ... my game would take (more) ages without it's precious help.
I'm addressing a lot of usability issues for DAME 3, many of which I spotted when I tried to make a game for Ludum Dare, so it will hopefully be even better when I release the next version.

When I work on my game, I open both DAME and FlashDevelop at the same time and obviously my project is open in FlashDevelop which includes .CSV files that lovely crimson DAME generated. Problem is sometimes when I export my levels from DAME, they cannot be overwritten because somehow they are locked or so in FlashDevelop, even though I didn't open those files.
This one I keep getting complaints about, and there really is nothing I can do. It all appears to be FlashDevelop's fault. I've had this happen back in the old days using Notepad and FlashDevelop and it's a nuisance. Sorry about that... the only option is to perhaps not embed the CSVs and load them dynamically, then maybe FD won't try to lock them. To be honest, I'm not exactly sure what triggers FD locking them. I've yet to discover a pattern...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Dec 26, 2011
Thanks man,

What I meant by properties is flixel side, I know how to set properties from the DAME side, problem is how to read those properties in the flixel. I know we get an array called "properties" for each object that has them but as of now I have to iterate through it to find an specific one. I wanted to know if there is an easy way to get an specific property from "properties".

-test84
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Dec 27, 2011
I don't believe so...

You could rewrite the exporter to generate a dictionary, or just a generic Object, instead of an array as those do support named indexing.

The current properties exported are done this way to allow for multiple same-named properties:

Code: [Select]
propertiesString = "generateProperties( %%proploop%%"
propertiesString = propertiesString.."{ name:\"%propname%\", value:%propvaluestring% }, "
propertiesString = propertiesString.."%%proploopend%%null )"

But if you change it to something like this (you might have to change some other supporting exported code like the generateProperties function itself) you'll be able to do what you want, obviously with the warning that you can't have 2 properties of the same name per object:

Code: [Select]
propertiesString = "generateProperties( {%%proploop%%"
propertiesString = propertiesString.."%propname%:%propvaluestring%,"
propertiesString = propertiesString.."%%proploopend%%null} )"

I just noticed a limitation that I'll fix in DAME 3. You have to put a comma after each item, which means you'll have to put a null entry at the end. I've already implemented a custom separator string for other loops in DAME 3 (sprite anims and metadata), so I'll add it for the properties as well. FYI, the syntax for that will be %separator:,%
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Wed, Dec 28, 2011
Just a feature request: Importing CSVs/Tilemaps into Dame via a monocrome bitmap(.PNG) per layer using a pre defined Tilematrix would be AWESOME and speed up comlex level blocking "le massive" =D exporting them to a monocrome bitmap would also be helpful. Because I sometimes find it kinda hard to see the whole picture in DAME and working zoomed out burns my CPU =)

Loving It btw! Thanks a lot for your Work!
Title: Re: DAME - a new map editor made using flixel!
Post by: Dmeville on Thu, Dec 29, 2011
Is there a way to change the background colour of the Tiles window? 
I'm working with transparent tiles, and it's near impossible to see it on the checkered background :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Dec 30, 2011
Is there a way to change the background colour of the Tiles window? 
I'm working with transparent tiles, and it's near impossible to see it on the checkered background :)
Not currently, but I can add an option to change the background colour.
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Fri, Dec 30, 2011
Have you thought of having a simple version of DAME that has less blinkies and flashies? You know, more "tame" like Tiled? (But with the awesome exporters of course!)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Dec 30, 2011
Have you thought of having a simple version of DAME that has less blinkies and flashies? You know, more "tame" like Tiled? (But with the awesome exporters of course!)
It depends what you mean by "blinkies and flashies" :)
I'm always open to suggestions, but even Tiled has a lot of features. Tell me what you want stripped down and then I can look into it/give you a better answer!
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Dec 31, 2011
I don't believe so...

You could rewrite the exporter to generate a dictionary, or just a generic Object, instead of an array as those do support named indexing.

The current properties exported are done this way to allow for multiple same-named properties:

Code: [Select]
propertiesString = "generateProperties( %%proploop%%"
propertiesString = propertiesString.."{ name:\"%propname%\", value:%propvaluestring% }, "
propertiesString = propertiesString.."%%proploopend%%null )"

But if you change it to something like this (you might have to change some other supporting exported code like the generateProperties function itself) you'll be able to do what you want, obviously with the warning that you can't have 2 properties of the same name per object:

Code: [Select]
propertiesString = "generateProperties( {%%proploop%%"
propertiesString = propertiesString.."%propname%:%propvaluestring%,"
propertiesString = propertiesString.."%%proploopend%%null} )"

I just noticed a limitation that I'll fix in DAME 3. You have to put a comma after each item, which means you'll have to put a null entry at the end. I've already implemented a custom separator string for other loops in DAME 3 (sprite anims and metadata), so I'll add it for the properties as well. FYI, the syntax for that will be %separator:,%

umm, I've read your post like 5 times but didn't understand it much, so I take that it's not possible to do what I wanted without changing the exporter, right?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Dec 31, 2011
Yeah! Well, there is another way... When you read in the properties of each object you can simply create a Dictionary that stores the name/value pairs that way. So in the objectAddedCallback do something like this:

Code: [Select]
if ( properties )
{
var dict:Dictionary = new Dictionary;
for( var i:uint = 0; i < properties.length; i++ )
{
dict[properties[i].name] = properties[i].value;
}
}
...
// Access entries like this (you'd need the quotes):
res = dict["Something"]

It's a bit of a long-winded approach if you want to avoid changing the exporter but it will work and in fact, using this method you can be a bit more selective over what properties you add to the dictionary, in case there are some that aren't needed anyway.

But yes... otherwise you would need to create a copy of the exporter and just change those lines I mentioned in my previous post. All I was trying to say before was that Arrays don't support named indexing, as far as I know, and the current method of exporting properties is done that way so that you could, for example, have many values in one property list that are tied to the same name - it's trying to be as generic as possible. To access elements by name you need to use either a Dictionary or a generic Object.

A Dictionary would still require the quotes around anything you put in the brackets, but with an Object (and this was the example I gave in my previous post), because the exporter generates the code it basically adds a new variable to each property object with that name, so it's like accessing a custom object with only the variables you need for each property list.

Of course, I'm not Actionscript expert so maybe someone else has a different solution...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Jan 2, 2012
Thanks Charles, that was exactly what I wanted!  :-*
Sorry for the late reply, my code was in a bad shape that I could not compile and test your suggestion.   :-[

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

And on a side not, sometimes when I open dame, the Layer/Sprites window (the 1/3 on the top left that has Layer and Sprites tabs) is full screen and I have to resize everything, I know it's not a big thing but I want to see DAME as best as possible.

And can't wait for DAME 3!  8)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Since the transition to HTML5 thing is starting, maybe you may want to make DAME compatible with those guys as in long-term. I know it currently supports raw type of exports and with exporters everything is possible but you may want to change stuff so it would work better in the future but maybe it's a little too soon.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

It would be nice if preview window for tilesets would resize it's width to width of the tile or at least resize itself as I resize the window because as I see in the attached image, my tile's width is 16 but the preview is smaller and I can't change it.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Currently if you have an unsaved file and open another file, DAME opens the new file without giving warning to save the previous one. It would be cool if we could have multiple instances too, it we want.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I think it would be good when we press B and we are in brush mode, it would go to tile matrix mode and vica versa.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I think it we are in MOVE mode (like we can move tiles) and we press on a tile in Tiles window (so we can draw), it would automatically go to brush mode. Since if user is clicked on a tile, he wants to draw stuff so automatically go to brush mode without needing hem to do it himself.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

It maybe good that if you click on a layer in Layer tab, it would collapse (or open or whatever it means) and show the stuff within it (like what you do with double click  or clicking on small triangle icon) and close the previous one that was open.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

When MOVE is selected, make the brush icon not selected. As of now, when you select move, the brush icon is selected and it was confusing to me for a while when I just stateted using this  :-*ly software.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Jan 2, 2012
Thanks for all those suggestions. I'll see what I can do for DAME 3. There are a few there that could be trivial to fix.

DAME 3's going to have some HUGE improvements to the drawing tools, by the way. The original ones in DAME 1 were ok but this, I think, brings it more in line with a realistic workflow.

Also, yeah, it is a little too soon for an HTML5 exporter - there really isn't a good framework that I've seen yet.

My current thinking, though, is that with DAME 3, which WILL be the last full version of DAME, I'll finally open source it so the community can help make it better. If you, or anyone, wants to become a DAME contributer then let me know...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Jan 3, 2012
Thanks for all those suggestions. I'll see what I can do for DAME 3. There are a few there that could be trivial to fix.

DAME 3's going to have some HUGE improvements to the drawing tools, by the way. The original ones in DAME 1 were ok but this, I think, brings it more in line with a realistic workflow.

Also, yeah, it is a little too soon for an HTML5 exporter - there really isn't a good framework that I've seen yet.

My current thinking, though, is that with DAME 3, which WILL be the last full version of DAME, I'll finally open source it so the community can help make it better. If you, or anyone, wants to become a DAME contributer then let me know...

Great. Let me know if any of my suggestions are not clear enough so I can explain them in more detail.
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Tue, Jan 3, 2012
Dude, no worries about HTML5 man, thats at least 3 years from now, and flash isn't going to die, what Adobe said was that they don't want flash to be compared to it and that they will focus on gaming, so I guess flixel will have a few more happy years. Don't let other peps dogmas influence your work, they are the result of fearfull thoughts of others, I think Mr. Jobs said that... flixel ist brilliant imho and that wont go down so easy!

Anyhow you could use DAME as it is already for your HTML projects, CSV files should work with most 2D tilemap engines and for the rest theres the LUA scriptability...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Jan 3, 2012
One more thing, since my game has more than 100 levels, maybe if we could write some stuff per level, like meta or anything, would be useful. I can catch the level in code and write info for it but it would be hard coded and game designer would not have control over it.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Jan 4, 2012
One more thing, since my game has more than 100 levels, maybe if we could write some stuff per level, like meta or anything, would be useful. I can catch the level in code and write info for it but it would be hard coded and game designer would not have control over it.
That can already be done via the group or tilemap layer properties. I think that the complex exporter picks that up... I might add an option to edit multiline properties in DAME 3....
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Jan 8, 2012
That can already be done via the group or tilemap layer properties. I think that the complex exporter picks that up... I might add an option to edit multiline properties in DAME 3....

Thanks, didn't know you could do the same with Layers, nice one.  :P
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Jan 8, 2012
And on a side not, sometimes when I open dame, the Layer/Sprites window (the 1/3 on the top left that has Layer and Sprites tabs) is full screen and I have to resize everything, I know it's not a big thing but I want to see DAME as best as possible.
Is that when you have DAME is maximised? I know there is a bug with the sections of the window being restored with incorrect sized when maximised.

Currently if you have an unsaved file and open another file, DAME opens the new file without giving warning to save the previous one. It would be cool if we could have multiple instances too, it we want.
I couldn't repro that (It always pops up the unsaved changes box - I think added a few updates ago). However, if you click File->New it currently doesn't show the warning box. Is that what you want? How were you opening the files?
Adobe Air does not directly support multiple instances without hacking (as far as I know), and rewriting DAME to support multiple files would be a pain. :(

When MOVE is selected, make the brush icon not selected. As of now, when you select move, the brush icon is selected and it was confusing to me for a while when I just stateted using this  :-*ly software.
The reason for this is that move/select mode is a sub-mode - ie you can move while drawing tiles or painting on tiles, and the behaviour is different when in each mode (when in draw mode you select the tiles and when in paint mode you select the regions that fall under the tiles), so by deselecting the brush icon it would cause confusion about whether you were in draw mode or paint mode. The most I can do is to add a spacer between it and the other icons to indicate that.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Jan 9, 2012
Is that when you have DAME is maximised? I know there is a bug with the sections of the window being restored with incorrect sized when maximised.
Yes, DAME is always maximized.

I couldn't repro that (It always pops up the unsaved changes box - I think added a few updates ago). However, if you click File->New it currently doesn't show the warning box. Is that what you want? How were you opening the files?
Adobe Air does not directly support multiple instances without hacking (as far as I know), and rewriting DAME to support multiple files would be a pain. :(
When I have an unsaved file and I open another one, it doesn't give warning on whether save the edited unsaved file prior to loading the new one. I want it to act like Photoshop, when you open another file and the currently open file is edited, open a dialogue box to ask for save.

The reason for this is that move/select mode is a sub-mode - ie you can move while drawing tiles or painting on tiles, and the behaviour is different when in each mode (when in draw mode you select the tiles and when in paint mode you select the regions that fall under the tiles), so by deselecting the brush icon it would cause confusion about whether you were in draw mode or paint mode. The most I can do is to add a spacer between it and the other icons to indicate that.
umm, it's confusing as of now, so anything would probably help, I think.
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Mon, Jan 9, 2012
I'm getting a lot of streaking / artifacting at the right border of my screen. When I scroll my map so that it moves from right to left, it leaves behind a big chunk of whatever just scrolled past. Makes it pretty much impossible to work. I'm on Mac 10.7, but the issue was happening on previous OS versions
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Jan 9, 2012
I'm getting a lot of streaking / artifacting at the right border of my screen. When I scroll my map so that it moves from right to left, it leaves behind a big chunk of whatever just scrolled past. Makes it pretty much impossible to work. I'm on Mac 10.7, but the issue was happening on previous OS versions
What resolution are you running at? In fact, could you send me your settings file? (feel free to leave any strings in the file empty that point to anything you want to keep secret). I don't know where they're located on Macs but on Windows it's here:
C:\Users\<USER NAME>\AppData\Roaming\DAME.dambots\Local Store\settings.xml

@test84

Hmmm... And you're on the latest version of DAME? I've double checked the latest version and if you go to File->Open or open recent files and have unsaved changes it should give you the "You have unsaved changes" dialogue box. How are you opening the files exactly? And what changes are you making? Perhaps there's something unique about what you're doing there...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Jan 9, 2012
@test84

Hmmm... And you're on the latest version of DAME? I've double checked the latest version and if you go to File->Open or open recent files and have unsaved changes it should give you the "You have unsaved changes" dialogue box. How are you opening the files exactly? And what changes are you making? Perhaps there's something unique about what you're doing there...

If you open a file from out of dame, for example from windows explorer, that dialogue box won't appear. at least that's my case.
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Tue, Jan 10, 2012
Xander, I sent you a PM with the attached file. Let me know if it didn't arrive, for some reason it's not showing up in my "sent" folder
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 10, 2012
Cool thanks. You've both helped a lot...

Both of those bugs will be fixed in DAME 3 (It is coming VERY soon - just trying to fix as many usability issues as I can now).

Also, xyroclast - if you want messages to show in your "sent" folder you need to tick a checkbox that saves a copy to your outbox :)
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Wed, Jan 11, 2012
Awesome, I look forward to it!
Thanks for the support
(and for the tip)
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Wed, Jan 11, 2012
I can't wait for DAME 3!!!
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Jan 14, 2012
I think it would be nice if we could have a template for layers, like sprites. So if we set some properties for a Layer, it would appear for new ones.

And I think someone should make a video tutorial for it since it has a lot of features that even I haven't touched yet, like paths and so. I can help on this part but haven't done anything like it before.
Title: Re: DAME - a new map editor made using flixel!
Post by: Placeable on Sat, Jan 14, 2012
Hey!

DAME is an awesome tool but I was wondering if its possible to input constant values for my sprite properties?  It doesn't seem like it.

Say I have an integer property on one of my sprites in DAME and I want to give it the value of  FlxG.BLACK, a simple color, but it won't let me since the input (FlxG.BLACK) is not a numeric value (but the constant is is my end code).  Could this be turned off somehow or, if not possible, looked into future updates of DAME?

Perhaps add a new data field that allows us to do so?

Thanks and keep up the awesome work!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Jan 14, 2012
@placeable: It will be possible in version 3 of DAME. I'll be providing a way of entering custom properties, along with what they mean in exported data:

(http://d3j5vwomefv46c.cloudfront.net/photos/full/491927527.jpg?Expires=1326576443&Key-Pair-Id=APKAIYVGSUJFNRFZBBTA&Signature=zev1xGe8HwrZiV66p~J8JpqbIGbt8bdyITWUs93RJ8bedKjiy04l-o7nfahQXsX8kygIZUKFL6~OrcCa72ExhdnJLq7~A5aBGyS47wkQ2IeMP6ZIAeSzFyG0ptNXn4h1eEcOV9WdIDKeULoo0D0ZyhPZ4c2dkU~vqbHHUGSShLE_)

Also, the custom properties will allow you to quickly enter layer names.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Jan 14, 2012
Hey!

DAME is an awesome tool but I was wondering if its possible to input constant values for my sprite properties?  It doesn't seem like it.

Say I have an integer property on one of my sprites in DAME and I want to give it the value of  FlxG.BLACK, a simple color, but it won't let me since the input (FlxG.BLACK) is not a numeric value (but the constant is is my end code).  Could this be turned off somehow or, if not possible, looked into future updates of DAME?

Perhaps add a new data field that allows us to do so?

Thanks and keep up the awesome work!

I input value of that constant in DAME and check it with enums in my code, if that helps.
Title: Re: DAME - a new map editor made using flixel!
Post by: copygirl on Sat, Jan 14, 2012
Can dame output 2-dimensional array like:

var data1:Array =      [
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[1,0,0,0,0,2,0,0,3,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
]   
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Jan 15, 2012
Another problem. I set a "Type" property in dame for my layers which is an Integer and it is show in my classes. problem is how to retrieve it. Because I create a BaseLevelinstance and assign my layers to it (I think it's called "upcasting") in order to store my current level, the currentLevel is not a Level_LevelX actually and thus I cannot get that Type from it.

What would you propose?

Let me restate it:
I hope I made myself clear enough: I make a BaseLevel variable and instantiate my Level_LevelX files into it but My Level_LevelX classes have a Type property that I can't access via that variable because it is not in BaseClass but is defined in it's children.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Jan 15, 2012
I think we either have to add that property to base class ( how I can do it?) or create a middle class that has this and levels inherit from it.
Would you describe the first one on how to add a property to BASE LEVEL class file in DAME?

EDIT:
I think I can't solve it with an intermediate class, I think we can't add it to the base class because all the levels have that property and that makes a conflict, base class should have it as a protected and other class should just give it a variable but with what DAME does currently, layers have that property as public and don't give a DAM[E]n about if it is in an intermediate class or what. Hope I'm clear on this.

-----------

I was thinking wish it was a way to have one class for my levels and several CSV files, can we do it in DAME 3 somehow? I think it's redundant currently to have 120 class files and 120 csv files, one level file that would load each of those CSV files would be more promising, at least in my point of view.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Jan 15, 2012
If it's just CSVs you need then I would use the CSV exporter. The complex exporter is set up to export multiple levels because it contains embedded code for the sprites, shapes, paths, properties and text. So a one level method would only work if you were dealing with just data alone, otherwise you'll end up needing an extra file with that data and a parser. The most I'll do is try and provide a static factory style method for spawning levels, thereby removing the need for people to write their own.

As for your specific problem I'm really not understanding what exactly you want from this. Why can't it work like this?:

Level_LevelX extends LevelIntermediate extends BaseLevel
LevelIntermediate contains the property
you store references to your level as LevelIntermediate

To use the intermediate class you don't need to modify the exporter script, just specify the name of the intermediate class when you export.
You can then override any base class functions you need as well.
Why would there be a conflict if all levels have this property?

I really really would suggest you create your own modified version of the exporter, though... it's not that difficult and would free you up from the restrictions imposed by the generic ones provided with DAME. Design your level architecture, then rework the exporter to fit your design.

@copygirl
Yes, it can... if you use the csv exporter it will export in standard csv format, which is the text file format which flixel uses, but if you want it to export code exactly as what you asked about then you'll need to write your own exporter. However, look at the sample exporters and you will see that all you need to do is modify a few parameters and construct the text in a certain way.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Jan 16, 2012
If it's just CSVs you need then I would use the CSV exporter. The complex exporter is set up to export multiple levels because it contains embedded code for the sprites, shapes, paths, properties and text. So a one level method would only work if you were dealing with just data alone, otherwise you'll end up needing an extra file with that data and a parser. The most I'll do is try and provide a static factory style method for spawning levels, thereby removing the need for people to write their own.

I mean wish there was a way to handle multiple CSV files with one level class with the exporters because usually levels don't differ that much.

As for your specific problem I'm really not understanding what exactly you want from this. Why can't it work like this?:

Level_LevelX extends LevelIntermediate extends BaseLevel
LevelIntermediate contains the property
you store references to your level as LevelIntermediate

To use the intermediate class you don't need to modify the exporter script, just specify the name of the intermediate class when you export.
You can then override any base class functions you need as well.
Why would there be a conflict if all levels have this property?

I tried this, problem was you can't define a property at two places. When I add the property in DAME, the generated code declares it and give it the value I set in DAME and I declared the same property in the extended base class, so that results in conflict because that property is declared at two places.

I think you have to declare your property in your extended base class and just give it a value in your level classes.

I really really would suggest you create your own modified version of the exporter, though... it's not that difficult and would free you up from the restrictions imposed by the generic ones provided with DAME. Design your level architecture, then rework the exporter to fit your design.

I rather not mess with DAME as of now because I have a lot of work for my game, let aside learning Lua and writing an exporter.

Where should I start? I think I have to copy both flixelComplex.lua and flixelComplex_settings.lua in the same folder and rename them to something else, right? Does that prevent newer versions of DAME to deleting them or something?

What sections do you think I should edit?
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Jan 16, 2012
Here is my LevelIntermediateClass:
Code: [Select]
package 
{
/**
* ...
* @author idn
*/
public class LevelIntermediateClass extends BaseLevel
{

public var Type:int = 999;
public function LevelIntermediateClass()
{

}

}

}

My Level_Level1 class:
Code: [Select]
//Code generated with DAME. http://www.dambots.com

package
{
import org.flixel.*;
import flash.utils.Dictionary;
public class Level_Level1 extends LevelIntermediateClass
{
//Embedded media...
[Embed(source="csv/mapCSV_Level1_Map.csv", mimeType="application/octet-stream")] public var CSV_Map:Class;
[Embed(source="data/background/MarioTileset_16x16.png")] public var Img_Map:Class;

//Tilemaps
public var layerMap:FlxTilemap;

//Sprites
public var ItemsGroup:FlxGroup = new FlxGroup;
public var EnemiesGroup:FlxGroup = new FlxGroup;
public var PlayerGroup:FlxGroup = new FlxGroup;

//Properties
public var Type:int = 1;


public function Level_Level1(addToStage:Boolean = true, onAddCallback:Function = null, parentObject:Object = null)
{
// Generate maps.
var properties:Array = [];
var tileProperties:Dictionary = new Dictionary;

properties = generateProperties( null );

and the error I was talking about:

Error: A conflict exists with inherited definition LevelIntermediateClass.Type in namespace public.

and I changed public to protected it to protected in LeveIntermediateClass, same error. I think it should not be declared in the Level_Level1 class and just get a value.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Jan 16, 2012
I see what you mean.
You have 2 options:
1. create a custom exporter in this case. You'd just need to modify these lines. There's really no lua you need to learn and it should be self explanatory what's going on:

Code: [Select]
groupPropertiesString = "%%proploop%%"..tab2.."public var %propnamefriendly%:%proptype% = %propvaluestring%;\n%%proploopend%%"

fileText = fileText..tab2.."//Properties\n"
fileText = fileText..as3.tolua(DAME.GetTextForProperties( groupPropertiesString, group.properties, groupPropTypes )).."\n"

2. Don't declare the type in the base class. If you need to access it you can still access it, but you'd need to cast your level as an object first. eg:
Code: [Select]
var obj:Object = level as Object;
// You might need to do this too if not all your levels have a value called Type:
// if (obj.hasOwnProperty("Type") )
x= obj.Type; // or whatever you want to do with it.

3. Similar to 2 but you declare a type with a different name. You have a function in your intermediate class which will do all of that casting etc and reassign the values to that new type. Eg in the intermediate class:
Code: [Select]
var IntType:int;

function SetupTypes():void
{
    var obj:Object = level as Object;
    IntType = obj.Type;
}


Personally, I still think the best solution is option 1. I know it seems daunting, but it's a a minute job and will save you a lot of headaches, especially once you get over the first hurdle, but solution 3 is the next best option.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Jan 16, 2012
Thanks.

I think it should be a little deeper than that because:

1- I think I should change the base class somehow too and make that property there and protected, otherwise I can't access it with instances of levels. (since I make an instance of base class to access instances of levels)

1- I think if I do this change in exporter, other properties would get broken, like I have properties for my sprites and so but don't want this change in base class thing happen to them as well.

(it's 3:30am here, this problem doesn't let me sleep, literally)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 17, 2012
Changing that line for the groupPropertiesString ONLY affects the properties for the level. Sprite properties are handled in a separate section of the lua script.
It's a pretty safe and isolated change so no need to worry.

For the other option, you don't need to touch the base class at all. Make sure you store all your levels as intermediate classes.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Jan 17, 2012
Thanks  :)

So I need to remove defining new variable as Public and somehow make it get value in the constructor of level, am I on the right track?
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Jan 17, 2012
I think this is about DAME's code, how I can change
Code: [Select]
fileText = fileText..as3.tolua(DAME.GetTextForProperties( groupPropertiesString, group.properties, groupPropTypes )).."\n"so it can just give me:
Code: [Select]
Type = 1;instead of
Code: [Select]
Type:int = 1;?

(Type being the propertyString, 1 is the value and type is int)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 17, 2012
You need to change the groupPropertiesString.

This is it now. proploop is the equivalent of a for each in the list of properties. It says place 22 tab spaces and then the rest should be straightforward...
Code: [Select]
groupPropertiesString = "%%proploop%%"..tab2.."public var %propnamefriendly%:%proptype% = %propvaluestring%;\n%%proploopend%%"

You'll need to do something like this (just eliminating the "public var " and the ":int" parts:
Code: [Select]
groupPropertiesString = "%%proploop%%"..tab2.."%propnamefriendly% = %propvaluestring%;\n%%proploopend%%"

Note, that you shouldn't modify the DAME exporters directly, nor add any exporters in the DAME installation path (as Air will overwrite everything in there on the next update).
Place a copy of the flixelComplex.lua and the settings file for the flixelComplex exporter in a new directory, renaming flixelComplex to something else, and then in the File menu of DAME click Specify Custom Exporter path. Afterwards you can select your new exporter in the exporters window and it's plain sailing.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Jan 17, 2012
You are the best man! THANKS.

Now that you mention it, I see the exporter is not that hard ...
(it was funny that when I first your first line, I went and fixed it and then saw my edit and your line are the same, lol)
(I was checking forums like 5 times per minute to see if you replied back or not, I was reading about Lua and had no luck!)

Love DAME ...
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Wed, Jan 18, 2012
You know how the BaseLevel's addSpritesForLayer is a virtual function? Flash Builder doesn't like that; It gives an error about how virtual is not a defined property. :( Why is this? Is there such thing as a virtual function in actionScript? BTW I just edited the lua code so it doesn't add virtual. :) The whole Lua thing is really cool. I'm starting to love DAME...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Jan 18, 2012
You know how the BaseLevel's addSpritesForLayer is a virtual function? Flash Builder doesn't like that; It gives an error about how virtual is not a defined property. :( Why is this? Is there such thing as a virtual function in actionScript? BTW I just edited the lua code so it doesn't add virtual. :) The whole Lua thing is really cool. I'm starting to love DAME...

Which exporter are you using? addSpritesForLayer is defined as public in my BaseLevel, and I'm using ComplexExporter.

AFAIK in Actionscript you don't need to explicitly mark a method to be overridden as virtual as you do in C#, the compiler will do this for you. This is why the keyword doesn't show up in any docs because it is irrelevant from the developers perspective.
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Wed, Jan 18, 2012
The exporter is FlixelSimple. :D
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Jan 18, 2012
Hmmm... I don't have any idea why I put that as virtual... flixel Simple was the very first exporter I created so it's entirely possible that none of it actually makes any real sense now. I was learning actionscript at the time and flashDevelop never actually reported any errors...

Well, I'll remove the virtual keyword for DAME 3 anyway...
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Wed, Jan 18, 2012
Something else:
I made a copy of FlixelSimple and I'm adding stuff to it. I'm trying to add properties, this is my added code:
Code: [Select]
groupPropertiesString = "%%proploop%%"..tab2.."public var %propnamefriendly%:%proptype% = %propvaluestring%;\n%%proploopend%%"

fileText = fileText..tab2.."//Properties\n"
fileText = fileText..as3.tolua(DAME.GetTextForProperties( groupPropertiesString, group.properties, groupPropTypes )).."\n"

fileText = fileText.."\n"
fileText = fileText..tab2.."public function Level_"..groupName.."(addToStage:Boolean = true, onAddCallback:Function = null, parentObject:Object = null)\n"
fileText = fileText..tab2.."{\n"


fileText = fileText..tab3.."var properties:Array = [];\n"
fileText = fileText..tab3.."var tileProperties:Dictionary = new Dictionary;\n\n"

The problem is that Flash Builder gives an error; %proptype% is an undefined property or something like that. In other words, DAME is not changing %proptype% to the property type!!! That's the only problem.
Oh and I did make it so the Level imports the Dictionary thing and I added the generateProperties to BaseLevel.

I looked at the help files that came with DAME, and it said to use %%proptype%% instead of %proptype%, which is on flixelcomplex. I tried both ways. Is this a typo, or is it just my lua ignorance acting up?

Thanks in advance. :D
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Jan 19, 2012
It should be %proptype%. Thanks for spotting the mistake in the help files! Generally speaking, keywords are surrounded by %% only if they are loops, if and endif keywords.

I'm not sure why it doesn't appear to be working for you as it all looks fine (since it seems to be exactly the same as flixelComplex). What does the exported code for those properties look like?

Also, can you send me you exporter? I'll double check it my end - perhaps there's something obvious.
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Thu, Jan 19, 2012
Here's the exporter:
http://www.cloudypixelgames.com/wp-content/uploads/2012/01/NewExporter.txt (http://www.cloudypixelgames.com/wp-content/uploads/2012/01/NewExporter.txt)
It prints this code into my Level:
Code: [Select]
public var uselessString:proptype = "stringyStringString";
public var truefalsemaybe:proptype = true;
public var oneortwo:proptype = 0;
public var hereallyfloats:proptype = 0;
It gets the name, and the value, but not the type.

Thanks for helping me on this strange problem. :)

Oh, and I added a label to show where I added the properties.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Jan 19, 2012
A shot in the dark: I think you should proptype into %. So replace proptypewith %proptype%:

replace this line:
groupPropertiesString = "%%proploop%%"..tab2.."public var %propnamefriendly%:proptype = %propvaluestring%;\n%%proploopend%%"
with this
groupPropertiesString = "%%proploop%%"..tab2.."public var %propnamefriendly%:%proptype% = %propvaluestring%;\n%%proploopend%%"
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Thu, Jan 19, 2012
Oh in the beginning it was that, but I was just testing random things. Here's the updated version, the one that also doesn't work:
http://www.cloudypixelgames.com/wp-content/uploads/2012/01/NewExporter.txt
It's the version that was copied from flixelcomplex.
Sorry about that.  :-[
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Jan 19, 2012
OK, would you please re-state the bug? Because I re-read your posts but couldn't figure out what is the current bug.

And if it's about properties, please state whom this property belongs to, a sprite, a layer, an anime sprite, etc.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Jan 19, 2012
You just need to specify the groupPropTypes. It's undefined in the exporter. This is how it is in flixelComplex:

local groupPropTypes = as3.toobject({ String="String", Int="int", Float="Number", Boolean="Boolean" })

I'll add a warning and make the exporter fail if this happens in DAME 3.
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Thu, Jan 19, 2012
Yes! It works! :D
Thanks a lot!
Oh, and I think I found a little glitch in DAME:
It says the project is untitled when it is.  :S
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Jan 20, 2012
I think it's nice to have default property for layers too, the way we have for sprites now (either with a template like currently we do for sprites)
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Jan 25, 2012
Hey Charles, would you please take a look at this topic?
http://forums.flixel.org/index.php/topic,5856.0.html

tnx in advance.
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Mon, Jan 30, 2012
I'm finally going deeper with Dame. There was couple things with ComplexClaws though.

Playstate - embed fonts with systemFont didnt work.

This works:

Code: [Select]
[Embed(source = '/Library/Fonts/verdana.ttf', fontName = 'VerdanaFont', mimeType = 'application/x-font')] private var fontVerdana:Class;
[Embed(source = '/Library/Fonts/verdana.ttf', fontName='ArialFont', mimeType='application/x-font')] private var fontArial:Class;


Not sure.. systemFont='Arial' might be just an issue with mac?

Another thing was in Baselevel + LevelArea1:

There was no class: TileMapEntity ..FlxTilemap seems to work fine.

Dame version 2.1.4, ComplexClaws downloaded today.

Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Mon, Jan 30, 2012
Okay :) I am now checking out actual exporting. There is place for TilemapClass, and i can change TileMapEntity to FlxTilemap there. Anyway, i guess it should be FlxTilemap as default.


edit:
TileMapEntity seems to belong to FlashPunk exporter, but it seems that sometimes its FlxTilemap and sometimes its TileMapEntity when i choose exporter. Bug?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Jan 31, 2012
Hmmm... I've not heard of that. Did you use the flashpunk sample as your base or export with the flashpunk exporter at one point?
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Wed, Feb 1, 2012
I was trying csv, simple and complex exporters. All works fine, but if i pick flashpunk exporter  tilemap class wont change. And at the moment its FlxTilemap no matter if i choose flashpund or flixel exporter. I actually can see that there is TileMapEntity but only like 0.2s, and it changes back to FlxTilemap.

Now i tried to make my own exporter, and there is few custom imports. When i pick my exporter imports appear as they should, but they wont go away if i pick another exporter.

Its not a big thing, but i suppose this is a bug. I also uninstalled dame and downloaded it again.. same thing.

Btw, custom exporters are absolutely great! It was just a "big" step to start using those. It could be good idea to make couple examples more.
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Thu, Feb 2, 2012
Any predictions on the release date of 3.0?
(Not impatient, just eager and excited :) )
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Feb 3, 2012
It's coming soon. I "hope" to have it done before the end of February, even if I patch in a few more things later.

Sorry it's taken a while but I really want v3 to have all the features I wanted from DAME at the very beginning and to be a much more enjoyable experience. I'm just taking the time to fix a gazillion bugs and improve the documentation, samples and exporters. The new extended zoom out and image exporting is really cool btw 8)
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Sun, Feb 5, 2012
No worries! It'll be ready when it's ready! And I'll be using it! :D
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Wed, Feb 8, 2012
I have a door sprite with property jammed (boolean). I can get the value exported correctly, but i cant get my custom properties to work like i understand from helppage:
http://damehelp.dambots.com/index.php/Writing_An_Exporter#Properties

How should i use this in exporter:

Code: [Select]
%%if prop:NAME%% This should be exported if there is property NAME %%endprop%%

I have tried all combinations, but it always exports everything including all those %%things%%
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Feb 8, 2012
Hi,

I need to add a controller/manager to my levels which doesn't have a visual and isn't visible in the actual game and the designer would edit it's properties (it's basically controls some manager with it). Is it possible to have something like this in DAME?

I can think of adding properties to each layer but since I will have this manager object in every level, there might be a chance that designer misses putting them in every level or puts a typo there, since we can't have properties of levels as templates, like what we can do with sprites.

Or do it as a sprite but in it's constructors, make it invisible so it won't get drawn on the screen but none of these options seem rad to me.
Title: Re: DAME - a new map editor made using flixel!
Post by: rukiri on Sun, Feb 12, 2012
If it hasn't been asked already you you distort the map or use the map for a 2.5D game?
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Mon, Feb 13, 2012
Feature request for DAM3

+ Relative paths for everything
+ Custom exporter for export settings

I dunno if this is common need, but my idea is that i could use portable project with usbMemory, or just zip the project and send / receive.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Feb 13, 2012
Feature request for DAM3

+ Relative paths for everything
+ Custom exporter for export settings

I dunno if this is common need, but my idea is that i could use portable project with usbMemory, or just zip the project and send / receive.
I'm trying to migrate more stuff to relative paths...

Not sure what you mean about the export settings. You already can do that. When you create a custom exporter you just create a settings.lua file as well with whatever you want...

If it hasn't been asked already you you distort the map or use the map for a 2.5D game?
The feature is supported. When you create a map layer set it up as Iso tile types, there are many pre-defined settings or ones you can customise for that. I've yet to provide a sample that demonstrates this.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Feb 13, 2012
Hi,

I need to add a controller/manager to my levels which doesn't have a visual and isn't visible in the actual game and the designer would edit it's properties (it's basically controls some manager with it). Is it possible to have something like this in DAME?

I can think of adding properties to each layer but since I will have this manager object in every level, there might be a chance that designer misses putting them in every level or puts a typo there, since we can't have properties of levels as templates, like what we can do with sprites.

Or do it as a sprite but in it's constructors, make it invisible so it won't get drawn on the screen but none of these options seem rad to me.

Any thoughts?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Feb 14, 2012
Any thoughts?
I'm not really sure about this. The per layer properties seems like the best idea. I would trust your designer and put in error messages in the game if the data is invalid.

I've not yet implemented layer templates. It might have to wait till after DAME 3 as I don't want to delay the release much longer and I need some time to think of the best solution for that. If you have any thoughts about how you would like the layer templates to work (as in the full process of setting them up, binding them to layers etc) then let me know and it might turn out to be as easy as pi.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Feb 14, 2012
A feature suggestion:

What if when you select a layer, all the sprites that are placed on that layer like glow very lightly to indicate they are selectable and are for that group.

And I think it would be nice if we could toggle between move and draw with same keyboard shortcut, like B would switch between move and draw, currently B goes to draw an V is for move.
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Tue, Feb 14, 2012
Not sure what you mean about the export settings. You already can do that. When you create a custom exporter you just create a settings.lua file as well with whatever you want...

Rights, i am aware of that. It was kind of related to that portable project idea :) ..i mean something like in export window you could set the exporter for this and only for this project, and you could include the exporter to project file (dam file). I dunno, or perhaps better way could be just if there is correctly named exporter next to myMap.dam file, it would be used as default?

Like:
myMap.dam
myMap.lua
myMap_settings.lua

And for relative paths. If they all cant be relative, perhaps it would be possible to have just one basePath, and all could be relative for that.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Feb 14, 2012
Rights, i am aware of that. It was kind of related to that portable project idea :) ..i mean something like in export window you could set the exporter for this and only for this project, and you could include the exporter to project file (dam file). I dunno, or perhaps better way could be just if there is correctly named exporter next to myMap.dam file, it would be used as default?

Like:
myMap.dam
myMap.lua
myMap_settings.lua

And for relative paths. If they all cant be relative, perhaps it would be possible to have just one basePath, and all could be relative for that.
Ok, that sounds like a good idea. I can't promise it for the first version of DAME 3, but definitely in a later update. Maybe have this accessible from another export button that bypasses the usual stuff and ensures it won't get saved globally.

A feature suggestion:

What if when you select a layer, all the sprites that are placed on that layer like glow very lightly to indicate they are selectable and are for that group.

And I think it would be nice if we could toggle between move and draw with same keyboard shortcut, like B would switch between move and draw, currently B goes to draw an V is for move.
The glow idea might be useful. The quick switch would still not solve the problems of going between select in paint, select in draw, paint in paint and draw in draw. It would need 4 keyboard shortcuts, or 2 shortcuts and a 3rd one for turning select on and off.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Feb 15, 2012
Hi,

In the export file of each level, for each Sprite Layer in Layers  the constructor creates a FlxGroup and adds content of that group to it and in then adds this FlxGroup to the scene. But in my game, I manage enemies myself and add enemies based on their type to specific FlxGroups and when I add them to the scene, it causes a bug that enemies won't move.

So, question is how I can prevent groups to create inside flxgroup and preventing it to add them to the scene directly just for some layers ? Or perhaps if there is anything else.

I think if I could change the constructor text for each Sprite Layer, like the way we can do with sprites, it would do fine.

Let me give an example:

This is the generated code from DAME for Enemies sprite layer:

Code: [Select]
public function addSpritesForLayerEnemies(onAddCallback:Function = null):void
{
addSpriteToLayer(null, EnemyPatrol, EnemiesGroup , 160.000, 208.000, 0.000, 1, 1, false, 1.000, 1.000, generateProperties( null ), onAddCallback );//"EnemyPatrol"
}

But what I want is this: (check third parameter of addSpriteToLayer)
Code: [Select]
public function addSpritesForLayerEnemies(onAddCallback:Function = null):void
{
addSpriteToLayer(null, EnemyPatrol, Registry.EnemiesNonFlying, 160.000, 208.000, 0.000, 1, 1, false, 1.000, 1.000, generateProperties( null ), onAddCallback );//"EnemyPatrol"
}
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Thu, Feb 16, 2012
@Test84

Have you tried to add your exporter custom group you need?

I believe it should go to part where sprite groups are made:

copypaste from simple exporter:
Code: [Select]
fileText = fileText..tab2.."//Sprites\n"
for i,v in ipairs(spriteLayers) do
fileText = fileText..tab2.."public var "..spriteLayers[i][3].."Group:FlxGroup = new FlxGroup;\n"
end
fileText = fileText.."\n"


Modify it like this:

Code: [Select]
fileText = fileText..tab2.."//Sprites\n"
for i,v in ipairs(spriteLayers) do
fileText = fileText..tab2.."public var "..spriteLayers[i][3].."Group:FlxGroup = new FlxGroup;\n"
end

-- put your custom groups here:
fileText = fileText..tab2.."public var myCustomGroup:FlxGroup;\n"

fileText = fileText.."\n"

I actually havnt try this, but generated as is just another as class, so you can do all changes  you need.

I have done some changes to baseLevel.as and i've removed that line from exporter that writes the baseLevel file.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Feb 16, 2012
Thanks but first of all, I want it to behave like this just for certain sprite layers and second of all, since they belong to different groups, I need to supply name of each special and specific group to each sprite layer
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Thu, Feb 16, 2012
Okay. Well, i needed some custom properties for certain sprites. There were some problems with %%ifprop%%, so i tried to make similar result by checking if the sprite is in this or that spritelayer. This might give you some ideas:

exporter part:
Code: [Select]
-- create the sprites.

for i,v in ipairs(spriteLayers) do
baseFileText = baseFileText..tab2.."virtual public function addSpritesForLayer"..spriteLayers[i][3].."(onAddCallback:Function = null):void { }\n"
layer = spriteLayers[i][2]
layerN = as3.tolua(layer.name)

if flixelVersion == "2.5" then
if layerN == "doorsJammed" then 
creationText = tab3.."addSpriteToLayer(%class%, "..spriteLayers[i][3].."Group , %xpos%, %ypos%, %degrees%, %flipped%, "..as3.tolua(layer.xScroll)..", "..as3.tolua(layer.xScroll)..", onAddCallback, true );//%name%\n"

else
creationText = tab3.."addSpriteToLayer(%class%, "..spriteLayers[i][3].."Group , %xpos%, %ypos%, %degrees%, %flipped%, "..as3.tolua(layer.xScroll)..", "..as3.tolua(layer.xScroll)..", onAddCallback );//%name%\n"

end
else
creationText = tab3.."addSpriteToLayer(%class%, "..spriteLayers[i][3].."Group , %xpos%, %ypos%, %degrees%, %flipped%, onAddCallback );//%name%\n"
end
fileText = fileText..tab2.."override public function addSpritesForLayer"..spriteLayers[i][3].."(onAddCallback:Function = null):void\n"
fileText = fileText..tab2.."{\n"

fileText = fileText..as3.tolua(DAME.CreateTextForSprites(layer,creationText,"Avatar"))
fileText = fileText..tab2.."}\n\n"
end


important part:
Quote
if layerN == "doorsJammed" then 
                     creationText = tab3.."addSpriteToLayer(%class%, "..spriteLayers[3].."Group , %xpos%, %ypos%, %degrees%, %flipped%, "..as3.tolua(layer.xScroll)..", "..as3.tolua(layer.xScroll)..", onAddCallback, true );//%name%\n"



BaseLevel part:

Code: [Select]
public function addSpriteToLayer(type:Class, group:FlxGroup, x:Number, y:Number, angle:Number, flipped:Boolean, scrollX:Number, scrollY:Number, onAddCallback:Function = null, jammed:Boolean = false):FlxSprite
{
var obj:FlxSprite = new type(x, y);
obj.x += obj.offset.x;
obj.y += obj.offset.y;
obj.angle = angle;


// Only override the facing value if the class didn't change it from the default.
if( obj.facing == FlxObject.RIGHT )
obj.facing = flipped ? FlxObject.LEFT : FlxObject.RIGHT;
obj.scrollFactor.x = scrollX;
obj.scrollFactor.y = scrollY;
group.add(obj);
if(onAddCallback != null)
onAddCallback(obj, group);
if(jammed)
obj.jammed = true;


return obj;
}

importatn part:
Quote
public function addSpriteToLayer(type:Class, group:FlxGroup, x:Number, y:Number, angle:Number, flipped:Boolean, scrollX:Number, scrollY:Number, onAddCallback:Function = null, jammed:Boolean = false):FlxSprite

What i needed, was doorSprite to be normal door, or jammed door....
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Feb 16, 2012
You'll probably need the spritelayer properties to export, which won't be available until DAME 3. Almost there...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Feb 17, 2012
Thanks, but I hope I made myself clear. I want DAME to use my supplied FlxGroup (and let me worry about it's creation, destruction and displaying it on the game since I handle it all) and just use it to add the objects from that layer to it, instead of creating a new FlxGroup and if I didn't, it would do as it do now: create a flxgroup, add members to it and put it to the master layer.

:love:
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Tue, Feb 21, 2012
Feature request for DAM3 (from graphic / level designer)

My friend asked if there was any easy way to clear sprite layers. I dont know Dame that well, so if there is no easy way to clear the whole map, i suppose that would be quite handy feature for Dame 3.

Save map for next level, and then hit the Clear All button -> clean start for new level with same layer structure.
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Tue, Feb 21, 2012
I have had a lot of trouble deleting paths. I can't delete the last node! :/
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Feb 21, 2012
Suggestion:

Currently if you make an object in a layer, it can still be selected if another layer is selected. Maybe restricting the selectable objects based on whether the layer they belong to is currently selected helps. It can prevent accidental sprite moves.

That would help the other feature I requested that like double clicking the group would glow all the objects for that layer.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Feb 21, 2012
Feature request for DAM3 (from graphic / level designer)

My friend asked if there was any easy way to clear sprite layers. I dont know Dame that well, so if there is no easy way to clear the whole map, i suppose that would be quite handy feature for Dame 3.

Save map for next level, and then hit the Clear All button -> clean start for new level with same layer structure.
Ctrl+A (Edit->Select All), Delete key.

Suggestion:

Currently if you make an object in a layer, it can still be selected if another layer is selected. Maybe restricting the selectable objects based on whether the layer they belong to is currently selected helps. It can prevent accidental sprite moves.

That would help the other feature I requested that like double clicking the group would glow all the objects for that layer.
Do you have Edit->Select From Current Only unchecked? It seems like you do... Maybe you unticked it by mistake?

Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Feb 21, 2012
Do you have Edit->Select From Current Only unchecked? It seems like you do... Maybe you unticked it by mistake?

I had no idea this existed there, thanks!

1- why when we press V for selecting, pressing it again won't toggle it to disable?

2- How parallex scrolling code generated by DAME works? Is it reliable? What do I have to do in order to have it in the game?
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Wed, Feb 22, 2012
Ctrl+A (Edit->Select All), Delete key.

That wasnt so hard lol Next time he asks something, i'll take a look.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Feb 23, 2012
I had no idea this existed there, thanks!

1- why when we press V for selecting, pressing it again won't toggle it to disable?

2- How parallex scrolling code generated by DAME works? Is it reliable? What do I have to do in order to have it in the game?
1. I'll look into that.
2. I'm not sure I understand. Do you mean the code in the exporter, because all that does is place sprites and tilemaps down at positions with scroll factors. DAME should be reliable - it's rendered using Flixel. Just run the exporter to have it in the game. :s
Title: Re: DAME - a new map editor made using flixel!
Post by: SnakeArsenic on Thu, Feb 23, 2012
Any chance of adding an option to center the Game Region Overlay? I work in the center and it seems strange to have a margin on only two sides.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Feb 24, 2012
Thanks for the reply. My game designer started working with it and loves it! Thanks.

One thing. Since we are working on two computers and I'm developing and adding feature to DAME and he is using the editor and making levels in it, if he makes new levels in game and wants to get the new .dam file with new sprites and stuff from me, his current .dam file with his levels will be gone.

So is there any way to save or transfer levels between two .dam files?

p.s. DAME is using 50% CPU on my other machine, which is XP SP3. I Update to lates 2.1.4 with no luck. What do you reckon about it?

Once again, thank you so much for this superb piece of program.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Feb 25, 2012
I tried the import option with different options but couldn't get it to work.

---------

It may be me by TAB seems a good keyboard shortuct to switch between Layers and Sprites tabs.

----------

I donno if it has any significance but you can't copy and text of Layer properties.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Feb 26, 2012
Yes, there are issues with CPU usage. It's something I've still not been able to fix.

The game region overlay will be able to be centered in DAME 3.

Did you try right clicking on the layer properties text and selecting Copy?

I'm not sure how the import is not working. I just tried it on my side and it's working fine, though I noticed that it will sometimes fail to load images because it gets confused about the paths. Did you get any error messages?
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Feb 26, 2012
I'm not sure how the import is not working. I just tried it on my side and it's working fine, though I noticed that it will sometimes fail to load images because it gets confused about the paths. Did you get any error messages?

Maybe the reason is it's from two different computers with different paths. I don't want to import anything but the levels that designer makes. I tried to even Append them to prevent any checks and bugs but that didn't work either. I tried both radio buttons on Import window, same path or specific path, none of them worked.

I don't remember the error message since I replaced the new file and added my sprites there manually but it was like a lot of small error windows. probably something about paths.

--

Is there any way to find type of a sprite after you put it on the screen?

---

It would be nice if you could integrage Pickle into DAME, so we could edit the sprites from DAME directly. Like double clicking on animation, would open a window with Pickle inside it.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Mar 1, 2012
A very bad bug, on one of machines, suddenly one of tile layers's widht and height are set to 1 and if I increase them, I can't set them to any value higher than that. this ruined all my levels.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Mar 2, 2012
A very bad bug, on one of machines, suddenly one of tile layers's widht and height are set to 1 and if I increase them, I can't set them to any value higher than that. this ruined all my levels.
Hmmm... bizarre... Do you have any repro steps? Did Undo fix it? Don't forget that DAME makes backup files! It's possible that it's something that might have been fixed in DAME 3 but I've not encountered that myself.

Is there any way to find type of a sprite after you put it on the screen?
Yes, you an use the Object Finder. Right click on the sprites layer on the layer tab to find the option. I really need to make a Tools Menu shortcut for this in DAME 3, I think, as it's a bit hidden.

It would be nice if you could integrage Pickle into DAME, so we could edit the sprites from DAME directly. Like double clicking on animation, would open a window with Pickle inside it.
I've no idea what Pickle is but there is full sprite and sprite anim editing in DAME 3!
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Mar 2, 2012
1- I uninstall and reinstalled DAME, didn't work, I unistalled AIR and DAME and reinstalled them again, it worked.

2- Wow, sprite editor in DAME would be awesome but with DAME always acting with delay, I hope it would work great.
Check out Pickle for sure: http://www.pickleeditor.com/

3- Object finder is nice but I would like to select a sprite and know what type it is rather than the other way around.

4- How I can have animated tiles? I remember you said something in Complex Claws demo but I can't find how.

5- I've worked almost non stop with DAME for past few days (and will do for next 18 days) so I have alot of features that I want:

A- Tile Matrix has bug that when I drag a tile into it, like 80% of times, it either won't place a tile into matrix's cell or puts a wrong tile into it. ( I suspect times that I see it won't put a tile there, it is actually put a wrong tile but it's empty and I believe it didn't do anything).

B- Again about Tile Matrix. Please remove that window that says " Do You want to keep this matrix?", it's very annoying. If I want to save, I will. What makes it more annoying is that it's not like normal windows message window that we can press tab and go to No and press space to select. It greatly reduces my process speed that when I want to put a single tile, I have to close Tile Matrix, press no to that message window, everytime.

C- Again about Tile Matrix. When I draw with a tile and then change it's tiles, please don't change anything that is already drawn. If I want I can store the matrix and draw with it again. Now if I want to draw with several combinations of matrix but do not need to store them, I can't just make a matrix, draw with it, change it a little and draw again because the new matrix will replace what was drawn with the previous one.

D- It would be nice if I could change background of tiles in Tiles menu. (the window that we select tiles from and put on the screen). (since lots of tiles are in black and white and transparent, it's very hard to see which is which)

E- Please make TAB to switch between Layer and Sprites tab.

F- Wish we could chain DAME with FlashDevelop so after each export, it would fire up FlashDevelop and call it's Compile and Run, instead of the message window that says export was OK. ( and doesn't remember I don't want to see it since it doesn't store that settings in the settings)

G- Can you make it act faster? It's acts with a lot of delay, like when I move my cursor over tiles, it takes 2-3 seconds to hover into the new tile.

That's what I remember for now but my most important requests are Tile Matrix ones because they are very handy, thanks to you.

I'll post back with more feedback.

Best regards,
test84.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Mar 3, 2012
1- Hmmm... it could have been something in the settings file. If it happens again then make a backup of your DAME settings file and delete it and if that fixes it then send me the settings file.

2- I hope so too :)

3- Right now you can right click on a sprite to edit it (and thereby find out what it is). In DAME 3 the status bar will display the name of the current selected sprite.

4- There is nothing in any of the current samples to demo this. I'm hoping to do a sample for DAME 3 that shows off every recent feature. For now, you would need to write your own exporter, and indeed flixel doesn't support them either so you would need to write code for that. Look in the exporter help docs under CreateTileDataText

A- I've seen this occasionally, though usually only the first time I use the matrix. I'll try to track it down.

B- I've added an option to remember your answer for this in DAME 3.

C- Maybe in DAME 4....

D- Done in DAME 3

E- This is difficult, because with DAME 2 and the ability to rearrange the layout as much as you like, there is no implicit state of having the layer and sprite panes under tabs. It works like Visual Studio or Flash Develop docked panes now. I'll see what I can do, but the best way would be to have a shortcut for each that would try to promote them to the top pane if they're tabbed.

F- I'd have to investigate if this is possible with Air. Ideally, it would be best to allow custom command lines to run on success, maybe tied into the lua script...

G- I'd need an example project to observe this on in order to fix this.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Mar 3, 2012
Thanks for the answers.
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Sat, Mar 3, 2012
One nice thing would be to have individual projects, that have the same settings, files, and exporting files for each .dam file.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Mar 4, 2012
I found the steps about CTRL+D bug: If you select some tiles in a tile layer and go to a sprite layer, you can't de select them and you have to get back to that tile layer to deselect.
Title: Re: DAME - a new map editor made using flixel!
Post by: Coman on Tue, Mar 6, 2012
 ;)
Hi, I'm new to flixel
and Sorry that I'm not good at English.
(T T , in fact I am typing in the dictionary help, I hope you can understand the meaning of my expression)

I have one question about sprite layer:
How to export data of sprite layer?
I export map layer's data to .csv file and it works well but I don't know how to deal with sprite layer.

I earnestly studied your sample(SimpleClaws and ComplexClaws)
I found that you added all coins in level.as manually. So many lines code.
Is there a way to automatically add all coins according to what I set in the Dame?
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Mar 6, 2012
About Sprite Editor and Tile editor in DAME3: If you would add the ability to paste clipboard data that comes from Photoshop and keep it's transparency while pasting it.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Mar 6, 2012
;)
Hi, I'm new to flixel
and Sorry that I'm not good at English.
(T T , in fact I am typing in the dictionary help, I hope you can understand the meaning of my expression)

I have one question about sprite layer:
How to export data of sprite layer?
I export map layer's data to .csv file and it works well but I don't know how to deal with sprite layer.

I earnestly studied your sample(SimpleClaws and ComplexClaws)
I found that you added all coins in level.as manually. So many lines code.
Is there a way to automatically add all coins according to what I set in the Dame?
Hi,
Actually the code that adds all those sprites was generated by exporters in DAME! For simpleClaws you run the flixelSimple exporter and for ComplexClaws you run the flixelComplex exporter. There is also a basic xml exporter that generates them as xml data. A more advanced xml exporter will be coming with DAME 3 which is capable of generating all of the data required to run those samples.

About Sprite Editor and Tile editor in DAME3: If you would add the ability to paste clipboard data that comes from Photoshop and keep it's transparency while pasting it.
I don't think that's possible :( The transparencies are internal. At least, there's no way I can get the transparencies in Air, and I've tried going from one professional paint package to another to see how they behave and transparencies appear to be lost in those too. If anyone has any idea how to do it then do let me know!
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Tue, Mar 6, 2012
Thanks for the reply.

1- Toggling Select/Move on and off is really cumbersome. I wish we could make it more intelligent, like when you decide a sprite from Sprites tab, you probably want to insert it to the map, right? So it would be nice if it would toggle off the Select/Move automatically.

I find myself and my designer lots of times pressing V and B to toggle it on and off where I believe we can track cases and find situations that it would turn itself on and off in a more smart manner.

2- I want to have some of my tiles as breakable. So would you tell me how I can set a Breakable property on tiles and how to handle it in the code?

3- I found out how to set property for each tile in DAME but I donno how to catch it and write the actual SetTileProperty code for it (don't tell me DAME can do it for me!) I can catch when the whole FlxTileMap is getting processed to the call back but how I can find which ones have that property that I set in DAME?

4- I tried to use "property" that is passed to callback function but it's weird, I attached a picture of inside it so you can see what I'm saying. I believe there shouldn't be %DAME_tiledata% stored in the first cell of that array. And I didn't change that part of complex exporter, it's same as one supplied with DAME.

BTW, I've been using Zoom out (at your own risk) and it was fine so far.
Title: Re: DAME - a new map editor made using flixel!
Post by: Coman on Tue, Mar 6, 2012
Thanks !
I got it  ^_^
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Mar 7, 2012
1. I'll look into trying to catch some of those cases. At the very least it makes sense that if you select a sprite entry and are on a sprite layer then you would go straight into paint mode.
2. It would have to be done as a custom property just as you were doing in 3 (since breakable is not a standard behaviour)
4. %DAME_tiledata% is added as a property to the tilemap layer directly from the exporter itself, so that's correct. It's done this way so it can be extremely generic and flexible. It only adds that property if there are any tile properties. Remember that these exporters are trying to be fairly generic and lightweight rather than being nice and streamlined and optimised or generating very pretty code! So when you get your properties, you just need to look for an entry called %DAME_tiledata% and cast the value as a Dictionary. Then you just iterate through all the entries. The keys are the tile ids where one or more properties are set and the values are the data you set on that tile property. It's basically a property entry that stores a dictionary of tiles mapped onto yet another set of properties per tile! Here's an example:

Code: [Select]
i = properties.length;
while(i--)
{
if ( properties[i].name == "%DAME_tiledata%" )
{
// Retrieve the dictionary for this layer.
var tileProperties:Dictionary = properties[i].value;

// Iterate through every tile in the dictionary.
for ( var tileIdObj:Object in tileProperties )
{
var tileId:int = tileIdObj as int;
// Retrieve the properties array for that tile.
var tileProps:Array = tileProperties[tileId];
var j:int = tileProps.length;

// Iterate through every property on that tile.
while ( j-- )
{
var propname:String = tileProps[j].name;
if ( propname == "breakable" )
{
// do stuff...
}
}
}
}
}
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Mar 7, 2012
Thanks Charles, That piece of code is exactly what I need! Genius.

One thing about DAME exporter settings file, it would be nice if it could store address as relative asn I'm passing DAME files back and forth with my designer, we always have to change the address of AS3 and CSV files since obviously their paths are different from mine and his machine.

As you suggested, In order to create animted tiles, I read about CreateTileDataText but couldn't get my head around what do I have to do about it.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Mar 8, 2012
(The mythical) DAME 3 has an option in the exporter window to store (and convert) paths as relative.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Mar 8, 2012
Great.

I'm positive that import method doen't work at all. I tried any possible combination with it and none of them worked. It's very crucial for us and the options it has are exactly what we need but I have no idea why the don't work.

Hint: the file I'm trying to merge comes from another PC, so it's paths are different from this PC but I tried both the same path and relative path options, none working so far.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Mar 11, 2012
We faced that problem that DAME files would not load correctly on one PC, which is Win XP. I tried uninstall/reinstalling AIR and DAME but didn't help. I tried copying another DAME from another PC but it just opened it's first level without shoting any tile graphics.

I tried to open the dam file in notepad++ and I see that no level groups are there. I thought DAME kinda messed that file but that's not stable because another time that it could not load the level, it has all the data in it.

Thanks.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Mar 11, 2012
After hours and hours of trying anything-that-possibly-comes-into-my-mind I found a way to at least make DAME work: by deleting it's folder from %appdata% folder. It's probably something to do with WinXP since I don't have this problem with another Win7 but maybe it's just OK with these systems.
Title: Re: DAME - a new map editor made using flixel!
Post by: LaughingLeader on Sun, Mar 25, 2012
Hi everyone. I've been using DAME for the past couple of weeks and I'd like to share that DAME is an absolute time-saver for me. It took me a little while to figure out how to write a custom exporter, but once I got that working, my level data is automatically built when I export it from DAME, which is tremendously helpful. Thank you for all the time and effort you put into making/working on DAME, XanderXevious.

I have some feedback about some minor bugs I've experienced with DAME.

I've noticed that when I update a sprite's property, position, or pretty much change anything relating to it, I have to close and re-open the project for the new data to export correctly(I don't have to close DAME completely, as going to New, then back to Recent Files -> MyProject correctly updates the sprites for export).

The other bug I've encountered is that if I leave DAME open for a while (I have dual monitor setup, so I like to leave DAME running on my other window), DAME tends to run slower when I tab back to it.

Other than those minor bugs, everything else has been great.
Title: Re: DAME - a new map editor made using flixel!
Post by: vol53 on Sat, Mar 31, 2012
On the next version of Dame, can you make the interface as simple as in the interface like Tiled? And possibly getting rid of the white box, in which everything can be painted.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sun, Apr 8, 2012
Note to self and probably hint to others:

If you make two layers that their scroll factor is 1 and you use complex exporter and you try to read the baseminx and other values from your base level file, it can get faulty because it's apparently designed for games with one map layers with scrolling level of 1. So be careful or change the behavior that maxx and other related values are calculated.
Title: Re: DAME - a new map editor made using flixel!
Post by: Jeff on Mon, Apr 9, 2012
I have downloaded the latest Master of Flixel (2.55 I think) and Flex SDK 4.5.1 wich is the latest too... I really dont get what is going wrong here as nobody else has encountered that problem before and I have done nothing else than importing Flixel to the samples source...  |-I

Update: After hours of thinking and trying out different versions and stuff I recognized something in the project settings: It was somehow set to Flash Player 9.  I feel very dumb right now.  :P

I had the exact same problem with exactly the same error messages, so thank you for giving the update: the settings were initially set to Flash Player 9, which caused the problem for me too. :)

Would it make sense to change the default Flash Player setting for Dame?

I'm just starting to get to know Dame, and already it seems like an excellent tool for Flixel. I just wish I had more time to work with this.
Title: Re: DAME - a new map editor made using flixel!
Post by: paala on Tue, Apr 10, 2012
Is it possible to have in DAME sprites(images) and then export them as csv like  tilemap?
This is very useful to me since i don;t have the complicated structure like in dame exporters, and I would like to place the sprites with dame on tilemap and then export them as csv.
Thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Wed, Apr 11, 2012
So, Charles, wazzup? Can we get a sneak peek at DAME 3 ? I'm damn curious! I'd like to start building an exporter for flixel and axel! Will You dip into www.axgl.org (http://www.axgl.org)? *Hope so...*
Title: Re: DAME - a new map editor made using flixel!
Post by: KunoNoOni on Fri, Apr 13, 2012
Is there a tutorial or something which talks about paths/platforms in DAME?


-KunoNoOni
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Thu, Apr 19, 2012
How in my exporter (which is basically like ComplexExporter) make one specific sprite layer not "add" ed in the generated level file?

In the exporter file, you check that if "addGroup" is true, then you add it to the master layer and it's totally fine, thing is, I want it to not add the sprite layer that has player inside it.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Fri, Apr 20, 2012
I've opened up DAME 3 for a private beta.

If anyone's interested then PM me, or email me and I'll send you a link.

Public release in 2 weeks, I think!
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Fri, Apr 20, 2012
At last!
Title: Re: DAME - a new map editor made using flixel!
Post by: mol on Fri, Apr 20, 2012
awesome!
Title: Re: DAME - a new map editor made using flixel!
Post by: mol on Sun, Apr 22, 2012
just a request

could you add a function to a group to move all items in it by a specific amount?

to be more specific lets say i have a group with 6 sprite_blocks in different sprite layers, one tilemap in a map layer and these being their coordinates

block1 x=0   y=0
block2 x=5   y=0
block3 x=10  y=0

block4 x=0    y=5
block5 x=5    y=5
block6 x=10  y=5

tilemap x=20 y=20

and lets say i want to move them 5 units in x and 5 units in y
giving the new coordinates:


block1 x=5   y=5
block2 x=10   y=5
block3 x=15  y=5

block4 x=5    y=10
block5 x=10    y=10
block6 x=15  y=10

tilemap x=25 y=25

could you do this?

thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Apr 22, 2012
In DAME 3 there will be a Move Group tool that lets you drag the group to move everything within it around.
Title: Re: DAME - a new map editor made using flixel!
Post by: Jeff on Tue, Apr 24, 2012
So far I've been only using DAME for creating the tilemap for a test level, in which I've been testing the functionality of some of the core sprite objects for my game. Now I'm trying to proceed to actually using DAME for inserting sprites and putting in multiple levels. The software is a huge help in designing the levels, but I'm wondering a couple of things:

Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, Apr 24, 2012
There are a few visibility options. You can turn on onion skinning so it only shows the current layer or the current group, and control the opacity of other layers and groups.
There are probably many different ways of visualising and selecting layers.
You can actually set it up so that a file is a level or a layer is a level. It's entirely up to you how you do it as the whole thing is pretty generic and configurable with custom exporters. I prefer the Groups as level method, but I've seen others do it different ways.
The reason the flixelComplex exporter was done this way was because it was the method most compatible with the method flixel users were working before DAME was released and because it's the most simple for new users to understand.
DAME 3, when released (not in the current beta), will come with a very good(I hope) XML exporter and a sample which supports dynamic loading of assets too. It will be able to support the same kind of maps that flixelComplex can but with a few new features. Actually, I build the XML exporter for a game I'm working on where I wanted to remove the need to install FlashDevelop from the pipeline.
Title: Re: DAME - a new map editor made using flixel!
Post by: Jeff on Wed, Apr 25, 2012
There are a few visibility options. You can turn on onion skinning so it only shows the current layer or the current group, and control the opacity of other layers and groups.
There are probably many different ways of visualising and selecting layers.

Yes, you can set the other levels you're not working on as invisible, so it's possible to work on just one level at a time. I just thought that it might be more practical, if layers and levels could be two entirely different things. In other words, there would be a two-dimensional array of sorts: on one axis you have the layers, and on the other axis the levels. Then:

I need to emphasize that this is an excellent software which I very much appreciate. :) I'm just trying to get used to it and also to learn if there is a specific reason for this kind of an approach that I just haven't realized - or of course if what I'm trying to describe here actually has some serious shortcomings or if it would be a significantly more difficult thing to implement.

By the way, related to the first point, what does "duplicate" do for groups? Duplicate empty does what it would imply, but when I click "duplicate" on a group it doesn't seem to do anything.


Quote
The reason the flixelComplex exporter was done this way was because it was the method most compatible with the method flixel users were working before DAME was released and because it's the most simple for new users to understand.

Okay. The first point clarifies things, but I'm not sure about the latter though. I'm a new user, and I think I would adopt the XML approach more quickly. But we'll see about that.

Quote
DAME 3, when released (not in the current beta), will come with a very good(I hope) XML exporter and a sample which supports dynamic loading of assets too. It will be able to support the same kind of maps that flixelComplex can but with a few new features. Actually, I build the XML exporter for a game I'm working on where I wanted to remove the need to install FlashDevelop from the pipeline.
Looking forward to that. :)
Title: Re: DAME - a new map editor made using flixel!
Post by: trq on Wed, Apr 25, 2012
I don't know if it was done berfore, but I'm gonna share my advanced XML+CSV exporter.  (http://dl.dropbox.com/u/24325446/AdvancedXMLCSV.zip)
It's basicly old good xmlExample exporter with following improvements:
Here's example of output:
(http://dl.dropbox.com/u/24325446/xml.png)
Title: Re: DAME - a new map editor made using flixel!
Post by: Jeff on Thu, Apr 26, 2012
I don't know if it was done berfore, but I'm gonna share my advanced XML+CSV exporter.  (http://dl.dropbox.com/u/24325446/AdvancedXMLCSV.zip)
It's basicly old good xmlExample exporter with following improvements:
  • Tilemaps are CSV strings embedded in XML with name, scroll factor and width\height params
  • Objects has Classname, x\y, angle, scaling, flipping and all user defined properties
Here's example of output:
(http://dl.dropbox.com/u/24325446/xml.png)

Thanks for sharing. Looks good! With the tilemaps embedded as CSV strings, this is about exactly what I had in mind. It's good to have alternatives. I think I'll either start with this one or go directly for the DAME 3 exporter. I will probably try this out during the upcoming weekend.
Title: Re: DAME - a new map editor made using flixel!
Post by: Jeff on Thu, Apr 26, 2012
Thanks for sharing. Looks good! With the tilemaps embedded as CSV strings, this is about exactly what I had in mind. It's good to have alternatives. I think I'll either start with this one or go directly for the DAME 3 exporter. I will probably try this out during the upcoming weekend.

I couldn't wait and had a quick try with that XML exporter now already. Apparently it exports all the groups in the same XML. Well, that's quite okay, I think. However, this does have one quite notable shortcoming: it doesn't distinguish between the sprites that come from different groups, which is problematic. But changing this probably doesn't require many changes to the .lua file. Perhaps I'll have a look at that on saturday or sunday.

In any case, the new xmlExporter for the new version of DAME creates one XML for each group, so that should work very nicely for sprites as well! Tile properties also get exported, so this gives a good basis to work on.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, May 12, 2012
Hey folks!

DAME 3 is finally out so get it from here:
http://dambots.com/dame-editor (http://dambots.com/dame-editor)

The feature list is pretty huge. The biggest changes are these:

The UI has been slightly overhauled and the silver theme is now the default.

You can have project specific exporters and paths in exporters can be relative, allowing for easy migration of projects between multiple users. An advanced xml exporter has been included. A sample project using this, and showcasing many other features will be provided soon.

There is now a feature for adding and editing animations for sprites, and the drawing tool has been improved. It’s now possible to draw shapes on tiles and to spawn new tiles as you’re drawing - a feature that works just as easily with isometric tiles!

Path events have been added allowing you to add custom actions or info at given points along a path.

Finally, you can now zoom out much further than before and provide additionally “screen” sized grid lines, making it much easier to edit large maps than before.

For the full list check the new blog:
http://charlesgoatley.tumblr.com/post/22934529043/dame-3-released (http://charlesgoatley.tumblr.com/post/22934529043/dame-3-released)
Title: Re: DAME - a new map editor made using flixel!
Post by: camasthecat on Mon, May 14, 2012
Yes! Thank you!!

Oh, and shouldn't the links be links, not code?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Tue, May 15, 2012
Yes! Thank you!!

Oh, and shouldn't the links be links, not code?
Haha... Well spotted!

Also, I've uploaded version 3.0.1 with a couple of small fixes and one new feature - the ability to add/remove padding for every tile.
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Sat, May 26, 2012
DAME3 looks and feels great. Nice work!

Is it possible to use dame when:

Quote
Note that the tiles in the tilemap are 1-based indexed; an index of 0 means no tile.
http://axgl.org/docs/org/axgl/tilemap/AxTilemap.html

So there is no empty first tile in tilesheet.. and first tile should be 1 not 0. I guess i could fix that one with exporter, but editing is still quite messy without empty first tile.


Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, May 27, 2012
DAME3 looks and feels great. Nice work!

Is it possible to use dame when:
http://axgl.org/docs/org/axgl/tilemap/AxTilemap.html

So there is no empty first tile in tilesheet.. and first tile should be 1 not 0. I guess i could fix that one with exporter, but editing is still quite messy without empty first tile.

I'm not sure I follow... In the tilemap properties you can specify the draw index to be 0 instead of 1, then the first tile will be drawn.
Title: Re: DAME - a new map editor made using flixel!
Post by: Chelnok on Sun, May 27, 2012
Yes i did that. But tilemaplayer was filled with first tile and that is what i ment messy editing :) After (csv) export i had to fix all data (plus one for every number greater that zero). That what i ment i could fix it with exporter. I dunno.. i guess i have done something very wrong either in Dame or Axel ..or both.

I need to try again with clean project. Thanks for reply.
Title: Re: DAME - a new map editor made using flixel!
Post by: AAorris on Wed, May 30, 2012
Hi there. I've been looking at the built-in exporters for simple and complex claws, but I haven't been able to find the source projects on my Dame3 installation. Are they hosted somewhere I can't find them, or should they have been installed already? When I try to open them listed in the recent files, I get a "Failed to load file: Error #2032".

I must be missing something!
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Fri, Jun 1, 2012
Hi !

Great job on releasing v3 :)

Some feedback:

- Having a "Redo" option, in contrast to Undo, would be nice.

- Wish there was a "Save, export and run" button there that we could configure that would save the project, export it with default values and compile and run the game. I know it can be daunting but I think will turn out well.

- Wish the tiles with properies would appear like in blue, as they do in the tile property, in the game scene or when you press CTRL+H to see collidable tiles.

- I know it's intentional or not but when you remove or add a tile to a tile sheet (GREAT feature BTW!) the collide index doesn't change. I think it should in most, if not all, cases.

- Wish we could see some small enhancement we asked prior to V3, like when you select a sprite from sprites tab, it would deselect the Move mode, I listed them all in previous pages and you were OK with them and promised them for V3.

DAME is a great tool and my would be impossible without it.

For the next game I'm planning to use triggers and stuff, so I wish there were some improvements there as well as last time I checked it was very strange and couldn't figure it out.

Is it possible to have the feature to have FlxGroups that consist of different Flxsprites as sprites? It is handy in complex situations like my game where player's sprite is diffrent from it's weapons so the better approach was to have FlxGroup but I had to resort to manually overloading Draw and draw weapon manually as I could't have FlxGroup as sprite.

I try to post my wish list again in a couple of days, hopefully it can help us evne more in future games.
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Sat, Jun 2, 2012
More wishlist:
- When Move is selected and you click on a tile, it should be clear that I want to put that tile on, so please turn off the move mode.

- Wish we could have [better] support for animated tiles as I wanted but couldn't get it to work previously.

- I asked this previously and you said it's apprently not possible but switching between Sprites and Layers tab should be nice. I know you try to make DAME versatile but I think being pragmatic about it helps, like see how people are actually using DAME after 3 versions and try to adapt with them a tad.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Jun 3, 2012
Hi there. I've been looking at the built-in exporters for simple and complex claws, but I haven't been able to find the source projects on my Dame3 installation. Are they hosted somewhere I can't find them, or should they have been installed already? When I try to open them listed in the recent files, I get a "Failed to load file: Error #2032".
Hi,
I moved the samples to a separate download file now as they were starting to get big. You can find them on this page: http://www.dambots.com/dame-samples (http://www.dambots.com/dame-samples)

Hi !

Great job on releasing v3 :)

Some feedback:

Thanks for the feedback and suggestions. Yeah, there were a couple of things that didn't make the cut in the end. I'm taking a small break from DAME for a while, unless any major bugs come up, but I'll try and get it open sourced real soon. I'm still looking for contributors who can make it even better... I will do that select sprite, deselect move feature next, though :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Jun 10, 2012
DAME 3.0.3 is released now.

Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Tue, Jul 3, 2012
I've been anticipating this release for a long time! Really glad to see that it's arrived!
Downloaded, and I'll be checking it out today!
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Jul 11, 2012
Is there any support for animated tiles in DAME, or at least in newer versions?

I would be interested to know about some clues to do so at least.
Title: Re: DAME - a new map editor made using flixel!
Post by: TheCreator on Wed, Jul 11, 2012
I'd like to know if it's possible to make a map layer invisible so that the tiles in it can't be seen but the collisition detection can still be checked.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Jul 15, 2012
Is there any support for animated tiles in DAME, or at least in newer versions?

I would be interested to know about some clues to do so at least.
Actually, they've been in DAME since version 2. However, after reading your query I've just uploaded a new addition to the DAME samples that should help you out here: http://dambots.com/dame-samples

I'd like to know if it's possible to make a map layer invisible so that the tiles in it can't be seen but the collisition detection can still be checked.
You can either set the drawIndex in the layer properties to something really high or (and this is preferable) add a boolean property to your map layer called "hidden" and then when you parse the properties you can just set the layers visibility to false if it finds this property.
Title: Re: DAME - a new map editor made using flixel!
Post by: LaughingLeader on Wed, Jul 18, 2012
I'd like to know if it's possible to make a map layer invisible so that the tiles in it can't be seen but the collisition detection can still be checked.

A simple solution in your code (after you already have your map layer exported and working in-game) would be to just set your FlxTilemap.visible to false. You can still collide with it, but it won't be visible.

Like so:

Code: [Select]
public function createCollisionMap():void
                   {
collisionMap = recycle(FlxTilemap) as FlxTilemap;
collisionMap.loadMap(new collisionCSV, levelData.collisionTilesPNG, 16, 16, 0, 0, 1, 1);
collisionMap.visible = false;
   }
Then in your Playstate:
Code: [Select]
FlxG.collide(Registry.Player, Registry.gameLevel.collisionMap);So you can still collide with the map and everything, but it's invisible. If you wanted, you could set a key to toggle it's visibility as well. Sorta make a "debug vision" kind of thing.
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Wed, Jul 25, 2012
Hey!

Still lovin your work! Good Job so far with 3.0!

I just have a small feature request on mind that I wanted to share:

I'd like to "link" layers to a collision Layer like in the Weltmeister Editor from ImpactJS:
http://vimeo.com/17163174 (http://vimeo.com/17163174)

Because when I duplicate the mapped out matrixed layers, they won't work with the 2Tiles for 0and1 on my collision map that lays all the way in the back. Or can anyone think of a trick?

Thank You!
Keep it up!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sun, Jul 29, 2012
DAME is now open source.

https://github.com/XanderXevious/DAME (https://github.com/XanderXevious/DAME)
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Fri, Aug 3, 2012
The latest updates to DAME are great. :)

But...heh...when I have the grid turned on, it doesn't stay visible on sprite layers. It shows if I'm panning around, but disappears as soon as I stop. Map layers are fine.

Anyone else experiencing this? I miss my grids. :(

EDIT: Okay, it seems the grid stays on if I have a sprite selected for editing, just not otherwise. Maybe that's even a good thing (need some time with it to see if it impacts my workflow).
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Wed, Aug 29, 2012
If possible, was wondering if possible to do these two:

1) Store addresses of AS3 and CSV of a project (or exporter) locally. I back and forth with my game designer and each time he gives me his Levels.dam file and I want to export, I have to reset the CSV and AS3 folders in the exporter manually, so does he.

2) When we export, a message box pops up saying that export was successful and do we want to see this dialogue box again and if I say no, it doesn't show up but DAME doesn't store that setting and if I re-open DAME and export, that message box pops up again.

And I suggest you add Rot Gut to list of games that have been made with DAME, perhaps, proudly.
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Mon, Sep 10, 2012
1) Actually you can already do this.. if I'm understanding correctly. When you export just tick the "store relative file paths".
2) And thanks for letting me know about the game. I just had a play and it's pretty cool. I'll add it to the list. I have a few to add...
Title: Re: DAME - a new map editor made using flixel!
Post by: test84 on Mon, Sep 17, 2012
1) I just saw that. Problem is game project's address is different between machines, hope I'm clear:

In my machine when I set AS3 and CSV folders and export and save and give it to my game designer, then he has to change AS3 folder and CSV folder again because it's saved into the file. I hoped it would stay in DAME rather than the file.
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Mon, Sep 17, 2012
Heya! I just wanted to ask if there is a way to load the levels externally, to give our players the option to create their own levels with DAME... I'll start a thread for this because I think it will be a bit more than a one shot awnser? But I thought I might give it a shot here first.

I was a huge fan of the quake series... so I wanted to set it up like they used to. That modders only have to make a *.zip with all the files in a certain hirachy then load this file ingame (with UI) or just place it into a local directory ... is there a chance that I could manage to do this or can I save my time digging into this any further because of some reason?

Or has someone done this allready and can point me to a nice place to start looking?
Title: Re: DAME - a new map editor made using flixel!
Post by: Backward pieS on Tue, Sep 25, 2012
+1 for having players able to load levels externally!

Seems like it shouldn't be *too* hard for someone who knows what he's doing...but that isn't me. :)
Title: Re: DAME - a new map editor made using flixel!
Post by: LaughingLeader on Tue, Oct 2, 2012
Heya! I just wanted to ask if there is a way to load the levels externally, to give our players the option to create their own levels with DAME... I'll start a thread for this because I think it will be a bit more than a one shot awnser? But I thought I might give it a shot here first.

I was a huge fan of the quake series... so I wanted to set it up like they used to. That modders only have to make a *.zip with all the files in a certain hirachy then load this file ingame (with UI) or just place it into a local directory ... is there a chance that I could manage to do this or can I save my time digging into this any further because of some reason?

Or has someone done this allready and can point me to a nice place to start looking?

I'd look into loading external files with URLLoader (or using the File and FileStream classes if you're using AIR), and then set up things so that your game can generate the level from the file (whether it's a xml, .csv, or text file). It's definitely not a simple answer, and it's more of a programming sort of thing than something DAME does "out of the box" (since DAME is really just a tool to be able to build levels and export them into whatever format you want for use in your game).

Here's some links:

http://www.actionscript.org/forums/showthread.php3?t=161491 (http://www.actionscript.org/forums/showthread.php3?t=161491)
http://stackoverflow.com/questions/6342986/building-a-tile-game-how-to-load-the-level-data-externally (http://stackoverflow.com/questions/6342986/building-a-tile-game-how-to-load-the-level-data-externally)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Thu, Oct 4, 2012
Heya! I just wanted to ask if there is a way to load the levels externally, to give our players the option to create their own levels with DAME... I'll start a thread for this because I think it will be a bit more than a one shot awnser? But I thought I might give it a shot here first.

I was a huge fan of the quake series... so I wanted to set it up like they used to. That modders only have to make a *.zip with all the files in a certain hirachy then load this file ingame (with UI) or just place it into a local directory ... is there a chance that I could manage to do this or can I save my time digging into this any further because of some reason?

Or has someone done this allready and can point me to a nice place to start looking?

Hi,

One of the DAME samples on my website already does this.
Check out the Xml dynamic load in the sample there:

http://dambots.com/dame-samples (http://dambots.com/dame-samples)

It's worth checking out those samples as it will show you xml exporting/importing, dynamic loading, isometric, stacked tilemaps.
Title: Re: DAME - a new map editor made using flixel!
Post by: Jeff on Mon, Oct 15, 2012
Hmh, a really silly question: I've somehow lost the tileset from the map editing layer, so now I can only use the tile that I've already selected or the ones I get with the pipette. The "restore lost tool windows" doesn't help. How do I get it back?
Title: Re: DAME - a new map editor made using flixel!
Post by: Rock Forever on Mon, Oct 22, 2012
hey XanderXevious, for some reason, i cant see the download link on your web page, so, can you post it here?
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Thu, Oct 25, 2012
There's an "install now" button in the bottom part of the black d in the red square
Title: Re: DAME - a new map editor made using flixel!
Post by: Rock Forever on Thu, Oct 25, 2012
There's an "install now" button in the bottom part of the black d in the red square

seeing nothing, maybe this "Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 10.1 or higher installed."
weird, because flash player its constantly updated and i have 11.something, thats why im requesting XanderXevious to post a direct link on the OP. if possible :)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Oct 27, 2012
seeing nothing, maybe this "Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 10.1 or higher installed."
weird, because flash player its constantly updated and i have 11.something, thats why im requesting XanderXevious to post a direct link on the OP. if possible :)
If you scroll down to the middle of the DAME page on my website Ijust under the feature list) you'll see that there are already direct links for everything you need to install. :)
Title: Re: DAME - a new map editor made using flixel!
Post by: zoorroo4 on Mon, Oct 29, 2012
My tile panel is´nt showing up.. WTF? Was working great a few days ago..
Title: Re: DAME - a new map editor made using flixel!
Post by: megablast2 on Sat, Nov 3, 2012
Hello :),

How can  I rip an image to create a tilemap layer and tileset and then sort the tiles's tileset  into a correct place?
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Wed, Nov 7, 2012
Very minor bug, but choosing "Check for updates" currently provides no response (not sure if it successfully does the check or not, but there's no notification)
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Nov 14, 2012
My tile panel is´nt showing up.. WTF? Was working great a few days ago..
Most likely something got screwed up in your settings file. It's an xml located... somewhere... on windows 7 for me it's here: C:\Users\Charlie\AppData\Roaming\DAME.dambots\Local Store\settings.xml
Rename it and then open DAME. If it fixes it, then close DAME and restore the original file. Maybe have a look at the xml. Probably just removing the contents between the two <layout> tags might help.

Hello :),

How can  I rip an image to create a tilemap layer and tileset and then sort the tiles's tileset  into a correct place?
With a layer group selected right click on the menu and select Add->Rip Tilemap... In fact, if you click on the main menu and select "Help Contents" and then select "Ripping Tilemaps" there's a small section on it there.

Very minor bug, but choosing "Check for updates" currently provides no response (not sure if it successfully does the check or not, but there's no notification)
There haven't been any updates since... a long time. I've been extremely busy and still hoping somebody else can take up the mantle from me and work on DAME from now on, plus there haven't been any bugs reported in... a long time. I could add an update to provide a response if you click "Check for updates" and there aren't any updates but you'll only know when the update is there once it's there... but my mind is kind of folding in on itself just thinking of what I just wrote.
Title: Re: DAME - a new map editor made using flixel!
Post by: xyroclast on Wed, Nov 21, 2012
There haven't been any updates since... a long time. I've been extremely busy and still hoping somebody else can take up the mantle from me and work on DAME from now on, plus there haven't been any bugs reported in... a long time. I could add an update to provide a response if you click "Check for updates" and there aren't any updates but you'll only know when the update is there once it's there... but my mind is kind of folding in on itself just thinking of what I just wrote.

Haha, I can see the Catch-22 there. No worries!
Title: Re: DAME - a new map editor made using flixel!
Post by: Rock Forever on Thu, Nov 22, 2012
(http://puu.sh/1tdZQ)

do you trust me now? edited: tried in friends pc and nothing... maybe its a browser specific bug or something, can you check that?
because in google chrome works fine, dunno on safari or mozilla or i dont know. I use IE 9, i already have the program (BTW its awesome :D ) but check it anyways :)
Title: Re: DAME - a new map editor made using flixel!
Post by: Gama11 on Sat, Nov 24, 2012
Why the hell would you use IE (and call it "awesome" D:) when knowing about good browsers like Chrome? :P I just tried, and I'm having the same issue in IE8, so I guess it is a browser-specific thing.
Title: Re: DAME - a new map editor made using flixel!
Post by: Rock Forever on Sat, Nov 24, 2012
NONONONONO i mean, DAME is awesome :D
Title: Re: DAME - a new map editor made using flixel!
Post by: pkiller162 on Sun, Nov 25, 2012
Hi

Im having issues with the rotate function.
I create a new group and put a map layer within that group.
I then set up my tilesheet within theat map layer.
I can place tiles fine but cannot scale or rotate them; just move them.
Any ideas?
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Sat, Dec 8, 2012
do you trust me now? edited: tried in friends pc and nothing... maybe its a browser specific bug or something, can you check that?
because in google chrome works fine, dunno on safari or mozilla or i dont know. I use IE 9, i already have the program (BTW its awesome :D ) but check it anyways :)
It should be fixed in IE now. Turns out I just had to move my swf embed script to the end of the html.

Hi

Im having issues with the rotate function.
I create a new group and put a map layer within that group.
I then set up my tilesheet within theat map layer.
I can place tiles fine but cannot scale or rotate them; just move them.
Any ideas?
Tiles in tilemaps cannot be rotated or scaled. A tilemap is for fixed tiles.
If you want to rotate or scale things you need sprites. DAME allows you to add sprites or spritesheets.


Also, I've just updated DAME, mainly with map layer templating, options to prevent frame selection in sprites, and to restrict rotation of sprites, as well as allowing more restrictions in how end users can work with DAME maps.
Title: Re: DAME - a new map editor made using flixel!
Post by: KraHen on Sat, Jan 5, 2013
This is my first post ever on this forum, but I really need to speak up now. THANK YOU!

I`m using a Flixel/Box2D/NME/HaXE combination (all of these for the first time) and with the simple XML exporter of yours I have been able to create a physics-enabled, tilemap-based world in like 2 hours. I really really appreciate the work you have put in this software, with this I`ll be able to create my game in no time!
Title: Re: DAME - a new map editor made using flixel!
Post by: XanderXevious on Wed, Jan 9, 2013
Glad to see you're making good use out of DAME KraHen :)

Also, I've uploaded a new version. Now at 3.1.1
Title: Re: DAME - a new map editor made using flixel!
Post by: zoorroo4 on Mon, Feb 25, 2013
I´m trying to make a custom exporter.

How do i get paths that is attached to sprites?
I can check if a path has an attached sprite. But i cant get a hold of that sprite to check the class name and properties of it. How do i do that?
Title: Re: DAME - a new map editor made using flixel!
Post by: Mystic on Mon, Apr 29, 2013
Hello!

Glad to join your wonderful community! Please excuse my English, I hope we can manage to understand each other :)

I'm using this great DAME editor. When I'm trying to use the game level that I made with DAME in my game project, the compiler refuses to build my project at the folloving code line in the mylevel.as generated by DAME:

Code: [Select]
mainLayer = layerBasicLayer;
Error: Access of undefined property layerBasicLayer.

I hope someone here can help me to solve this terrible problem with my project :)

P.S.: Flixel is beautiful
Title: Re: DAME - a new map editor made using flixel!
Post by: c023-DeV on Mon, Jul 8, 2013
Heya,

first of all DAME ROX ... still, been working the hell out of it, great tool, you get my full recommendation! =)

I have one problem with the complex exporter, it seems to ignore different scroll values for sprite layers. When I have background maps that should only scroll like: y:1 and x:0.9 the result in the final .as is 0.9 on both axis =(

It works with tilemaps, its just the sprite layers that do this, and my project is getting too big to change them manually, any fix for this?

Thanks!
Title: Re: DAME - a new map editor made using flixel!
Post by: Titch on Tue, Jul 30, 2013
So for the past few days I was struggling to get DAME to work with Axel, due to tile indexing issues; since Axel doesn't include the 0 indexed transparent tile so all the tile ids for the numbered tile where off by 1.

It turns out all I had to do to make it work is go into AxTilemap and comment out one line at 219.
//tid -= 1;

Boom. Now it's working.
Title: Re: DAME - a new map editor made using flixel!
Post by: Arkeus on Tue, Jul 30, 2013
So for the past few days I was struggling to get DAME to work with Axel, due to tile indexing issues; since Axel doesn't include the 0 indexed transparent tile so all the tile ids for the numbered tile where off by 1.

It turns out all I had to do to make it work is go into AxTilemap and comment out one line at 219.
//tid -= 1;

Boom. Now it's working.

I've been meaning to make that configurable, to make it more compatible with tools like DAME...
Title: Re: DAME - a new map editor made using flixel!
Post by: GeoKureli on Fri, Oct 11, 2013
Hey Xander, I've been using DAME for a while now, and its the greatest editor I've seen out there. I just forked your git repo because I noticed some bugs I'd like to fix, and I'd really like to make some features that are specific to the games I'm working on. However I can't seem to run the project. I'm getting 10 of these errors:
Code: [Select]
C:\Users\Yeehaw McKickass\Documents\Flash Develop\DAME\DAME\src\com\UI\SpritesTab.mxml(407): Error: The style 'borderSides' is only supported by type 'com.UI.MyTree' with the theme(s) 'halo'.
and one of these:
Code: [Select]
C:\Users\Yeehaw McKickass\Documents\Flash Develop\DAME\DAME\src\com\UI\PopupWindow.mxml(4): Error: Invalid value:  right.  It must be one of left, center, auto.
Any idea why I'm having this issue. I'm using whatever the latest FD version is and I haven't touched the project properties from the values set in your git.