Panuchka

Members
  • Content Count

    11
  • Joined

  • Last visited

About Panuchka

  • Rank
    Member
  • Birthday 08/06/1989

Profile Information

  • Gender
    Male
  • Location
    Finland, Tampere

Recent Profile Visitors

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

  1. Just a quick question; how to not freeze the render loop when doing "heavy" operations? Example: In my game, I have a stage that is composed of squares. The player can move around the stage but so can the enemies. The enemies are using a pathfinding system that uses navigation mesh. This navigation mesh is created dynamically when the game runs. Player can destroy the tiles of the stage. The tile destruction triggers the recalculation of the navmesh. The recalculation itself is a pretty heavy operation that freezes the whole game for a second or so. What I'm pretty much asking is if there is an async functionality for heavy functions/operations that are triggered from the render loop. Or what is the best way to handle these situations?
  2. Panuchka

    Importing Canvas2D to project

    Is there ETA for 3.0? If the full release is far far away in the future, could we have 3.0 alpha/beta builds in npm too? Or include Canvas2D for 2.5? If I can't get this to work, I guess I have to do the UI using html/css I would prefer using just Babylon.js though, with Canvas2D.
  3. Panuchka

    Importing Canvas2D to project

    Why isn't Canvas2D included here in the npm package at all? https://www.npmjs.com/package/babylonjs @Deltakosh I can try that, but the Canvas2D should be included to the npm first! Can you do that?
  4. I am struggling with a similar problem like in this thread, but the solution provided here seems not so ideal... I have many modules in my game, and if I use Babylon.js in any of those, I import it using: import Babylon from 'babylonjs' So there isn't any good way to include Canvas2D similarly? I understand it is somehow baked to Babylon.js, but how do I use it? I'm downloading all the dependencies from the npm, including Babylon.js. Then I bundle everything using Webpack. Ideally, I would like to use Canvas2D (for example) like this: import Babylon from 'babylonjs' import Canvas2D from 'babylonjs' Please help, I've been scratching my head for hours now...
  5. Quaternions, matrices, yes. Joints and contraints, not yet so much I would like to improve my knowledge in these areas though. Well, philosophically thinking some of us are more into building Lego™ blocks themselves and not using the blocks to build something. I personally love to use the blocks someone else has already defined. So I guess I'm saying that for me, success is defined by "can I use this right now and is it viable". Most real life projects need some pre-existing technology to be ready so you don't have to invent the wheel again. It kind of baffles me that a 3D-framework for building games doesn't have a solid solution for a common 3D-game issue. Also I have to say that JavaScript is (in my opinion) a really nice environment to work with. I really love the ability to test the game on multiple platforms quickly and the fact that I can write JavaScript on the client side and the backend. You've been helpful, don't worry! I think I'm going to give up on the physics though, since it seems too much of a hassle. Hopefully I can have some help on the animation problem too!
  6. Thanks for the input @Wingnut, I appreciate it! I'm a Master's student in Computer Science, doing my thesis basically on the viability of 3D webgl engines for game development (at the moment). The reason why I'm currently using physics is pretty much trying to figure out how easy it is to use them. I'm also secretly comparing everything here to Unity, since I'm more familiar with it (and since Unity has webgl export thingy nowadays). Oh man, I looked into the source of the old man too and... It really seems a bit complex. What I've gathered now is that physics based games with animations are a bit of a no-go for now? At least if you want to have animations or so. Of course some 'tilt the board and make the ball go through maze'-kind of physics puzzle games would be possible, but nothing that requires complex models, animations and movement, am I right?
  7. Hi again, it's going to be long and maybe silly post once again. Today's topic is character animation and movement using physics (Cannon.js for now). Still doing the Bomberman clone. I've been digging for a some kind of a tutorial for this, but have not found it so far. What I basically wish to know is how to: Import a character with animations "the right way". I currently have a character, which has animations for idle/walking/running/jumping(start/looping/end). The problem is, the animations are all in different files and the format is FBX. So, what is the preferred way to import my character to BabylonJS? Should I just try to mash all the animations in a single file somehow? Currently, if I export the FBX to .babylon format, I get multiple files for each animation. When I import the animations to my scene, they are all playing by default. Sorry if this is a beginner question... Move a character using physics properly. I guess the main idea is similar to what Unity does. I created a picture (Image 1) attached to my post to demonstrate what I mean. I currently have a SphereImpostor, which is moving using keyboard controls (using addImpulse). Now, I guess what I need to do is kind of have all the other stuff such as the visible mesh that has the animations and the box for wall collisions to somehow stick with the ball that is moving. And also to rotate the animation to the direction where the ball is leading the character Am I on the right track here? Image 1: How I would like the 'character' to be like. Some threads that I dug up on the similar matters: Buuuut he decided to not use physics at all. Also found this demo, but it's from 2014... http://babylonplayground.azurewebsites.net/babyoncharacterwalk
  8. I managed to fix it. The problem was that I did not assign the physics impostor to the mesh properly: // RIGHT tileMeshCopy.physicsImpostor = new BABYLON.PhysicsImpostor(tileMeshCopy, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0, restitution: 0.9 }, scene); // WRONG new BABYLON.PhysicsImpostor(tileMeshCopy, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0, restitution: 0.9 }, scene); Here is the working one: http://www.babylonjs-playground.com/#BHMRT#1 I kind of thought that just creating the physics impostor would attach it to the mesh itself. Oh well
  9. Here you go sir! http://www.babylonjs-playground.com/#BHMRT Although I've been thinking of maybe dumping the use of physics engine and just use the collisions. What would I miss? If the only thing I need is some falling from the platforms, it is probably wiser to use something simpler? I'm curious, have you investigated how much the physics engine slows down everything?
  10. Hi, just a short question about physics usage. I use Cannon.js for now, moving to Oimo.js later on. Anyways, I'm making a Bomberman clone with physics turned on. Let's say that I have a 20 x 20 grid. Bomb explodes in my game and this should destroy some random tile. After I dispose the mesh, the physics impostor seems to be there still, since my trusty old debug ball happily rolls over the empty space. The question is: How to remove mesh and its physics properties from the scene?
  11. Hello everyone! I have kind of a complicated question. I'm currently doing my thesis at uni, the topic being web based games (specifically 3d ones). I'm going to create a small multiplayer Bomberman clone and reflect the process on the thesis itself; what problems I had, how does the development compare to for example Unity etc. I have used Unity kind of a lot and know the basics of threejs. However, after many hours I decided to make the game with Babylon, since it seems to be more suitable for the task at hand. I have a strong web-development background, so the thesis pretty much gives me some time to learn more about game programming Ah yes the question itself, which is pretty much about setting up the project. I would like to have help with these areas: Using modern JavaScript, ES6 syntax and features for BabylonJS. Maybe load the modules using, for example, SystemJS. Is this a silly idea? Is it best to use, for example, Gulp for the deployment stuff, like minification? However, I have not found that many sample projects at all for the engine itself. Maybe I haven't digged far enough? If anyone has any useful links, sample projects or ideas to share with me I would be really blessed. Thank you in advance for reading my lengthy post