Members

4292

Members

653

Members

2510

Members

88

## Popular Content

Showing content with the highest reputation on 10/15/18 in all areas

1. 3 points

## Pixel perfection

Hey ! Welcome to the forum Try this - http://jsfiddle.net/zmatocef/ and here's the PG- https://playground.babylonjs.com/#M9XT7F#3 as you can see, if you use diag, the FOV for 0px offset still leaves some area(coz of sq root) which is because of the fact (basic maths) let's say you render size was 500*500; diag = Math.sqrt(500*500 + 500*500) => 500 * Math.sqrt(2); because of this (sqr 2)1.41 there's some region left in the view area. (same case happen with Three.js; you can try yourself! ) This is how the formula is derived -> tan(x) = height/ base. Now for FOV ( we have to find 2tan(x)) In our case tan(x) = (renderHeight/2)/ (distance) ; //(distance btw camera and mesh; because camera is in middle) now x = tan-1(renderHeight/ 2* distance); and FOV = 2x; if you use diagonal; you can't get accurate result (x in this case)
2. 2 points

## Basic infinite scroller game

@kcoley i actually managed to fix it by tweaking the iterations param of the cannonjs plugin, but it would be interesting to know why that seemingly solved it. thanks!
3. 2 points

## Trying to understand the babylon paradigm...

As far as clones, these are just meshes sharing geometry. Disabling one has no effect on others. Also, there is no such thing as a MASTER clone, which means the first mesh can also be deleted with no effect on others. In general, these "tricks" as you call them are due to people perceiving that they are operatiing on meshes. In the GPU / reality however, the primary thing be operated on is materials which translate into a vertex / fragment shader pair. This difference of what is really being done to how you THINK you are operating, is causing your disconnect of what should be the way "things should be". For instance, having vertices in the CPU does not mean anything to the GPU until a material is created for them to be used as data. This compiling of shaders / GPU programs is what causes the latency. As @JohnK says, adding a mesh & disabling gets the shader programs compiled, so everything is ready when you want that mesh (really material) to be seen. Not straight forward, unless you look at it from the GPU's point of view.
4. 2 points

## How big of a terrain to balance performance + appearance on low-end machines?

Your water does not need as much subdivision. your water is flat, a subdivision of 4 is sufficient.
5. 2 points

## Maximum call stack size exceeded when apply click event on BILLBOARDMODE_ALL enabled meshes

Hi Deltakosh should be around by tomorrow. As mentioned, this happens because of a loop in calls, Here's a temporary fix for until it's fixed; Accessing absolutePosition directly, instead of getAbsolutePosition() function which forces computeWorldMatrix. Include the snippet in your code, after the main babylonJs file. BABYLON.ArcRotateCamera.prototype._getTargetPosition = function() { if (this._targetHost && this._targetHost.absolutePosition) { var e = this._targetHost.absolutePosition; this._targetBoundingCenter ? e.addToRef(this._targetBoundingCenter, this._target) : this._target.copyFrom(e) } var t = this._getLockedTargetPosition(); return t || this._target } https://www.babylonjs-playground.com/#9XBPW4#4
6. 2 points

Here's one in HTML that just makes a black background container and a video element. https://playground.babylonjs.com/#GC1S7W#1 (You may need to click run before the video works, issue with video elements need interaction.) side-note: PG with timeout( for extra video time ) will bug when clicking run again before the timeout finishes (and video is hidden).
7. 1 point

## Phaser 3 - Video tutorial series Free

I'm doing a video tutorial series for Phaser 3 since the only alternatives are paid Zenva courses(which aren't bad but not many can afford). I'm aiming to do videos once a week and if you want to help out, I'll be on discord open to discuss the scripts and what to go over.
8. 1 point

## Web Game Editor (MMORPG Editor)

Hello, I announce the release of Web Game Editor. More info here: http://www.html5gamedevs.com/topic/39884-web-game-editor-mmorpg/ Link of the site:=> http://www.web-game-editor.actifgames.com/ To download the editor you must be registered on the site. Feel free to consult the manual and tutorials videos or ask questions on the forum. You welcome. I hope you like this new version. There is still work to be done, but this version is more accomplished than the previous ones. Be sure that I will make every effort to make this editor as functional as possible with regular updates. Have fun. Some pictures:
9. 1 point

## Web Game Editor (MMORPG)

