Search the Community

Showing results for tags 'phaser'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3,282 results

  1. spawn_more_overlords

    Simple Cutscene between levels

    Hey guys, im working on a 2D platformer with linear level structure. Between some levels i want to make a cutscene which consists of a background and a single sprite thats moving from left to right. Everything else like my HUD or character should disappear during that cutscene. In my case its just a plane thats flying through the screen. Once the plane has passed the next level should start. Can someone tell me whats the best way to achieve that. Thanks in advance!
  2. Hello all, We are expanding our team so we are looking for HTML5 (JS) programmers who are passionate about casual gaming, who want to work in international environments, with very experienced industry peers and great learning opportunities. If you have all these qualities we would like to meet you: A strong desire to learn, collaborate and work hard Organized and proactive Proven proficiency and professional experience (or extensive amateur experience) in at least one of the following game engines: Phaser Pixie JS Cocos2D-html5 Haxe/OpenFL Playcanvas Extensive domain of HTML5 and JavaScript Have demos or portfolio you can share Knowing some/all of these skills will make you a little bit more suitable for the position: Intermediate, Advanced or University Studies in Programming Experience working with third-party SDKs (Facebook, Adm...) Experience developing multiplayer games Knowledge of AWS or Google Cloud Knowledge of Unity 3D English You are gonna help us: Technical implementation of the games we make Guarantee the highest quality of our products Collaborate in the design of games Create a better working environment Benefits Flexible schedule with core hours from 10:00 to 15:00 (you choose when to work the rest) Possibility to grow professionally in the company To be able to learn from professionals with more than 10 years of experience in the industry. Join one of Europe's most successful casual gaming companies Possibility of working remotely if you are not in Barcelona PM us your updated CV (and a link to your portfolio) and we will contact you shortly. THIS IS A PAID POSITION
  3. spawn_more_overlords

    Simple interaction between two characters

    Hello guys, i am currently building a simple 2D platformer and want to create a simple interaction between my main character and a NPC. Im trying to figure out which functions i should use for this scenario: What i want to achieve: Main character walks until it reaches the sprite of the NPC. Soundeffect plays only one time and speechbubble (i will use a simple image) appears. Speechbubble can only be confirmed by pressing Enter. While speechbubble is not confirmed character cant move. When player hits enter, speechbubble disappears and character can pass the NPC without anymore interaction.
  4. NicoA

    [WIP] Bugs with GUNS

    Hello! I want to show the first 5 lvls of my second phaser game (v2.6.2), here is a picture of it: And the link: https://sumonbugs.herokuapp.com/ It work in PC and cell phones. It is a little laggy in some android devices. I will be great if you can test it and tell my what you think. Thanks!
  5. Del Piero

    Learn: Phaser 2 or Phaser 3?

    Hi guys! I need some help. I want to begin to learn phaser , but I don't know if I study the 2 or 3 version , I'm completely newbie. sorry for question.
  6. I have 2 files as below: file 1- var deck = 0; var game = { fun: function() { statements; } } file 2 - var game1 = { I need to call file 1function. I dont know how to call. } i am beginner for phaser 3. i dont know how to call..
  7. Lord Strider

    Phaser game - Dream Wizard

    Hello everyone, this first post here I hope you like it This is a bit of how my game is getting. I wait until the end of the year to complete it. It was built with Phaser 2.6 currently being used Phaser 2.10 will be ported to android using Cordova + Crosswalk will soon put it running on mobile. https://youtu.be/VepJt6wSJKo Thanks For Watching
  8. Play Cool Math

    Math Pixel Puzzle

    Math pixel puzzle is a very unusual game. The rules are very simple. You will see an image with pixels of various colors. After three seconds, the pixels fly apart in 3D space. Your task is to rotate the space so that the image appears as originally. In the upper left corner you will find a hint - a small picture. You’ll need to collect an image so that it becomes exactly the same as the one in the hint. If it gets upside down or inclined – let’s look for more options to solve this puzzle. The difficulty of the levels increases at every level. In this game, we collected figures from 0 to 9 and pictures of geometric shapes: circle, square, triangle, parallelogram, cube and star. Do not spend too much time as it is limited. The faster you solve the puzzle, the more points you will get. Game Play Video https://www.youtube.com/embed/wuCh4hVShZI Cordova Project for iOS and Android Google Play pluging GameCenter plugin Heyzap plugin (admob, UnityAds) Firebase plugin Play Math Pixel Puzzle Online Download Math Pixel Puzzle on AppStore Get Math Pixel Puzzle on Google Play
  9. Balamurugan

    How to build android and ios

    Am the beginner for phaser. I don't know how to take ANDROID and IOS build. Can anyone provide step by step guide or any link.
  10. Hello guys, in this tutorial we implement entering username for players by creating another login phaser state. Tutorial: http://gojasonyang.com/post/phaserMultiplayerGamePart7.html Github: https://github.com/dci05049/Phaser-Multiplayer-Game-Tutorial
  11. dcgames

    Jumping Cube

    I just did HTML5 implementation of an old game from Unix platform which seemed pretty much lost. The AI is moderate to avoid performance issues on the client browser. Expecting some feedback on it. Web: http://www.playonlinedicegames.com/jumpingcube Android: https://play.google.com/store/apps/details?id=com.algotgames.jumpingcube
  12. Hi everyone, I'm actually working on an app using phaser. I receive inputs from a device and i need to draw the last 200 points received each frame. I looked all day trying various solutions with bitmapdata and render textures but i couldn't find any way to draw all thoose points at once, each time i check with the firfox's canvas inspector i get to 202 drawings with something like 800 calls, i'm totally lost. Could any one help me? Thank you in advance!
  13. DavidAames

    Error when adding sounds with phaser

    Hey guys, first things first: sorry for my bad english. I have a big problem with phaser. I build a educational game without a webserver and everything's going fine and runs perfectly (using Phaser.CANVAS). But when i load a sound (game.load.audio("theme","assets/music/theme.ogg");) i get this error: "Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https." I've watched online and it seems, i need to have a webserver. But there are some questions and problems with this kind of thing. 1. Why can i add pictures, animations,code and more from my harddrive but music is a no go?! 2. I want the Game runs complete offline. It's important because the guy i am making this game for is teacher and they still have no Internet in his school. (unbelivable but true) 3. If I would setup a local server, then every who gets the game need one to?! it's so frustrating. i build the game as a html-file because this game should go to other schools with linux, mac etc. I just wanted it runs everywhere. With or without internet, no matter what OS is using. But what is a game without a Soundtrack? I have build the whole game and the only thing missing, is sound. I hope somebody can help me.
  14. CyborgNachte

    Stop all animations in a sprite group

    Hey there! I was wondering how you stop all animations in a sprite group when clicking one of them. I can't seem to get it to work. Heres my code that deals with it: function create(){ cardPack = game.add.group(); cardPack.create(game.world.centerX - 250, game.world.centerY, 'card'); cardPack.create(game.world.centerX - 75, game.world.centerY, 'card'); cardPack.create(game.world.centerX + 100, game.world.centerY, 'card'); cardPack.callAll('animations.add', 'animations', 'flip', [0,1,2,3], 12, true); cardPack.callAll('play', null, 'flip'); cardPack.setAll('inputEnabled', true); cardPack.setAll('input.useHandCursor', true); cardPack.setAll('events.onInputDown.addOnce', stopAnimation, this); cardPack.setAll('input.priorityID', 1); } function stopAnimation(){ cardPack.callAll('animations.stop', 'animations', null, true); } Is the error in the callAll for the animation stop or in the setAlll for event onInputDown? I've tried manipulating both and looking for examples for this but I'm coming up empty handed or just not searching correctly.
  15. onlycape

    Flappy Tours (my first game)

    Hi all, This is my first html5 game and my first contact with Phaser (2.10) and javascript, and I must say that this framework has left me pleasantly surprised. I'm a hobbyist with some experience in libgdx(java) and monogame(c#). Screenshots: Desciption: Simple endless game based on the original Flappy Bird. We must prevent the bird from colliding with obstacles. I know it is not the most original, but it is a simple way to quickly test the possibilities of Phaser. Link: Flappy Tours Target platform: The game is designed to play in portrait mode on a mobile with an aspect ratio equal to or narrower than a 3: 4. Of course, the game is playable in desktop browser. Credits: -Bird (duck) designed by bevouliin.com. Source: OpenGameArt.org . License: OGA-BY-3.0 . -Music "Pleasant Creek" by Matthew Pablo . Source: OpenGameArt.org. License: CC-BY-3.0. - Everything else by me. Notes: At least in this case and after some compatibility and performance issues, I take the following options (I'm newbie, I have probably done some things wrong ): - Do not use webgl. Still supporting webgl, some browsers have a low performance with WebGl. - Disable sounds when webAudio is not available. - Make the UI in the DOM. - I just found a little problem with phaser. When I turn 180 degrees a sprite using "sprite.scale.y = -1" the bottom and top properties of the sprite change (anchor is set to the center). This forum has helped me a lot in the development of the game when I was stuck with some problem. I hope to be able to return the help received. Best Regards and thanks for your time.
  16. I am trying to make an android build via cocoon.io using Canvas+ The game imports json tilemap data generated by Tiled. The game works fine in the browser, it evenr works when I use cocoon.io's webview instead of canvas+ (very slow though, like 1 FPS). I understand that this is probably a cocoon.io issue, but maybe someone else had this problem? Any idea what might be wrong?
  17. Loonride

    Coding Slither.io in One Week

    Check out my new video about my one week Slither.io project with JavaScript and Phaser!
  18. MerchantAdventurer

    Company of Merchant Adventurers

    Company of Merchant Adventurers is a trading game based on the C64 game Hanse from the 80ies. It's a browser game completely in HTML5/JS and using Phaser for some game elements like the Map or the mini-games. It's got a bit of multiplayer as you can see other merchants in towns and buy shares or attack their ships and harbours. The goal of the game is to claim the title of Mayor in London. This can only be done by wisely trading the goods returned by your merchant fleet. The game is not commercial and I've developed it as a hobby game programmer. It's in english and german language (settings at the top). If you like trading games - turn based trading strategy, and maybe enjoyed the game Hanse - you will enjoy a quick round of my Merchant Adventurers - give it a go and let me know what you think - trade's up! Login and register free at: http://trader.thomashopes.de/indexgame.php More details and blog: http://trader.thomashopes.de
  19. FahrulID

    Responsive Fullscreen

    I want to ask,, I want to make a game that it would fit to Phone Screen at any Screen Resolution with 800x600(or etc) canvas is it possible ? how can i do that ?
  20. eyo_omat

    Ticking time bomb in a game

    I am trying to create a bomb that only goes off after the player has collides with it but delays for a number of seconds. Currently it goes off immediately I have my collision as below game.physics.arcade.collide(this.player, this.tnts, this.tntCollision, null, this); and the collison handler as below tntCollision: function (player, tnt) { if (player.body.touching.right){ player.body.velocity.x = -200; } else if (player.body.touching.down) { tnt.kill(); var explosionGroup = "explosionSmallGroup"; var explosion = this[explosionGroup].getFirstExists(false); explosion.reset(tnt.x, tnt.y); explosion.animations.play('explode', 30, false, true); } else if (player.body.touching.left) { player.body.velocity.x = 200; } }
  21. I'm very new on Phaser, Hope you all can help me This is my fresh code <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>hello phaser!</title> <script src="//cdn.jsdelivr.net/phaser/2.5.0/phaser.min.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { // Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN. // Although it will work fine with this tutorial, it's almost certainly not the most current version. // Be sure to replace it with an updated version before you start experimenting with adding your own code. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create }); function preload () { game.load.spritesheet('courtrecordbtn', 'src/images/court-record.png', 194, 71); game.load.spritesheet('profilesbtn', 'src/images/profiles.png', 194, 71); game.load.spritesheet('nextbtn', 'src/images/next.png', 194, 71); game.load.image('logo', 'phaser.png'); } function create () { var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo'); logo.anchor.setTo(0.5, 0.5); // Court-Record Button var courtrecordbtn = game.add.button(606, 0, 'courtrecordbtn', actionOnClick, this, 2, 1, 0); courtrecordbtn.onInputOver.add(over, this); courtrecordbtn.onInputOut.add(out, this); courtrecordbtn.onInputUp.add(up, this); // Profiles Button var profilesbtn = game.add.button(0, 0, 'profilesbtn', actionOnClick, this, 2, 1, 0); profilesbtn.onInputOver.add(over, this); profilesbtn.onInputOut.add(out, this); profilesbtn.onInputUp.add(up, this); // Next Button var nextbtn = game.add.button(game.world.centerX - 97, 529, 'nextbtn', actionOnClick, this, 2, 1, 0); nextbtn.onInputOver.add(over, this); nextbtn.onInputOut.add(out, this); nextbtn.onInputUp.add(up, this); } function up() { console.log('button up', arguments); } function over() { console.log('button over'); } function out() { console.log('button out'); } function actionOnClick () { background.visible =! background.visible; } }; </script> </body> </html> I want to know how to make a button or images will appear if called, and can disappear too. Thankyou Very Much.... Edited : I Figured out i can use "If ", but i want to know another simplier way <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>hello phaser!</title> <script src="//cdn.jsdelivr.net/phaser/2.5.0/phaser.min.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { // Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN. // Although it will work fine with this tutorial, it's almost certainly not the most current version. // Be sure to replace it with an updated version before you start experimenting with adding your own code. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create }); // Variable var courtrecordbtnenable = true; var profilesbtnenable = true; var nextbtnenable = true; function preload () { game.load.spritesheet('courtrecordbtn', 'src/images/court-record.png', 194, 71); game.load.spritesheet('profilesbtn', 'src/images/profiles.png', 194, 71); game.load.spritesheet('nextbtn', 'src/images/next.png', 194, 71); game.load.image('logo', 'phaser.png'); } function create () { var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo'); logo.anchor.setTo(0.5, 0.5); // Court-Record Button if (profilesbtnenable == true) { var courtrecordbtn = game.add.button(606, 0, 'courtrecordbtn', delnextbtn, this, 2, 1, 0); courtrecordbtn.onInputOver.add(over, this); courtrecordbtn.onInputOut.add(out, this); courtrecordbtn.onInputUp.add(up, this);} else { } // Profiles Button if (profilesbtnenable == true) { var profilesbtn = game.add.button(0, 0, 'profilesbtn', profilesbtnclicked, this, 2, 1, 0); profilesbtn.onInputOver.add(over, this); profilesbtn.onInputOut.add(out, this); profilesbtn.onInputUp.add(up, this);} else { } // Next Button if (nextbtnenable == true) { var nextbtn = game.add.button(game.world.centerX - 97, 529, 'nextbtn', actionOnClick, this, 2, 1, 0); nextbtn.onInputOver.add(over, this); nextbtn.onInputOut.add(out, this); nextbtn.onInputUp.add(up, this);} else { } } function up() { console.log('button up', arguments); } function over() { console.log('button over'); } function out() { console.log('button out'); } function actionOnClick () { background.visible =! background.visible; } function profilesbtnclicked() { alert('Profiles Button Clicked'); } function delnextbtn() { } }; </script> </body> </html>
  22. coelacanth

    Cannot read property '2' of undefined

    Here is the code from an example. I have separte tiles images. <!doctype html> <html> <head> <script src="phaser.min.js"></script> </head> <body> <script> var game = new Phaser.Game(1024, 1024, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.tilemap('map', 'bsdmap.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('terrain', 'terrain.png'); game.load.image('p1', 'p1.png'); game.load.image('p2', 'p2.png'); game.load.image('bg_tile', 'bg_tile.png') //game.load.image('phaser', 'assets/sprites/arrow.png'); //game.load.spritesheet('coin', 'assets/sprites/coin.png', 32, 32); } var map; var layer; function create() { map = game.add.tilemap('map'); map.addTilesetImage('terrain'); map.addTilesetImage('p1'); map.addTilesetImage('p2'); map.addTilesetImage('bg_tile'); layer = map.createLayer('Tile Layer 1'); layer.resizeWorld(); } </script> </body> </html> Here is a tiled map in json format { "height":32, "infinite":false, "layers":[ { "data":[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], "height":32, "name":"Tile Layer 1", "opacity":1, "type":"tilelayer", "visible":true, "width":32, "x":0, "y":0 }], "nextobjectid":1, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.1.2", "tileheight":32, "tilesets":[ { "columns":0, "firstgid":1, "grid": { "height":1, "orientation":"orthogonal", "width":1 }, "margin":0, "name":"tileset", "spacing":0, "tilecount":4, "tileheight":32, "tileproperties": { "0": { "blocked":"" }, "1": { "blocked":"" }, "2": { "platform":"" }, "3": { "platform":"" } }, "tilepropertytypes": { "0": { "blocked":"string" }, "1": { "blocked":"string" }, "2": { "platform":"string" }, "3": { "platform":"string" } }, "tiles": { "0": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/terrain.png", "imageheight":32, "imagewidth":32 }, "1": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/bg_tile.png", "imageheight":32, "imagewidth":32 }, "2": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/p1.png", "imageheight":32, "imagewidth":32 }, "3": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/p2.png", "imageheight":32, "imagewidth":32 } }, "tilewidth":32 }], "tilewidth":32, "type":"map", "version":1, "width":32 } All the tiles are embedded in Tiled. But I got an error: Uncaught TypeError: Cannot read property '2' of undefined at Object.parseTiledJSON (phaser.min.js:3) at Object.parse (phaser.min.js:3) at new i.Tilemap (phaser.min.js:3) at i.GameObjectFactory.tilemap (phaser.min.js:3) at Object.create (index.html:33) at i.StateManager.loadComplete (phaser.min.js:3) at i.Loader.finishedLoading (phaser.min.js:3) at i.Loader.processLoadQueue (phaser.min.js:3) at i.Loader.asyncComplete (phaser.min.js:3) at i.Loader.fileComplete (phaser.min.js:3)
  23. Kalablum

    Projected Trajectory

    Hi, could some one point me to right direction on how to do this kind of predicted trajectory?
  24. CyborgNachte

    Tween on Click stops after rapid clicks

    Hey there! I'm pretty new to Phaser, but I've been making an idle clicker in it to learn the ropes. I've run into some issues with tweens that I'm not to sure how to fix. I have a sprite, and when you click it, it increments a counter and plays a 'bouncy' tween, to display you clicked on it. This is cookie clicker style, so the user will inevitably rapid fire click it at some point. The issue seems to be that after several rapid fire clicks, the tween just sort of gives up and stops working. My first assumption is that because we're creating a tween each time we get some kind of overload of them because we're not properly destroying them? I'm unsure how to effectively do this in this situation. The ways I attempted to fix it: use game.tween.remove(tweenName) at the end of the function (expecting the next click to create a new one) store tween in variable and if variable != null, clear variable before creating new tween in it. Neither of these had results which makes me think I'm not understanding this correctly. Code: crystal = game.add.sprite(game.world.centerX, game.world.centerY - 5, 'crystal'); crystal.anchor.set(0.5); crystal.inputEnabled = true; crystal.input.pixelPerfectOver = true; crystal.input.useHandCursor = true; //on click event firing crystal.events.onInputDown.add(actionOnclick, this); //this tween is just it moving up and down to 'float' game.add.tween(crystal.position).to( {y: game.world.centerY + 5}, 2200, Phaser.Easing.Linear.InOut, true, 500, 20, true).loop(true); //on click event function function actionOnclick(){ game.add.tween(crystal.scale).to({x: 0.95, y: 0.95}, 300, Phaser.Easing.Bounce.None, true, 300, 0, true); counter++; text.setText('Glamour: ' + counter); } Note: the tween doesn't need to complete if the user clicks again, just start over. It does this, but after so many rapid clicks it stops doing anything.
  25. jevisan

    Sprite flickering

    Im having an issue with my game. The player sprite flickers when positioning at certain points in the game. My tile maps are made in tiled editor so no risk of misplacing a tile. The flickering is only vertical and the physical body of the sprite is set a little smaller than the actual sprite which is 32 x 32 while the physical body is 16 x 28. I've also noticed that the flickering varies with the setting of the velocity. As an example, when jumping above a certain platform the sprite flickers when the assigned negative velocity of y and y gravity are assigned certain value, but it doesn't flicker when assigned another value. On the other hand, on another part of the game the whole screen/camera flickers at certain height. Any thoughts?