Search the Community

Showing results for tags 'FPS'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 124 results

  1. Hi, after upgrating to latest Phaser v2.1.3 performance in camera.follow rapidly drops... Here is a example... Test steps: - after load click on "HRAJ"("hraj" means "play" in slovak language) - you will be forced to fullscreen - use your keyboard arrows and walk around with character Whats wrong? When camera is moving with character performance of app rapidly drops!!! This is not a problem in Phaser 2.0.7 but all version up to 2.0.7 are affected with this Expected behaviour In phaser v2.1.3 it should camera.follow performance fast as it is in Phaser v2.0.7 CAMERA FOLLOW IS FAST - v2.0.7 This link using v2.0.7 - it's fast CAMERA FOLLOW IS EXTREMELY SLOW - v.2.1.3 This link load Phaser 2.1.3 - and on camera follow its extremely slow Code is the same but different versions of Phaser, any suggestions? Thanks for support
  2. Hello folks ! I recently discovered babylon.js and it's awesome ! I would like to create a FPS camera, i mean a camera that doesn't need to click on screen to move ! Can you help me with pieces of code ? Many thanks !
  3. Do you want custom FPS with smooth animations? I have made a method that makes this possible. The first 1-3 seconds may be buggy, but after that it works smooth. The update() method is called (custom FPS) times per second. The draw() method is called how many times the browser refreshes per second. Here's the code: (mainCanvas is a canvas with the size 800,600) window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function( callback ) { window.setTimeout(callback, Math.floor(1000 / 60)); };function step(){ for (var i = 0; i < updates.length; i++) { if (updates[i] == tick) { utick++; update(); } } tick++; var cursec = (new Date()).getSeconds(); if (cursec != prevsec) { prevsec = cursec; frametime = tick; tick = 0; uframetime = utick; utick = 0; updates = []; for (var i = 0; i < fps; i++) { var uind = Math.ceil(frametime / fps * i); if (uind >= frametime) { uind = frametime - 1; } updates[i] = uind; } } draw(); requestAnimFrame(step);}function update(){}function draw(){ ctx.clearRect(0, 0, 799, 599); ctx.fillText(uframetime.toString(), 10, 20);}var mainCanvas = document.getElementById("mainCanvas");var ctx = mainCanvas.getContext("2d");var fps = 30;var prevsec = (new Date()).getSeconds();var tick = 0;var frametime = 0;var utick = 0;var uframetime = 0;var updates = [];ctx.font="20px Georgia";step();
  4. Hi, i've been trying to getin my scene a camera like a first person shooter, what does it means? a camera where the y coordinate stay constant. Here in the official Babylonjs page you can find three examples ( Espilit or Windows Cafe or Flat 2009. thanks in advance.
  5. Hi Everyone, I'm experimenting with phaser and js windows store apps. I created a very simple app, just moving some sprites on the screen. What troubles me is quite often when i run the app on local machine from visual studio it lags. The sprites gently jump rather than move smoothly. This happens randomly. One time everything works smooth, next time it lags again (without changing the code or starting any other applications or anything). I use game.debug.text to draw fps to the screen and every time the game laggs i have 67 or 65 or 63. When game runs smoothly fps is equals 60. The extra few fps that happen in corelation with the laggy behavior happen even if i use game.time.deltaCap = 1 / 60. Has anyone came accross something similar ? Any help appreciated . Thanks! Code: // For an introduction to the Blank template, see the following documentation: // (function () { "use strict"; var app = WinJS.Application; var activation = Windows.ApplicationModel.Activation; // init for phaser; var game; var fishgroup; function preload() { //prealoaing assets game.load.image('xxx', 'images/test.png'); } function create() { game.time.advancedTiming = true; game.physics.startSystem(Phaser.Physics.ARCADE); fishgroup =; //game.stage.backgroundColor = '#ffffff'; game.time.advancedTiming = true; // game.time.deltaCap = 1 / 60; for (var i = 0; i < 5; i++) { var f = fishgroup.create(,, 'xxx'); game.physics.enable(f, Phaser.Physics.ARCADE); f.scale.setTo(2, 2); f.body.velocity.setTo(300, 0); } } function update() { for (var i = 0; i < fishgroup.length; i++) { var f = fishgroup.getAt(i); if (f.body.x > { f.reset(0 - f.body.width, f.body.y) //f.body.x = (0 - f.body.width); f.body.velocity.setTo(300, 0); } else if (f.body.x < 0 - f.body.width) { f.reset(, f.body.y) // f.body.x =; f.body.velocitysetTo(300, 0); } } } function render() { game.debug.text(game.time.fps + "---" + game.time.deltaCap + "---" + game.time.fpsMax, 100, 100); } app.onactivated = function (args) { if (args.detail.kind === activation.ActivationKind.launch) { if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) { // TODO: This application has been newly launched. Initialize // your application here. game = new Phaser.Game(1600,900, Phaser.CANVAS, '',{ preload: preload, create: create, update: update, render: render}); } else { // TODO: This application has been reactivated from suspension. // Restore application state here. // load , unpause } args.setPromise(WinJS.UI.processAll()); } }; app.oncheckpoint = function (args) { // TODO: This application is about to be suspended. Save any state // that needs to persist across suspensions here. You might use the // WinJS.Application.sessionState object, which is automatically // saved and restored across suspension. If you need to complete an // asynchronous operation before your application is suspended, call // args.setPromise(). }; app.start(); })();
  6. Hello, When I ran my code on Chrome today I suddenly found that it was locked at 30fps. I was confused because I hadn't changed anything since it last ran at 60fps so I tried Firefox which continued to run perfectly at 60fps. My only guess is that Chrome updated to lock the fps or something. Any ideas? (I am using Pixi 1.6.1 and Chrome Version 36.0.1985.125 m which is the latest) Crowbar
  7. Hello, Let me present you my game. This is a Multiplayer First Person Shooter set in a fantasy context. It runs only in Firefox and Chrome/Chromium browsers or any browser that fully supports HTML 5, pointerlock and websockets. So don't try with Internet Explorer. The game uses raycasting technics and looks like wolfenstein 3D or Heretic. The server program is written in Node.js and the client is written in javascript. No framework but mine is used. The game is located here : You play a wizard with the ability to shoot magic missiles and read various scrolls. All players are fighting each other in an arena. As a wizard, you may : Read scrolls and use potions. those items grant you temporary effects like invisibility or reflection shield. Such items can be found in chest scattered throughout the arena. Basic controls : Use your mouse and keyboard (W.A.S.D) to control your character. Click on the left mouse button to shoot, click on the right mouse button to use the selected item (scroll or potion). Use the mouse wheel to select an item. Deathmatch only... Currently, the only objective is to earn points by shooting down your opponents. There may be "team deathmatch" and "capture the flag" modes in the future. Mobs : Pumpkin monsters may crawl in the arena so watch out ! They are nasty. The server : Hosted by friends of mine, the server is located in Europe and may not be optimized for network games, sorry about the high network latency you may experiment... Screenshots : Video : Game : Game Manual : I hope you'll give it a try, please post some comments or suggestions. I'm thinking about improvements on this game, but I also have others projects in mind so ... If anyone knows one thing or two about making games a little more popular I'll be happy to read some advice. Thank you.
  8. Update: pre-alpha version now playable at: A few things to note: Works best on Chrome 34+; Firefox is supported but currently has performance issues; IE/Safari not supported due to missing pointer lock APIThis is not intended for mobile devicesA minimum resolution of 1024x768 is required to playHave fun! Hi, I'd like to show you the new three.js-powered FPS I'm working on. It's heavily influenced by '90s shooters (read: Doom clone), and features an abstract art style, blending 2.5D levels with Minecraft-like voxel models for enemies, weapons and power-ups. It's not released yet (currently going by Blizzard's soon model), however you can find more screenshots at Official site: Any feedback is greatly appreciated. Enjoy!
  9. About a month ago I started working on a First Person Shooter using ThreeJS. The main Goal is to make it easy to design a level/map/game in Blender 3D and have it fully functional in the browser without having the designer touch any of the code (although it is encuraged to look at, play, and help with the code). After about 2 weeks of working on it, I through out everything I had and started over again with BabylonJS. The game is coming along well and I thought it was about time I started sharing, and looking for help. To be honest, my coding is a mess and I'm constantly re-writing things. I really hope that people join in and help me with this project. I definately need some help making the menus and Heads Up Display look nice (anyone good with CSS?), as well as help with everything else. Here is a little bit of the game play: You can play the lastest version here (there might/will be bugs and glitches): And you can get the code here: You can catch me on freenode if you want to talk (I go by Metalx1000):
  10. whizzkid

    Spine fps

    Hey guys, Can anyone tell me how I can change the speed of a Spine animation ? I've read that one of the advantages of that kind of animation is the ability to slow down or speed up the animation, but I can't find out how to actually do this regards, -- update I see that I can easily add an animationSpeed variable to spine.AnimationState.prototype in pixie.js, and have the update function add delta * this.animationSpeed to its current/previous and mix time.. but is that the way to go? or can I use something that pixi already has built in somewhere?
  11. Hi, I'm some newbie programmer that need a little help in his starts. Now i have three questions to ask you. First. I've find an examples of sprite garbageCollector, but its work only in older versions (i test it on 1.1.5). How can i fix it? Here is code: var game = new Phaser.Game(800, 480, Phaser.AUTO, '', { preload: preload, create: create, update: update });var clouds;var cloud_dummy;function preload() { game.load.image('mario_cloud', 'mario_cloud.png');}function create() { clouds =; clouds.enableBody = true; clouds.createMultiple( 10, 'mario_cloud'); timer_shit =, add_cloud, this);}function update() {}function add_cloud() { cloud_dummy = clouds.getFirstDead(); cloud_dummy.reset(800, 100); cloud_dummy.body.velocity.x -= 150; cloud_dummy.body.immovable = true; cloud_dummy.outOfBoundsKill = true;}Error message: Phaser v2.0.3 - WebGL - WebAudio ♥♥♥ phaser.min.js:8 Uncaught TypeError: Cannot read property 'reset' of null (index):34 add_cloud (index):34 b.Timer.update phaser.min.js:12 b.Time.update phaser.min.js:12 b.Game.update phaser.min.js:8 b.RequestAnimationFrame.updateRAF phaser.min.js:11 window.requestAnimationFrame.forceSetTimeOut._onLoop phaser.min.js:11 Second question: I've some trouble with accessing elements of group. In example that u can see above, we have group named clouds and a cycle that add cloud_dummy elements to it. For example i have 10 elements on the screen, and i wanna access 3rd element of group to run other How can i do this trick? Third question: I've 2 browsers on my net-book, Chrome and Firefox. In Firefox my games(like example above) lag so hard, but Chrome give me around 60fps and have a little lagspikes that drop fps to 50. Phaser.CANVAS works better in Firefox and Phaser.WEBGL works better in chrome. How can i optimize my games to work better in both browsers? EDIT 03.05.2014: I've find a reason why my garbageCollector won't work. I forgot to check world bound for every sprite... Code shoul look like that: function add_cloud() { cloud_dummy = clouds.getFirstDead(); cloud_dummy.reset(800, 100); cloud_dummy.body.velocity.x -= 150; cloud_dummy.body.immovable = true; cloud_dummy.checkWorldBounds = true; cloud_dummy.outOfBoundsKill = true;}
  12. How know the fps for to set animationSpeed? Thanks!
  13. Hi, We are building our very first game-like page with really simple sprites with not so many object (less than 20) and animations using Pixijs renderer. Our target is to make the page work smoothly on decent tablets. But it turns out that the performance is very bad (fps is usually lower than 20). We tried to use Cocoonjs to boost the performance but when we deployed, the apk’ed app shows only black screen. Is there any direction/task that we could do in order to improve the performance of an mobile canvas-based application? Please look at our demo on your tablet to see the performance issues: Thank you, Sean
  14. My fps get over 60 (about 1k in a few seconds). What's wrong? It happens when window isn't active or if I open and close console all the time. What's wrong? I'm so confused… Is there vsync now that I need to turn on or something?
  15. Hi, I'm trying to make a game that's basically a much more simplified version of terraria but due to the amount of sprites I have, it's impacting the FPS pretty badly. I was wondering if there's some way to have lots of sprites while still keeping a high FPS.
  16. I've been just doing some simple tests on my server just to get things running. When I run it in Firefox I'm getting 60fps When I run it in Chrome however I get 24fps. Any ideas why my chrome browser would be going slower? I don't experience this problem with other browser games, including other phaser games. The only extension I have active is Adblock, which I disabled for my site Are there any plugins that are known to cause problems?
  17. So, I've begun fiddling with the tutorial example, but noticed that my fan was running a lot faster than it usually does. I checked the system monitor and noticed a CPU usage of around 50-60% when running the game code. This happens in both Firefox and Chrome. Is this normal? Any workarounds? It even slows down my code editor and other tasks. Sometimes it freezes for about 10 seconds, then continues but leaves the computer in a very sluggish state. - Scrolling vastly slowed down, programs shut down very slow etc. What is even more disconcerting is that nothing in the system monitor indicates any resource hog after I shut the browser down, yet the problems persist until I reboot. PS: I run Ubuntu 12.04 on a a i5 quad-core 2.5 GHz, 4 GB RAM. Bonus question: When upgrading from 1.1.3 to 1.1.5 gravity seems to get botched resolving A LOT slower than it should (and does in 1.1.3). What gives?
  18. Hello all, I have some performances issues when importing several scenes from Blender on tablet and some computers (with graphic drivers up to date). I have a page with several images displayed : when an image is displayed, a scene is loaded (like on I use this method to load a complete scene exported from Blender : BABYLON.SceneLoader.Load("models/", modelName, engine, function (newScene) { })In the callback function, I set up my ArcRotate camera, and a new light. My render function is very classical : scene.render() and stats display. My problem is : when I press the "back" button, and load another model (or the same one), I got a big FPS drop, from 60 FPS to 30 FPS (my model has ~20000 vertices) My handler on the back button takes care to destroy my previous scene : if (scene) { scene.dispose(); scene = null;}Is there something missing in my scene clean up ? Thank you for your help.
  19. Hello everyone, Lately I have been making a bunch of small web games. Therefore I'm quite interrested in: How to calculate the FPS of the game. I make my games in plain Javascript, and therefore I would like to know how to calculate the FPS in plain Javascript. I hope that was enough explanation. Thanks!
  20. Hello ya'll! Is there a way to directly set how fast the framerate should be? I figure there should be a "fps" variable that I could set to determine how often the update function gets called. Is that the case? Thanks!
  21. fabnun

    Set FPS

    Hi, first thank for this excellent framework, I used it to implement a zoom in Now I want to use it to develop a match viewer for My query is: can i set fps to a constant value such as 30 fps? Greetings and sorry by my english (i use google translate)
  22. I'll start with an issue I'm having and after that I will pass to a more generic thought. I'm using this game loop structure, using requestAnimationFrame: requestAnimFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(/* function FrameRequestCallback */ callback, /* DOMElement Element */ element) { window.setTimeout(callback, 1000/60); };})();gameloop=function(){ //Here I do my calculations and drawings //I do this in order to calculate FPS thisLoop=new Date; var fps=1000/(thisLoop-lastLoop); lastLoop=thisLoop; requestAnimFrame(gameloop); }It works fine both on Chrome and IE, at a steady 60 fps pace. But when running on Firefox, FPS counting goes over 60 (it sets around 65) and the gaming experience is a lot worse, not smooth at all because I suppose the screen might be dropping some frames. I read of setting a time-interval alongside the requestAnimFrame call but I don't know if it's the solution. Any thoughts? Having said that, a more broad question. MAKING GAME LOGIC FPS INDEPENDENT. This has been taking some of my time lately. I've tried a couple of methods to do that. In the first one, I use that fps data I'm getting to do the pertinent speed corrections every cycle with fresh data. Then I tried to do the same but using a mean value calculated over some cycles. I'm getting buggy results either way (what else!). Is this the correct approach? Which is the lowest FPS you handle in your games?
  23. This is my very first post so, first of all, hi everyone. I'm finishing my first mobile browser game and I would like to know witch ones are the cross device performance standards you use to validate the game. How many different devices do you use for testing? Do you only test the game in the modern ones?