Hello, I'm proud to talk about version 2 of my MMORPG editor (FR and ENG) that I renamed to "Web Game Editor" instead of "HeroonEngine" which was a name that looked too much like another existing editor. This version 2 comes with a new, more modern, community-based website. It will be possible to find a manual and video tutorials for getting started, as well as a shop and a forum (FR and ENG). The editor has undergone many improvements, new features and various fixes to make it more stable, more functional and more successful. Some things have been totally rewritten. It will come with a small Integer demo that contains two terrain and plenty of media on offer. I should hopefully release version 2 in the month and make an announcement of its release. For the moment I present it here. I have been working on this editor for years since BabylonJS was born. The editor has been renamed 4 times and rewritten 3 times totally and this name is the last change. Content and features: Here is some screenshot:
10. 1 point

11. 1 point

12. 1 point

## Recommended approach in setting collision properties

If you dont want to use indices there is another way setCollisionByProperty You'll have to add the property to the tile in Tiled
13. 1 point

## Is it possible to mask a scene with another scene? ("Mask Pass")

Using the concept of layermask, you can also have at least 4 simultaneous scenes in the same place at the same time. A camera has a layermask, as do meshes. You could set all the meshes for one scene to a mask. The meshes for "another scene" can have another mask. If you set the mask of the camera to one or the other, then a different "scene" will be shown. If you set the camera's masks to a bitwise or of both, then both will show. If you are familiar with Blender, same concept. One Blend file / scene. If you wish to show only certain meshes put them on the same layer. If multiple layers are selected, more than meshes for one layer with display.
14. 1 point

## Pass a high-res texture and a low-res texture into a fragment shader, and output a new high-res texture

Well because it is a Pass postprocess It just pass the data (but can be used to scale up/down)
15. 1 point

## camera similar to DeviceOrientationCamera

Cheers @Deltakosh, will check it out this evening.
16. 1 point

## camera similar to DeviceOrientationCamera

Hello! this camera extends the ArcRotateCamera and then use this inputManager: http://doc.babylonjs.com/api/classes/babylon.arcrotatecameravrdeviceorientationinput You can use the xxxCorrection properties and set then to -1 to change the direction A doc about inputs: http://doc.babylonjs.com/how_to/customizing_camera_inputs
17. 1 point

## GLTF Extras

Here it s for the main extras field: https://www.babylonjs-playground.com/#10D6YT#154 It logs undefined as my gltf does not contain extras here but you can get the idea and then extract what you want from the JSON. This event will be raised before any of the other processing in the loader.
18. 1 point

## Trying to understand the babylon paradigm...

setEnabled takes the mesh out of the rendering loop and so does not consume processing time. Whereas isVisible hides the mesh but keeps it in the rendering loop. As always the best way to find out if something works is to try a simple example in the playground https://www.babylonjs-playground.com/#6W0A00 When cloning the geometry is copied but you can change materials. An alternative is createInstance this copies the geometry and the texture, so an instance cannot have its material changed. My preference is SPS solid particle system this takes a single mesh and allows you to group copies, as a particles, into a single mesh, so one draw call, but still allows a number of aspects to access individual particles.
19. 1 point

## Pixel perfection

well thanks a lot for the explanation, you made my day sir!
20. 1 point

## BabylonJS Toolkit Problems

You can literally HOST that Export folder as in IIS / ASP.NET There are so many options... The toolkit itself HOST the export every time you hit build and preview... IT ALSO SUPPORTS Serving compressed content... Just look at the Web Browser Network Panel... On eof the columns shows the actual gzipped size that is transfer. You could just Copy the Export folder to a hosting company like GODADDY... The bin folder has the HttpModule if you have that selected to export... and it generates the web.conifg that associates all the scene content stuff. Dude... If you are using My Toolkit... You are literally ready to rock and roll for web release Just HOST the Export folder somewhere (When not using the Toolkit for development)
21. 1 point

## Trying to understand the babylon paradigm...

Interesting question and from my point of view it is a bit like asking why does Picasso paint faces with both eyes on the same side of a head when they are clearly on opposite sides. Answer because he wanted to. Developing any system depends on the life experiences and views of the developer and since these are different for us all we all see things dfferently. When I first started with Babylon.js my expectations often led me down the wrong path until I learnt not why things were done in the way they were but how things were done. When you are learning it is too easy to look for the pieces you expect to find so you can put them together to build the system you want. However these pieces might not exist. You need to think about what it is that you want to build and what pieces are available that will allow you to build it. For example an alternative way to approach your number 2 could be to load your mesh and then use mesh.setEnabled(false) to keep it out of the way until you need it or even just mesh.isVisible = false. If you need lots of copies of the mesh then perhaps the SPS system might be a better way than cloning. Keep learning and there are many contributers here to help.
22. 1 point

