farhan

Members
  • Content Count

    30
  • Joined

  • Last visited

About farhan

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Hi, has anyone seen this bug? I am testing onBlur/onPause and onFocus/onResume. When I am out of focus by tapping out of the game window, both onBlue and onPause triggers and the game stops updating. And when resume everything resumes as expected. BUT, if I go out of focus by tapping another tab on my chrome browser and then go back to the game tab; based on logs, the game did pause and resume as expected; however, the game.time.elapsed value is wrong, as if it is accumulates the total time from when the game pauses till when it resumes. This issue also happens on mobile, for example I have a url button to click out of the game and open a browser, the game indeed pause but when i go back to the game, the game.time.elapsed returns incorrect value; it returns the accumulated time it is pausing same as the out of focus through tab issue. Is this a known bug? It just doesn't make sense because onBlur/onPause, onFocus/onResume triggers correctly. Perhaps something is not pausing or not reseting when you go out of focus by clicking on other tabs or click out from the game into a browser on mobile. Currently, I just have to add a check if game.time.elapsed returns a large number, I just reset that value to 1.0
  2. Not sure what the issue you are having but, the only thing I did was separating audio track from video and play them separately. The video file won't have audio track. And then, I check on audio ends to continue and do other stuff since when the video has no audio and it will never trigger on the on video end event.
  3. farhan

    Documented steps on getting a Phaser game on Steam

    Is there any updated guide? I believe there is no greenlight anymore, anyone can sell their games right away? Is there a new guide for the latest steam?
  4. That looks great, does the book include information on how to publish and sell the game on steam or for mobiles? As well as adding ads etc etc for Free games/apps?
  5. farhan

    non chinese community for EGRET game engine??

    You can also use google web translator as alternative if no one is available to help instantly. It has helped me reading forums or online documents in foreign languages.
  6. farhan

    phaser-spine no way to pause the plugin?

    I guess I have fixed it, you have to call PhaserSpine.Spine.globalAutoUpdate = false; then it works But to make it easier I just modify phaser-spine plugin and just add in its constructor _this.game.onPause.add(_this.onPause, _this); _this.game.onResume.add(_this.onResume, _this); _this.game.onPause.add(_this.onBlur, _this); _this.game.onResume.add(_this.onFocus, _this); and the functions Spine.prototype.onPause = function () { Spine.globalAutoUpdate = false; }; Spine.prototype.onResume = function () { Spine.globalAutoUpdate = true; }; Spine.prototype.onBlur = function () { Spine.globalAutoUpdate = false; }; Spine.prototype.onFocus = function () { Spine.globalAutoUpdate = true; }; Now, it will pause all spines in game without needing to add anything on game side I recommend to have this is phaser-spine plugin, unless there is a reason these are not in the plugin in the first place.
  7. I am using phaser-spine for my Phaser 2 project, main issue is the spine is not pause when the game is pause/out of focus etc Is there a way for the plugin to automatically pause when the game is paused? Currently the only way to pause is by doing this spine.state.timeScale = 0.0; onBlur/Pause and set to 1.0 onFocus but if I have 100 spines, it would have to manually set this to all of them I see the globalAutoUpdate, doesn't work, makes no difference. Unless I am calling it incorrectly? I did PhaserSpine.globalAutoUpdate = false to pause but no changes. Anyone got any tips or at least a point me to the right code that I can modify or add something to make the whole plugin pause when Phaser is pause or out of focus, via versa. Thanks!
  8. farhan

    HTML text input within Phaser canvas

    That is weird; when I set AUTO for Phaser CE 2.11.0, I believe it uses Canvas for the IOS devices because everything played at a slow framerate. It runs faster when I set to WEBGL. When I use 2.6.2, everything runs much faster and smoother/higher framer rate for the same device when set AUTO.
  9. Cool, that is exactly what I did to clean it, destroy the children. Sometimes it is faster to do it myself based on what I know than figuring out what Phaser already provided 😛 I am still new to Phaser, and don't have much time to figure out everything lol But thanks for the tips, will look into that as I work on more Phaser projects.
  10. farhan

    HTML text input within Phaser canvas

    Try Phaser 2.6.2 or someone needs to fix Phaser CE 2.11.0 so it will work with the phaser plugin-input
  11. farhan

    HTML text input within Phaser canvas

    https://github.com/orange-games/phaser-input Works great with Phaser 2.6.2 but does not work right with Phaser CE 2.11.0 I believe whatever updates added to 2.11.0 broke the phaser-input plugin. I wish Phaser CE 2.11.0 has backward compatibility. Speaking on Phaser CE 2.11.0 I found out that it defaulting the game to use Canvas instead of WebGL. Is there a reason to use Canvas as default? Having Canvas as default option is just a bad idea because Canvas sucks on mobile devices. Which is why I change to 2.6.2 which it uses WebGL as the default option PLUS phaser-input works
  12. farhan

    Why Phaser 3 Don't Allow Loading Data URI?

    Thanks for the tip. But I am not loading external assets but in the game code itself because I am making a project where I have to have all assets data in one index. Which is by using data URI not URL it is a base64 data. By using data URI you don't have to provide the image or audio or video files but the data of those files in strings. This is one of the sites I am using to convert images files into base64 data URI. https://www.base64-image.de/
  13. If you are talking about latest IOS, the only solution is to separate audio track from the video. Make sure the video has no audio track and then just play audio and video at the same time. And for checking on end video, use on audio end to continue because for some reason on IOS devices, it cannot detect when the video is over when the video has no audio track, at least the is an issue I encountered.
  14. Nope, IOS 8 and 9 are just too old. In addition, there is no way that I know of to get the hardware mute status on iPhone for html/canvas games unless you are making native apps/games. Perhaps Apple can answer this question BUT they have addressed this issue on newer devices/IOS. People who still uses IOS 8 and 9 have to live with it 😛 It is not the end of the world just because you cannot mute it using hardware mute. Right now, it is already at IOS 11 which works great, and in the next year or 2, IOS 8 and/or 9 will be gone by then. I can't wait 😛
  15. Thanks everyone for the info; yeah, i figured out that in default, it destroys group object which is why the group was null; when I set not to destroy, it works fine, but like you said this may cause garbage issue. We can also recreate all groups, but to me, that is pointless since why do we need to destroy and then recreate again, when we don't really need to destroy it in the first place. Anyway, I ended up not using the statemanager and just go back to the basic way where we set the preload, create, update and/or render functions when creating the game; and I just create my own simple state manager and clean up the group manually The only downside, all game states are clumped together, but at least it is simpler and I don't have to destroy and recreate unnecessary stuff I was just trying out statemanager so that I'm able to organize the code by states; but I guess this is not a good option for me. Specially when I am just making a tiny simple short game.