Harrisyu

Members
  • Content count

    8
  • Joined

  • Last visited

  1. I seen new commit, that's quick, and I agree with @ldd. It's all about "Pixel Perfect" See the scale part of : https://www.raywenderlich.com/14865/introduction-to-pixel-art-for-games And this : And this : http://diestware.tumblr.com/post/133416514160/pixel-perfect-camera-tutorial Pixel perfect is scale up with out blur, and also no subpixel movement.
  2. Let's me try to explain better: I like to have actually "2 sets of Tiled map/room/stage tmx" setup in my workflow: 1.design/develop time tmx file, I will put a lot of helper object including tile object for visually design my level. 2.runtime tmx file, use in actual game, it's clean, for levelDirector to load, don't need to load helper tilesets nor objects. And they don't need to be in 2 files, just use a little cpu time to "clean" the file before level start. The workflow became very simple, edit the level in tiled, ctrl+s, reload the game. So in this case, after I undenstand how melonJS works, I can solve this problem in user size, so melonJS don't need to do any change. BUT, melonJS only treat objects in 2 cases: 1.Is this object has name? no -> create collison object, yes-> see below. 2.try to create entity from entity pool, if it is not exist, throw error and stop the game. But objects in Tiled can be use on a lots of things : *defind an area; *defind a path for character to follow; etc... For example, put a poly line in tiled: If leave the name empty, it became an collison object(even on a layer without collison in name): If you give it any name, it throw an error: Now, I think these should be improve, or user like me need to do more work to hacking it...
  3. I sovle my own problem, check this:
  4. When I start using melonsJS, I find out that integrate with Tiled make melonJS almost an editor base engine. So I want to visually place player and enemy using there tile image as entity defind. Problem is melonJS will load everything you defind, including these helper tileset. And I post my question here:http://www.html5gamedevs.com/topic/28667-feature-request-or-how-to-load-level-without-loading-all-tileset/ Now I now how to replace these helper object in Tiled's json data , before building the map. Here is the code in coffee: convertHelperTileset = (mapJson, tilesetName)-> tempArray = [] for tileset in mapJson.tilesets if tileset.name isnt tilesetName tempArray.push tileset else #now covert all objects using this tileset for layer in mapJson.layers if layer.type is "objectgroup" for obj in layer.objects if obj.gid? #object that has gid is a tile object if obj.gid>=tileset.firstgid and obj.gid<=tileset.firstgid+tileset.tilecount delete obj.gid #will recognize as a rectangle object obj.y -= obj.height #this is the pivot point diffrent between tile and rectangle mapJson.tilesets = tempArray return After map are loaded,using me.loader.getJSON(mapName) to get the map json object, and then use this function to convert all the helper tileset. That is it.
  5. I got this tile map in tiled:(4x) In 4.1.0 when you video.init using this settings (for integer scale) antiAlias: false, scale: 4 * window.devicePixelRatio, In will draw like this: tile texture are scaled 1 pixel, and it looks very bad. It's all because of these change: So there is an option for creating renderer: * @param {Boolean} [options.textureSeamFix=true] enable the texture seam fix when rendering Tile when antiAlias is off for the canvasRenderer But it's not in the API document yet, and also you can pass this option to video.int which you might not know like me, so, to fix it add textureSeamFix: false video.init : if (!me.video.init(256, 208, { wrapper: 'screen', antiAlias: false, scale: 4 * window.devicePixelRatio, textureSeamFix: false }))
  6. Thank you for your support ! I will also find a workaround and post here.
  7. Hi! I am a beginner to melonJs, but I love it so much, it works so well with tiled map editor. Here is the question: We can use object in tiled to mark entity for melonJs, But I would like do a little bit further:use image as object for better visual. like this: Of cause it works, thanks melonJs, that image even been replace by the entity. But if I don't load all the tileset image in the tmx file, for example the player image I use in tiled. "me.levelDirector.loadLevel" will fail. So, it's there a way to skip loading some tileset in tmx file?
  8. Why Pixi.js ?

    The only reason for me is phaser don't support spine very well but pixi does.