Search the Community

Showing results for tags 'phaser.js'.



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 24 results

  1. Play Link: Blob'n Pop Play Link: Blob'n Pop -------------------- UPDATE March 19, 2018: We have added an Endless Mode to the game, as was suggested in the replies below! -------------------- Hey guys, I would like to show you my newest Phaser 3 game! The gameplay takes a casual and funny approach – enter one of the three unique worlds and pop bubbles for the highest score! Art Style: For the first time I have a game where all pictures were drawn specifically for this game! I hope the worlds and their animated surroundings are enjoyable to play. Gameplay: Pop the bubbles, but don't touch the forbidden color! Get combo points by popping the same color 3x in a row. Get enough points and avdance through 3 unique worlds with funny distractions Features: Short Tutorial 3 Unique Worlds With 3 Levels Each Levels Become Increasingly Difficult Your Best Score and Your Last Score Simple Click/Touch Inputs Mobile Optimized! I hope you like the game! I created it with Phaser 3, if you find a bug or problem, please let me know. Also any feedback is much appreciated! Play Link: Blob'n Pop
  2. Hi guys, I've tried everything, but still cannot get my game to have states. I hate to post my whole code but I have no idea what else to do. If anyone has a bit of time, please let me know what you think. A noob in these matters, I still don't get why I have to use 'this'. Also tried to do this in different files but nothing. I just want a basic 'play' menu, the actual game, and then the 'play again'. Am I doing something wrong in the code that prevents this to have states? I also tried the game.pause = true, but as it pauses everything and buttons won't work. 'use strict'; let game = new Phaser.Game(800, 600, Phaser.CANVAS, 'showgame', { preload: preload, create: create, update: update, render: render, }); function preload () { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.stage.backgroundColor = '#000'; game.load.image('ground', './assets/scripts/game/images/ground.jpg'); game.load.image('star', 'assets/scripts/game/images/star.png'); game.load.image('sadmicrowave', 'assets/scripts/game/images/sadmicrowave.png'); game.load.atlasJSONHash( 'sprites', './assets/scripts/game/images/spritesheet-mini.png', './assets/scripts/game/images/spritesheet-mini.json' ); game.load.atlasJSONHash( 'enemies', './assets/scripts/game/images/students.png', './assets/scripts/game/images/students.json' ); } let sadmicrowave; let katie; let students; let tables; let cursors; let score = 0; let scoreText; let timerText; let weapon; let fireButton; let table1; let showgame = document.getElementById('showgame'); let scorediv = document.getElementById('scorediv'); let scorelabel = document.getElementById('label'); function create() { let ground = game.add.image(0, 0, 'ground'); ground.fixedToCamera = true; // Enable p2 physics game.physics.startSystem(Phaser.Physics.P2JS); game.physics.p2.setImpactEvents(true); game.physics.p2.defaultRestitution = 0.8; // Collission Groups let playerCollisionGroup = game.physics.p2.createCollisionGroup(); let studentCollisionGroup = game.physics.p2.createCollisionGroup(); let table1CollisionGroup = game.physics.p2.createCollisionGroup(); game.physics.p2.updateBoundsCollisionGroup(); let x = game.world.randomX; let y = game.world.randomY; //weapon - does not work yet weapon = game.add.weapon(30, 'sprites', 'chair.png'); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; weapon.bulletSpeed = 500; weapon.fireRate = 600; // main character katie = game.add.sprite (700, 300, 'sprites','katie.png'); game.physics.p2.enable(katie); katie.body.setCircle(30); katie.body.setZeroDamping(); katie.scale.x *= -1; katie.anchor.set(0.5); katie.body.fixedRotation = true; katie.smoothed = false; katie.body.setCollisionGroup(playerCollisionGroup); katie.body.collides(studentCollisionGroup, hitStudent); katie.body.collides(table1CollisionGroup, hitTable); game.camera.follow(katie); weapon.trackSprite(katie, 0, 0, true); fireButton = this.input.keyboard.addKey(Phaser.KeyCode.SPACEBAR); let students = game.add.group(); students.enableBody = true; students.physicsBodyType = Phaser.Physics.P2JS; students.smoothed = false; for (let i = 0; i < 23; i++) { // let student = students.create(190 + 69 * i, -90, 'enemies', i); let student = students.create(x, y, 'enemies', i); student.body.setRectangle(30,30, 0, 0, 4); student.body.setZeroDamping(); student.body.fixedRotation = true; student.body.setCollisionGroup(studentCollisionGroup); student.body.collides([ studentCollisionGroup, playerCollisionGroup, table1CollisionGroup ]); } students.setAll('inputEnabled', true); students.setAll('input.useHandCursor', true); let tables = game.add.physicsGroup(); tables.enableBody = true; tables.physicsBodyType = Phaser.Physics.P2JS; tables.smoothed = false; // for (let i = 0; i < 100; i++) { let table1 = tables.create(x, y, 'sprites', 'table.png'); table1.body.setRectangle(10,10, 0, 0, 0); table1.body.setZeroDamping(); table1.body.setCollisionGroup(table1CollisionGroup); table1.body.collides([ studentCollisionGroup, playerCollisionGroup ]); } let door = game.add.sprite (20, 500, 'sprites', 'door.png'); cursors = game.input.keyboard.createCursorKeys(); scoreText = game.add.text(16, 16, 'Score: 0', { fontSize: '32px', fill: '#000' }); timerText = game.add.text(530, 16, 'Time: ', { fontSize: '32px', fill: '#000' }); game.time.events.add(Phaser.Timer.SECOND * 30, fadePicture); } function hitStudent(katie, student) { // student.health = 2; // for each {student.sprite.alpha -= 0.5}; student.sprite.alpha -= 1; score += 10; student.destroy(); } function hitTable(katie, table1) { // student.health = 2; // for each {student.sprite.alpha -= 0.5}; table1.sprite.alpha -= 0.5; } // GAME OVER function gameover () { game.destroy(); console.log('game destroyed'); } function fadePicture() { game.add.tween(katie).to( { alpha: 0 }, 2000, Phaser.Easing.Linear.None, true); game.add.tween(scoreText).to( { alpha: 0 }, 2000, Phaser.Easing.Linear.None, true); } function update() { katie.body.setZeroVelocity(); if (cursors.left.isDown) { katie.body.moveLeft(350); } else if (cursors.right.isDown) { katie.body.moveRight(350); } if (cursors.up.isDown) { katie.body.moveUp(350); } else if (cursors.down.isDown) { katie.body.moveDown(350); } if (fireButton.isDown) { weapon.fire(); } } function render() { scoreText.text = 'Score: ' + score; timerText.text = 'Time Left: ' + game.time.events.duration; if ( game.time.events.duration === 0 ) { gameover(); } }
  3. When I hit the "Reload Example" button the page scrolls to the top but nothing else seems to happen... For instance if I open this Drag example and drag the sprite, then when I hit the "Reload Example" button the sprite should be back at its original position in the center, but it's not. Likewise editing the example code and hitting the button doesn't run the new code, it just scrolls to the top of the page... EDIT: oops, the button is called "Reload Example" not "Refresh" (I guess the icon reminded me of refresh;)
  4. Hello everyone! Just a quick question for you all. Sprites in my game are moving flawlessly when the game is played inside a browser window. However, once I switch to mobile webview, all the movements / animations become choppy. I have already set the following inside my game: game.forceSingleUpdate = true but nothing has changed. Is there any way I an optimize my game, or add something to make make my sprite move without lags? Thank you in advance!
  5. Hello to everyone, I am new to Phaser.js and wanna create a Slot machine game with it as i requested to create the flash game in html5 canvas. After research i understand that is better to use either Pixi.js or Phaser.js framework. I have read the Phaser Getting started guide and did the small game with the tutorial but need some help, guide for my Real game. Am attaching a screenshot with game view. I need something to start with, like the structure and other stuff. Are there any limitations from the design point? ANy help is appreciated from game gurus. Thanks in advance.
  6. I have developed so many games in Phaser but it is lagging and performance is too bad. I am really having no way to improve the performance. http://slopho.southindia.cloudapp.azure.com/static/games/homerun/index.html Thanks, Awadh
  7. Hello i recently started to study Phaser and i have came to a problem witch i need help with solving. I created a 3 layer map with Tiled. SkyLayer, GroundLayer, BrickLayer. I added physics that allow the player to move around the GroundLayer. I also added physics that allow him to jump on the BrickLayer. I am struggling to make a motion that allows the player to jump from the bottom hit the brick with his head, when he hits his head the motion of the brick to move up a pixel and then back down a pixel just as in Mario. I have trouble finding out how to identify which brick section i have hit from the BrickLayer so i can later on apply the animation to the brick element.
  8. Chen Ling Xue

    Full Screen on enter full screen error

    I want to make use of phaser js callback function on fullscreen enterFullScreen leaveFullScreen i tried to see the example from this https://github.com/photonstorm/phaser-examples/blob/master/examples/display/fullscreen buttons.js Thanks.
  9. Varan

    Information window

    Hello. The question is: how to make a window appears when you press the button? P.S. Strongly do not throw slippers, English I have a bad :)
  10. jamespierce

    [Phaser] Rabbit Warrior

    Hello guys, my newest browser game is called "Rabbit Warrior" and is optimized for mobile devices but works on desktop just as well of course: "Enter the world as the courageous Rabbit Warrior, equipped with sword and hammer! Protect the core from the demons and activate all the shrines to complete each level. Pick up hidden weapons that enable unique attacks and unlock increasingly difficult levels and even new skins if you reach 3 stars." Game link: http://browsergameshub.com/RabbitWarrior/ Game features: - Click to move controls - 5 different levels - Reach 1 to 3 stars for each level completion - 4 unlockable skins (if you reach 3 stars in a level) - Created with Phaser.JS Controls: Since it's optimized for mobile, movement is click-to-move and clicking on a weapon button to activate the skill. However, on the desktop you can also use the keyboard buttons 1 to 3 to activate the weapon skills while using the mouse to click-to-move. Game link: http://browsergameshub.com/RabbitWarrior/ I hope you like the game and thank you all for checking it out!
  11. Here is the JSFiddle. I have two events. game.input.onDown which does some logic (generates particles in my example) textButton.events.onInputDown, where textButton is a Phaser.Text object instance, which does another logic.The problem is: when I click on my textButton both event are fired 1 and 2. The question is, how to prevent event 1 from firing when I click on the textButton? And why is it happen? Part of code: ... //This event is fired on click anywhere event # 1 game.input.onDown.add(particleBurst, this); //This is Clickable text textButton = game.add.text(game.world.width - 5, 5, "CLICK ME", fontStyle); textButton.anchor.setTo(1, 0); textButton.inputEnabled = true; //This event is fired on click on text event # 2 textButton.events.onInputDown.add(function () { console.log("button is Clicked"); }, this, 2); ...Any help is appreciated. How can I stop event propagation?
  12. I would like to prevent players from switching to any game state by typing "game.state.start('name');" into the console. Has anyone found a way to prevent this from happening? Imagine you have a login-screen and any user can just type "game.state.start('play');" into the console and skip straight into the game. I have already tried using anonymous functions and closures but the problem is that the other states such as BootState, MenuState, GameState etc cannot access the game object created from new Phaser.game. I cannot be the only one who's worried that users can simply skip any game state by typing one line into the console. How have others dealt with this security breach? I tried googling but couldn't find any posts about this whatsoever. Thanks in advance for all answers!
  13. Jake Whiteley

    Willie or Won't He

    Hey all, I finally have a game up and live in the wild! I've been using Phaser at home for quite a while, and this was the first opportunity I had within a work context (I work at a digital agency in the UK) to produce a game and get paid for it. It's called Willie or Won't He and is based on a referee called Willie Collum who is well known for sending players off, so we wanted to create a game which involved 'sending off' players by smashing them in the face with a red card I did it using the standard arcade physics engine which made for some interesting difficulty with hitboxes on rotated sprites, and has convinced me to use P2 for my next project. The other difficulty was no fullscreen on apple devices - how have other people gotten around keeping fixed aspect ratio on mobile devices? My personal top score is 48, but I know the theoretical top score is much higher than that - Any takers? http://willie-or-wont-he.com/ Cheers, Jake
  14. Daria K

    Cooking/Serving game tutorial

    Hello everyone, I am new to phaser and I have an assignment to create a cooking/serving game(using phaser).. you know, where you have customers and you have to cook burgers e.g., you have time and some goal. I can't really find a useful phaser tutorial for such game. And I can't write the logic myself. So I was wondering has anyone seen such a tutorial, or can you link me some other useful readings and tutorials, that will help me get started. These are similar games to what I want to create: 1. http://www.y8.com/games/delicious_burger_shop 2. http://www.y8.com/games/breakfast_bar 3. http://www.y8.com/games/oscar_mayer_deli_creations
  15. Mizukage

    SAO RPG (MMORPG simulation)

    Hi, This is video from my Phaser.js game in early dev stage, ENJOY
  16. We are North America's fastest growing educational software company and need solid game developers. Our product is an MMORPG focused on teaching math to children from grades 1 to 8. The bulk of our adoption has been in North America but we will be going global very shortly. We are in need of an accomplished Intermediate Game Developer to join and possibly soon lead our quickly growing team. We are really looking for someone with solid OOP development skills and real dev mastery...not reliance on Unity for example. Here is the link to our position: http://prodigycanada.applytojob.com/apply/Z0mTCD/Video-Game-Developer. We will NOT consider remote developers. We WILL look at solid candidates that are within Canada, the US, or who have legal work status. Please apply directly via the link provided!
  17. Hi there, i was searching the forum for a method to send information trough the states, and found this post that was very helpfull. http://www.html5gamedevs.com/topic/14708-controls-through-multiple-levels/?hl=%2Bobject+%2Bjson#entry84031 My question is.... Is there a way to create an object in another .js file and use it instead of passing the information with the function state.start? Thank you for your time, and sorry if i didn't explained myself well...English isn't my native language.
  18. Hello! I have just done a game jam over the last 2 days and I am looking to carry on creating games with someone. I feel that working in a team is vital these days and I really would like to work with some other people. If you know Phaser.js I would love to team up with you to make some games and possibly make some profit off GameJolt.com. I would probably be working with Git for managing code but don't feel that you need to be a pro Git expert to ask to team up! Contact me on skype for information: lucamarchal Website: www.codeluca.com Game Jam Game I just did: www.codeluca.com/bacongamejam/ Thanks for looking at this! Luca
  19. hi i made a game with phaser last version it works fine in web but in mobile devices its become very slow the game is about cars and racing something like that i package it to APK with crosswalk i tried coconjs it is not working only black screen show up and then nothing please help me to solve my problem
  20. Gan_HOPE326

    [Phaser] qPong

    So here's my first game with Phaser.js... and in fact one of the first ever (at least completed ones, and if we don't count the ascii shooter I made with QBasic in middle school XD). http://gamejolt.com/games/arcade/qpong/28916/ This is qPong - a quantum version of the classical game of Pong, where the ball can be in multiple places at the same time and the outcome of a match is determined by both skill and randomness. I took inspiration from some actual physics (I work as a computational scientist, so I know a bit about this kind of simulations and some of that knowledge leaked into my game design ). The description explains it better... anyway it's pretty lackluster but it has good music (thanks to fellow GameJolt user Qwak) and what I hope is an interesting gameplay. I also plan to try and improve the AI a bit in the near future. Enjoy!
  21. Hipst3rKiwi

    Error

    hello, i was making a flappy bird clone for school and i keep on getting this error whenever i try to make my pipe functions work Uncaught TypeError: Cannot call method 'apply' of undefined phaser.js:39346 Phaser.Timer.updatephaser.js:39346 Phaser.Time.updatephaser.js:38796 Phaser.Game.updatephaser.js:19712 Phaser.RequestAnimationFrame.updateRAFphaser.js:34769 _onLoopphaser.js:34755 code: function start() { birdSprite.body.allowGravity = true; // spawn pipes // Create our Timer pipeT = game.time.create(false); // Set a TimerEvent to occur after 2 seconds pipeT.loop(2000, pipeS, pipeS); // Start the timer pipeT.start();} function pipeS() { //pipeT.stop(); var pipeY = ((game.height - 16 - OPENING / 2) / 2) + (Math.random() > 0.5 ? -1 : 1) * Math.random() * game.height / 6; // Bottom Pipe var botPipe = makePipe(pipeY); // Top Pipe (flipped) var topPipe = makePipe(pipeY, true); // Add invisible space thingy var inv = invs.create(topPipe.x + topPipe.width, 0); inv.width = 2; inv.height = game.world.height; inv.velocity = -SPEED; //pipeT.start(); pipeT.add(1 / SPAWN_RATE);} function makePipe(pipeY, flipped) { var pipes = create( game.width, pipeY + (flipped ? -OPENING : OPENING) / 2, 'pipe' ); // Flip pipe pipe.scale.setTo(2, flipped ? -2 : 2); pipe.offset = flipped ? -pipe.body.height * 2 : 0; // Move to the left pipe.body.velocity.x = -SPEED; also for some reason im getting a problem with this return pipe;} can anyone help?
  22. Hey people, I'm here representing Gembly Games B.V. and we are looking for someone who would like to port our flash games to HTML5. Gembly Games is a young and fast learning company. We love to make goofy, loveable and surprising games that bring people together. Our team consists of 7 dedicated people who enjoy games and game development. We maintain 2 portals of which gembly.com has our main focus. All but one game on our portal http://gembly.com are made by us. The gameplay of these games is all verified by a node.js server. Previously we converted our games from flash to createjs, but our interests in PIXI/Phaser increased as we saw these libraries mature. Due to a shortage on time and developers we are looking for a skilled HTML5 coder who is willing to convert our flash games to html5 using either just PIXI or Phaser. These games also have to connect to the node.js backend. We will supply a base of our node.js server which the games can connect to and verify the logic. Me (coder) and my colleague (game developer) will be available for assistance. Consistency is very important from a technical perspective, reusing a base for multiple games would be of interest for us, a framework in which we can extend new games would be a nice to have since most of our games are dice and/or card games. Mobile is the target platform for our games, I know this is very broad and even though our current focus is mostly on tablets we also like to have our games run stable (20+ fps) on up-to-date mobile devices. Essentials: At least 1 year of HTML5 game development Knowledge of either PIXI.js or Phaser.js (provide examples) Knowledge of Howler.js for WebAudio Nice to have: Past Flash/Actionscript game development If you are interested in helping us out with our mobile endeavour you can contact me at "ale at gembly dot com" or PM me. We will pay per game conversion Update 2014-03-26: Closed for new entries: all people who have responded to me will get an update asap
  23. I am very new in the html5 and game development and I am very impressed with the engines, specially Phaser. I am developing a 2D game based on the Tank example available at http://examples.phaser.io/. Currently, I am trying to physics to the bullet group, but I read in the post from yesterday that is not possible http://www.html5gamedevs.com/topic/4800-how-to-add-velocity-to-a-group/. The idea is to shoot when when clicked and the bullets should lose height and speed as it cross the screen. Here is revelant part of the code: function create() {... // Our bullet group bullets = game.add.group(); bullets.createMultiple(30, 'dude'); bullets.setAll('anchor.x', 0.5); bullets.setAll('anchor.y', 0.5); bullets.setAll('outOfBoundsKill', true);function update() { if (game.input.activePointer.isDown) { // Boom! fire(); }}function fire () { if (game.time.now > nextFire && bullets.countDead() > 0) { nextFire = game.time.now + fireRate; var bullet = bullets.getFirstDead(); bullet.reset(weapon.x, weapon.y); bullet.rotation = game.physics.moveToPointer(bullet, 1000); }}Any idea of how to implement it ? Regards
  24. piotr409

    Circle opacity, render sprite

    Hey, I'm new to forum and phaser.js. [uPDATE] I don't have anymore problem with my gravity, but I don't have idea how to show sprite on the circle, it renders circle on Jet. Also is it possible to change opacity of circle? I want to get transparent circle color. Thanks Source Code : var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'Jet Fly', { preload: preload, create: create, update: update, render: render });function preload() { game.load.image('arrow', 'img/jet.gif');}var circle;var sprite;var setGravityToPointXY = function(game,sprite,power, radiusLow,radiusHigh,pointX,pointY){ var pointXY = new Phaser.Point(pointX,pointY); var tempDistance = Phaser.Point.distance(sprite,pointXY); // console.log(tempDistance); if(tempDistance>radiusLow&&tempDistance<radiusHigh){ var rotation = game.physics.angleToXY(sprite,pointX,pointY); sprite.body.velocity.y += Math.round(Math.sin(rotation)*1000)/1000 * (power); sprite.body.velocity.x += Math.round(Math.cos(rotation)*1000)/1000 * (power); }};var getJetDegree = function(aX,aY){ return 90+180*(game.physics.angleToXY(new Phaser.Point(0,0),aX,aY)/Math.PI);};function create() { game.stage.backgroundColor = '#0072bc'; sprite = game.add.sprite(50, 200, 'arrow'); sprite.anchor.setTo(0.5, 0.5); sprite.angle = 90; sprite.body.velocity.x = 50; circle = new Phaser.Circle(400, 300,300); circle.alpha = game.math.clamp(circle.lifespan / 1000, 0, 1);}function update() { setGravityToPointXY(game,sprite,0.1,0,150,400,300);}function render() { game.debug.renderCircle(circle,'#cfffff');} Screenshoot :