Author Topic: DAME - a new map editor made using flixel!  (Read 201286 times)

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #40 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...

OmegaStorm

  • Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
    • OmegaStorm Productions
Re: DAME - a new map editor made using flixel!
« Reply #41 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.

Garmichael

  • Member
  • **
  • Posts: 89
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #42 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.



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 :) :) :)

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: DAME - a new map editor made using flixel!
« Reply #43 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 :)
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: DAME - a new map editor made using flixel!
« Reply #44 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.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #45 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...
« Last Edit: Sun, Sep 12, 2010 by XanderXevious »

TestSubject06

  • Member
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #46 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
Stuff.

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #47 on: Mon, Sep 13, 2010 »
Thanks for letting me know.
Added to the bug list!

TestSubject06

  • Member
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #48 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...
Stuff.

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #49 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.

Garmichael

  • Member
  • **
  • Posts: 89
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #50 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?

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: DAME - a new map editor made using flixel!
« Reply #51 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 :)
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #52 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!!

Garmichael

  • Member
  • **
  • Posts: 89
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #53 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.

Garmichael

  • Member
  • **
  • Posts: 89
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #54 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

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #55 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...
« Last Edit: Fri, Sep 17, 2010 by XanderXevious »

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #56 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.

TestSubject06

  • Member
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #57 on: Fri, Sep 17, 2010 »
Does 400% tile zoom for the tile sheets come tomorrow too?
Stuff.

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #58 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.

XanderXevious

  • Contributor
  • ****
  • Posts: 360
  • Karma: +0/-0
    • View Profile
    • Deadly Alien Microbots
Re: DAME - a new map editor made using flixel!
« Reply #59 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:

  • Inner corners, or whatever non-standard connections you like, are now possible in the tile Matrix. Click Allow Special Connections and you can select from some existing connection types or make your own - or modify them by clicking on the 8 little nodes around the edge of each tile. Red=tile must not exist in this connection, green=tile must exist and empty=it doesn't matter.
  • Up and Down arrows next to + - buttons allow you to resave the current matrix(up) and replace the matrix with the one in the db(down).
  • Fixed bug where every File->Open command after a File->Save As would actually save the file you open with whatever current map you have.
  • Zoom in tile palette to 25% and 400% for those of you who like it big or small!!
  • Small fix so tile matrix tiles properly refresh when switching layers.

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.