none-9999

Members
  • Content Count

    171
  • Joined

  • Last visited

About none-9999

  • Rank
    Advanced Member
  • Birthday 01/02/1999

Profile Information

  • Gender
    Female
  • Location
    uk++++++++++++++

Recent Profile Visitors

2,005 profile views
  1. none-9999

    Babylon.js in responsive

    hola, gilberto389@gmail.com
  2. hi for all, mi game has been accepted
  3. none-9999

    Firefox Slow FPS

    The same thing happens to me, and that without using any framework and having an emphasis on optimization (pool objects, bitwise etc)
  4. none-9999

    Mi new game, Space Jumper

    Hello everyon
  5. none-9999

    Babylon.js in responsive

    Hi, center in all orientation/resolutions. var ancho=1920;//width var alto=1080;//height function rPantalla() { var gameWidth = window.innerWidth; var gameHeight = window.innerHeight; var scaleToFitX = gameWidth/ancho ; var scaleToFitY = gameHeight/alto ; var currentScreenRatio = gameWidth / gameHeight; var optimalRatio = Math.min(scaleToFitX, scaleToFitY); if (currentScreenRatio >= 1.77 && currentScreenRatio <= 1.79) { //16/9 aspect canvas.style.width = gameWidth + "px"; canvas.style.height = gameHeight + "px"; canvas.style.left = ((gameWidth - (ancho * optimalRatio))/2)+"px"; canvas.style.top = ((gameHeight - (alto * optimalRatio))/2)+"px"; console.log("a "+canvas.style.left); }else { canvas.style.left = ((gameWidth - (ancho * optimalRatio))/2)+"px"; canvas.style.top = ((gameHeight - (alto * optimalRatio))/2)+"px"; canvas.style.width = ancho * optimalRatio + "px"; canvas.style.height = alto * optimalRatio + "px"; // console.log("b "+canvas.style.left); } scaleX = ancho/(gameWidth-(gameWidth-(ancho*optimalRatio)));//I use this for events, but it may not be necessary scaleY = alto/(gameHeight-(gameHeight - (alto*optimalRatio))); //console.log("scale x "+scaleX+" scaley "+scaleY); console.log("width "+ancho+" height "+alto); dataRatio.offx = parseInt(canvas.offsetLeft); dataRatio.offy = parseInt(canvas.offsetTop); if(playing){ engine.resize(); } } //fin de rPantalla : redimensionar la pantalla (end of resizing display) function init(){ dPantalla.w = window.innerWidth; dPantalla.h = window.innerHeight; dPantalla.rx = ~~(dPantalla.w/2); dPantalla.ry = ~~(dPantalla.h/2); canvas = document.getElementById('canvas1'); rPantalla(); //event resize, also change orientation window.addEventListener("resize", function () { setTimeout(rPantalla,300);//important this async }, false); } //end of init if you need more aspect ratios, tell me.
  6. none-9999

    Babylon js developer

    hi, i sent a email. 😊
  7. none-9999

    How to force HTML5 Game to load in Landscape mode

    here the advice to user to rotate device function setOrientation(){ if(window.innerWidth > window.innerHeight){ //device is landscape canvas.style.display="block"; imagePleaseRotateDisplay.style.display="none"; //resume the game }else if(window.innerHeight > window.innerWidth){ //device is portrait canvas.style.display="none"; imagePleaseRotateDisplay.style.display="block"; //pause the game } } window.addEventListener("resize", function () { setTimeout(setOrientation,200); //somewhere the coordinates update as asynchronous //that use the "setTimeout" }, false);
  8. Yes, I already know nodejs and babylonjs, but I want to take the course, to see what approach you give, And if you do that part would be wonderful, greetings.
  9. bought it. I hope the course has the part of creating game rooms, which has given me so much headache nodeJS
  10. In about 2 months ... it will be over. It was for the dream build play but I could not finish it by a lot of work .. Here I upload the development progress https://web.facebook.com/DiyoGames/
  11. Hi, 0.9 was a random value, if I had placed 0.5, it would go out of the screen to the right and I no longer heard any touch event. "engine resize" is why that function is called when starting (body onload) so it is inside that if. There is only one canvas .. in the DOM, (and a button for fullscreen) thank you very much.
  12. none-9999

    coordinates world

    many thanks, It helped me a lot, I had rotated the camera and that's why I moved in two directions at the same time ...
  13. none-9999

    coordinates world

    I need to create the "radar screen" to locate asteroids and ships, but I can not understand how coordinates systems work in BabylonJS. When the game starts, the ship is at 0,0,0 after moving on the x axis, (or what I believe was moving on that axis). How is it possible for the z-axis values to change? Note: I do not move on the y axis. At what point did I move 145 units on the Z axis? What am I doing wrong ? In the second image you can see the options that I have tried .. and i tried this too