Temechon Posted March 19, 2015 Share Posted March 19, 2015 Hello guys, I'm trying to work on Babylon integration with Cocoonjs. It works great, performance are really good (with Canvas+, Webview+ seems slower) as far as I can tell (and THANK YOU JC for your great help ). As you surely know, a game without a proper GUI/HUD is not really a game, but more a game prototype.However, with canvas+, there is no DOM support = that means all the GUI/HUD should be in the main canvas. I tried to stack two canvas (one for a 2D library like pixi.js, and the other one for Babylon), but it does not work in canvas+ (a support ticket at Ludeai has been sent).Another solution is to work with Babylon.Sprite, with an orthographic camera, but there are few features missing : First, only squared sprites are supported today. You can find a repro case here : http://www.babylonjs-playground.com/#KTGW2, with the original sprite here : https://dl.dropboxusercontent.com/u/17799537/pixi/test.pngWith a non-squared sprite, results are very weird. Second, layerMask are not supported by sprites or spriteManager. A solution would be to set the orthographic camera very very far away from the scene, with a fixed maxZ (otherwise the orthographic camera will see all the scene), but it does not seems to work --> repro case here : http://www.babylonjs-playground.com/#YF6KR (or maybe I don't use maxZ correctly, which is very possible). Last, Bitmap font support. A game GUI have a lot of values changing all the times (text and number), and it's not a solution to create a sprite for each value. Bitmap font support would be awesome (see http://kvazars.com/littera/ to create custom bitmap font). To me, as Babylon is more a game framework than a 3D engine, it should be able to do all of this. What do you guys think about all this ? Any other ideas to create awesome game HUD ? Thanks ! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.