Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxTileMap behaves differently Neko vs CPP #1520

Closed
FryDay opened this issue Jun 7, 2015 · 6 comments
Closed

FlxTileMap behaves differently Neko vs CPP #1520

FryDay opened this issue Jun 7, 2015 · 6 comments
Milestone

Comments

@FryDay
Copy link
Contributor

FryDay commented Jun 7, 2015

In Neko, FlxTileMap behaves as expected.
screen shot 2015-06-07 at 4 09 09 pm

In CPP, however, there is what appears to be a rending issue.
screen shot 2015-06-07 at 4 09 48 pm

You'll notice on the right side, there is extra tiles and some background showing.

@Gama11
Copy link
Member

Gama11 commented Jun 7, 2015

Code to reproduce?

Flixel version?

@FryDay
Copy link
Contributor Author

FryDay commented Jun 7, 2015

This is the latest dev branch. I'll work on pulling some code out to reproduce.

@FryDay
Copy link
Contributor Author

FryDay commented Jun 7, 2015

This CSV can be used to reproduce:
http://pastebin.com/raw.php?i=bUzjVjE6

var wallsMap1:FlxTilemap = new FlxTilemap();

wallsMap1.loadMapFromCSV(theCSVfromPasteBin, "images/wall.png", 60, 60, AUTO);

wallsMap1.updateBuffers();

The wall file I am using is https://drive.google.com/file/d/0ByA4i-641qG2ZkRaTV9YaDAxS3M/view?usp=sharing

Also to note, I have not tried this on anything other then OSX yet. I will try in Windows and Linux and report back.

@FryDay
Copy link
Contributor Author

FryDay commented Jun 8, 2015

This is an issue on all platforms.

@Gama11 Gama11 added the Bug label Jun 10, 2015
@Gama11 Gama11 added this to the 4.0.0 milestone Jun 10, 2015
@leoncvlt
Copy link
Contributor

I have got a similar issue that might be related to this, my FlxTileMap is incorrectly parsed from a TiledLayer when using CSV format - works fine with base64 and 1D arrays.

More infos in this forum post: http://haxeflixel.com/forum/?place=msg%2Fhaxeflixel%2F5FgwBq6nWhs%2F3_pdcsOBCAAJ

@Gama11
Copy link
Member

Gama11 commented Dec 23, 2015

This happens because trailing commas are parsed differently on different platforms. Has nothing to do with rendering or auto-tiling.

package;

import flixel.FlxState;
import flixel.graphics.FlxGraphic;
import flixel.tile.FlxTilemap;
import flixel.util.FlxColor;

class PlayState extends FlxState
{
    override public function create():Void
    {
        bgColor = FlxColor.WHITE;

        var tilemap = new FlxTilemap();
        tilemap.loadMapFromCSV("1,", FlxGraphic.fromClass(GraphicAuto));
        add(tilemap);

        trace(tilemap.getData()); // [1] on neko, [1,0] on flash and cpp
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants