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
    • 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 3,332 results

  1. jk90

    Loading Splashscreens

    I'm having problems displaying a splash screen/ loading screen using Phaser. I have managed to create a splash screen using text and a background colour, but one problem I am having is with displaying an image before the rest of the files have loaded. All of the loading of images must be done in the preload function but I cant use this function to actually display any images. What I would really like to do is load the splash screen image, display it and then continue to load the rest of the images ect. in the background. Preferably with text displaying the loaded %. Phaser apparently doesn't make this easy.
  2. Why aren't the physics engines stand-alone/plugin projects? Would it not be possible to have an adapter layer that must implement some interface for passing back collision data so that we could use which ever physics engine we wished and without having the bloat of trying to wrap other physics engines into Phaser? I'm asking this both from an academic and practical point of view. Is it slower to do it that way? Is it something you considered/attempted and decided it wasn't gonna work? Was it completely unfeasible? Just curious.
  3. While preparing a test project for this topic, I've come across something that seems to be a bug. I can reproduce it on the code from arcade physics body scale example. I've attached a zip file with the source code. Here are the steps to reproduce the bug on the body scale example code: move the game.physics.enable(sprite, Phaser.Physics.ARCADE); line just below the sprite creationset some scale (in my case 0.99)comment out sprite.body.immovable = true;comment out game.add.tween(sprite.scale).to( { x: 3, y: 3 }, 2000, Phaser.Easing.Linear.None, true, 0, 1000, true);The effect is that the first sprite begins to move right and downward (if the scale was set to some value greater than one the movement would be left and upward). phaser-arcade-scaling-example-with-bug.zip
  4. Hi, I have a sprite that gets scaled up x4 during the game but is then reverted to scale x1. Despite of scaling it down to x1 the game.physics.arcade.overlap() reports overlaps as if the sprite was still at x4 scale. To scale the sprite back to x1, I use: sprite.scale.setTo(1, 1);Is this a bug or do I do something wrong?
  5. markus.n

    Point-and-click-movement?

    Hi, I'm doing my first game with Phaser, in a similar style of 2d point-and-click adventure games. All the controls of Phaser seem very nice for platformers, but this feels very unintuitive. What I need to do is to move an animated spritesheet character to where i click (or tap) on a flat 2d screen, preferrably with an even pace from start to finish. I started with this similar example: http://examples.phaser.io/_site/view_full.html?d=basics&f=04+-+image+follow+input.js&t=04%20-%20image%20follow%20input The main differences are that I want the Y coordinate to stay the same all the time (easy) and that the character should stay still until there's a click. I've tried all kinds of combinations with e.g.: - game.input.activePointer.isDown (doesn't really help, since I don't want to hold the mouse button while the character is walking). - game.input.activePointer.justReleased (doesn't help either, since the walking time isn't standard, and the character keeps moving with the mouse after it's reached its destination already) - game.physics.arcade.moveToPointer (would be perfect, if there just was a parameter for stopping when it reaches the point, now it just keeps going.) - game.physics.arcade.moveToXY(player, game.input.activePointer.clientX). (same as before) Any help is greatly appreciated!
  6. how to determine whether one object in sight of another? in version 1.9 everything worked.
  7. So my first html5 game is almost done and you can check it out here: http://www.inflow-development.com/avoider/ Let me know what you think. Thank you.
  8. zenista

    [Complete][Phaser] The Guard

    Hi, Here is my complete game in Phaser. Link: http://www.breakfail.com/the-guard/index.html Check it out and give feedback. Regards update: Game updated with following changes. 1. It uses Phaser 2 now. 2. Three difficulty levels removed. Instead, now difficulty is automatically increased after each 5000 score interval. 3. Now game directly starts into fast action mode.
  9. mamwalter

    Display time after pause/resume

    when i create a timer: this.gameTimer = this.game.time.create(false);this.gameTimer.start();i can display seconds like this: this.gameTimer.seconds.toFixed(0)but if i pause my timer and resume it, it will not take care of the pause because .seconds is the duration since when the timer start. How can I display the time elapsed since the beginning of the game, taking into account pauses ? also this work perfectly: game.time.events.repeat(Phaser.Timer.SECOND * 20, 2, removeStar, this);but this not: this.gameTimer = this.game.time.create(false);this.gameTimer.repeat(Phaser.Timer.SECOND * 20, 2, removeStar, this);this.gameTimer.start();events are fired instantly.
  10. Hey, I have implemented a method to control enemy movement in a platform game. I have done it pretty sketchy and i'm wondering what would be a better / 'proper' way of doing it. Essentially it makes an enemy sprite walk to the end of a platform and when the sprite collides with the corner tile (before falling off the edge of the platform) the sprite then turns around and walks towards the other end of the platform and vice versa. I found that if I made the sprite turn as soon as it hit the corner tile that it would constantly go backwards and forwards on the spot because it was updating so quickly so I made it so it could only turn after a certain amount of time of previously turning. I know this solution is pretty sketchy but would be grateful if anyone could give me ideas as to a better way of doing this. Thank you. this.game.physics.collide(bird, layer, this.enemyTurn, null, this);enemyTurn: function (enemyHit, layerHit) { if(layerHit.tile.index == 25 || layerHit.tile.index == 35 || layerHit.tile.index == 34 || layerHit.tile.index == 54 || layerHit.tile.index == 28 || layerHit.tile.index == 38 || layerHit.tile.index == 44 || layerHit.tile.index == 10) { if (enemyHit.body.velocity.x == forward && allowedToTurn == true) { timeWhenTurned = this.game.time.now; allowedToTurn = false; enemyHit.body.velocity.x = backwards; } else if (enemyHit.body.velocity.x == backwards && allowedToTurn == true) { timeWhenTurned = this.game.time.now; allowedToTurn = false; enemyHit.body.velocity.x = forward; } } timeSinceTurned = this.game.time.elapsedSecondsSince(timeWhenTurned); if(timeSinceTurned > 0.06) { allowedToTurn = true; } },
  11. eugenioclrc

    [phaser] Circus Charlie

    Hi, i am developing a remake of the Circus Charlie. Feel free to be part of the proyect, or send me any tips or feedback. Personal blog: http://letscodetogether.tumblr.com Source: https://github.com/eugenioclrc/circushtml5 Game (only desktop version): http://eugenioclrc.github.io/circushtml5/
  12. Hello, I have nearly finished a platform game I have made in Phaser. The game runs mostly fine, however sometimes when the state is changed to a new level and the player sprite is created, it falls through the floor tile, hence losing a life and restarting the level. I'm not sure why this is and it doesn't happen very often but does occasionally which seems odd. I would be grateful for any info as to what might be causing this. Cheers!
  13. programlocura

    Phaser + CocoonJS - PHP Services problem

    Hi everyone! I'm in the final phase from my game, fixing bugs to work like a charm on mobile, but i'm having a lot of problems with cocoonjs. A co-worker told me that Cocoonjs doesn't support PHP. I was working with an intermediate PHP file to call to an external URL (From a service) that returns information, but it only returns the file content itself. Now i'm trying to retrieve information from the service but i'm having cross-domain issues. Someone actually has achieved this? Any information would be appreciated. Regards.
  14. Bluesir9

    PHP Leaderboard on Phaser JS

    How can i use php to mantain a leaderboard in a game built using phaser js?
  15. SpriteWrench

    [phaser][wip] Hail

    So in the spirit of "completing" one game a week. Here is my next project with phaser: spritewrench.github.io/hail . Polish is definitely needed on this one. Any feedback would be appreciated! The plan is to work on 1 project a week (while touching up previous ones) for 3 weeks and use the 4th week of a given month to finish up, polish and port to mobile devices(android and/or iOS). The source code for these projects will be put up on my github: www.github.com/spritewrench for review by the masses.
  16. Hi, I'm Cutler Cox. I am a junior in highschool who is looking for people to work with on the "Student Game Developers: Got Game?" competition by clay.io. I am a beginning coder, so I am not going to be perfect, but I work hard to be the best I can be. I'm looking for an artist, but other roles are welcome because I would like this game to be polished and well thought out. Most likely the project will be in phaser, but if I am unable to get it going on that, I'll go for impact.js because of the great available resources, and the competition gave me a free license. Once again, all help is welcome, but there is no promise of pay for anyone. If we get the game is good and we put in ads, the revenue will be split between all the collaborators. Thanks in advance!
  17. Hi there, I'm trying to get off the ground with creating my own phaser games, but I've hit a blocker that I just can't work out. I have a very basic setup, based on the Phaser Tutorial examples: index.htmljsphaser.min.jsassetsstarfield.pngThis is my very, very basic index.html code - but it falls over at the first hurdle when I try to access a game.physics method: <!doctype html><html> <head> <meta charset="UTF-8" /> <title>hello phaser!</title> <script type="text/javascript" src="js/phaser.min.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { var game = new Phaser.Game(1900, 1000, Phaser.AUTO, '', { preload: preload, create: create }); function preload () { game.load.image('starfield', 'assets/starfield.png'); } function create () { game.physics.startSystem(Phaser.Physics.ARCADE); // The scrolling starfield background starfield = game.add.tileSprite(0, 0, 1900, 1000, 'starfield'); } }; </script> </body></html>In Chrome I get the following error: Uncaught TypeError: Object #<Object> has no method 'enable' (index):48 create(index):48 d.StateManager.loadCompletephaser.min.js:4 d.Game.loadCompletephaser.min.js:5 d.SignalBinding.executephaser.min.js:4 d.Signal.dispatchphaser.min.js:4 dispatchphaser.min.js:4 d.Loader.nextFilephaser.min.js:10 d.Loader.fileCompletephaser.min.js:9 a.data.onloadphaser.min.js:9 This is all running locally under Apache. I have tried a few other basic things, but whenever I try to access any Phaser object methods I get this same 'Uncaught TypeError' issue. I have phaser-examples set up locally, and these run just fine - as do the Phaser Tutorial examples. I have been trying to just build out from the tutorials to experiment and get to grips with everything. I assume it's a really dumb error, but I just can't see where I'm going wrong. Any tips would be gratefully accepted. Thanks, Stu
  18. Finally, after weeks (I think around 3 weeks) of game design, refine, and coding, I finally able to put something decent up for showcase! The game, so far no named yet. The logic of the game is simple, don't get hit into the boxes! Just jump over or jump on the boxes to get scores. The game is at monsterenterprise.ml What left now is: 1. Music/sound 2. Better loading screen 3. Mobile management Please provide some feedbacks! Thanks!
  19. zxxz

    Default drag

    Hey I have a feature where a sprites velocity becomes the velocity of a moving platform when landing on it which worked fine. I have now however tweaked some of the controls including the drag.x and now when riding the platform the sprite slips off? I have also tried to change the drag to 0 when the sprite is on the platform but I get he same thing happen? Not sure of there is a way to essentially turn drag off or to whatever it is initially? Thanks
  20. rykket

    HitArea - Phaser 2.0.0

    Hi, I can´t find any information on how to use the new hitArea property for Phaser 2.0.0, I want to use this to check whether the face of a character is clicked/pushed or if it the rest of the body that is clicked. I am pretty new to Phaser so hopefully someone can help me at either showing me where to find the documentation on this or give an example of how to set an area and how to check if this area is clicked. Thanks in advance!
  21. Hey I'm trying to find a tool that will let me export the correct style JSON to add to a sprite using the .setPolygon() method. I've tried all the export settings from PhysicsEditor and none seem to provide the correct JSON. Is this the best tool to be used to create points from a shape with a transparent background? The polygon itself is quite complex, consisting of around 400 points. I wonder if it's even possible with this many points?
  22. turnA

    [Phaser] Sagemath

    Hi there! This week we want to share with you an educational HTML5 games, Sagemath! Sagemath is a math-arcade games where user must use correct wand (math operator) to combine Hero and Monster number, to defeat the enemies. We try to take a different route when coming up with the idea of new games, and try to make a quick & simple defense games using math mechanism. Play it on mobile browser for fun parallax effect Link: http://j.mp/sagemath Alternate Link: https://dl.dropboxusercontent.com/u/47459072/sagemath/index.html Hope you enjoy this little brain teaser! Do let me know if you have any problem or feedback
  23. shaunumb

    Any Pause Screen Code / Examples?

    Hi guys – just discovered Phaser yesterday. Just wondering if anyone has an example of a pause screen/state in a game created? Would be great to see some code. Had a look at the examples in the docs and couldn't see anything. Also, is the only way to pause/resume a game to individually pause and then resume all the moving / relevant elements, or am I missing some amazing game.pause() function? I pretty familiar with JS, but am pretty much a noob at creating games with frameworks. Many thanks, Shaun
  24. AustinG08

    Gradient background

    I am a total beginner with phaser and graphics programming so pardon my newbness. I am trying to do something similar to game.stage.backgroundColor only I want backgroundGradient. The only gradient methods seem to be for BitmapData however. Furthermore I can't even get any BitmapData to render. I just want to make my stage have a background gradient. Can somebody help me? Thanks! P.S. I have looked at this similar phaser post but couldn't make the canvas example work. http://www.html5gamedevs.com/topic/3330-gradient-fill-on-text/
  25. YTPo0OP

    Slow tilemap :c

    Hi everyone !I'm trying to display a part of a huge tilemap, so I think I have to add sprites in the render part like this : function preload() { game.load.image('tile', 'graphics/tile1.png'); } var map_x = 100; var map_y = 100; var map = new Array(map_y); for (var i = 0; i < map_y; i++) { map[i] = new Array(map_x); } var tiles = map; var speed = 4; var draw = true; function create() { game.world.setBounds(0, 0, 32 * map_x, 32 * map_y); cursors = game.input.keyboard.createCursorKeys(); mapen.generate(map, level, map_x, map_y); // Generate a map in map.js game.camera.setPosition(map_x * 16 - 600, map_y * 16 - 335); }// Update function with movements function render() { //TODO: render map var poscx = Math.floor(game.camera.x / 32); if (poscx < 0) poscx = 0; var poscy = Math.floor(game.camera.y / 32) - 1; if (poscy < 0) poscy = 0; for (var y = poscy; y < poscy + 23; y++) { for (var x = poscx; x < poscx + 39; x++) { switch (map[y][x]) { case 0: break; case 1: tiles[y][x] = game.add.sprite(32 * x, 32 * y, 'tile'); break; } } } }}; When I move the tilemap, the game become slower and slower... I tried to display all the tiles at once in the create() part but it's slow too :c I think I need to create in memory each tile and then display the one I need or delete the useless tiles, but I don't really see how I could do that ! Thanks for your help !