## How to re-use animations for different sprite sheets?

Absolutely amazing - many thanks on that!
23. 1 point

## cordova android ubuntu fail to install need really help

defaultBuildToolsVersion="27.0.1" //String Installed packages:=====================] 100% Computing updates... Path | Version | Description | Location ------- | ------- | ------- | ------- build-tools;19.1.0 | 19.1.0 | Android SDK Build-Tools 19.1 | build-tools/19.1.0/ build-tools;20.0.0 | 20.0.0 | Android SDK Build-Tools 20 | build-tools/20.0.0/ build-tools;26.0.2 | 26.0.2 | Android SDK Build-Tools 26.0.2 | build-tools/26.0.2/ build-tools;28.0.3 | 28.0.3 | Android SDK Build-Tools 28.0.3 | build-tools/28.0.3/ See the problem ?
24. 1 point

## Text styling

Looks like there's no letter spacing for text in Phaser 3 So here's a little solution if someone will need it textline = 'qwerty'; letterSpacing = 10; letter = null; startPositionX = 400; for(var i = 0; i < textline.length; i++){ if(!letter){ letter = this.add.text(startPositionX, 1020, textline[i]).setStyle({ fontSize: '60px' }); } else { letter = this.add.text(nextLetterX, 1020, textline[i]).setStyle({ fontSize: '60px' }); } nextLetterX = letter.x + letter.width + letterSpacing; }
25. 1 point

## Basic infinite scroller game

for show you what happen you don't need terrain i just have one mesh and in any step prepare that again http://www.babylonjs-playground.com/#1QC9DP#175
26. 1 point

## How to re-use animations for different sprite sheets?

@blackhawx Okay I just kept typing and my post was getting a bit out of hand. So I decided to just write it out as a post on my dev blog here: How to Re-Use Phaser 3 Animations for Different Sprite Sheets I hope this was clear and useful! Feel free to "like" the post if it was good or leave feedback how I can improve it. Thanks again for helping me understand this process!
27. 1 point

28. 1 point

## WAZANA.IO

A lot of very nice feedback since WAZANA.IO is featured on the BABYLONJS homepage. I suspect you guys to help me make this game even better! Huge thanks
29. 1 point

## The Wingnut Chronicles

