Jump to content

Search the Community

Showing results for tags 'phaser 2'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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

  1. I want to destroy <Phaser.Rectangle>sprite.getBounds(); in phaser 2 and call again in next function
  2. I came across a problem while the play again button is clicked. I have 3 states in my game. when the game is over, there is a button given to the user for playing again, that button leads the user to game state. I have used P2 physics. I am using sprite.id for collision detection, but while playing again the id changes every time. I tried using destroy() to delete the existing p2. But that gave me more errors while playing. How can i reset the Physics when playagain button is clicked? Hope someone can help in this?
  3. Hi i just finish a mini game with the idea come from compass. 360 Degree Spinning Shooter Space Game A Game that you need to move your whole body to play. New Type of Casual Mini Game. A shooter game with spinning 360 degree. *** WARNING *** - Not for pregnant woman and lazy people. - You could get throw up after some game. HOW TO PLAY Hold your phone flat in the palm of your hand Spin around while holding your phone in your hand to change direction of space ship Tap screen to fire the object TAP and HOLD to rapid fire when too many object appear. FEATURES. Number of object to show up will increase randomly. Fire rate decrease along with number object show up. Bullet, Object speed increase after every time destroy object. Spin your body all around. Some difference type of object. Some difference background. Best Score Shop to buy new ship Collect Star If you got any suggest. Please contact me. [email protected] Download iOS : https://apps.apple.com/us/app/360-shot-space/id1476517779?ls=1 Download Android : https://play.google.com/store/apps/details?id=shoting.threesixzero.com Demo Game Play without interact with the body move https://www.youtube.com/watch?v=7Ale_dozAv4 https://www.youtube.com/watch?v=v59WOi7MVn8 ScreenShot. I could not attack files for some reason.
  4. How to drag sprite on a path like there https://cdn-factory.marketjs.com/en/mcdonalds-playable-ad/index.html ? Thanks a lot!
  5. hi guys I have a Construct 2 Project i want to transfer it to phaser 3 any idea ! hope someone can help asap thank you so much
  6. Hello, I have different states like "menuState", "optionState", "playState". In optionState I have more than 50 toggle buttons (possible frames: 0 and 1) So, I can include/exclude different cities by clicking those toggle buttons. Let's say I click toggle button next to "Berlin", this city is excluded from an array, and button's frame is set to 1 now. It works fine for all cities, but if I go to menuState or playState, then I go back to optionsState, those toggle buttons are created again, and their frame is 0 by default. Is is possible to save those buttons (keep them on frame 1) after switching the state? I can add different variables to game.js for example, and when toggle button is clicked, set corresponding variable to 0/1. But this requires a lot of coding. Is there any better solution? Thanks
  7. I've seen a gantt chart with a planned "phaser 2 to 3 migration guide" but now it seems to be deleted. I have a lot of 2.x code and I would love to migrate to 3.x in an ordered way. So, will there be any migration guide or should I just start seeing the examples and tutorials and figure out the best way to do it? It's nice to have such amazing library!
  8. Powerdefense A towerdefense game. Towers require energy. Towers can be upgraded by adding components. Url: https://www.powerdefense.com Screenshot: Lemme know what you guys think
  9. Hi! character in my game is this cat: The cat is class extending group and contains torso and head, both are sprites with arcade physics enable on it. In the game, the cat is pushed up by applying velocity on it and it collects certain items (gameplay is similar to Flip the Gun game, check it out for better understanding). THE PROBLEM: In update method, I am constantly checking for collisionse between cat and the items: this.game.physics.arcade.overlap(this._cat, this._sceneObjectsLayer, this.onObjectCollision, null, this); My onObjectCollision method looks like this: onObjectCollision(cat: Phaser.Sprite, item: GeneratedItem) { console.log("COLLISION SOURCE IS " + cat.key); console.log("COLLISION! OBJECT ID IS " + item.ItemID + "... UPDATE FRAME IS " + this._updateFrameCnt); this._items++; this._UI.showCount(this._items); item.KillItem(); //inside this method I call item.kill() this._sceneObjectsLayer.remove(item); } Basically, it should just update the total amount of items taken in player UI. The problem is that same item is sometimes collected multiple times. That makes sense - one collision for torso, one for head, but I would expect it not to call this method for the same item after item.kill() is called. I already debugged this and I put the variable this._updateFrameCnt to update method. Result is this. You can see that the item with certain ID is collected, then it is killed and after few frames it is collected again like no kill() was called on it: State_game.ts:451 COLLISION SOURCE IS catHead State_game.ts:452 COLLISION! OBJECT ID IS 0... UPDATE FRAME IS 2034 GeneratedItem.ts:52 KILLING ITEM WITH ID 0 //called from item.KillItem //and after few frames: State_game.ts:451 COLLISION SOURCE IS catTorso State_game.ts:452 COLLISION! OBJECT ID IS 0... UPDATE FRAME IS 2040 GeneratedItem.ts:52 KILLING ITEM WITH ID 0 //called from item.KillItem Moreover, this sometimes happens for the same sprite (for example it is called twice for head sprite). Is this expected behaviour due the reasons how Phaser handles physics? Seems really strange for me, I would expect to make physics computation after each frame and therefore no second collision should occur, because the item should be dead at the time. Am I missing something here? Thanks in advance for your responses!
  10. How to load images or assets from local address instead of phaser assets through web? Whenever I try to load assets from my local drive it doesn't show the contents.I want to load my assets offline. Thanks in advance.
  11. Need to make a drawing tool where sprites would be pipes of different shapes and they need to be controlled through drag and drop and virtual joystick.
  12. Hello I made a game by phaser 2. Ragnarok Triple Triad is a strategy game design base on Triple Triad : a card game originating from Final Fantasy VIII Ragnarok Online : massive multiplayer online role-playing game Game Play Ragnarok Triple Triad is played on a three-by-three (3x3) square grid of blank spaces where monsters will be placed as the game progresses Each monster has lv, hp numbers placed in top, bottom; Monsters can have elemental alignments that affect the gameplay if there are elemental icons on the game board. FEATURES - Reset Game. You could start the game from the start at any time you want. - Upgrade Monster. You could obtain stronger monster by exchange numbers of low lv monsters - PVP : Working on. The Design is on working so it's a little off. Website Demo Link : http://cbr-game.com/tripletriad/index.html This game purpose design to play in mobile so it's rotate 90 degree You should play it in your mobile with lock enable. You could try it here. Android link : https://play.google.com/store/apps/details?id=com.ragnarok.trtr Demo Play Link Some Images. Having any problems? Any suggestions? I would love to hear from you! Please contact me: [email protected]
  13. 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.
  14. Reservoir Cleansing. Short arcade type game, just kill the enemies each level: ARROWS (UP & DOWN) - Switch character Z - Attack X - Heal C - Power up (Character upgrades when bar fills) (MAX is Golden armour) It was just a small project to take a break from a big one (kaeBLUE). Won't be doing much to this , but any feedback will help improve any future versions, or even other games. - PLAY ON KONGREGATE - Thanks ?
  15. Hi, I've been off the grid for a quite a while. I'd like to ask what happened to Lazer project? Is it now Phaser 3 or is that a branch of Phaser 2? Thank you guys.
  16. Hi, I'm making a dismemberment function of a sprite (human) when it died. This is how i see it : Get 6 bitmap (pooled) Copy with copyRect part of the sprite's texture (legs, torso, ...) and eventually resize these bitmaps Get 6 Image (pooled) and apply theses different textures Play some tweens to make parts fly randomly When tweens finished, free the 6 bitmaps and 6 image ( return to pool queue) Do you have any advices ( performance, ...) about this way ? Thanks
  17. Hi, Which is the most efficient way when you need to deal with many text to display (mobile/pc) ? Because i spent times on forum and didnt find a clear answer (sometimes Phaser.Text, but often BitmapText) : Thanks
  18. Hi All I've been working on a top down endless runner , where the player jumps from one platform to another and should not leave the screen. How to make a platform move horizontally I'm spawning platforms and adding x and y velocity its working but is it a right of doing it ? if not how to make it look better this.initX = this.x; this.body.velocity.y = -200; platform.prototype.update = function () { if (this.moving) { if (this.x > (this.initX + this.width)) { this.speed = -200; } if (this.x < (this.initX)) { this.speed = 200; } this.body.velocity.x = this.speed; }
  19. Hi all, I am new to Phaser game development. I want to build a game like this: https://studio.code.org/s/hero/stage/1/puzzle/1. The idea is that I want to use blockly to play the phaser game instead of keyboard input. Basically I want to write some javascript code that would make the Phaser game figure move (write code to play the game). My question is: is there any API in Phaser can help me achieve that? Or the only way to achieve that is to simulate keypress in browser? Thank you all! Update: I figure out I just need to set the cursors properties. This question has been resolved.
  20. this.game.physics.startSystem(Phaser.Physics.P2JS); this.game.physics.p2.setImpactEvents(true); var wallCollisionGroup = this.game.physics.p2.createCollisionGroup(); var playerCollisionGroup = this.game.physics.p2.createCollisionGroup(); var doorCollisionGroup = this.game.physics.p2.createCollisionGroup(); this.game.physics.p2.updateBoundsCollisionGroup(); // I've created all the necessary collisions as in expamle: https://phaser.io/examples/v2/p2-physics/collision-groups and it works perfect. player.body.collides(wallCollisionGroup); player.body.collides(doorCollisionGroup, wrongDoor, this); cursors = this.game.input.keyboard.createCursorKeys(); } wrongDoor() { player.body.velocity.x = 0; player.body.velocity.y = 0; //player.body.setZeroVelocity(); //player.body.velocity.x = -20000; //player.body.velocity.y = -20000; //player.body.static = true; result = 'You last hit: The wall :)'; this.game.displayDialogLine('Message', 'text'); } update() { player.body.velocity.x = 0; player.body.velocity.y = 0; if (cursors.left.isDown) { player.body.velocity.x = -300; } else if (cursors.right.isDown) { player.body.velocity.x = 300; } if (cursors.up.isDown) { player.body.velocity.y = -300; } else if (cursors.down.isDown) { player.body.velocity.y = 300; } } Hello. I'm making a game where player have to reach the right door and created all the necessary collisions and it works almost perfect, except the call back function wrongDoor. I want to create a dialog line when player collides wrong door and make his velocity = 0 while dialog line is on screen, but I can't. Every time player colldes the door dialog line displays on screen but the player sprite still moves. How can I make him stop on collision with door? All the //commented stuff I've tried and it didn't help. I tried to add this function in Update function but it triggers wrongDoor all the time and displays dialog line again and again from the start of the game. I've tried set velocity = -20000 but it doesn't set -20000 velocity, like it doesn't see the player. On screenshots I press up and right buttons so character moves up and right after wrongDoor triggers.
  21. We moved our game from Phaser 2.6.2 "Kore Springs" to 2.10.3 and encountered this error in Firefox and Internet Explorer: IndexSizeError: Index or size is negative or greater than the allowed amount The exception is trown from PIXI.Sprite.prototype._renderCanvas: renderSession.context.drawImage(this.texture.baseTexture.source, cx, cy, cw, ch, dx, dy, cw / resolution, ch / resolution); The arguments are: cx : 803 cy : 899.37 cw : 168 ch : 0 dx : -0 dy : -0.6299999999999955 resolution : 1 Everything was fine in "Kore Springs" but we wanted to take advantage of all the fixes and updates on tilemaps in CE.
  22. I resently started working with Phaser 3 and so far I learn some of the differences compared to Phaser 2: Scenes No pixi engine Is there any other notable differences at this point?
  23. Hi guys, Im kinda new here but I need help with Phaser 2 (PhaserCE 2.10.3) and loading videos.. My code is : main.prototype = { preload: function(){ game.load.video("earth_1", "assets/video/earth_1.mp4"); }, create: function(){ var video = game.add.video("earth_1"); video.play(true); video.addToWorld(); var flare = spawner.spawn(g.sprites.flare) var ring = spawner.spawn(g.sprites.ring) var highly_recommended = spawner.spawn(g.sprites.highly_recommended) var logo = spawner.spawn(g.sprites.logo) ... it works fine when I run it in web using a local server.. but when I compile it with cocoon using canvas+, i get an error. using the cocoon developer app i get the errors attached.. i tried my best to google it out and also look at the https://photonstorm.github.io/phaser-ce/ docs as well as the main site but i just cant crack this running out of ideas.. does the video resolution have an effect? im using an .mp4 video as an animated background
  24. Hi, so I'm trying make a doodle jump type of a game , so far I've created the infinity world and added 6 ledges. now I want to kill and revive the ledges with the new X and Y coordinates, but somehow can't get it to work. I've managed to kill the ledges as they go out of camera bounds by using (forEachAlive)but got issues with reviving them. I've tried getFisrtDead and reset but nope, cant get it to work. Does anyone know how I could solve this? so this is how I create the platforms: generatePlatforms: function(){ //grouping the platforms platformPool = game.add.group(); platformPool.enableBody = true; var ground = game.add.sprite(0, game.world.height -32 ,'ground' ); platformPool.add(ground); ground.scale.setTo(3,2); ground.body.immovable = true; for (var i= 0; i < 6; i++){ var randomX =game.rnd.integerInRange(0, game.world.width -50); var randomY = game.world.height -100 *i; ledge = game.add.sprite(randomX,randomY,'ground'); platformPool.add(ledge); ledge.scale.setTo(0.3,0.3); ledge.body.immovable =true; } }, and this is how I kill the ledges under the update function: platformPool.forEachAlive(function(el){ var platformYMin = el.y; if(el.inCamera == false){ el.kill(); } },this); Thanks in advance
  25. I am thinking about just using Phaser 2 for my games since there are so many available examples online unlike Phaser 3.
×
×
  • Create New...