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. So, this weekend I finish the design of my new game. I managed to go from here: to here: what do you think about my progress?? Do you like the new design??
  2. kpowgames

    Directional swipe

    Hello everyone, I'm fairly new to Phaser, and I'm just starting to figure things out. I made a simple prototype that uses "game.input.keyboard.createCursorKeys()" to listen and process the keyboard's cursor keys. Basically I have a sprite that moves up, down, left and right depending on input. Now I'm trying to achieve the same using touch events: when I swipe left, the sprite moves left; when I swipe up, the sprite moves up, etc.... but with no success. I've managed to detect swipe using a solution that user @imshag posted in this topic: http://www.html5gamedevs.com/topic/3862-swipe-to-jump/?hl=%2Bswipe+%2Bphaser#entry24473 It detects swipe, but doesn´t give me info on the direction of it. I could really use your help... How can I detect the direction of a swipe, and limit it to "up", "down", "left" and "right? Thanks in advance!
  3. Martiny

    [Phaser] ClickPic

    This is my first game, made with Phaser. It is an educational game made for my English students. I don't aim to win money from this in any way because I don't have the right of any of these images. Choose a category and click in the picture the text tells you. If you can test in your phones, that would be great. In my experience, the loading time is horrible, but I didn't find a way to improve it. Every image is around 50kb and I don't know how to make them smaller. Anyway, I'm glad I finished this game, it was a nice experience. If anyone wants, I can put the source code somewhere. Just bear in mind that this may not be a good source of information, since I'm just a beginner. Link: https://googledrive.com/host/0Byme41zCWn4peW1pRXZJYXNsc1E/index.html Bye
  4. trquoccuong

    Phaser on rails

    Hi everybody. I am studying Ruby on Rails and I see Phaser have a gem for rails.But I didn't find any tutorial for use it. I make a mini tutorial for run Phase on rails . What you need : Rails Installer http://railsinstaller.org/ ( easy way to install Rails ) Any edictor like sublime text .v.v In this tutorial I use the tutorial by Alvin Ourrad and Richard Davey. http://www.photonstorm.com/phaser/tutorial-making-your-first-phaser-gameLet 's start Create a new rails applicationrails new gamesGo to games folder by command linecd gamesCreate a controller for this game rails g controller star indexInstall Phaser to RailsAdd this code to Gemfile gem 'phaser-rails'Run on command line Bundle installOpen yourdir/games/app/assets/javascripts/application.html.erb and add this line //= require phaserNow I will copy all images on the tutorial to yourdir/games/app/assetsAfter that I will copy javascript code of that game to yourdir/games/app/views/star/index.html.erbRun the rails server Go to http://localhost:3000/star/index and try your games You can also upload that games to heroku like this http://blooming-fortress-2804.herokuapp.com/Sorry for my bad English
  5. gikdew

    Phaser LiveStream [Right now!]

    So, I was on ludumdare.com, thinking about game development you know... And suddenly I discover that this guy is making a game live using phaser, you can watch how it developes here: http://www.twitch.tv/i_am_spencer
  6. FrankyCutty

    Phaser error my website

    Hi, I want add a game-banner to my website, I have a game width fixed height and full width responsive. I have this home banner: I want to make this(image photoshopped quickly): When I load phaser.min.js in my index.html, not any problem with this. But when I load my main.js the scrollbar disappear instantly: I load phaser.min.js and main.js just after jQuery files: The code of main.js is very simple, I want load a image sprite test: Not even I use the id 'phaser-game'. Thanks for all the help
  7. michael-Bell

    Limit number of objects in group

    Sorry if this is a simple problem, this is my time using Phaser I am making a simple platforming game where you shoot at boxes, I am trying to limit the number of bullets that can be onscreen at any given time. In TypeScript, you can pass along the max number when you create the group, as shown here(http://jessefreeman.com/game-dev/building-a-html5-game-with-phaser/). bulletGroup = myGame.createGroup(10); // the max number is 10 To make this group in Javascript, I would use BulletGroup = game.add.group(); But if I try to pass along 10, then I get an error in the phaser.js file saying: TypeError: c.addChild is not a function Can someone suggest how I can resolve this problem?
  8. Hi, I have a scene where a global gravity for Arcade Physics is set to 640. Then I try to set a lower gravity of 10 for a specific particle emitter, so to have the particles seem to float in the air. game.physics.startSystem(Phaser.Physics.ARCADE);// 1. Setting global gravity.game.physics.arcade.gravity.y = 640;game.physics.arcade.frameRate = 1 / 30;game.time.deltaCap = 1 / 30 * 2;emitter = game.add.emitter(0, 0, 100);emitter.makeParticles('particle');// 2. Overriding gravity for particle emitter.// Won't have any effect because of 1.emitter.gravity = 10;But it seems that it's not possible to override the emitter gravity if the global gravity is set. Commenting out game.physics.arcade.gravity.y = 640; makes the particles float in the air as expected. I've attached a test project showing the problem in action. phaser-2.0.2-overriding-particle-gravity.zip
  9. Or a tutorial to create something similar?
  10. How would I go about detecting collosion of a player and a block(image)? The player currently collides with the block but I want to know how I could restart the game after this happens.
  11. LividPixel

    Sharp Screen Scaling?

    I'm working on a pixel art style game with Phaser and Typescript, and I was wondering how I would accomplish working in a 320x180 environment, and having it scaled up to 1280x720 (factor of four). I'd much rather be able to scale up the end result, rather than having to scale up each of my individual sprites. I've tried putting the small dimensions into my game constructor and setting scale.scaleFactor to (4, 4), but that didn't seem to do anything. None of the methods I've come across while googling seem give me my desired result. Any advice?
  12. jyapayne

    Phaser To Desktop Application Beta

    Hey everyone! I've been working on a little app for myself that allows exporting any html5 and javascript application to a "native" desktop application. It uses node-webkit to create binaries that work on all platforms. One awesome side effect of this is that node-webkit has it's own internal server, so there's no need to have a server installed to test your application. And, by enabling the toolbar, you can debug your apps just like you would in the browser. If you'd like to test the app and give me some feedback, that would be awesome. I'm hoping this will take down a part of the barrier of setting up a server in order to use phaser. Anyways, here's the link to my project: https://github.com/jyapayne/Web2Executable There are links to precompiled binaries on the github page and you can also check out the source code to see how it works. The source is kind of ugly right now and I need to clean it up a lot, but the app works and is functional on all platforms. Let me know what you think! Cheers!
  13. CarrotIsland

    Created Objects Collision Issue

    Hey all, I have been working on a side-scroller game in Phaser on and off for a week or so now and seem to have hit a wall. Basis of the game: You play a guy that shoots blocks and then uses said blocks to traverse a level. Problem: I am able to shoot blocks and finally able to jump off of blocks because I made them immovable. However, this removes their collision and thus all other blocks just go straight through them. This is a problem because I need blocks to stack and collide and such. Block Code In create(): blocks = game.add.group();blocks.enableBody = true;blocks.physicsBodyType = Phaser.Physics.ARCADE; In update(): game.physics.arcade.collide(player, layer);game.physics.arcade.collide(player, blocks);game.physics.arcade.collide(blocks, layer);game.physics.arcade.collide(blocks, blocks);// movement codeif (shootButton.isDown) { fire();}function fire () { if (game.time.now > shootTimer) { shootTimer = game.time.now + fireRate; block = blocks.create(player.x + 50, player.y, 'block'); block.body.immovable = true; block.body.collideWorldBounds = true; block.body.velocity.x = 400; } }All code: Gist - CarrotIsland
  14. Hi! I'm trying to figure out how to detach a sprite from a Group. Currently you add it with the group as a two-step process: 1) Create the Sprite 2) Add it to the group: group.add(sprite) But if I want to detach it from the group, so I can handle it individually, I have no other option than "destroy", which removes the Sprite. Setting the parent to null doesn't work either. The objective is that when a specific condition is met, the tween that is applied to all elements in the group as a whole doesn't apply to this particular sprite. Thank you!
  15. Arlefreak

    [Phaser][WIP] 8Puzzle

    Hi! today my last game became "playable" You can find it here : http://www.arlefreak.com/games/8puzzle/play/ To play use the arrow keys And the source code: https://github.com/Arlefreak/Phaser-8-puzzle-game Currently its using Phaser 2.0.2 It is an attempt to improve my JS and AI skills, the objective is to get the right order of the numbers, I used A* algorithm to find the answer, at the moment you can see the progression opening the console and hiting the arrow button. I will really appreciate if someone could tell me any feedback on my JS or AI skills based on the code or any feedback actually When I implement the solving animation will update this
  16. StuffBySpencer

    Having Troubles With States

    I'm currently having troubles with states in my game. I just started using it so I'm certain I'm making a dumb mistake, but if you could help I would really appreciate it. The problem I'm having is that when I hit the Space Button, it triggers the start function in stateMENU again and again. Shouldn't the stateMENU end and not respond/react anymore? If you need any more information, let me know. Here's My Code This is in LOAD.js: var stateLOAD = { preload: function(){ this.game.stage.backgroundColor = "#FF0921"; this.game.load.spritesheet('player','redThief.png',50,95); }, create: function(){ this.game.state.start('menu'); }}; This is in MENU.js: var stateMENU = { create: function(){ game.stage.backgroundColor = "#8A8A8A"; var spaceBttn = this.game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); spaceBttn.onDown.add(this.start,this); }, start: function(){ console.log('start'); this.game.state.start('play'); }};This is in PLAY.js: var bgColor = "#678543";var statePLAY = { create: function(){ console.log('CREATE'); game.stage.backgroundColor = bgColor; var moveKeys = game.input.keyboard.createCursorKeys(); }};^ When you hit spacebar during the 'play' phase, it triggers the code in the start function in stateMENU and the console logs 'start' along with 'create'. This is in GAME.js: var game = new Phaser.Game(600,400,Phaser.AUTO,'gameDIV');game.state.add('load',stateLOAD);game.state.add('menu',stateMENU);game.state.add('play',statePLAY);game.state.start('load');
  17. Hey so i moved away from the gameControler.js So instead i tried this. lftButton = game.add.button(0, 300, 'button', actionMoveLeft, this, 2, 1, 0); rhtButton = game.add.button(200, 300, 'button', actionMoveRight, this, 2, 1, 0); //but i know that it has to keep update alive cause when you only use this you have to press the button like crazy to make the player move. tried too add an extra pointer, and then check for active input and so on but still no good came from it. So please any better solutions too this would be awesome thanks! function actionMoveLeft() { player.body.velocity.x -= 900; player.animations.play('left');}function actionMoveRight() { player.body.velocity.x += 900; player.animations.play('left');}-Learning
  18. Thunraz

    [Phaser] Hexagon Snake

    Hello! Click me! Me (@Thunraz) and my friend @Laguna_999 wrote a little game for #1GAM March 2014. It's called Hexagon Snake and (as the name suggests) you play Snake on a Hexagon grid. Feel free to tweet your high scores. There's a button that appears in the top right for your convenience. The game should be playable on desktop as well as mobile browsers. Please let us know if your configuration does not work. We used Phaser 1.6, Cubase, Piskel, Aseprite, SFXR and Inkscape. If you have any sort of critique - be it positive or negative - let it out!
  19. maf

    timeline animation

    i keep running into the need to implement fairly complex animations in cut scenes for games/apps. currently using phaser for game and scene management which is going great, but i'm sick of manually porting timeline animations into code - i've used flash cc's html5 export functionality fairly successfully with the createjs library in the past for other projects - just trying to get my head round trying to merge these two worlds. wondering if anyone's had any experience with this - a sprite with a BitmapData texture rendered to by createjs? or any alternative suggestions? Basically looking for something an artist can use to spit out timeline animations that I can easily integrate into a Phaser state. These animations are not involved in the actual gameplay, just presented as separate sequences between levels.
  20. FlashbackJon

    The art of waiting...

    Long story short: new to Phaser, making a roguelike. Turn-based movement on a tilemap grid, etc. Obviously this ground has been covered before, but it seems that every example of a roguelike or RPG that I've found has basically just set the x/y of the sprite every time a movement occurs, and I'd like to be animating it. I want to wait for user input, then shut off listening for input, and wait for the chosen action/move (if valid) to finish before the game continues processing the turn. I've got it tweening well, but I'm not sure, conceptually, what the best practice is for "waiting." A few games I've seen that use turn-based structure set a variable and then check time in update() to see if sufficient time has passed. I tried using a timer at first, but ran into unexpected behavior (I'm sure I could fix it, but I'm more interested in knowing what I ought to do)... What I have now (experimenting with the former), but not overly enamored with it: function update() { if (acceptInput) { if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { acceptInput = false; moveTimer = game.time.time; game.add.tween(player.body).to({ x: '-' + TILEWIDTH }, MOVEDURATION, Phaser.Easing.Linear.None, true); } else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) { acceptInput = false; moveTimer = game.time.time; game.add.tween(player.body).to({ x: '+' + TILEWIDTH }, MOVEDURATION, Phaser.Easing.Linear.None, true); } else if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) { acceptInput = false; moveTimer = game.time.time; game.add.tween(player.body).to({ y: '-' + TILEHEIGHT }, MOVEDURATION, Phaser.Easing.Linear.None, true); } else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) { moveTimer = game.time.time; acceptInput = false; game.add.tween(player.body).to({ y: '+' + TILEHEIGHT }, MOVEDURATION, Phaser.Easing.Linear.None, true); } } else { if (game.time.time > moveTimer + MOVEDURATION) { acceptInput = true; } }}Thoughts?
  21. Hi all I'm trying to make a toy game that's a pinball game. For this I needed good Physics so I opted for P2JS Have a look at this current version: http://noben.org/pinball/ Here is the source easier to read (you can see I've been at this for a while! @#$%$) https://gist.github.com/keyle/9823187 I'm having big issues with the physics system though... - all materials feel gooey. Ball seem to soften into all other parts... that's not great. - when moving the flippers, the ball quite often falls through... Is it because the refresh rate is too slow? is there a function to call to force a refresh of the physics system? Or does the physics system does not support fast moving items? - no matter what I tweak, the bounciness feels odd. Center of a surface seems to be a lot bouncier than the edges! - I couldn't figure out how to change the pivot (center of rotation) of the P2JS body... I opted with using larger PNG and shifting the position of the sprite inside, giving me a large P2JS body. Are any of you familiar enough with P2JS? Documentation is... sparse to say the least. Can you help with any of the items above? Thanks!
  22. Hello, so as the topic title states. How too keep default touch action that phaser has in phones when using gameController.js? i want to only have control on the left and still keep that touchEvent/function default.. if this is not possible is there better ways to make on-screen controls ? All the help i can get is greatly appreciated. Thanks in advance. -Learning.
  23. keyle

    Pinball like physics

    Hi. I'm attempting to make a pinball like game with Phaser. So far, not much luck with the physics system. I tried Arcade, Ninja and finally P2 and found the following issues: - Arcade and Ninja - I can't simulate the flipper hitting the ball at an angle. Seems the physic system is simplistic? I tried changing the angle and body angle with not much luck. - P2 - I can't seem to be able to "hold" the flipper at a fixed position, it always falls with gravitiy like the balls. Also, I can't seem to be able to change the anchor to something than the center of the sprite. Any help would be GREATLY appreciated.
  24. Hello, I would really appreciate some help. I am making a phaser game for a university project and have uploaded the current progress of the game to Kongregate. The game works fine on my laptop but I tried it on another laptop and it errors. The initial menu and loading screen loads and then when the game starts the sprites show but the tiles do not and there is a black background. On the console it says: webGL:invalid_value: texImage2d: width or height out of range. And that the texture is not a power of two. I'm assuming I may have to resize some of the assets I have used? I am confused as to why the game works on my laptop though. Also two players have scores on the leader board which I assume means the game worked for them also? Any help would be greatly appreciated. Thank you.
  25. I'm using a custom sprite for my main player. Based on the demo's I've seen I'm using `this.body.touching.down` to detect when the sprite is touching my bottom border. The problem is that when I use a custom sprite like this Phaser is first calling the `Phaser.Sprite.prototype.preUpdate` method which clears the touching state. Using `this.body.wasTouching.down` seems to work but seem semantically wrong since I'm trying to check the current state. Does anyone have ideas or suggestions on the appropriate way to do this? Here's the custom player sprite I have so far. The relevant piece is the last part of the update method. Also just to note, I do have a main Game object that has the typical update method and if I call `this.player.body.touching.down` it does resolve to true as expected but that's not encapsulating the behavior of the player which is my purpose for having a custom player object. BasicGame.Player = function(game, x, y) { // new Sprite(game, x, y, key, frame) Phaser.Sprite.call(this, game, x, y, 'dude'); game.physics.arcade.enable(this); // Player physics properties. Give the little guy a slight bounce. // this.body.bounce.y = 0.2; // this.body.gravity.y = 6; this.body.bounce.y = 0.4; this.body.gravity.y = 375; this.body.collideWorldBounds = true; // // Our two animations, walking left and right. this.animations.add('left', [0, 1, 2, 3], 10, true); this.animations.add('right', [5, 6, 7, 8], 10, true);};BasicGame.Player.prototype = Object.create(Phaser.Sprite.prototype);BasicGame.Player.constructor = BasicGame.Player;BasicGame.Player.prototype.update = function() { var cursors = BasicGame.input; // Reset the players velocity (movement) this.body.velocity.x = 0; if (cursors.left.isDown) { // if (this.game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { // Move to the left this.body.velocity.x = -150; this.animations.play('left'); } else if (cursors.right.isDown) { // } else if (this.game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) { // Move to the right this.body.velocity.x = 150; this.animations.play('right'); } else { // Stand still this.animations.stop(); this.frame = 4; } // Allow the player to jump if they are touching the ground. if (cursors.up.isDown && this.body.wasTouching.down) { // if (this.game.input.keyboard.isDown(Phaser.Keyboard.UP) && this.body.touching.down) { this.body.velocity.y = -350; }};