Hi girls. A little update on the SKAP tumble-recovery auto-pilot, as well as the new automatic "orient" auto-pilot. (skap - station-keeping auto-pilot) (tumble-recovery) https://www.babylonjs-playground.com/#PBVEM#292 Just RUN it and relax. Spacecraft is auto-tumbled, and SKAP func (lines 1318-1371) auto-activates after 3 seconds. It uses a combination of throttled thrusting, and a tiny bit (more) of physicsBody angularDamping. So far, I have not seen the SKAP phase fail. You can watch the av: numbers (angular velocity) as the skap "grinds" those numbers toward low magnitude values. When SKAP reaches a reasonable threshold of tumble-recovery... it shuts off. 3 seconds later, auto-orient activates... thrusting the spacecraft toward 0,0,0 on the erot (euler rotation) and qrot (quaternion rotation) values. It takes a while, and it is NOT perfect. But, if I ask it to be MORE perfect-resulting, it takes even LONGER. So, it's a trade-off. Most astro-crews probably don't care if they have a tiny bit of angular drift... at the end of a short auto-orient function. It seems to work pretty well, but SKAP phase COULD still fail... sometimes. It's "on the fence" Maybe that's part of the fun of the game. SKAP failures happen when the craft is ALMOST PERFECTLY done spinning... but then the av numbers start increasing again. I have not figured out WHY that happens. But, all in all, I can programmatically "watch for" indications of a SKAP about to start failing, and have it shut-off the SKAP immediately (prevent craft from slowly re-entering violent tumble again). I am still in search of the reason WHY SKAP failures happen. I think you can promote more SKAP failures... if you remove line 1351, and increase amp in line 1337... to perhaps 15 or 20. At a certain point of slow angular velocity and low rotation, the whole thing reverses... and my thrusters appear to start INCREASING angular velocity, going against their code logic. Interesting note (yeeeah): If I see the av: numbers start increasing, and manually shut-off the SKAP (by clicking any SKAP button)... then wait a few seconds, and click a SKAP button again (to re-start SKAP)... the "backwards-ness" is STILL there. The SKAP thrusting starts increasing the tumble speed. Bad, bad, bad. I wonder what causes this "suddenly, all my thrusters work backwards" problem. hmm. See lines 130-138? It's a cool little function that DK showed me. What it does... is calculate the very-current rotation/orientation of the craft. EVERY TIME I generate a physics translation impulse, or two rotation impulses (I "twist" the craft with 2 opposed'n'offset physics impulses... to cause a rotation thrust)... this function gets called. EVERY thrust pulsing! I dunno IF or WHY this function would/could "invert"... where it starts doing everything in the opposite direction... but that's my best suspect so far. SKAP works just fine... thru its "coarse" phase... counter-thrusting almost all angularVelocity magnitudes... using only thrusters and EVEN with UN-throttled thrusters. I hate (highly-dislike) setting/varying throttle values on the thrusters. It seems like cheating. By initial design, they are supposed-to always thrust at the same set power. But noooo. Ex: Line 1344... the Math.abs(av.z*amp) portion... is a thruster throttle-setting value. (Wingy pokes it with a stick and hopes it will leave). It should probably be Math.abs(av.z)*amp, too, but I guess that doesn't matter. ANYWAY... when the SKAP starts working on the "vernier" phase... the little-thrustings.... the final tweaks... THAT'S when I see the SKAP sometimes start failing. Most/all the av: numbers start increasing instead-of decreasing. SO, this persistent and annoying "thrusters suddenly start working opposite when av values get low" -problem... is still a huge issue and a major puzzle. All help welcome. Thx. Click here for 2 meg .zip of entire box-flyer package - no keypress observers - no spacecraft model attached. Meantime, I think I'll start working on linearVelocity SKAP now... when the craft is changing position at an insane rate. Just possibly, I will need to ensure the craft is NOT TUMBLING... before I can begin counter-thrusting the unwanted translation. So, rot-skap first (but maybe no auto-orient needed)... and then lin-skap. Then orient. Complete vehicle insanity-recovery. It's not like any of us would EVER pilot a spacecraft... in a way that would cause it to tumble violently thru space, right? Nah. Update: #295 is ready. PG starts with craft tumbling and translating uncontrolled. Click 'Rot Skap' and wait until that is finished. After that, you can click Trans Skap or Orient in any order, and maybe at the same time. Do Rot SKAP first, because Trans SKAP does not work well... while craft is tumbling. All 3 buttons are toggles. Old 'null rot' and 'null trans' buttons are still active... for instant-stop, as wanted. Trans-SKAP is brand new... and fails often... same problem as rot SKAP... thrusters sometimes operate in wrong direction. Still testing.
30. 1 point

## Friendly competition - Retro Remake Challenge!

Well, although I didn't arrive at a finished level, the retro competition still helped me make lots of progress and add new features to my work-in-progress game. You can play the uncompleted model train retro level (created for this challenge) here: https://quintushegie.com/gardentrains/#retrotrains2 This level (and all others) will become more exciting as my programming progress continues. Yesterday for example I added the shadows and improved lighting, which look nice. So my benefit of the challenge was that it helped me get excited about trying out new things and getting things to work. Not so much that I was able to complete a whole new mini retro game... but that wasn't my goal anyways. ðŸ™‚
31. 1 point

Hi @Buzul . Have you seen these docs on creating custom loading screens?: http://www.babylonjs-playground.com/#1WXS3J Here is a sample playground that uses a custom scene loader: http://www.babylonjs-playground.com/#1WXS3J You can implement a function in displayLoadingUI that implements a video texture.
32. 1 point

## Dynamic Terrain

Little uncomplete demo of a bat flight simulator in a cave : http://jerome.bousquie.fr/BJS/test/cave.html 2 dynamic terrains, one inverted
33. 1 point

## BabylonCpp - A port of Babylon.js to C++

