Search the Community
Showing results for tags 'devices'.
-
Should I buy multiple apple and android phones/tablets or can I get away with using some sort of environment/simulator to test my games in?
- 2 replies
-
- responsive design
- devices
-
(and 1 more)
Tagged with:
-
Need some serious guidance with SceneOptimizer. I promise I have thoroughly read through the wiki page https://github.com/BabylonJS/Babylon.js/wiki/How-to-use-SceneOptimizer-tool I believe I have included the scene optimizer javascript correctly. Not sure if I am implementing the code correctly. Basically, I'm trying to downgrade rendering on slower devices (eg Samsung Galaxy S4). Using this code below, I never see anything coming through on the console.log when testing on my Linux Debian laptop in Chrome 38. Javascript include: <script src="/libs/babylon/babylon.1.14.js"></script><script src="/libs/babylon/babylon.sceneOptimizer.js"></script>Code: var _canvas = document.getElementById("renderCanvas");var _engine = new BABYLON.Engine(_canvas, true);BABYLON.SceneLoader.Load("", "babylon/room.babylon", _engine, function (scene) { // Wait for textures and shaders to be ready scene.executeWhenReady(function () { // Optimize scene rendering BABYLON.SceneOptimizer.OptimizeAsync(scene, BABYLON.SceneOptimizerOptions.HighDegradationAllowed(), function() { console.log('FPS target reached'); }, function() { console.log('FPS target NOT reached'); } ); // ...I've tried changing out High to Low and Medium but I'm never seeing the log. Leading me to believe I'm not implementing right. Also not sure, even if I get a log from it that it is degrading. I'm unable to find any other examples from a Google search. Can someone provide a very very simple working example where it will just auto degrade whenever the frame-rate starts dropping below 30? Thank you so much. And thank you for such a brilliant library. I'll share my project when it's done.
- 28 replies
-
- optimization
- platforms
-
(and 2 more)
Tagged with:
-
Hello, How do I make my canvas look the same on all devices? function PixiPlay(){ var renderer = PIXI.autoDetectRenderer(350,460,{antialias: false, transparent: false}); document.body.appendChild(renderer.view); var root = new PIXI.Container(); I saw a tutorial talking about Pixiv4. But he talks almost nothing about the canvas Can anyone teach me how to do this, in a simple way, please?
- 4 replies
-
- canvas
- resolution
-
(and 2 more)
Tagged with:
-
hi, it's a subject that appears also often but i can't find a solution who work for me, especially with the new Phaser. I have a portrait game and i want that my game is stretched like that : width = width of the device height is stretched to the height of the device i want no black borders visibles i have try many things without success, i have follow these links : https://phaser.io/examples/v2/input/game-scale http://www.emanueleferonato.com/2015/03/25/quick-tip-how-to-scale-your-html5-endless-runner-game-to-play-it-on-mobile-devices/ http://www.html5gamedevs.com/topic/8441-stretch-game-to-fit-window/ http://www.html5gamedevs.com/topic/13177-canvas-resize-how-to-always-make-entire-game-visible/ these solution appears to be fine but that don't work at 100% , see my capture screen : var innerWidth =window.innerWidth var innerHeight=window.innerHeight var gameRatio =innerWidth/innerHeight var game = new Phaser.Game(640,Math.ceil(640*gameRatio), Phaser.CANVAS, '', { preload: preload, create: create, update: update }) function preload() { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL //doesnt work with the new phaser > it appears that i must use game.scale.refresh() but that doesnt work // game.scale.setScreenSize(true) game.scale.pageAlignHorizontally = true game.scale.pageAlignVertically = true game.load.image("test","https://s21.postimg.org/ohfa30zhj/test.jpg") } function create(){ var ech=game.add.sprite(0,0,'test') //resize() } function update(){} https://jsfiddle.net/espace3d/s1poyaas/ have you a an advice to do that ?
-
Hi ! First, sorry for my bad english, i'm french and really not good in english... So, I'm creating a game, with sprites animations on click, all is right with this, but i test it on mobile today and there is a black square at the place of my png sprite, all of the other png are correctly displayed ! I've an other png animated in game wich is not on click event, it works perfectly... i don't understand the prob..? Could u help me please ! ps: If you don't understand anything, i can try to explain better ! Thanks !