• Content count

  • Joined

  • Last visited

  • Days Won


PixelPicoSean last won the day on March 9

PixelPicoSean had the most liked content!

1 Follower

About PixelPicoSean

  • Rank
    Advanced Member
  • Birthday 12/03/1990

Contact Methods

  • Website URL
  • Twitter
  • Skype

Profile Information

  • Gender

Recent Profile Visitors

2,004 profile views
  1. HTML5 export of Unity flappy bird is 714KB?

    They did not explain it at all, but 714KB is acceptable right? 72KB of core might be possible, but to my experience of compiling C++ code into wasm, a fully functional game with WebGL and audio(also includes some cross platform code and framework such like IMGUI) starts from 500KB gzipped or 1100KB uncompressed. 100KB if only use WebGL with nothing else. In my case I don't use STL at all which increases final size significantly. Which means even containers like string, vector and map are my hand coded version. And that is hand written optimized C++ code. As far as I know, it's only possible to use C instead of C++ to reduce the size of generated asm.js/wasm code. Unity's C# to C++ cannot do that much optimize, especially for its huge code base. A friend of mine told me that Unity uses gzip to compress everything and uncompress them at the runtime, maybe there's some black magic.
  2. HTML5 export of Unity flappy bird is 714KB?

    That 72K is not size of the "core", but a complete flappy bird game. So the package already includes 2D and sound support at least, which is already usable for me. The only thing is to find how to integrate JavaScript SDKs.
  3. Just watched the keynote of Unity on GDC, they said the HTML5 export of flappy bird game made with Unity is 714KB, how is it possible?
  4. How to Create a Loading Scene in Phaser3

    Add a files array to config of your loading scene and add put whatever images you want to use into it. Those files will be loaded before preload method is called, so you can use them to create the scene and subscribe to progress event inside the preload method. Load progress with file payloads example
  5. Adjusting offset and rotation of two bodies

    Then set the origin to (0, 0.5)
  6. Adjusting offset and rotation of two bodies

    Origin of Text by default is set to (0, 0), so it rotates around the top left corner.
  7. Dynamically creating text with physics

    Sorry I just read the source code of arcade physics, it does not use SAT for collision detection and does not support rotation either.
  8. How do I save scenes and swap back and forth between them?

    The scene switching example itself is broken now. The problem occurs when using input event to switch to other scenes, which I believe is a bug or something needs improvement. About the room, I guess you have same logic for all the rooms, then it could definitely be a single scene which loads data of a room and initialize objects. But the scene can also be stopped and created again for every room (just pass room data to new scene and use the create method), so that the scene will take care of objects/events clean up.
  9. Dynamically creating text with physics

    Arcade physics of Phaser 3 does support rotation of body (using SAT algorithm), but the debug graphics simply draws a rectangle which I think is not finished yet.
  10. How do I save scenes and swap back and forth between them?

    start will simply stop current scene and start the new one. A stopped scene cannot be wake any more, that is why your scenes are created again and again. switch can be used for that purpose, and when a scene already been created the wake will be called instead. The downsides is that you can not pass data to the scene while awaking.
  11. Get image from cache

    Images are stored in the TextureManager, which can be access from game.textures but as Texture instances.
  12. upgrade phaser version

  13. Phaser 3 Scene / Phaser 2 State - passing data to init when start

    I think it is totally nice to start another scene with data you wanna pass to, the update method is only called once and your data delivered to the right place, everything else works fine.
  14. Phaser 3 Scene / Phaser 2 State - passing data to init when start

    @Stathis Latest master branch has already enabled switching to same scene. I just noticed that data is missing when switching to another scene from create method, that might be a weird bug.
  15. upgrade phaser version

    Phaser 3 is quite different from Phaser 2, so you can only upgrade to latest 2.x (CE versions are great)