Growler

Members
  • Content count

    31
  • Joined

  • Last visited

1 Follower

About Growler

  • Rank
    Advanced Member
  1. @obiot @Parasyte any thoughts on this?
  2. Hybrid GFX test - scaling tilemap

    @obiot @Parasyte any thoughts on this?
  3. I borrowed the code from http://melonjs.github.io/melonJS/examples/platformer/#debug to create my own game. I'm on Melon5.1. From that tutorial, the Tiled map is 35x35px tiles, and the resolution is 800x600 (see here: https://github.com/melonjs/melonJS/blob/master/examples/platformer/js/game.js). The GUI elements (sound, joystick, etc) this.opacity change work fine. onOver : function (/* event */) { this.setOpacity(1.0); }, My needs are for 16x16px tilesize, and heard 1280x640 is a good resolution for this. If I adjust to this, however, here are the issues: - Debug panel: click events no longer work. - GUI_Object element opacity: this.opacity doesn't change even though the hover event is firing. When I move the character, all of a sudden the opacity onOut (this.setOpacity(0.5)) fires. But only once. It's as if the hover event to setOpacity is called but doesn't update the opacity under I move the character (I guess which calls animation redraw?). And what's more weird: when I have debug panel open, hover works every time on the GUI buttons. See images below. - GUI_Object hover events: for my custom GUI element, which I've scaled to .5, .5: hover events are no longer registering. It registers when I refresh the game page, works a couple times, then stops. Why is this? Seems quite buggy. Note: resolution at 640x320, I am able to click the debug toolbar buttons. But at another multiple of 16 resolution, 1280x640, I cannot. if (!me.video.init(640, 320, {wrapper : "screen", scale : "auto", scaleMethod : "fit", renderer : me.video.AUTO, subPixel : false })) { alert("Your browser does not support HTML5 canvas."); return; } -------------------- Second question: me.GUI_Object doesn't accept width/height parameters. While you can set the framewidth and frameheight in settings, how can I scale the object down on screen? GUI_Object extends sprite which extends renderable, so I should be able to do this.scale(.5, .5), right? If I do this, it scales but looks very pixelated even on the down scale.
  4. Hybrid GFX test - scaling tilemap

    Using MelonJS 5.1, my game's pixel artist wants to test "Hybrid GFX" approach and see how the tilemap will scale at 16x16 tilemaps compared with GUI (GUI Object) items. Basically, we want to scale up 16x16 pixel art 3x, but not scale the GUI overlays. Video settings are: {wrapper : "screen", scale : 1.0, scaleMethod : "fit", renderer : me.video.AUTO, subPixel : false } - Resolution is: 1280x640 (1x zoom) How can I independently scale up pixel map art and leave GUI elements as is? Essentially: My resolution options are: let screenRes = { // Pixels rendered at 64x64 (3x size) '16': [320, 160], // Pixels rendered at 32x32 (2x size) '16': [640, 320], // Pixels rendered at true form, 16x16 (1x size) '16': [1280, 640], }; We want to test 3x zoom (320x160) on 16x16 pixels, but leave the GUI watch in pure resolution. In the me.GUI_Object for the watch, if I set this.scale(1, 1); Then you can see the result (first image). If I scale it back down by .33, then it looks horribly pixelated.
  5. Git clone Melon example

    I'd like to use one of your example projects as a starting ground instead of following the tutorial. I.e., the projects listed here: https://melonjs.github.io/melonJS/ In particular, I'd like the Platformer there: http://melonjs.github.io/melonJS/examples/platformer/ (Git Repo: https://github.com/melonjs/melonJS/tree/master/examples/platformer) Can you at least make this Platformer git cloneable?
  6. HTML 5 canvas with Melon causing high fan speeds

    @Parasyte Also RE: "The high fan speeds can happen with large canvases and high refresh rate. It's because your CPU is doing all of the work to render and draw the scene. WebGL helps a lot in this area because the GPU starts doing most of the drawing work" - i plan on having full screen canvas. Using 5.x melon, how do I ensure the high refresh rate work is offloaded to the GPU instead of CPU? My game should be played in Firefox and Chrome, both GPU accelerated browsers by default... is this offloading to the GPU then automatic? Like I said my game will have many layers and I care a lot about performance. Im usually able to maintain high FPS like i said, but cpu speeds up and is sluggish from cpu side (speaking from my experience previously on 2.1)
  7. HTML 5 canvas with Melon causing high fan speeds

    @Parasyte, I'm ultimately changing the direction of the game anyway so it's a good time to upgrade from Melon 2.x to 5.1. At this juncture I'm also evaluating Phaser (2.6.3 and 2.10+ CE) vs Melon 5.1. Phaser JS looks like a more developed community especially with its 2.10 Community Edition, but I've heard a number of complaints around the underlying pixi engine causing high CPU usage and frame rate drops when you add a lot of layers (10+ I believe). From your perspective, what are the key benefits of Melon 5.1 over Phaser 2.10+ CE (or even 2.6.3 latest team release)? I care about performance and easy-to-use API.
  8. Debug panel in 5.1 not registering click events

    @obiot Indeed it's the latest version. I'm using the latest version of Chrome, on a Macbook Pro Sierra 10.12.6. It still doesn't work.
  9. Sprite FlipX rotates full width on x axis

    This flips on the Y axis game.PlayerEntity = me.Entity.extend({ /** * constructor */ init:function (x, y, settings) { this._super(me.Entity, 'init', [x, y, settings]); this.body.setVelocity(3, 15); me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH); this.alwaysUpdate = true; this.renderable.addAnimation("walk", [0, 1, 2, 3, 4, 5, 6, 7]); this.renderable.addAnimation("stand", [0]); this.renderable.setCurrentAnimation("stand"); // set the renderable position to bottom center this.anchorPoint.set(0.5, 1.0); }, Result
  10. I'm following the MelonJS platformer tutorial again for 5.1 (used to be on 2.x). I'm unable to activate any of the debug menu checkboxes. Checking "Hitbox" to outline hitboxes, for example, doesn't do anything. It's somehow not registering my click event.
  11. I'm following the MelonJS platformer tutorial again for 5.1 (used to be on 2.x). For some reason basic this.renderable.flipX(true); causes the sprite to rotate the width of itself (64px) on the x axis? Below, he's standing on the ledge. I tap left and he flips sprite, but is 65 pixels offset. How do I flip in place?
  12. How to add collision to Tiled Polyline?

    No ways to accomplish this other than box/sprite collision? MelonJS supports this out of the box and would expect Phaser to do so as well. I'm in the process of creating a quick demo to compare Phaser against other HTML5 game engines and need this to work.
  13. How to add collision to Tiled Polyline?

    Any thoughts here?
  14. Pretty straightforward question: I want to draw my collision layers in Tiled, preferrably using the Polyline tool. I would use createFromObjects, but I don't really need the polyline to appear as a sprite, or appear at all (except for debug mode as a collision layer). Phaser: 2.6.2 Physics: Arcade Create() { ... map = game.add.tilemap('mario'); map.addTilesetImage('tileset', 'tiles'); layer = map.createLayer('Tile Layer 1'); boundary = map.objects.boundaries[0]; player = game.add.sprite(map.objects.mainPlayer[0].x, map.objects.mainPlayer[0].y, 'dude'); game.physics.arcade.enable(player); player.body.collideWorldBounds = true; ... } Update() { ... game.physics.arcade.collide(player, boundary); ...
  15. melonjs zooming and panning

    @Parasyte oh my! How did you get those beautifully animated windmills? Are those just animated sprites (like any other sprite) placed on tiled?