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

XanderXevious

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

paala

  • Contributor
  • ****
  • Posts: 250
  • Karma: +0/-1
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #421 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 )
{

Artofacks1

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

XanderXevious

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

Titch

  • Contributor
  • ****
  • Posts: 270
  • Karma: +0/-0
  • Thing with the guy in the place.
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #424 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.
Free cake whippings every day at #flixel on irc.freenode.net.

XanderXevious

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

XanderXevious

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

yuewah

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

XanderXevious

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

yuewah

  • Member
  • **
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #429 on: Sun, Apr 17, 2011 »
yes, you are right. thx a lot

Loupax

  • Member
  • **
  • Posts: 81
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #430 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...
  • In flixelSimple exporter, the custom constructor text doesn't seem to work.
  • 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!
As the size of an explosion increases, the number of social situations it is incapable of solving approaches zero.
--Vaarzuvius
My blog!

XanderXevious

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

Loupax

  • Member
  • **
  • Posts: 81
  • Karma: +0/-0
    • View Profile
Re: DAME - a new map editor made using flixel!
« Reply #432 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!
As the size of an explosion increases, the number of social situations it is incapable of solving approaches zero.
--Vaarzuvius
My blog!

XanderXevious

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

bakana

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

Sparkky

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

XanderXevious

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

thechaosengine

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

bakana

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

thechaosengine

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