• Content Count

  • Joined

  • Last visited

1 Follower

About Growler

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @obiot separately (I know I should probably start a new thread), do you know how can I maintain order of Tiled Layers? As you can see from the tiled Layers image below, Player should always appear behind building overlap (since it's ordered below in Tiled) yet in game he appears in front. Secondly, if I have to manually change the layering, how I can get access to the tiled layers within melonJS code?
  2. @obiot I just don't have time to read thru changes I need to make from 5.1 to latest. I guess the WebGL "Texture cache overflow: 16 texture units available." error is pretty annoying but not sure any Melon upgrades can solve that limitation. (I talk about it here: If you email me at I can send you the game so you can check it out. Perhaps as you play maybe you can find some reasons I should upgrade?
  3. Hello, I wanted to use this particle creator/editor as I have many times before but it's down now: Error throw in console is: Uncaught TypeError: context.beginPath is not a function Seems you've updated its MelonJS to latest without making necessary changes? I'm on Melon JS 5.1 and don't have plans to upgrade for the time being. Can you restore the functionality of this please? @obiot
  4. @PLAYERKILLERS What does sortOn "y" do? Can you elaborate a bit more on this answer and perhaps provide a couple examples?
  5. @obiot Hi Obiot. Wondering if you can help with this? Btw my game is ready if you're interested in trying it - please email me at
  6. Using Melon JS 5.1, I want to have an entity bounding box for collision, and a separate box for click interactions. Meaning, the smaller thin red rectangle is collision for the tree. If the player's Y coords are less than the tree's red collision rectangle, the tree appears behind the player. If the player's Y coords are greater than the tree's red collision rectangle, the tree appears in front of the player: Player in front: Player behind: game.TreeEntity = game.MapObjects.extend({ /** * constructor */ init: function(x, y, settings) { // super constructor this._super(game.MapObjects, 'init', [x, y, settings]); this.body.removeShape(this.body.getShape(0)); // Divide height by 10 because we want the collision box to be basically flat this.body.addShape(new me.Rect(0, 0, settings.width/2, settings.height/6)); this.anchorPoint.set(0.5, -2); ... me.input.registerPointerEvent('pointerdown', this, (e) => { console.log('This is a ', this.type); }); I've tried adding a second shape to the Tree. The idea, again, you have a large area to click on the tree and get information about it. This new click rectangle is causing the original centered collision red rectangle to offset to the top left: Problematic offset larger shape: // Clickable to get name this.body.addShape(new me.Rect(0, 0, 96, 192)); this.anchorPoint.set(0.5, 0.5); This is my desired end result: ------------------------- Moreover, the registered click event, registerPointerEvent, bound to this (the tree entity) only fires on clicking the smaller collision rectangle, not the larger shape intended for clicks. Questions: 1) how can I add a second clickable rectangle on the Tree entity that doesn't interfere with the current smaller red rectangle collision shape? 2) how can I specifically bind the registerPointerEvent to the larger clickable rectangle, not the smaller collision shape? 3) On hover, how can I change the coloring and/or opacity (to indicate that the tree is clickable) @obiot @Parasyte
  7. Using MelonJS 5.1 (I cannot upgrade at this point), I'm creating a fairly large adventure game. My TMX map loaded fine until I added water tile layer: At which point I started getting error: Texture cache overflow: 16 texture units available. Error name is Digging into the code, I see there is a max size for the Texture Cache: validate : function () { if (this.length >= this.max_size) { // TODO: Merge textures instead of throwing an exception throw new "Texture cache overflow: " + this.max_size + " texture units available." ); } }, How can I fix this? Btw this seems to have been fixed in 2015: @obiot @Parasyte
  8. Growler

    Entity glow

    @obiot @Parasyte any thoughts here?
  9. Growler

    Entity glow

    How can I glow me.Entity in MelonJS 5.1? For example, if I wanted to glow an entity on mouseover. @Parasyte @obiot
  10. I have a peculiar issue: if you accidentally hit tab in browser in game, it tabs to the URL bar as the next Browser element in line. What this means for MelonJS is if you were pressing a bound key, e.g., me.input.KEY.DOWN, at the time of tabbing, me.input.isKeyPressed('down') would remain true even if you're no longer pressing the key after focusing back on the game. 1) Why does this happen when you blur the game's focus? 2) How can I ensure isKeyPressed('down') is updated to current state onFocus into game? @obiot @Parasyte
  11. @obiot Found the issue. It had to do with conflicting tileset names. I have another map, map2.tmx, with a tileset that is named the same: <tileset firstgid="1" source="ground tiles.tsx"/> Even though this map is never loaded via the levelDirector, I guess its file is still loaded by melon into the manifest. Since map2.tmx's "ground tiles.tsx" has largely the same tiles as map1.tmx's "ground tiles.tsx"... when map1.tmx was loaded by levelDirector, it loaded map2.tmx's "ground tiles.tsx" and only complained about the tiles that weren't present. This was odd because the respective ground tiles.tsx files are loaded in at different paths: For map1.tmx: - data/map/map1/tiled assets/ground tiles.tsx For map2.tmx - data/map/map2/tiled assets/ground tiles.tsx Moreover, levelDirector never loads both maps... yet there is still a conflict.