• Content Count

  • Joined

  • Last visited

About simpleyuji

  • Rank

Recent Profile Visitors

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

  1. I'm using Pixi 4.8.8. Some users have reported a low fps when playing my game, and when i asked for chrome profile report, I see something strange. It seems like some task is taking a long time to complete (red highlight shows 38ms or 27fps) despite the javascript taking much less than that. Here's the chrome profile json ( . Since its not like the timeline shows a long running javascript function, it's hard for me to figure out whats the causing the frames to take that long. Any idea on how what could be the cause? In comparison, when I record a chrome profile in my own browser for the same game, i get a consistent 60fps with no lag at all. And here's the chrome profile for that (
  2. Thanks!. I'll give it a try
  3. I was using 4.8.5, but I was able to reproduce it on 5.0.3 . Here's a demo. . I've used chunk size of 4 tiles so things are easily viewable on jsfiddle. Notice that some textures could be 96x96, 100x100, etc. You can change the CHUNK_SIZE variable to 8 to see more non-power of 2 textures To give you a bit more context, i'm making a sandbox game where players can modify each tile (place blocks and destroy them). What I'm doing is calling cacheAsBitmap (false, then true) on a chunk if its been modified. You mentioned RenderTexture. I can see how it can be initialized with a fixed size. So should I do PIXI.RenderTexture.create(512, 512) for my chunk instead of using cacheAsBitmap?
  4. I have a tiled based game, where i use cacheAsBitMap to render tiles as chunks (16x16 tiles). The way I'm currently doing is grouping tiles into a chunk instance which is basically a PIXI.Container . If all 16x16 tiles are filled, then cacheAsBitmap would generate a texture of 512x512 which is great. However, if there are some tiles that are not filled (i.e empty spaces), the generated texture (ie. 224x416) would not become power of 2 and I'll get console errors. The error looks something like "texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering". What's the best way to set the bounds of my container such that its fixed at 512 width and 512 height. My current planned solution is to make new custom class FixedContainer that inherits from PIXI.Container, and overriding getBounds function to return the proper values. Is there a better way?
  5. Seems like the free FBX converter from autodesk that you're referring to now links to "FBX review" instead. I did find windows version on other sites though.
  6. What's the best way to import a Unity Asset with animations into BabylonJS ? I tried 5/EditorToolkit , and was able to Export Scene, but it just didnt render properly. Might be because I'm using Unity 2017 . I've also tried importing .fbx file to Blender 2.79 (for later export), but depending on the asset, animations are not being included. Right now, I'm inclined to generate pre-rendered 3d animations as a 2D spritesheet instead, but just wanted to see if anyone has a different recommendation.
  7. So apparently, setting the ground position is good enough. ground = BABYLON.Mesh.CreateGround("ground1", CANVAS_SIZE, CANVAS_SIZE, 2, scene); ground.position = new BABYLON.Vector3(CANVAS_SIZE/2, 0, CANVAS_SIZE/2);
  8. I'm calling BABYLON.Mesh.CreateGround("ground1", CANVAS_SIZE, CANVAS_SIZE, 2, scene) to create a ground, but it starts at (0,0,0) and expands outwards in x,z plane in both positive and negative directions. I was wondering if its possible to make a ground such that it only grows in positive direction. I want to avoid negative values when setting player positions .
  9. Hey Eric. Really good textures, and nice work overall. Although at first I was confused when I got to the homepage, as I was seeing mostly sound effects, but realized that some links are for images, others sound
  10. Thanks. It currently has entity interpolation only, but yes, will definitely add client-side prediction to handle input-lag. Gameplay wise though, felt like something is missing. Not enough appeal, and not really sure how to describe it. I was also thinking of making it sort of a 2D battle-royale/last-man-standing type game, but if the basic gameplay mechanics is not good (which currently needs improvement), I feel like it just would not have the same appeal.
  11. Hi guys. Me and my brother made a game. It's a topdown HTML5 multiplayer battle-arena game inspired from Mario Kart, Donkey Kong (although there's barely any similarity) . It's based on phaser on the client, and most physics are done on the server using p2.js . Networking is done via (although will replace it eventually with just plain websockets), and protocol buffers for binary serialization. You move via "WASD" keys, "space" to dash, and mouseclick to shoot. Would love to get some feedback! You can check out the game below.
  12. Thanks for the reply. Just saw this. I ended up, just having a baseSocketHandler for all events, and doing a try{} catch {} on any exceptions that bubble up.
  13. Im making a multiplayer game using phaser on client and node.js/ on server and I'm currently not sure how to handle exceptions on server-side. Basically, whenever there are uncaught exceptions (perhaps due to some edgecase i didnt foresee), the server will crash, and the game state which gets stored in-memory for speed and updated every 33ms will get lost, including disconnecting all connected players (ie. 20 players will get disconnected if there's an unexpected server bug). Even if there's automatic restart, it'll be a new process with new memory and new socket connections. So my question is, how do i auto-catch these exceptions, so that I can handle them via an email notifier instead, and let the game continue on smoothly (prevent client disconnect) ?
  14. So I've been having trouble understanding how P2 physics works. Particularly, depending on the order of my function calls, sometimes the behavior would be different. Currently, if you look at the example here (, if the arrow-key controllable smaller box collides with the bigger one on the edge, it would actually go inside and through the body before some kind of separation happens. However, if I change the lines from box.body.mass = 0.3; box.body.damping = 1; box.body.fixedRotation = true; to: box.body.fixedRotation = true; box.body.mass = 0.3; box.body.damping = 1; The desired behavior of the objects not overlapping occurs. Why is this happening? Is it a P2 bug? It took me several hours to make it work the way I want it to (i tried changing the stiffness, tolerance, friction, contactMaterials, relaxation) by trial and error. I wish there's a more systematic way to debug physics. Is there a good P2 tutorial out there?