Search the Community

Showing results for tags 'phaser'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Found 2,858 results

  1. Same background image in all states

    Hello, I'm new to the Phaser framework and I'm trying to have a single backgound and logo througout all the states in a phaser game. I add the background image in the very first state but when I start the next state using:"State2"); the background image disappears. Do I have to load the background image in every state? Thanks
  2. Point and click adventure games

    I grew up playing point-and-click adventure games and really love the genre. I was curious if anyone knows of any examples, even small ones, made using Phaser, or others using JavaScript. I have been able to find very little on this, which surprised me quite a bit. There are a few engines available such as JSGAM, but I kind of want to use this as a learning experience about creating more complicated games myself, how to structure them, rather than making an awesome game.
  3. Phaser Scaling Question

    Hello guys, currently I'm trying to resize my game to the whole window, while centering a fixed aspect ratio game window in the center, and having padding sprites at the side, but without success. Can you tell me what I should do? Cheers
  4. Hi i'm very new to Phaser but i'm struggling with the onFloor and onCeiling events working together - i'm assuming it's syntax or something stopping this working as i want. Basically i'm playing with the sandbox and using code from the examples to familiarize myself with Phaser - my problem is this (code snippet from update below) the player.body.onFloor event works if i comment out the player.body.onCeiling event and a Game over message appears. As it is if i get the player to the top of the screen I get the You win message - but if i hit the floor then the game over message does not appear and the game seems to freeze and Platforms.destroy() does not execute. or is there a better way to implement "top" and "Bottom" of the screen? var text; var message; function update () { emitter.customSort(scaleSort, this); game.physics.arcade.collide(player, platforms); player.body.velocity.x = 0; if (cursors.left.isDown) { player.body.velocity.x = -250; } else if (cursors.right.isDown) { player.body.velocity.x = 250; } if (jumpButton.isDown && (player.body.onFloor() || player.body.touching.down)) { player.body.velocity.y = -400; } // mycode if (player.body.onFloor()) { message ="Game Over!"; GameOver(message); } if (player.body.onCeiling()) { message ="You Win!"; GameOver(message); } } function GameOver() { var bar =; bar.beginFill("#FFFFFF", 1); bar.drawRect(0, 250, 800, 100); var style = { font: "bold 32px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" }; text = game.add.text(0, 0, message, style); text.setShadow(3, 3, 'rgba(0,0,0,0.5)', 2); text.setTextBounds(0, 250, 800, 100); platforms.destroy(); player.destroy(); }
  5. Phaser

    Hey everyone, I have noob questions. I'm creating a platformer game with Phaser, as well as Tiled to create a layered JSON map. So far one of my tile layers is handling all of the inanimate object collisions via, 600, true, this.collisionLayer, false) to which I've passed indices to my entire tileset (only using one). Given that I've done this, does the number of tiles I actually create in that layer via Tiled affect performance? Would it be advisable for me to just use setCollision() or setCollisionBetween and pass only the necessary tiles that I plan on passing to that layer? My tileset is about 1/3 tiles I want to use for collision, and they're not totally organized but I can reasonable get that done if necessary. Also, what's better for performance, bigger tilesets or more, smaller tilesets. What would you consider a sweet spot for this in terms of size and number of tilesets? Note that I've already compressed my images etc and not having any performance issues so far, just taking preventative measures. Thanks for any help in advance.
  6. Game list of phaser games

    Edit by Rich (September 2016): Back in 2013 Mike created a web site (below) that allowed Phaser devs to list the games they'd made. You'll find over 400 games created with some of the earliest versions of Phaser. Lots of the links don't work any more, but some do, and it's a really interesting archive. It's not worth submitting your games to the list any longer, however I'm keeping it, and this thread, because people still post new games to this thread even today. If you do this, it's highly likely I'll see it, and add it to the Phaser web site. Mike's original message follows: ------------------------------------------------------------------------------------------------------------------- What I did started from personal need, but decided to share it and maybe improve it if it went bigger. Well since the engine is still new but there is quite a moving and I check every topic, and game that is made I have a phaser game list:
  7. [Help] Available Screen Space

    I am new to Phaser and mobile. As a learning exercise I am attempting to build a simple demo that renders a Phaser game object in the browser and draws a rectangle around the border of the available visible space. My goal is to make sure I understand how to determine the actual usable space. My game is going to use a board that fills one screen so I do not need (or want) any scrolling. I just want to determine the usable screen space so I can fill it. I have found numerous versions of this question on this forum and others and after trying many of the things discussed I am still not getting the result I am after. Based on reading, I think I should be using window.innerWidth and window.innerHeight to get the dimensions I want. On my desktops (using Chrome and Edge/IE) it works as expected. On my tablets (iPad and Nexus) it works as expected for both portrait and landscape orientations. On my iPhone (6) it works in portrait but when I turn it to landscape (and refresh the screen) the browser's navigation bar covers the bottom. On my Android phone it works in landscape but when I turn it to portrait (and refresh the screen) the browser's nav bar covers the bottom. I have spent a couple days on this so now it's time to ask for help... Is there a property I can use to get the actual usable space in the current browser or will there always need to be tweaking for specific devices? Thanks for any suggestions, DK Edit: So I added a check in the render function to watch for the screen size changing. When a size change is detected it rereads the window.innerHeight and window.innerWidth properties and then resizes the game accordingly. Doing this inside the render function appears to solve the problem. I am going to go with this for now. If anyone has any additional words of wisdom I am still open to suggestions.
  8. Hey everyone so I started my venture into programming months ago and started out with game maker language but didn't think I would ever get a job writing games in GML and so I stopped learning it and started learning HTML CSS and just recently 3 months or so ago got into what I thought would be super scary JavaScript, I dabbled in all the languages I could tbh and they all seemed so daunting. I didn't know what to do so I went back to HTML, CSS and JS. I think I understand JavaScript at a beginner level. My question how ever is.Is trying to study HTML5 game development as a sole hope to get a job doing it viable? I mean I can sit here and learn more on making websites but its not really my interest at all. I love games, playing em coming up with ideas to make em all of it. I would of learned Unity or Unreal but C# and C++ seemed so confusing to me, I like how JavaScript writes it just makes sense to me. But then when I start to make games and I've made some with tutorials with the Phase framework. I just get confused if I try to do it on my own. With Phaser I've done many many tutorials but I still can't seem to set out and just write it on my own. I just want to be able to one day make a game and have some kid stumble upon a kick ass browser game like I did years ago when I saw my neighbor playing Tibia and later RuneScape and thought it was the coolest thing ever. I know that RuneScape was originally written in Java and now C++, and Tibia was always a downloaded game idk what language it was written int but it does have a browser option now and I think thats amazing. Great games accessible anywhere with no download. Sources I've used to make games with Phaser Zenva Academy Interphase From Null to Full Lessmilks 2d Platformer Lessmilks Flappy Bird And I've even learned to just make games on the canvas with these 2 sources (no game engine.) GameKedo Intro to Canvas GameKedo Follow Up to beginner course Basically What I'm asking is if I should continue down this route and try to flesh out my skills and get a job for game development and what other sources or routes can I take to get there?
  9. Hello, Just finished my new game "Ball&Roll". It's my first attempt to use 3D assets with 2D engine. Playable link: The game is still open for exclusive licensing.
  10. Phaser move filter

    Dear community: We are learning about phaser and we have a doubt for this forum. We are trying to develop a simple shoot game with a plane and enemies. The goal is that when a enemy is killed, a fire animation will be showed. We did this with a spritesheet and the result is good but we want to improve the quality with this filter: The problem is that we can't move the fireball effect over each enemy. The fire is always in the same position (left-bottom corner), and we can not change it. Probably the problem is the opengl code but we are not sure. Anyone can add this fireball effect to be showed when the enemy is killed? I thing that this code will be useful for the developers as us.
  11. Development of games for Android?

    Who knows examples of successful games for android and suitable phaser framework for this?
  12. Phaser Atlas Sprite Size

    I have a sprite created from atlas. Everything works fine expect that the sprite is the size of the original image not the trimmed version. For Example, my sprite is 300x300 but I want it to the trimmed size of 110x93. How can I do that? { "filename": "stand1", "frame": {"x":1077,"y":708,"w":110,"h":93}, "rotated": false, "trimmed": true, "spriteSourceSize": {"x":119,"y":98,"w":110,"h":93}, "sourceSize": {"w":300,"h":300} }
  13. Admob Integration

    Hello guys, I know your busy on your projects but I'm stuck with this problem about 4 months I don't know what's wrong but I did all my best to make it work but unfortunately it won't. I just need help and some instructions for me to make it work. this is my, sample demo that didn't work for many times :'( Phaser-Ads.rar hope someone notice problems on it, regards. Phaser-Ads.rar
  14. Admob Integration

    Hello guys. I just need help regarding on implementing ads on my Phaser game, I am using CocoonJS compiler to compile my game and it seems that my process didn't work and I just rely on some examples from github and didn't work also. Hope you can help me with this. Thanks. I will upload my code here for checking.
  15. Make profile picture CIRCULAR

    I am getting data from server for multiple user images for my card game. The images are in rectangle/square format. I want to show the image in circular format. How to do this? Is there any workaround here?
  16. Hello everyone, I am developing a platform game like super Mario , I hope the enemy can move left and right horizontal and loop this. I just use very stupid way to make it. I use this code is work. if (enemy.x<= 450){ enemy.body.velocity.x = +200; } else if (enemy.x>= 800){ enemy.body.velocity.x = -200; } if I have more than one enemy, I need to set each of their values. I try to use game.add.tween eg game.add.tween(enemy).to({ x: enemy.x+80 }........, It also work!!!!!!! but same problem , I need to set each of their values. I try to use, but no success. What are the easy way to set enemy auto move left and right horizontal and loop this? Thanks you very much.
  17. This is a continuation of Multiplayer game tutorial series. On this part 2 tutorial, we make authoritative server for security purposes. We're using physics in the server (p2 physics) Tutorial here: If there's any question, please feel free to ask questions on my site.
  18. Hi there. Apologies if this has been asked before but I couldn't find an answer. I'm looking to create a visible grid on a layer of a tilemap. I could draw 2d lines on top of the layer but I'd much rather if I could have black layer underneath a ground layer and with that ground layer having a 1pixel margin between each tile on the grid. Hope this makes sense. Example of what I'm going for:
  19. I'm trying to kill a sprite after it passes the bounds in my game. I've tried using the phaser example this is my entire script, please help me <script type="text/javascript"> var game = new Phaser.Game(1040, 450, Phaser.AUTO, '', { preload: preload, create: create, update: update }); var platforms; var player; var bot; function preload(){ game.load.image('sky','assets/rpg-bg.png'); game.load.spritesheet('player','assets/player-walk.png', 87,125); game.load.spritesheet('player-attack','assets/player-shot.png', 113, 132); game.load.image('player-death','assets/player-death.png'); game.load.spritesheet('bot','assets/bot.png', 112, 141); } function create(){ game.physics.startSystem(Phaser.Physics.ARCADE); // Backgrounds game.add.sprite(0, 0, 'sky'); bot = game.add.sprite(1000,, 'bot'); game.physics.arcade.enable(bot); bot.body.gravity.y = 100; bot.anchor.setTo(0.5, 0.5); bot.body.collideWorldBounds = true; bot.body.checkCollision.none = true; bot.animations.add('run');'run', 10, true); bot.checkWorldBounds = true;, this); // Player player = game.add.sprite(32,, 'player'); game.physics.arcade.enable(player); player.body.bounce.y = 0.1; player.body.gravity.y = 100; player.body.collideWorldBounds = true; player.animations.add('run');'run', 10, true); } function update(){ // Bot Movement bot.body.velocity.x = -150; } function killBot(bot){ bot.kill(); } </script> Thank you
  20. Hello! I'm building a soccer keepie uppies game. I have many texture atlas' that make up the player and ball for my animations and some static images placed in the scene. There is also a score text in the top left corner. This all runs fine on desktop but on my iPhone 6s the fps is around the high 40's. If I remove the BitmapText then it's back up to 60fps. Even removing the player and ball and pretty much having only the score text in the scene I am noticing a hit in performance. Even if I don't update the score and have it just static at 0 points. I'm really wracking my head with this. I've been looking for a solution for nearly a week now and can't seem to come up with anything. I fell like I've tried all the tricks : ( Unfortunately I can't show any code as I am not permitted to. Has anybody else ran into an issue like this? Really hope somebody can help as I'm at a loss... Thanks!
  21. I wrote my very first blog post. It's a tutorial on how to create a multiplayer game with phaser in the client, and Node.js in the server: The server uses and Express.js. Part 1: It's for complete beginners who aren't familiar with Node.js and Phaser. I hope someone finds it useful if it's their first time working with Phaser and Node.js !!
  22. Space 2

    I just finished a game for KenneyJam called Space 2. You can play it for free. Now that the jam is over, I'm looking to polish and refine it. Looking forward to some constructive feedback on gameplay. Game Play Description Earn experience points for destroying enemy ships and asteroids. Use that experience to upgrade your ship. You can upgrade your max health, regenerations speed, reload speed, ship speed, shot damage, and weapon speed. Fly around the universe and try to stay alive, see how many rounds of enemy ships you can defend. Controls Use the arrow keys or WASD to move your character around and the spacebar or left mouse button to shoot. Click on the abilities to increase them once you have ability points.
  23. Phaser Plugin PocketDebug

    PocketDebug displays fps and timing graphs inside A HTML DOM Text element for maximum conciseness. Source & Docs Demo NPM pocketplot is the platform independent version . It can be used if you want to add a graph to A plain website. Looking forward to receive feedback (please do), ideas, contributions, optimizations so that the plugin can be enhanced for Phaser
  24. Flappy Pong

    Hello everyone, I'm very glad that I can show you my game called Flappy Pong. Its a little mix up of flappy bird and classic pong. In simple words - you have to bounce the ball. Everything with beautiful changing colors! Get it on play store: Click Here PS. I'm aware that at the start there may be some light freeze - its due to the loading banner from admob(Still trying to figure it out, maybe someone have some solution?). Tell me your opinions
  25. Admob Integration Help

    Hello guys. I just need help regarding on implementing ads on my Phaser game, I am using CocoonJS compiler to compile my game and it seems that my process didn't work and I just rely on some examples from github and didn't work also. Hope you can help me with this. Thanks. I will upload my code here for checking. Phaser-Ads.rar