Search the Community

Showing results for tags 'phaser 3'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 81 results

  1. Antriel

    3 Minute Adventure

    A short interactive story. Get equipment, go fight a dragon, talk with a princess. Epic adventure. Created using Phaser 3 and Haxe, with custom (and for now very simple) "narration engine story" language for writing the actual story in and compiling down to data the game uses to handle the interactions. Play the game here: http://nextrealmgames.com/games/3-min-adventure/ You can put the game on your portal using this url. The game is also available for licensing.
  2. Hi, I'm having trouble with browsers blocking popups. I know the rule is that it needs to be in response to a user action. Is this a bug with phaser? this.input.on('pointerdown', (pointer, targets) => { window.open('https://fb.gg/play/freeriderjumps', '_blank'); }); Thanks
  3. Hello game developers, this is my first post on this forum, so let me introduce myself first. My name is Michael, I am 21 years old and located in Germany. I love programming and starting to get involved in game programming. I already build a little prototype for the game where you can move the main character in front of a background image: https://sprig.000webhostapp.com/index.html For this game development project, I gonna use JavaScript and the Phaser 3 framework for the first time. The type will be a 2D side-scroller. The story, animation, art and sound assets are not a problem, so I am only looking for someone who knows or is willing to learn JavaScript and the usage of Phaser 3. If you are interested PM me on this forum. Have fun, Michael
  4. Antriel

    Spot The Spot

    A small skill based game with infinite upgrades. Made in a week using Haxe and Phaser 3. Play the game here: http://nextrealmgames.com/games/spot-the-spot/ You can put the game on your portal using this url. The game is also available for licensing.
  5. Play Link: Monster Clean-Up Can you fight monsters with a mop? Thanks to player feedback, I've invested all my time in creating this huge update: - New Monster Types - Boss Events - Different Weapons - In-Game Shop - Score System & Online Leaderboard! - Personal Kill Statistics - And more Gameplay You are the janitor entering a monster-infested building. How many monsters can you clear? Find out in Monster-Clean-Up! Clear floor by floor, collect power-ups, buy new weapons and stack up on dollars to save your progress! Check the leaderboard to compare your score with other fellow Janitors! The game works on all mobile devices (phones, tablets). Art & Design All the sprites in the game have been hand-drawn by me, which is a first. I would love to hear all your feedback regarding the art style as well as the overall gameplay! Game Link Thank you for checking it out Play Link: Monster Clean-Up
  6. makis

    Needing some tutorial!

    <script> this.input.keybord_F_key(‘isdown’,go); function go(){ this.add.anims({ targets: rocket, rocketPosition: { t:1, rocket.x: path.get.point.x, rocket.y:path.get.point.y, duration: 500 } }) } this.setColide(rocket, planet, blowUp); function blowUp(){ this.add.anims({ targets: planet, frames: {begins:1,ends:6}, frameRate: 20 }) } </script> I have to say that beeing a newbie on Phaser, I dont know if it is the right tool for little fun animations. If so can I have some help, please. Or, have you any idea for a different tool for projects like that? I know many things about html, css, javascript, d3.js, gsap.js, jquery.js. I have a tilesheet that begins with a planet and ends with the explosion of the planet. I have the rocket. When I push the F (fire) key it moves on path and destroys the planet. It explodes on it! Can I have any help in order to speak Phasers 3 language so I can give flesh and bones to my project? You have to keep in minde the unfortunate scarcity of Phaser 3 tutorials that could help people, thirsty for coding, like us. Again if you know some other tool for little animations, can you tell me what is that? I would be grateful if you do ...
  7. I have problems writing a multiplayer game with phaser 3 and socket.io I’ll explain it using a simple example: 2 players P1 and P2, try to kill each other using bullets B1 and B2. Scenario A: Use Pure Javascript and socket.io, without any game engine. A1. The socket.io server calculates the position of all players and bullets, and send these information to all players for every 30ms. A2. Each player send [inputs] to the server on real time basis. Of course, those inputs may arrive the server later then expected. A3. Each player show objects in screen only according to the information provided by the server, without calculating the objects’ position on the client side. A4. The game runs without any BIG problem since the Unique Game State is only calculated on the server side. A5. However, without using game engine, I need to calculate the [Physics] of all objects by myself on the server side. Scenario B: Use Javascript with phaser 3 and socket.io B1. At time 0.000 second, the server ask both players start the game at the same time. B2. At time 0.030 and 0.040, both players start the game accordingly. (As you can see, the network of player P1 is faster) B3. At time 0.200, player P1 fires a bullet B1 and starts to update screen using the phaser 3 engine’s [Physics]. B4. At time 0.280 (here the server takes 10ms to transfer this action from P1 to P2), P2 gets this action from the server, and starts to update screen using the game engine’s [Physics]. (You may probably notice that at this moment, the screens of P1 and P2 are different!) B5. Suppose the bullet B1 is able to hit P2 at time 1.000. At time 0.950, P2 moves away from the bullet and continues playing the game. B6. As you may already figure out, the action that P2 moves away, arrives P1 at time 1.030, at that time, P1 already win the game! At this moment, in P1’s screen, P1 win the game, but in P2’s screen, P2 is still playing the game! It seems that phaser 3 is not suitable for multiplayer games. Did I miss anything? Thanks in advance for your help.
  8. Hi! My game has two BG audio tracks: one for gameplay, and another for menu. I start the scene playing both, the menu sound have volume = 0. When I open the menu i call a tween that raises the menu music to max and decreases the game music to zero. When menu is closed, I call a similar tween that decreases menu music to 0 and increases game music to max volume. It works on Chrome and FIrefox. On Internet Explorer 11 it does not work. After some investigation, I found the volumes are completely ignored. Both sounds play at maximum volume simultaneously. Is there any workaround?
  9. Hi everyone! With the help of Phaser 3 I introduce... Free Rider Jumps! This is using the facebook messenger platform. The first instant game by Kano . Available on desktop, and mobile . Its a single track. Goal is to get the best score you can. You earn points by going the distance and doing it with style by doing tricks! Mobile & Desktop on Messenger Search "Free Rider Jumps" or try http://m.me/freeriderjumps?game=freeriderjumps Desktop Only on FB https://www.facebook.com/instantgames/183911338963055/ Still some work to do on it, like music / sounds, but the bulk of what we wanted is there. Feel free to give feedback / ask questions.
  10. HTML5 Game Link: Snot Kid EDIT: The game is now also available on the Google PlayStore: Snot Kid Android App Hello everyone! I am super excited to share this game with you and I hope you give it a try and let me know what you think. You can also play it on your mobile phone Below is a descriptive overview of the game with more details. Summary: The game is a high-score game with increasing difficulty, with many achievements to unlock and a online leaderboard! What is it about? Throw the kid's snot at the insects and stop them from entering through the window crack. If you hit enough insects you can even charge up a powerful burp to scare the insects away! Controls: Click / tap anywhere on the screen to shoot snot at the crawling insects. Stop the insects from entering through the window crack! Main Features: Funny and beautiful drawings Many achievements to unlock Global leaderboard to compete for the highest scores Easy controls Mobile optimized HTML5 Game Link: Snot Kid Google PlayStore Link: Snot Kid (Is there a way to add the YouTube video in a smaller size?)
  11. In Phaser2.x we can get `events.onOutOfBounds and events.onEnterBounds` for a Sprite object by enabling `sprite.checkWorldBounds = true`, With this event i can track how long an image object appeared on the screen. But in Pasher3.x, looks like it doesn't have events for `.onOutOfBounds and .onEnterBounds` It 'd be great, if you can give some insights on tracking how long an image object appeared on the screen on Phaser3.x
  12. tl;dr Pause, sleep, resume and wake make for a confusing api initially. Also a master pause (logic and audio) would be handy ( I might have missed this though.) After a longish break of game dev I wanted to take a look at Phaser 3. Loving it so far, (Phaser has come such a long way) but I find the pausing/resuming the entire game(logic, animation, sounds) a little confusing. I'm making a master Pause/Play switch. After game.loop.pause() didn't have the desired effect I've switched to game.loop.sleep and awake(). But I'm unsure if this is the intended use for them. Looking forward to the release of this bad boy, continue doing awesome work. Cheers
  13. Hi All, The body.gameObject is null during collisionstart event when using TexturePacker and PhysicsEditor json files Cannot read property 'setTint' of null The setTint call works (and gameObject is valid) when I load the two images directly like this.load.image('ship', 'images/ship.png'); Do I need to modify this code in some way so I can use TexturePacker and PhysicsEditor? var config = { type: Phaser.AUTO, width: 800, height: 600, parent: 'phaser-game', physics: { default: 'matter', matter: { debug: true, gravity: { y: 0 } } }, scene: { preload: preload, create: create } }; var game = new Phaser.Game(config); var ship; var ball; function preload() { // Load sprite sheet generated with TexturePacker this.load.atlas('sheet', 'images/sprite-sheet.png', 'images/sprite-sheet.json'); // Load body shapes from JSON file generated using PhysicsEditor this.load.json('shapes', 'images/sprite-shapes.json'); } function create() { this.matter.world.setBounds(0, 0, game.config.width, game.config.height, 0, false, false, false, false); var shapes = this.cache.json.get('shapes'); ship = this.matter.add.sprite(0, 300, 'sheet', 'ship', { shape: shapes.ship }); ball = this.matter.add.sprite(600, 300, 'sheet', 'ball', { shape: shapes.ball }); ship.setVelocityX(10); this.matter.world.on('collisionstart', function (event) { console.log("collisionstart"); console.log(event.pairs.length); console.log(event.pairs[0].bodyA); console.log(event.pairs[0].bodyB); event.pairs[0].bodyA.gameObject.setTint(0xff0000); // gameObject is null here (Cannot read property 'setTint' of null) event.pairs[0].bodyB.gameObject.setTint(0x00ff00); // gameObject is null here (Cannot read property 'setTint' of null) }); } sprite-shapes.json sprite-sheet.json
  14. Has anyone encountered a problem with the load progress reporting incorrectly when loading sprite sheets? I'm loading a large sprite sheet and loading goes from .5,.33,.66, to 1.00 immediately and loads these numbers every time. The game does eventually load fine, but way after load progress reports 100%. Here's the code: this.load.multiatlas('sprite_sheet1', 'sprite_sheets/sprite_sheet1.json', 'sprite_sheets'); this.load.on('progress', function (value) { console.log(value); }); I'm using Phaser 3. Anyone see any problems with the way I'm doing this?
  15. Hello, The answers to my questions may seem evident, please consider I'm a complete beginner to HTML and JS Phaser coding. I am having two problems with my code. The first is that renderTexture doesn't seem to work. I am trying to make a trail of my player, like the "trail" example on labs.phaser.io. I actually copied the code needed, but it does not work. Here is the line causing the problem: rt = this.make.renderTexture({ x: 0, y: 0, width: 800, height: 800 }).setOrigin(0, 0); in the create function. And here is what the console says: Uncaught TypeError: this.make.renderTexture is not a function at Scene.create ((index):301) at SceneManager.create (phaser.js:51412) at SceneManager.loadComplete (phaser.js:51329) at LoaderPlugin.emit (phaser.js:2622) at LoaderPlugin.processComplete (phaser.js:111210) at LoaderPlugin.removeFromQueue (phaser.js:111190) at LoaderPlugin.processUpdate (phaser.js:111171) at Image.data.onload (phaser.js:8947) _____________ The second issue affects the collision boxes of my obstacles. Those are static sprites, and the physics are "MatterJS". I have defined the shape of the hitboxes in PhysicsEditor, and have done exactly like in their tutorial to link the JSON to the sprites, but it doesn't work: the collision is not only triggered when the player enters the parts in the shape, but also in the rest of the rectangle that should not be considered. Furthermore, all physical properties I've set in the editor don't work. Then, I tried to do all of it without physicsEditor: I added required setters to do the work. While the physical properties are now correct, the hitboxes are still the whole rectangles instead of the chosen parts. Here is the code: //example var ob12 = this.matter.add.sprite(800-211, -6353, 'ob12').setStatic(true).setSensor(true).setFriction(0,0,0).setInteractive(new Phaser.Geom.Polygon([ [ { "x":132, "y":291 }, { "x":337, "y":498 }, { "x":423, "y":2 } ], [ { "x":50, "y":789 }, { "x":239, "y":979 }, { "x":337, "y":498 } ], [ { "x":0, "y":1220 }, { "x":423, "y":1639 }, { "x":239, "y":979 } ], [ { "x":239, "y":979 }, { "x":423, "y":1639 }, { "x":337, "y":498 } ], [ { "x":337, "y":498 }, { "x":423, "y":1639 }, { "x":423, "y":2 } ] ]), Phaser.Geom.Polygon.Contains); Thank you, Vainly
  16. Hello, community! I've just started using Phaser 3, and it's a pleasant experience. Special thanks to team for TypeScript definitions. I'm currently trying to implement scale logic for my game. I've read in this blog post that developers considered to change `ScaleManager` in Phaser 3, but I didn't find one in sources. I've also tried to take a look at how resize is handler in Mario platformer from pinned topic. Author used this: scaleMode: 0, //Phaser.ScaleManager.EXACT_FIT, ... but I didn't find `scaleMode` in Config.js object, and also didn't find any reference in Game.js object to this config property. It seems this was a way to scale game in Phaser 2, but not anymore. My current idea is to put all game objects in a 'parent' frame (not sure which object should I used for this btw..), and scale this 'frame' in each Scene on 'resize' event. This feels awkwardly wrong to me, and I'm looking for better approach. Would be very grateful for a hint where to look, or an advise on how to properly implement scaling. Thank you!
  17. Damla Eker

    addToFileList in Phaser 3

    Hi everyone, Is there an equivalent of "addToFileList" in Phaser 3?
  18. Damla Eker

    addToFileList

    Hi everyone, Is there an equivalent of "addToFileList" in Phaser 3?
  19. Hello! Have 3 virtual button for moving player. Use arcade physics. Phaser version: 3.10.0 How to make when holding down button with your finger, the player began to move. What you need to add the condition? Create: this.input.addPointer(2); this.jumpBtn = this.add.sprite(650, 950, 'jump').setScale(0.4).setScrollFactor(0).setInteractive(); this.leftBtn = this.add.sprite(100, 950, 'left').setScale(0.4).setScrollFactor(0).setInteractive(); this.rightBtn = this.add.sprite(250, 950, 'right').setScale(0.4).setScrollFactor(0).setInteractive(); this.jumpBtn.on('pointerdown', function (pointer,pointerdown) { }); this.leftBtn.on('pointerdown', function (pointer,pointerdown) { }); this.rightBtn.on('pointerdown', function (pointer,pointerdown) { }); function update () { if (cursors.left.isDown) { player.setVelocityX(-200); player.anims.play('left', true); } else if (cursors.right.isDown ) { player.setVelocityX(200); player.anims.play('right', true); } else { player.setVelocityX(0); player.anims.play('turn'); } if (cursors.up.isDown && player.body.touching.down ) { player.setVelocityY(-530); } }
  20. Hello people, I have the next problem, I'm making a little game with phaser 3, and I getting a strange behavior with the camera. I have a tiled map, 640x640, and a little sprite of 16px. So I'm trying that the camera focus the player a little closer and follow the player, but.... 1) When I try to zoom the camera to see the player, (passing a integer 2, 3 o 4 to the setZoom method) the camera distances itself more from the sprite, instead of get closer . With setZoom (1): With setZoom (2): 2) If I try to put a slower value, as 0.1, 0.4, the zoom get the camera closer it works, but if I use the startFollow method that makes the camera follow the player, make the screen black (I think it's because focus somewhere else out of the map, but this is an expeted behavior: API Documentation ), if I don't use the startFollow, and update ScrollX, and ScrollY, it do it alright. (I get the effect that i want) but everything is working diferent from the expected behavior: the documentation says that higher values make the camera zoom in, no zoom out, also in this way, I have another problem, a new cam that I use has minimap, do not work if I use a decimal value for the zoom ON THE MAIN camera. I have this config for phaser: var config = { type: Phaser.AUTO, parent: 'phaser-example', width: 640, height: 640, physics: { default: 'arcade', arcade: { debug: false, gravity: { y: 0 } } }, scene: { preload: preload, create: create, update: update } }; At the end of the create method I have : this.cameras.main.setZoom(2); //this.cameras.main.setSize(1000); I try to change the camera size, because if I use a higher zoom, the "square" or size of the camera became smaller. **** I writting this from another machine, but I will update with Screenshoot and more code
  21. Bodman

    Transparent Background

    Edit: Never mind. Typescript Type Docs are just incorrect This must be an easy solution, but I can't figure it out. I'm trying to make phaser render with a transparent background, but I'm getting a black background every time. Here is my initialization new Phaser.Game({ type: Phaser.AUTO, width: Config.width, height: Config.height, scene: Scenes, parent:document.getElementById('game'), "render.transparent": true }); Anything I'm doing incorrectly? Thanks again,
  22. Hi, recently i moved from Phaser 2 to Phaser 3 and i started some new project. Here is my problem: In Phaser 2 its easy to add text to sprite like this: var sprite = game.add.sprite(...); var button_style = { font: "27px Verdana", fontWeight: "bold", align: "center", fill: "#000000", stroke: '#ffffff', strokeThickness: 2 }; button_text = game.add.text(0, 0, 'blabla', button_style); sprite.addChild(button_text); After few days i am very tired of searching to get solution on Phaser 3 to add text on sprite. Can anybody help me please ? Thanks in advance.
  23. Hello, I'm using Phaser 3 and the physics engine matter. I need to call a function when one object collides with a particular object. For example I have a tank, barrels, hearts. Then there will be bullets, other tanks, some other objects. You need to call the function when the tank collides with the barrel, it should explode, and if it collides with the heart, it will replenish life. this.matter.world.on('collisionstart', function (event) { bangBarrel(); }); this method calls the function in any collision. How to trigger the function when the tank collide with the barrel, and how to trigger the function when the tank collide with the heart?
  24. Hi, devs I have a Phaser 3 game that I just integrated into the app and it was running just fine on the iOS simulator with all images and sounds working just fine. But when I ran it on actual iOS devices, I cannot see images at some places in the game. What can be the possible reasons behind this? There is no error in the code I guess since it is working fine in simulator and desktop chrome.
  25. karanJK

    failed to load image

    i'm trying to load image on phaser 3 but on chrome consol says failed to load image also search for it, change code but can't solve it. here is my js code var config = { type: Phaser.AUTO, width: 800, height: 600, physics: { default: 'arcade', arcade: { gravity: {y: 500}, debug: false } }, scene: { preload: preload, create: create, update: update } }; var game = new Phaser.Game(config); function preload() { this.load.image('sky','src/assets/sky.png'); } function create() { this.add.image(400, 300, 'sky'); } function update() { }