• Content Count

  • Joined

  • Last visited

About Edricus

  • Rank
    Advanced Member

Recent Profile Visitors

823 profile views
  1. So I've been looking into the new updates to Phaser CE (2.7.0+) and what has caught my eye the most is the updates to the way Phaser handles textures. It now seems to have the ability to handle texture compression formats for WebGL which is exciting! Previous to this, all the games I had worked in were just loading PNG RGBA data into the graphics card and having come from other engines that support texture compression for GPU RAM optimizations, it was definitely a feature I missed. I've branched on an old project I had in order to test this new compression system but I'm not sure how it would work with atlases. I was already using Texture Packer before to generate Texture Atlases for the game but they were just PNG atlases. I came across this Advanced Rendering Tutorial where it explains how to set up your Texture Packer project. I've gone ahead and done that but the examples only show the ability to load an image with those compression settings. Here is a doc reference to the load image function. Currently, I am using this.game.load.atlasJSONHash('key', 'texturePNGURL', 'jsonURL'); It seems the new update only supports the following two calls this.game.load.image('factory', { etc1: 'assets/factory_etc1.pkm', s3tc: 'assets/factory_dxt1.pvr', pvrtc: 'assets/factory_pvrtc.pvr', truecolor: 'assets/factory.png' }); this.game.load.texture('factory', { etc1: 'assets/factory_etc1.pkm', s3tc: 'assets/factory_dxt1.pvr', pvrtc: 'assets/factory_pvrtc.pvr', truecolor: 'assets/factory.png' }); How would I go about loading my atlases with the accompanying JSON information using the new compression system?
  2. Hmm, so you want one object to pass through another object? I'm not quite sure what your initial question means. Could you try rephrasing or further explaining? Perhaps a hypothetical example would help.
  3. If your talking about one object being able to push another then set their immovable member to true. This will make it so whatever physics body hits that immovable object, the immovable object won't move.
  4. // Audiothis.game.load.audio('bgMusic' , 'assets/audio/DST-Blam.mp3');this.game.load.audio('splashSFX' , 'assets/audio/Kayyy-Wave.mp3');this.game.load.audio('sparkleSFX' , 'assets/audio/Sparkle-Robinhood76.mp3');this.game.load.audio('gameOverSFX', 'assets/audio/Benboncan-SadTrombone.mp3');So this is the code in my preload to load audio. When running it in CocoonJS Launcher app on Android I get the following warnings in this order: Phaser.Loader error loading file: gameOverSFX from url null Phaser.Loader error loading file: sparkleSFX from url null Phaser.Loader error loading file: splashSFX from url null Phaser.Loader error loading file: bgMusic from url null Running the game through a localhost loads the audio perfectly fine which is what I find odd. Anyone have any idea?
  5. Does your world happen to have a gravity set on it?
  6. So as the screenshot above displays I have a character that surfs along a set of teeth. Every time a tooth is touched it plays a cleaning animation. The goal of the game is to dodge the incoming germs and clean as many teeth as possible before becoming victim to the germs. On desktop the games runs smoothly. Over the past few weeks I posted a few topics here to try and get some help with performance and such. I figured instead of writing a new topic I would post in here again. On mobile I noticed a jitteriness before. At first I saw no frame drop but upon close inspection frames do drop when the jitteriness happens. I have done quite a bit of performance handling from suggestions on these forums and the jitteriness has gone down quite a bit however it's still there. It's there mostly towards the beginning of the game for about 30 seconds or so. Frames will spike between 50 and 60 FPS causing a noticeable jitter. However after about 30 seconds the frames stabilize a bit and hang mostly between 55 and 60 FPS. The jitter is less often but still happens. Another thing I noticed is that if I hover in the middle and don't touch any teeth there is no FPS drop at all. Thus why I am back in this thread. Lwester32, I know you mentioned rendering is heavy part of Phaser and that it most likely wasn't the physics. I made the changes above that you suggested and took out the unnecessary for loops. After atlasing my assets and compressing I am still lost as to what I could do to help get rid of this.
  7. Woops. Totally misread that while watching the video! Haha, I feel a bit stupid now. Thanks for pointing that out.
  8. I heard editors like Tiled support multiple layers for tilemaps. From your video it looks like you do to. However what I also heard is that Phaser does not support multiple layers for tile maps. Would you happen to know if this is true?
  9. Well derp. Turns out I was using the right member: frameName, but I was typing the wrong name... I had a capital letter in it and the atlas key didn't have one. >_> It's too early in the morning here
  10. How would I go about accomplishing this for a button though? This is the code I currently have button = this.game.add.sprite(0, 0, 'buttonPack');It currently loads the first texture in the texture pack so this gives me the indication that the texture pack is loading correctly. I've tried setting the key member of the button through button.key as well as the frame or frameName but none of them seem to work properly. They all just load the first texture in the atlas.
  11. I also just stumbled across this function in the Phaser Docs. http://docs.phaser.io/Phaser.Animation.html#generateFrameNames Would I just place this into the create function of my prefab and omit passing in a frame with this?
  12. So I'm used the web version of the Leshy Spritesheet Tool and got a packaged version of my assets. Currently my code for grabbing the correct image is like so var Germ = function(game, x, y, germType, frame) { Phaser.Sprite.call(this, game, x, y, germType, frame);From what I understand, in order to make this compatible with a my new packaged textures png I need to replace germType with the name of the loaded png pack and frame with the name of the asset in the pack that I want to grab? Also, in order for this method to work with sprite sheets, is it safe to assume that the sprite sheet must be split up individually and then placed in? If so, how would I go about getting an animation playing from a texture pack? All this is very new to me and I thank everyone for their help. This looks awesome and I really want to learn how to use it properly. I tried looking at the Phaser examples but they aren't the most informative for something like this.
  13. Another thing I found interesting about this was that I could run the same PNG through the site for further compression to reduce it even more. Of course the more you reduce it the less compression it does on every cycle through. Eventually you start to notice a difference in the aliasing of the object (assuming you're running vector objects through the compressor).
  14. First, I would just like to say that I ran all of our assets through TinyPNG and my god did it ever work wonders. We had assets totalling to 14.5MB and TinyPNG dropped that to a mere 4.77MB with (at least to my eye) absolutely no noticeable difference in quality! This website is awesome to say the least! Thanks a lot for showing me this. I will definitely be telling my friends about it. I'm going to try some sort of TexturePacker if I have time to hopefully help a bit more with mobile performance.