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
    • 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,970 results

  1. So I am preloading an atlasXML spritesheet game.load.atlasXML('sheet', 'images/sheet.png', 'images/sheet.xml'); and I can create a sprite using: game.add.sprite(game.world.centerX, game.world.centerY, 'sheet', 'playerShip1_orange.png'); I am trying not to use a for loop to create many sprites for a a sprite group I'm creating by using Group.createMultiple Now if I'm just loading a sprite or image, I can do this.meteorGrey = game.add.group(); this.meteorGrey.createMultiple(25, 'meteorGreyBig1.png'); Now when it's in a atlas sprite, this is where I'm running into trouble. this.meteorGrey = game.add.group(); this.meteorGrey.createMultiple(25, 'sheet', 'meteorGreyBig1.png'); It ends up displaying nothing
  2. I created a Mario map in tiled. Then when i try to put it into phaser it wont load. its giving me this error I've searched the internet and haven't found any solutions to this problem. My javascript file lists as follows: Please help, Thanks EDIT: I fixed this problem but now i have a new one. I'm get this error Anybody know how to solve it? Thanks
  3. Unable to repick tile

    Hi folks, first time into Phaser, and so far so good except... I have Tilemap with data from CSV, with one board checker. My goal is to have possibility to pick and set it to new playing field. With below snippet after one "pick and leave" it is not possible to pick him again. private _updateMarker(): void { this.pointer.x = this.playerLayer.getTileX(this.game.input.activePointer.worldX) * Constants.TILE_SIZE; this.pointer.y = this.playerLayer.getTileY(this.game.input.activePointer.worldY) * Constants.TILE_SIZE; if (this.game.input.mousePointer.isDown) { if(this.currentTitle !== null) { this.map.putTile(this.currentTitle, this.playerLayer.getTileX(this.pointer.x), this.playerLayer.getTileY(this.pointer.y), this.playerLayer); this.map.removeTile(this.currentTitle.x, this.currentTitle.y, this.playerLayer); this.currentTitle = null; } else { this.currentTitle = this.map.getTile(this.pointer.x, this.pointer.y, this.playerLayer); } } } So maybe you have some idea what is going wrong here Thanks in advance!
  4. i test this example http://phaser.io/examples/v2/box2d/car-on-terrain work with VS2017 finished and build! but not excute... T_T error message is "TypeError: i.Physics.Box2D is not a constructor " this.game.physics.startSystem(Phaser.Physics.BOX2D); >>>>> this line is problem.. i dont know why!!!!!! anyone help me... plz... exam project solutions list
  5. Hello, guys! I'm new here and in the world of games in general, that is why i need the quality feedback from community. I just finished my first game with Phaser, using a modern strucuture for the Javascript. The game is simple, but the organization of the code can serve as a reference for the community. I used ES6 for writing javascript and divided the code according to CommonJS pattern, using Browserify + Babel for this. I still used a linter (JSHint) for syntax tests and the Gulp for create and manage tasks like minify CSS, uglify JS, run the tests and do JS code via browserify (commonJS in client-side) + Babel (transpiler of ES5 for ES6). Ah, of course, all dependecies manages by NPM. I think that, for less experienced developers in hard code and javascript in general, my code can serve like a guide/boilerplate. Please, have a look at the repository and use the code as you prefer: https://github.com/fernandohenriques/paw-patrol-game-for-kids Read the README.md and talk to me, for any question. On the other hand, how I'm new in the world of games, i need on your tips to enhance user experience and gameplay. ******************************************************************************************************************************* Paw Patrol Game Description: A simple 2D phase game with "Paw Patrol" theme, aimed at childrens. In total there are four stages and the player has to get all the bones of each phase before the time runs out. Direct link for the game: http://fernandohenriques.com.br/paw-patrol-game/ Thanks!
  6. [ANDROID] Chip Chip Crap

    Hello world! Just realeased my first Phaser + Cocoon game. https://play.google.com/store/apps/details?id=com.boboalegre.chipchipcrap It is really a basic starter (side-)project but I'm quite happy how it came out. I plan to continue upgrading things so I'd really appreciate any suggestion/feedback. Hope you give it a try! Have a great day!
  7. Body vs Sprite (ARCADE physics)

    Hello to everyone, I am new to Phaser. These days I am studying the tutorials and I suddenly came across the many problems related to sprite of different dimensions. So I am learning to use Texture Atlas. I have create an animation with the related json file. All work just fine (visually). Playing with the json file I am able to adjust the sprite width (green box) but not the body size (red box). The ARCADE Physics has only ONE box size? Is there a way to automatically adjust the body size following the sprite size? Or I must move on onto more complicated physics. Thanks to enyone who can help me.
  8. [PHASER] Collide an ITEM with GROUND.

    Hello, I am actually trying to make my very first game with Phaser ! Saddly, I am not able to get it work. Actually, the game is simple : There is a ground, a character (player), and a "coin" that fall from the top of the game to the ground. If the player hit it, the score increase by 1. All of this work fine. But I want to end the game if the "coin" hit the grounds. For this, I want the coin to collide with the ground. But unfortunally, the player collide with the ground, and the coin pass through the ground. I don't understand why. Demo here. Keep in mind that this code & game is only for testing PHASER. Here is the full code : Could you please help ? ;...; xxx lol EDIT : I got the problem solved, just misstake to place it : Now I wonder why my function endGame() isn't call when gold hit the ground. EDIT² : I got my second problem solved with this code : But I don't understand the difference between my code and game.physics.arcade.overlap();. Can someone explain me ? Code updated aswell !
  9. Hello! Winter is coming. And for most of us winter is associated with Christmas. That's why I am glad to present you my brand new match3 HTML5 game "Christmas gifts". - All assets including sounds and graphics were made from the scratch; - Branding options are provided; - Less than 3 mb; - Both types of licenses (exclusive and non-exclusive) are available at the time of the creation of the post; PM me for details. Link to the game: http://powerthemes.eu/christmas
  10. Hello! I had a look at the forum and couldn't find any advice on this previously (/I don't know the terminology to look up) so I thought I would post and see if anyone could give advice. I am using revolute constraints in my project because I wanted, as you can image, a joint that allows rotation and allows the player to rotate it with keys. The issue is that they are just flopping around the revolution instead of being rigid until the player turns them. I went through the documentation and found other types of constrains, like lock constraints, but they don't seem to work, and I have even tried turning off gravity for the arms to see if that was the issue to no luck. The code for the constraints is below, and I am sure I am missing something obvious so any advice would be great! backConstraint = game.physics.p2.createRevoluteConstraint(player, [-5,-20], backArm, [-20,0.5]); frontConstraint = game.physics.p2.createRevoluteConstraint(player, [-5,-20], frontArm, [-20,0.5]);
  11. Hello! I had a look at the forum and couldn't find any advice on this previously (/I don't know the terminology to look up) so I thought I would post and see if anyone could give advice. I am using revolute constraints in my project because I wanted, as you can image, a joint that allows rotation and allows the player to rotate it with keys. The issue is that they are just flopping around the revolution instead of being rigid until the player turns them. I went through the documentation and found other types of constrains, like lock constraints, but they don't seem to work, and I have even tried turning off gravity for the arms to see if that was the issue to no luck. The code for the constraints is below, and I am sure I am missing something obvious so any advice would be great! backConstraint = game.physics.p2.createRevoluteConstraint(player, [-5,-20], backArm, [-20,0.5]); frontConstraint = game.physics.p2.createRevoluteConstraint(player, [-5,-20], frontArm, [-20,0.5]);
  12. [Phaser] Baked Donuts

    Hello, This is my new game. Any feedback would be greatly appreciated! Google Play: Baked Donuts itch.io: https://alex-creativity.itch.io/baked-donuts YouTube: Baked Donuts
  13. Hello, I'm creating my first mobile game via Phaser framework and canvas. So for creating the channel (please check attached screenshot of my spiral channel) I imported my sprite into Physics Editor program, did what is described in this tutorial. Now trying to prepare the part when user will press/touch the ball holder, after touch/press the ball should rotate around the channel and depending on the speed it should fall into holes. Did some research but can't find any example on how I can make the ball move around the channel. Any ideas will be appreciated. I have following code for loading spiral sprite and its json file: preload: function() { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.load.image("spiral", "assets/images/pinball-channel.png"); game.load.image("ballHolder", "assets/images/ball-holder.png"); game.load.image("ball", "assets/images/ball.png"); game.load.physics("physicsData", "assets/sprite_physics.json"); }, create: function() { var ballHolderGraphic; ballHolderGraphic = game.add.sprite(196.5, game.height-98, 'ballHolder'); ballHolderGraphic.width = 60; ballHolderGraphic.height = 104; ballGraphic = game.add.sprite(213, game.height-ballHolderGraphic.height-23, 'ball'); ballGraphic.width = 28; ballGraphic.height = 28; var channel; game.physics.startSystem(Phaser.Physics.P2JS); channel = game.add.sprite(225, 365, 'spiral'); channel.width = 400; channel.height = 550; game.physics.p2.enable(channel, false); channel.body.clearShapes(); channel.body.loadPolygon('physicsData', 'spiral'); } Also I have one issue, after this line (channel.body.loadPolygon('physicsData', 'spiral');) nothing (image, button,etc...) is being displayed in the screen but once I add them before this channel part, it works perfectly. Any ideas why? Thanks
  14. Hey guys, I'm using the Tiled map editor and creating it with the code below: //GAME PRELOADER this.load.tilemap('map_testmap', 'assets/phaser_assets/maps/map_testmap.json', null, Phaser.Tilemap.TILED_JSON); this.load.image('grass', 'assets/phaser_assets/tiles/grass.png'); this.load.image('spike', 'assets/phaser_assets/tiles/test_spike.png'); //GAME CREATE create: function() { // this.scale.pageAlignVertically = true; this.world.setBounds(0, 0, 2000, 1400); this.physics.startSystem(Phaser.Physics.ARCADE); this.stage.backgroundColor = '#3A5963' // this.add.sprite(0, 0, 'sky'); var map = this.add.tilemap('map_testmap'); map.addTilesetImage('grass', 'grass'); map.addTilesetImage('spike', 'spike'); map.setCollision([0, 1, 2, 15, 16, 17, 18, 19, 20, 30, 31]) this.layer = map.createLayer('Tile Layer 1'); // this.layer.fixedToCamera = false; // this.layer = map.createLayer('Tile Layer 1', 2000, 1400); // this.layer.anchor.setTo(0.5); // this.layer.position.set(this.world.centerX, this.world.centerY); this.layer.resizeWorld(); However, when I start the game up, my layer looks like this, but my actual layer looks like the image on the right. So my question is, how can I push the layer down on the canvas programmatically? I've tried changing the position, but it seems that the collision doesn't move with the layer's position. Any help would be greatly appreciated!
  15. Hi, I am really confused why I am getting errors with this code from the weapon plugin: create: function() { //load current level this.loadLevel(); this.weapon = this.game.add.weapon(-1, 'explode'); this.weapon.fireFrom.setTo(300,300, 1, 1); this.weapon.bulletKillType = Phaser.Weapon.KILL_CAMERA_BOUNDS; this.weapon.bulletGravity.y = -1000; this.input.keyboard.addKey(Phaser.KeyCode.SPACEBAR) .onDown.add(this.weapon.fire, this); The error is: phaser.js:100951 Uncaught TypeError: Cannot read property 'width' of undefined at Object.Phaser.Weapon.fire (phaser.js:100951) It seems to be an issue with the context, but I have tried this.weapon, this.state, this.game all to no avail. Annoyingly if I run ZPlat.GameState.weapon.fire() from the console it shoots fine. If anyone can see what I'm doing wrong I'd be very grateful. Thanks, Gordon
  16. Hi! I'm looking for 2d artist to participate in my project - simple maze brain-teaser planned to release on HTML5, Android and iOS The game is about a hamster in a sphere looking for an exit in a maze with movable walls and other dangerous stuff (e.g. fans and electric arcs) Game prototype At the moment there are only 9 levels showing key mechanics that I plan for implementation Since I'm absolutely dumb in art I'd like to give the artist an absolute creative freedom in all the visuals of the game: style and graphics, animation and visual part of UI If you are interested and: - like the prototype and game idea - have ideas on how to enhance the game graphics - have at least some experience in 2d art creation - ready to connect via skype on a daily basis please PM me or response in this thread. About money. I'd like to work under revenue-share agreement. Some fixed fee is possible and under discussion About me. I'm specializing on programming: Phaser, kivy (Python framework), HaxeFlixel (Haxe). I can create some graphics in Inkscape. My released games: - Football juggle - Gravity Ride - Trivia I've worked on this games with freelancers. But I'd like to change the approach since freelancers are not interested in result and I can't adequately asses the quality of art work before all the game art assets and mechanics are joint together. And that takes time
  17. Hi, I'm currently in the process of making my first game having completed the zenva course and am confused by the weapon plugin. My game is a platformer shootemup type, where there will be the player and multiple enemies shooting a variety of ammo types. The zenva course covers making bulletpools and sharing them between enemy sprites, but does not mention the weapon plugin. On the face of it the weapon plugin looks great, sorting out a whole load of features neatly. However if each enemy has its own weapon tracking it, does that mean that it then gets its own bullet pool, all of which then need to be destroyed once the enemy is killed? This seems to somewhat defeat the point of the bullet pool. My question is then: can the bullet pools be shared between enemies OR should I just rely on the entire bulletpool being recycled along with the enemy itself as it is itself pooled OR should I just not bother with the weaponplugin at all? Any help or suggestions much appreciated, Thanks, Gordon
  18. Super Asteroid Battle

    Join the Super Asteroid Battle! Bring your friends to fight the asteroids, collect ore, upgrade your spaceship, and shoot for the high score in this now multiplayer version of the classic Asteroids game. Built as a collaboration between Elisabeth Seite and Jackson Sui. We used the phaser.io framework and socket.io for multiplayer. We think the game turned out very well and hope you enjoy it! Try playing it here! Github Link
  19. Hi, I have a button in my game which has two child elements(a text aligned top center in and another text aligned bottom center). The issue is the child texts are also taking click of the button which should not happen. Here is the code for this: Fiddle : https://jsfiddle.net/3sf1b2zL/18/ var game = new Phaser.Game(480,320,Phaser.AUTO,''); var gameStates = {}; gameStates.Main = function(game){}; gameStates.Main.prototype = { preload: function() { this.load.crossOrigin = "Anonymous"; this.load.image('shop','https://s1.postimg.org/6fz3duzc0r/user_input_box.png'); }, create:function(){ var btnText = this.add.text(0,0,"Game Loaded",{fill:"#ffffff"}); var infoText = this.add.text(0,0,"This is a description of the game. It is only an informative text and it should not take click of its parent button. Try clicking this text",{fill:"#ffffff", wordWrap:true,wordWrapWidth:450}); var shopBtn = this.add.button(0,0,'shop', function(){ btnText.text = "Shop Clicked";}, this); shopBtn.anchor.setTo(0.5, 0); shopBtn.addChild(infoText); shopBtn.addChild(btnText); btnText.alignTo(shopBtn, Phaser.TOP_CENTER); infoText.alignTo(shopBtn, Phaser.BOTTOM_CENTER,0,20); shopBtn.x = this.game.width/2; shopBtn.y = this.game.height*0.2; } } game.state.add('main',gameStates.Main); game.state.start('main'); Please help me so that only the button takes click and text should not take the click Thanks
  20. Hi, I have a problem with a phaser android game, build with Phonegap, in the android 4.4.2 version, the canvas is showed in the middle of the phone screen, showing the rest of the screen in black. You can move this canvas to position 0,0 after the screen is showed. In other android versions this does not happen. The game is shown in landscape mode, but in portrait mode the same thing happens. I add a screenshot of the game to show this problem. I appreciate any help. The android game is published in https://play.google.com/store/apps/details?id=com.phonegap.WackTrump. Thanks in advance. Greetings.
  21. Phaser poor performance on mobile

    Hi guys! So I am trying to create a mobile racing game in Phaser. But the game has really poor performance on mobile. I tried to reduce a lot of things in the game and test if I get a better performance, but so far no success. What I have so far after reducing everything to absolute minimum is a sprite of a car (79x160 png image), a sprite for the background (100150 png) and in the update function I only scroll the background adding to the background y some value to move it down. I am running the game in CANVAS mode. Any thoughts what might be happening, or any tips or tricks that will improve the performance? Thanks!
  22. GitHubGameOff2017

    Hello, I just have submitted a basic game around Phaser in the actual game jam https://reneromain.itch.io/githubgameoff2017 Feel free to discuss it in itch.io
  23. [Phaser] 3anglez

    Avoid, smash and defeat your enemies! Get endless entertainment! 3anglez is a minimalist 2D game. The game has simple instructions : tap anywhere to move. The action takes place in a colorful set up built entirely from triangles. Your progress is guided by the slowly changing colors which are present in every level. Your job is to survive for as long as you can. Each death improves your gameplay abilities. You are able to collect coins by avoiding, smashing and defeating your enemies. You can use them to upgrade the skills of your player. If you die, you don't get a second chance. How long can you stay alive? PS: If the game is too hard upgrade your speed! Made with Phaser + Cordova + Crosswalk
  24. Hi ! I'm new with phaser and i'm making a game, I have trouble with the double jump. I checked the others forum but it doesn't work with my game. I tried this and i checked the count of the jumps with an alert, and i see that it doesn't work bu i don't know why. // DOUBLE JUMP if (player.body.touching.down) // if player touch plateform, he gains his double jump { var jump = 2; } if (cursors.up.isDown && jump==2) { player.body.velocity.y = -400; //jump counter -1 jump--; alert(jump); } if (cursors.up.isDown && jump==1 ) { player.body.velocity.y = -400; jump--; alert(jump); } Thanks.
  25. Maze generator

    Hello, ok here's my request, I am trying to create a minigame like in "The legend of zelda: phantom hourglass" multiplayer game https://youtu.be/rwNNHZlyuGU?t=1m45s one of the difference with this gameplay is that it will be a multidevice mobile version, another difference is that the level will be randomly generated. I have found a maze generator here: https://codepen.io/GabbeV/pen/viAec therefor i have a few questions: -how could i use this to create multiple paths like showed on this picture? https://i.stack.imgur.com/EYBEV.png -Am i able to export a phaser game to an android app with cordova? -Is is possible to put a hitbox on the randomly generated walls on the canvas and if so how? Thanks for reading this post and hopefully i'll find a solution thanks to you