Hi Babylon.js community, It is my pleasure to announce BabylonCpp, a port of Babylon.js to C++, facilitating the creation of lightweight, cross-platform 3D games and applications with native performance. This port is a manual translation from the thousands and thousands of lines of Babylon.js TypeScript code into C/C++. Some history In 2015, I was looking for an interesting pet project. Due to my interest in 3D and modern C++, I stumbled upon Babylon 3D (C#/native port). I used this project as a starting point for mine and started updating the code with the latest code of Babylon.js. In beginning of 2017 - after a long time of porting, frustration and testing - I decided to publish the code on GitHub. Since then I kept updating the code and adding examples on daily basis. The Good TypeScript makes it really easy to port to C/C++ compared to JavaScript. For most parts, it is basically copying the code, updating to the proper syntax and updating the header. To get a good overview of the current state of the project I refer to the screenshots on the samples page. Not really a surprise, but if you look at the samples code you will see that the API looks very similar to the one of Babylon.js. Not all functionality is supported yet, but this a work in progress. I am really pleased with the performance of Babylon.js and the speedup of BabylonCpp. I am aware that I am comparing apples and oranges but I can give you some numbers. On my Intel NUC NUC7i5BNHX1 (Intel Iris Plus Graphics 640 GPU) I am getting the following numbers for the relatively simple Grid material example for a resolution 1680x1050 on Fedora 28: Babylon.js engine (v3.3.0-rc.3), Firefox 62.0: +/- 15% fluctuating CPU load, 270 MB RAM usage, fluctuating fps between 45-60 fps BabylonCpp (library size is 7.6 MB): constant 2% CPU load, 16 MB RAM usage, constant frame rate of 60 fps Some possible use cases of BabylonCpp include: Native apps development on iOS, Android Using the library as a WebAssembly module Using the library in existing desktop applications or integrating third-party libraries (i.e. Recast & Detour, Bullet Physics engine, etc.) Technical exploration (i.e. testing functionality that is in OpenGL and not yet in WebGL, supporting Vulkan API) The bad Most of the time goes into keeping up with all the Babylon.js code changes. Every month I take a snapshot of the latest code and port the changes into my version. As a result, the code is always very up-to-date but code on which people are still working or that might be thrown away in later versions is also integrated. An alternative I am going to follow for Babylon.js 3.3 is sticking with the stable version and focus mainly on features and stability. Porting will be done in a branches and less frequently. Not all code can be easily ported. For instance, C++ does not have reflection. There are third-party libraries available to support this, but this means introducing a new dependency. ...and the Ugly Linux is my main development platform. The code compiles on Windows (MSVC 2017) and OS X but is not really tested and buggy. On Linux I am also getting different behaviour between the debug and the release version. So the library is for moment only really usable on Linux in debug mode... Looking forward to hear what you think about the project or where you want to use it. If you have some suggestions for improvement or want to contribute or help resolving some of the issues described above feel free to contact me any time or let them know in this forum, it certainly would help a lot! Cheers, Sam
34. 1 point

## Best way to learn Phaser 3?

Months later and I still can't learn Phaser 3, so frustrating to spend hours just to find the proper syntax or way to do something.
35. 1 point

## is Phaser 3 not for newbie?

Trying to learn Phaser 3 has been a frustrating experience, Unity 3D might be easier to learn with all the Youtube videos and tutorials that are available.
36. 1 point

## How big of a terrain to balance performance + appearance on low-end machines?

Hey @jdavid It's all in the math. Look at the least common hardware you want to support, and do an evaluation of vertices, materials, and textures. Always use a power 2 texture until we enter full support of WebGL 2.0. I always look at my code as a water pipe and a bathtub... how much water can I push through the pipe and how much water can the bathtub hold? DB
37. 1 point

## Best way to learn Phaser 3?

Hi @EpicKingdom_ For me the best way to learn is by picking a project (make it a really basic one for your first game), and learn what you need as you go. I'm sure others will have different ways of doing stuff, but for me, this has always worked. Need a menu button? Learn how to display a button and click on it. Need to change scenes? Find info on the forum about changing scenes. This is what I did when learning the Panda 2 engine and it has worked really well. If you get stuck, post a question on the forum
38. 1 point

## 2D Text in 3D world

@aWeirdo Seems to be in the right direction. How do I make the plane transparent though? (without making the text transparent as well) http://www.babylonjs-playground.com/#1WHJCE#0 I'd like to not have a background (the actual plane) behind the text, just a floating text with a transparent background.
39. 0 points

## Best way to learn Phaser 3?

It is discusting I fully agree! Rich take the money from mozilla and make the phaser 4, then phaser 5, then... 1000. Who care. It is all a joke!