Search the Community

Showing results for tags 'performance'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 219 results

  1. Hi community, I want to propose you some addition to assetManager and sceneOptimizer. If the solution already exist, said me assetManager : 1. Get loading percent, not on x file loaded but on stream data loaded when it's possible. > for more precision and to show state if you load some big files. 2. Add "abort" function and "onAbort" callback to cancel running tasks and loading files. > Currently "clean" function delete tasks in assetManager but not abort current loads. That mean if you have a big file in loading, it don't stop. sceneOptimizer : 1. Add a starter level to try optimizing render : > I tested the current sceneOptimizer and the problem is it try the best render first. If you have an older device, the website crash and the browser reload page before that sceneOptimizer can downgrade the render. So, it's a loop without ending. 2. Create two steps to optimize render : > First : upgrading. The sceneOptimizer try to reach "x" FPS with the starter level. If it's ok, it upgrade render again until when it can't reach "x" FPS. > Second : dowgrading. If the last try (or the first try with the starter level ) not reach FPS, the sceneOptimizer downgrade until when it can reach FPS. If the sceneOptimizer reach "x" FPS, it stop. > Of course, we keep "trackerDuration" : time in milliseconds between passes. > You will can restart the sceneOptimizer when you add or change something like the current version What do you think about this ? Have a nice day !
  2. Stuck at 33 FPS on iOS 11

    Ever since I updated to iOS 11, I’ve noticed phaser games now seem to be stuck on 33fps on my iPhone 7. I wondered if it was just the games I made then I tested the bunny mark link below and it was the same. Has anyone experienced this? http://phaser.io/sandbox/Pjdxyqzl/play
  3. Raycast Performance

    Hey guys... got a couple of quick questions about raycasting... 1... Is recasting an 'Expensive Thing' for BabylonJS. I ask because in unity, a fully scripted player character might by casting 6 - 10 rays on each frame... One ray might be be checking ground distance... Four separate rays might be casting to the four near clip plane points of the camera to check for Collision and or occlusion and one ray might checking wall distance ... and so on... Now that apparently is FINE in Unity on a native platform... Would that many rays be TOO MUCH for a BabylonJS Game... ??? 2... Is is possible to create a "Sphere Cast" type functionality like Unity Has... Example: Physics.SphereCast public static bool SphereCast(Vector3 origin, float radius, Vector3 direction, out RaycastHit hitInfo, float maxDistance = Mathf.Infinity, int layerMask = DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal); Parameters origin The center of the sphere at the start of the sweep. radius The radius of the sphere. direction The direction into which to sweep the sphere. hitInfo If true is returned, hitInfo will contain more information about where the collider was hit. (See Also: RaycastHit). maxDistance The max length of the cast. layerMask A Layer mask that is used to selectively ignore colliders when casting a capsule. queryTriggerInteraction Specifies whether this query should hit Triggers. Returns bool True when the sphere sweep intersects any collider, otherwise false. Description Casts a sphere along a ray and returns detailed information on what was hit. This is useful when a Raycast does not give enough precision, because you want to find out if an object of a specific size, such as a character, will be able to move somewhere without colliding with anything on the way. Think of the sphere cast like a thick raycast. In this case the ray is specified by a start vector and a direction. Notes: SphereCast will not detect colliders for which the sphere overlaps the collider. Passing a zero radius results in undefined output and doesn't always behave the same as Physics.Raycast. See Also: Physics.SphereCastAll, Physics.CapsuleCast, Physics.Raycast, Rigidbody.SweepTest. using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { CharacterController charCtrl; void Start() { charCtrl = GetComponent<CharacterController>(); } void Update() { RaycastHit hit; Vector3 p1 = transform.position + charCtrl.center; float distanceToObstacle = 0; // Cast a sphere wrapping character controller 10 meters forward // to see if it is about to hit anything. if (Physics.SphereCast(p1, charCtrl.height / 2, transform.forward, out hit, 10)) { distanceToObstacle = hit.distance; } } } Yo @Deltakosh ... Gotta ping you in here ???
  4. Hi, I'm currently preloading in a single sprite atlas (png image with a json data file) for one sprite (by this i mean a character i want to animate). However, the problem is that the sprite atlas image file is pretty big (over 8000x6000 sometimes) and there's FPS drops on lower end machines/older browsers. I'm not 100% sure that the FPS drops are caused by the large image file, but when i reduced the sprite atlas image file's size, it fixed the issue. My question is, is there a good way I can assign multiple sprite atlases to one character/sprite? Also, would that even help the issue? I want to keep decently high resolution frames so in the end this solution doesn't actually reduce the total size of images being preloaded, just preloads multiple smaller images instead of one huge one. I want to do something like: game.load.atlas('mysprite', 'assets/sprites1.png', 'assets/sprites1.json'); game.load.atlas('mysprite', 'assets/sprites2.png', 'assets/sprites2.json'); this.sprite = game.add.sprite(game.world.centerX, 300, 'mysprite'); // 'walking' is part of the sprites1.png this.sprite.animations.add('walking', Phaser.Animation.generateFrameNames('walking', 1, 6), 5, true); // 'flying' is part of the sprites2.png this.sprite.animations.add('flying', Phaser.Animation.generateFrameNames('flying', 1, 6), 5, true);
  5. get data from Texture

    Hey, i'm trying to get the data source from a loaded Texture in BABYLON. But I haven't found a way to do this. Basicly my idea is to get the data from the image and save it as base64 in the local cache. And then I can get the image from the cache again and load it into BABYLON. This should improve performance and result in faster loading times once you already loaded the scene once. Does this accually makes sense or is there a better way of caching textures?
  6. Choppy tweens on mobile (Cordova)

    Hi all, I have a game which I've turned in to a cordova app. Gamephysics with collision are working smooth, but when I am using tweens it sometimes lags a little bit. I am using Crosswalk and are testing on a Sony Xperia Z3. I've tried removing all backgrounds and animation and left only one sprite doing the tweens, but the lags remain. Everything is smooth on the desktop browser. Anybody got any tips on improving the performance?
  7. I'm looking for ways to optimize a scene I created in the Playground. This scene is based on previous work from another thread, I just added some objects and logic to mimic a small game. It uses native CannonJS for the PFS-camera and movement of the monster models. I used the code and model from the instances demo. From line 16, you can turn on and off physics for the monsters, skeletal animations, the skybox, trees, shadows, procedural textures(grass), and whether or not the monsters should lookAt and follow the player. As well as specify the amount of trees + the range and amount of monsters. https://www.babylonjs-playground.com/#FZZV7K#23 I'm only hitting around ~30 FPS with this example. Is a scene such as this too heavy for WebGL and browsers? The trees are instances, so unless I clone and merge them, I don't see what could be changed there. Maybe a smaller, compressed texture. The monster models all have skeletons and animations, so no instances or merging can be used here. Disabling physics seems to give some FPS boost, so maybe using a worker would do some good in this example. I'll give this a try, and see what effect it has on overall performance. Here's a minimized version, with most things stripped, and 50 monsters without animations. https://www.babylonjs-playground.com/#FZZV7K#24
  8. questions about cacheAsBitmap

    Hi guys, since webgl will cause some problems for some low performance phones(screen blinking or couldn't show at all), sometimes we are forced to use canvas instead, but the number of sprites showed in the game really influence the performance a lot for canvas, we use cacheAsBitmap to resolve it, but seems like cacheAsBitmap is very memory consuming, it will cause the game crashed for some low performance device(perhaps memory not enough) maybe I didn’t use it correctly, could anyone answer my following question so I can use it more properly? if there is a sprite and it doesn’t move or change at all, will it be kept redrawing by renderer? if so, does it mean that a moving sprite consume the same performance as it to a static sprite? should I use cacheAsBitmap to a single sprite(as I tested the performance improved), or I should only use it to a group which contains numbers of sprites? I have a group contains 40 sprites, those sprites only change their visibility(i.e. sometimes show only 20 of them), I set the group’s cacheAsBitmap to true after i set the visibility to it’s children, and I will set it to false when I need to change the visibility of those sprites again, is it proper to use cacheAsBitmap this way? when I set cacheAsBitmap to false, would it release the memory? any other suggestion will be appreciated:)
  9. Work offer

    Hi guys, After some previous attempts to solve some problems in our project, we saw that we were not getting anywhere so we decided that we needed a professional help. This is the offer we published on the Upwork platform, so if anyone is seriously interested in completing the job, please contact us. This is the text of the offer: _______________________________________________________________________________________________________________________________ Representation of a snow-covered mountain scene in Babylon.js Engine The task consists of representing a snow-covered mountain landscape with forest and water bodies in Babylon.js. The focus has to be made on the visual attractiveness while still offering high performance. An example of a scene like that would be this one (Scene1), made in Three.js. We are providing a basic scene (Scene2) made in Babylon.js, and the following improvements have to be made to this scene: 1) Implementing a GLSL Shader / Babylon.js Custom Material which accepts the following criteria: Terrain Texture: - Rocks: should be a procedural texture with a nice natural transition between the snow and the rock texture like in the Scene1. - Water: should be the WaterMaterial provided by Babylon.js Material library. - Snow: it is already acceptable in the Scene2, but any visual improvement is welcome. If needed, the mask image for the texture mapping can be also provided as three separated alpha mask images, one for each type of texture. Furthermore, it has to support a Dynamic Texture on top of the Terrain Texture, so that it should be possible to draw directly on the ground. An example of this would be this scene (Scene3), implemented with ShaderBuilder : The problem with this scene is that it lacks bump maps, fog and shadow effects. There should be visual consistency across the most popular browsers: Chrome, Firefox, Edge and Safari. 2) Representation of the forest: - Positioning the trees based on an alpha mask image, as opposed to placing them based on a position array (see treepoints.js file in the source code), like in this example (Scene4). - The forest should be realistically dense, similar to that in the center of the Scene4, with the same tree size. - For optimization purposes, the trees should disappear at a distance and be substituted by a texture in a visually subtle manner like in the Scene1. - The trees can be sprites / particles / solid particles / meshes / shaders / anything else, as long as the performance is still good. _______________________________________________________________________________________________________________________________ If you have any questions, we're ready to answer them. Thanks!
  10. Hello! I'm building a soccer keepie uppies game. I have many texture atlas' that make up the player and ball for my animations and some static images placed in the scene. There is also a score text in the top left corner. This all runs fine on desktop but on my iPhone 6s the fps is around the high 40's. If I remove the BitmapText then it's back up to 60fps. Even removing the player and ball and pretty much having only the score text in the scene I am noticing a hit in performance. Even if I don't update the score and have it just static at 0 points. I'm really wracking my head with this. I've been looking for a solution for nearly a week now and can't seem to come up with anything. I fell like I've tried all the tricks : ( Unfortunately I can't show any code as I am not permitted to. Has anybody else ran into an issue like this? Really hope somebody can help as I'm at a loss... Thanks!
  11. memory leak?

    During a recent profiling we found that a Scene object is being retained in the heap infinitely even if dispose is called. Apparently the Engine keeps an array of compiledEffects which then has fallback meshes that keep a reference to the scene and that prevented the scene object from being garbage collected. Is this expected? There's about 9MB of stuff that can be wiped out from our pathetic mobile device memory, so definitely hoping there's a way to collect it.
  12. Hi peeps, I've already published a similar topic not a while ago, but we couldn't really reach any conclusion: http://www.html5gamedevs.com/topic/32079-sprite-occlusion-for-performance/ I have this demo: http://devel.arinnova.com/tests/3dmaps/babylonjs_demo/ I'm trying to get a similar forest to this three.js scene: https://www.piste.io/#!/cortina . Notice how the forest is really dense and the FPS are really good. What I've already tried without success: 1) Loading meshes instead of sprites and applying LOD mechanism resulted in very low FPS. 2) Using mesh instances instead of sprites, still very low FPS 2) Temechon kindly helped me and coded a LOD function for sprites, but unfortunately it was more or less the same FPS as without the LOD. 4) Showing all the 54k trees, but using a particle system instead of sprites, which helped to reduce the draw calls, but the FPS were still low. 5) I've implemented a "poor man's LOD". I separated the 54k trees into 9 chunks, each chunk corresponding to a specific area. Then at every frame I calculated the distance from the camera to the central point of each area. If it was close enough to the camera, I showed the area trees and if not, I removed them. This way at each frame I had to calculate distances to only 9 points instead of 54k points, which helped but visually it was not pretty at all. Even applying a brown texture on the terrain underneath the trees, the chunks of trees appearing and disappearing all at once are very noticeable. 6) I also reduced the tree image size to 128x128, just in case, but I'm not sure it had an effect on FPS. Using an image of a pine tree or a leafy tree would create much more perception of a dense forest, but unfortunately I can't use those. The scene is a winter map of a specific real-world area with leafless trees and I'm trying to be as realistic as possible. A silly idea I've also tried was using an image of a group of trees instead of an image of a single tree. It obviously looked fake, especially when rotating the camera. Some other ideas that I've had but have not tried: Solid Particle System -> as it has more effect on performance than a simple particle system and I've already tried that. Octrees -> could this help me? I've read the tutorial but I'm not sure I understand how could I apply it to sprites. I don't know how camera.maxZ works internally, but is there possibly any way to apply it only to sprites, so the nearest sprites only are visible? Could I implement my own camera that does this? tldr; I'd like to show ~200.000 trees in my scene with minimal performance drawback. Thanks a lot in advance!
  13. Hi everyone, We've been working on a 3d mobile RPG game for a few weeks using Babylon.js and what we've been continuously struggling with is how challenging it is to keep 60fps on mobile. Let me share the "game" here to show you what the scene looks like: https://xiaobaker.github.io/. Don't laugh. Some stats: We have a ground mesh with standard material We have 4 different kinds of environment objects, tree1, tree2, rock1, rock2. We created 50 meshes of them using mesh.createInstance(). We have up to around 10 active characters in the camera. Each character has 6 meshes. I don't think we can instance them because each of them will need its own bone animation (one day -_-). Under 50 draw calls in total Running this on iphone 6 with ios 10.3.3 gives under 40 fps. We are hoping to keep it at 60 with even more stuff we want to add later on. I'm not super experienced with graphics optimizations, so could really use some advice here. A few optimizations I'm thinking of: The environment objects never change position or anything. How can we optimize for that? They use different materials, so I can't just merge them. Also, freezeWorldMatrix() on instanced meshes seem to destroy the mesh. Currently in the inspector it shows that mesh selection is taking 9.4ms and render takes 13ms. How do we bring mesh selection down? Octree can bring mesh selection down to 4.5ms but still that's quite a bit. How do we debug what's happening in the 13ms of "render"? How do we debug webGL performance issues on mobile devices in general? Any general suggestions on how to optimize for a game like this? Any inputs are greatly appreciated!
  14. low fps on iphone 6plus

    pixi.js is doing amazingly well for us on all our android and ios devices except iphone 6 plus. First discovered in our own game, later on we found that it can be successfully reproduced using http://www.goodboydigital.com/pixijs/bunnymark/. On most devices, it can keep 60 fps at even 50k bunnies, which is impressive. However, iphone 6 plus seems to be an exception. FPS drops to around 30 with just 3k bunnies, and close to zero with 10k. Anyone has any clue on what's special with iphone 6 plus?
  15. Hello everyone, Is is possible to implement some occlusion or LOD-like mechanism for sprites in Babylon? I have a scene with a very large terrain and some forest areas represented by thousands of tree sprites. There are so many sprites that they actually affect performance. Could someone point me in the right direction? Is there a way to adapt LOD for sprites? Or could I put the camera into some kind of transparent mesh and in some way occlude the sprites behind the mesh walls?
  16. Hi, I have a scene with around ~800 non-static meshes moving around, and I find the main performance bottleneck is the time taken by Babylon calling evaluateActiveMeshes, which in turn calls computeWorldMatrix and _updateBoundingInfo on most of the meshes. However, the nature of my scene is that most of the meshes never rotate, and I separately track their locations and bounding info. So in principle, it seems like I could tell Babylon they're static (by calling freezeWorldMatrix?), and then manually update their boundingInfo objects, and set their worldMatrices to simple translation matrices. Would this be a safe approach, or has anyone tried it? Or is there some built-in way of achieving a similar result? Or does freezing the world matrix have other implications that would cause this to break? Thanks!
  17. performance limit of webkit

    I modified the phaser example named "arcade physics/gourp vs self", I change the number of object to 10000 then , off course , fps is very low But only 14% cpu, and 300m memery be used on my system Is there any performance limit exist in chrome or webkit ? How can I change it?
  18. Hi everyone, We made a simple runner demo with Phaser that works as a base for all our future projects. We are using node modules to make our development easier. We shared it on github so more people can use it and learn from it: https://github.com/Tembac/ChimangoGamesDemo You can try it here: http://chimangogames.com/games/demoRunner/index.html It works great on every device we tested but some people reported that it is running slow on Ipad mini 1gen. We don't have that platform to test so it is hard for us to know how to improve it. Can someone give us tips on how we can improve performance for this demo on that platform? Thanks!
  19. Hello, I want to create an action-adventure platform game (similar to Swordigo). I chose Phaser because I've been using JavaScript for 5 years and I feel prepared regarding the patterns to use. I'm new to game development and I have a question: Phaser is suitable for this kind of game? Or can it cause performance problems on mobile phones? The game will have to work on iOS and Android in a WebView widget.
  20. Hey, I made a post before about scaling for high DPI monitors and thought that I came up with an acceptable solution but here I am again with some of my concerns about scaling and performance on 4k/retina displays. Even when I start from scratch and just draw a circle the performance is garbage. The weirdest thing is that the performance drops as soon as I put 1 pixel of the Chrome window on a 4k screen. So basically I have 2 screens connected and I move the Chrome window off the normal screen towards the 4k screen and immediately the frame rate drops to 30 instead of 60. I've logged the canvas and rendered size and there is no change when I put it partially on the other screen so the same stuff gets rendered. I've done the same to some other games and didn't notice this performance drop at all. It also happens with the examples and the bunny benchmark as shown in the crappy video below So my question is why the performance is suddenly so bad when I move the window over towards the 4k monitor. I would really appreciate if people have any tips on how to make sure the game looks good and performs well on 4k/retina displays. CSS scaling makes the performance better but then everything becomes extremely blurry and it's really not acceptable. Is it even possible to make web games that look great for 4k/retina displays with PIXI or in general?
  21. I am stuck in low FPS.

    I find that my game is always running at very low FPS (10 - 28 FPS) no matter what I try to improve the performance. The worst part is I don't know where to begin debugging or profiling. I have the following question, with priority in order. When FPS is low, is it always client side's problem? ( I just want to make sure if I am debugging on the right side, although I have also improved my server side in the process) How to profile it on Chrome? I have used the performance tab on Chrome but all I can see is the call tree from the ticker which goes all the way down to render function and renderCanvas function in PIXI's renderer. It doesn't help much with this information. I have tried commented out parts that are used to render different things in my game. But not leaving a single part out of my game would improve the FPS, the only way to get to 60 FPS is not to display the whole game scene (a container in app.stage) at all. I hope this question is not too specific.
  22. Phaser.Graphics anchor / pivot

    g'day g'day I've been lurking around a few forum posts addressing anchoring with Phaser Graphics objects and why you can't do it. I gathered it was something to do with it being a lower level issue with Pixi (don't quote me on that) the solution for dealing with this seemed to come down to either using pivot or generateTexture() and loading into image / sprite. Since it looks like post 2.5.0 we've lost Phaser.Graphics.pivot, I was wondering if there was any performance loss / gain by calling generateTexture() and loading into a Phaser.Image / Phaser.Sprite and anchoring from there? I guess simply put, is it cheaper to have 10 Phaser.Graphics or 10 Phaser.Images? ( bonus points for shedding light on what happened to pivot )
  23. Phaser + CocoonJS Lag Performance

    Hi in this states i uploaded my game is so laggy and i notice a bit of stopping after a platform leaves the viewport. It is a simple platformer game, hope you noticed this issue. THanks endlessState.js
  24. Hi there, i have a problem with the performance of my phaser game after i compiled it with cocoonjs i noticed that my game is so laggy. Is there someone developing games in phaser with cocoonJs that has a good performance after compiling?
  25. I have a heavy load Babylon scene (all meshes are optimized), which runs sufficiently well on desktops and tablets. The same site is slugish, slow or does not run at all on many mobiles when accesing through the mobiles browsers. I guess this is pretty normal since mobile GPUs are not as powerful as let's say tablets' GPU. So I guess the best thing to do is to test if the site is being accessed by a mobile device and divert the user to a mirror site where the textures are of lesser quality and the mesh sizes are smaller. Is that a correct solution? Is there any other ways of boosting performance Secondly, will wrapping the site into a Mobile app such as Cordova boost performance as compared to accessing the site through the mobiles' browser? Has anybody had experience with Windows apps running Babylon.js and were there any performance gains?