enpu

Members
  • Content Count

    1,669
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by enpu

  1. enpu

    hiresRatio question

    No exactly sure what you mean. That code is used to detect if the engine should use hires assets or not (if hires mode is enabled). game.System.scale is used to enable scaling, which just scales the canvas element to fit the window size.
  2. @Stephan Thanks for the info! This should be now fixed in Spine plugin 1.3.4
  3. enpu

    transparent background ?

    You can do this by setting the default scene background color to null: game.config = { scene: { backgroundColor: null } }; Note that the default loader (which is also a scene) has it's own default background color defined too. So if you want the default loader to have transparent background too (if you are not using your own loader), then you need to set that to null too: game.config = { scene: { backgroundColor: null }, loader: { backgroundColor: null } };
  4. enpu

    hiresRatio question

    Hi @Stephan Sorry for the late reply. HiRes mode is used only when you want to use multi-resolution assets (the name HiRes mode is actually a bit misleading, should be something like multiresAssets). Multi-resolution assets mean that you would have multiple versions of each asset that you use in your game. For example: player.png player@2x.png player@4x.png hiresRatio is a value that is used to detect which of those assets should the game engine use. For example if your project's base resolution is 200x200 and you have set HiRes mode to 4 with ratio of 2, that would mean that the window size (where the game is running) would have to be at least 2 times bigger than the base resolution (200x200 base resolution, so it has to be 400x400) for the engine to start using @2x asset files. For @4x assets, the window size would have to be at least 2 times bigger than the resolution used for @2x assets (which in this case would be 800x800). So this has really nothing to do with scaling. If you just want to scale the canvas to fit any screen resolution (scaling just scales the size of the pixels in the canvas, doesn't actually change the amount of pixels in the canvas), then using game.System.scale property is enough. If you also want to resize the canvas, so that it fills the whole screen no matter what aspect ratio the screen is, then you should use game.System.resize property together with the scaling. Does that make sense?
  5. enpu

    change the assets folder

    Sure. game.config = { mediaFolder: 'media' };
  6. Hi @nagyv So you want to get the color of a single pixel in the canvas?
  7. enpu

    About creating dynamic font for Japanese

    Hi, Do you have any more information or examples on using Kanji? I'm not familiar with that, but i'm sure it can work with Panda.
  8. Hi @MyFault Thanks for the info! These are now both fixed. Cannon plugin and Tipsy Tower 3D template updated, so just download again.
  9. enpu

    Panda 2 Roadmap

    Panda 2 Roadmap is now live at https://www.panda2.io/roadmap Feel free to create new bug reports and feature request. Once approved, it will appear in the roadmap. Thanks!
  10. enpu

    How to improve Load time?

    Yes you need to update to latest dev version
  11. enpu

    How to improve Load time?

    Actually i just added third parameter to addAsset function that will do this for you automatically. // Never loads the file from cache game.addAsset('https://panda2.io/temp/example.json', 'example.json', true);
  12. enpu

    How to improve Load time?

    You can add some random number to the end of the url, to prevent browser from loading the file from cache. Like this: game.addAsset('https://panda2.io/temp/example.json?' + Date.now(), 'example.json'); game.createScene('Main', { init: function() { var json = game.getJSON('example.json'); } });
  13. enpu

    Spaceship 3D game template

    New Spaceship 3D game template available for download! Play: https://www.panda2.io/templates/spaceship3d Download: https://www.panda2.io/templates#spaceship3d
  14. @Wolfsbane Storage class uses local storage. The reason why the build failed was that the code was placed outside of the module. // CODE OUTSIDE OF THE MODULE game.module( 'game.main' ) .body(function() { // CODE INSIDE THE MODULE }); The build process needs to go through the module file, so it can know which modules to include in the build (if module requires other modules). It uses Node and there is no local storage available, so that's why it throws "localStorage is not defined" error. Build process doesn't run the module's body function, so that's why you should put all the code there.
  15. Hi! Can you send your log file, so i can take a look and see why the build is failing? Location of Panda 2 log files: macOS: ~/Library/Logs/Panda 2/log.log Windows: %USERPROFILE%\AppData\Roaming\Panda 2\log.log
  16. enpu

    Bezier curve support added

    Panda Engine 2.12.0 now supports bezier curves with new Curve class. Here is interactive example, where you can see bezier curve in action: https://www.panda2.io/examples#curve-handles You can modify the curve by moving the start and end points as well as the two control points. Here is also example on how to use Curve together with Tween: https://www.panda2.io/examples#curve-tween Documentation of Curve class: https://www.panda2.io/docs/api/Curve
  17. enpu

    Bezier curve support added

    This seems to be issue with Pixi plugin, will put this on the roadmap. Thanks!
  18. Hi! Here is example project, that shows you how to do it example.zip
  19. enpu

    [Panda2]Make 10! - A card game for Android.

    Great work and congratulations on getting your game published! About Crosswalk, it's really needed only if you want to support Android 4.x, which distribution percent currently is around 10%. One note about the game is that it seems to be designed to work only on a specific screen aspect ratio, which means that on some devices you will see black bars. Fixing this on such a simple game would be really easy.
  20. Check out this small tutorial on how to create desktop apps with Panda 2 using Electron. You can develop your game on Panda 2 and see it running as a desktop app at the same time, all changes taking effect instantly on both as you save. You can also easily turn your existing project into a desktop app.
  21. enpu

    How to improve Load time?

    Yeah just load assets that you really need and don't load them multiple times. For images you can try to compress PNG files (try TinyPNG) and/or use sprite sheets (try Texture Packer). For audio you can try to lower bitrate, use compressed formats (m4a, ogg, mp3) and make your music loops shorter. You can also try to change the amount of files the engine tries to load at the same time, default is 4: game.config = { loader: { maxFiles: 8 // Load 8 files at same time } };
  22. enpu

    How to improve Load time?

    I can see that you have three different loading screens (initial, stage select and stage). Which one is too slow?
  23. enpu

    How to improve Load time?

    Are you now talking about load times in web version or in the app, or both?
  24. enpu

    Block Puck 3D game template

    New Block Puck 3D game template available for download! Play: https://www.panda2.io/templates/blockpuck3d Download: https://www.panda2.io/templates#blockpuck3d
  25. enpu

    [Panda2] Dead Gunner

    Really good work for a first game!