Code Monkey home page Code Monkey logo

tmxjs's People

Contributors

bitwit avatar cdmckay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tmxjs's Issues

Tilesets generateTiles could wrongly generate tiles

Hi!

I want to use tmxjs to export pseudo randomly generated tilemaps to tmx-files. While working with the basics (generate maps, tilesets, ...) I found out that our tileset-image isn't perfectly sized (it's 1366x1007). Something like that can happen fairly easy (I know it's sloppy). A tile is 24x24. So they are 56 columns and 41 rows of tiles. Your algorithm for automatically generate tiles is using the imageInfo and tileInfo. You are using the imageHeight and imageWidth to find out if next to the current position another tile is waiting. When the tileset-image isn't perfectly sized than tiles are created which aren't there. I think it could be better to use the number of columns and rows to calculate the tile-boundaries because that will work always.

What's your opinion on that? Thanks

Even better would be to use the tilecount attribute which was added in version 0.13 to the tmx map format. http://doc.mapeditor.org/reference/tmx-map-format/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.