Search the Community

Showing results for tags 'arcade'.



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

  1. My game is lagging when moving the camera in mobile devices, I don't really know how to fix it without changing in tilemap... my game here: https://github.com/CharlesCraft50/Brawler You can see the tilemap in the assets folder and the code of the tilemap is in the js/functions.js Thanks in advanced
  2. The fps of the game is very low in mobile, but in my pc is 54-60 fps, I don't know why, I am using intel XDK and here is my game code: https://github.com/CharlesCraft50/Brawler
  3. Hey there! I'm trying to make a Speak Bubble follow the player so I use this code if (typeof(speakBubble.speaker) !== "undefined") { speakBubble.position.x = speakBubble.speaker.position.x + speakBubble.speakerOffsetX; speakBubble.position.y = speakBubble.speaker.position.y + speakBubble.speakerOffsetY - speakBubble.parts.center.height; } in the update function of the game state. The player or "speaker" has arcade physics applied to it and moves in a platformer manner. The problem is that the speak bubble updates BEFORE the physics system updates the player so it shifts slightly to the right when the player moves left and left when they move right, etc. Is there a function that I can use to update the speak bubble AFTER physics update (perhaps like the LateUpdate() function in Unity)?
  4. plugin

    Hello everyone! I thought I'd share something I've been working on for the past few weeks. A plugin for Phaser that provides collision handling for sloped tiles and half tiles, similar to Ninja Physics but somewhat more concisely. Check it out on GitHub, give it a whirl, let me know what you think! Github: https://github.com/hexus/phaser-arcade-slopes Demo: http://hexus.github.io/phaser-arcade-slopes/ It's still early days for this project, as I've only just released v0.1.0-alpha today, but I look forward to continuing fleshing it out. Why did I make this? I've been intending to make a 2D platformer with Phaser for ages, and I knew I wanted it to have sloped tiles to allow for a liberating way to traverse the Y axis, but I couldn't find anything that worked the way I want it to. I experimented with Ninja Physics, but it's deprecated and its limitations left me wanting. I tried P2, but it was too much in terms of physics for me, and I didn't want to tame a beast like that. I started searching these forums to see if anyone had managed to get sloped tiles working in Phaser, with some success, but not completely. The solutions wouldn't allow for completely free tile placement, and they just stuck physics bodies to the slopes and left it at that. So, with a somewhat limited understanding of the maths I'd need to learn to achieve what I wanted, I started reading tutorials about the Separating Axis Theorem (SAT), particularly the ones from Metanet and one I found magically through a Google search. After experimenting with SAT.js in Phaser, I decided that I could totally pull off my own plugin to solve this the way I wanted it to be. With lots of learning, but with a clear vision of how I wanted the plugin to work, this is what I've managed! I have lots more features planned, as you can see in the roadmap, but for now I'm just glad I've built something that can be plugged straight into any Arcade Physics project that just works. Screenshots
  5. So here's the deal. I'm making an online multiplayer action game, currently using Phaser for the client (mainly for rendering and input), and I've hacked Phaser onto my Node.js server as well (http://www.html5gamedevs.com/topic/7393-running-phaser-on-nodejs-how-i-did-it-and-why-you-shouldnt-do-it/), so I can use the Arcade physics system to manage the interactions of player's entities with other entities in the game world. I get that some people puke at this idea, but it works, mostly. The server entities use sprites with no texture, just so I can give them a physics body to use for collision/intersection checking, but I'm having some alignment issues related to how bodies relate to the scales and anchors of their respective sprites, and have been thinking that I probably should be using a proper system where physics bodies aren't tied to sprites (display objects). What good alternative, standalone JS physics engines are there that offer similar features to Arcade that I can use on my server? Arcade seems ideal for what I'm doing, but lugging around the rest of Phaser with it without using it is just silly. The game only requires simple rectangle AND circle body support. No complex polygons or shape rotating, and needs to be fast, as there may be many entities that could interact with each other at any time. I've thought about doing this myself, but want to save some time if I can.
  6. Hey guys, hope you're having a great time. And I have a little problem you may be able to help me with. I'm making sort of RTS and there are lots of units marching to each other and killing each other. The problem is, they are stepping onto each other, and kind of pushing each other, and sometimes even jumping someplaces. This looks weird. Watch this video and you will understand what I'm talking about (I'm using Warcraft 2 sprites just for testing purposes, and also because they are great). https://www.youtube.com/watch?v=6htpVG8Shyc A little more details: I'm using Arcade physics. All units are objects of the same class, derived from Phaser.Sprite. All of them have a circle body, anchor set to 0.5 (if if matters), and are moving using velocity (before that I was modifying their poistions manually but with the same result). Units belong to 2 different groups, each group is collided with self and other group - so they won't walk through each other. What I want is that units would be standing still and no one could move them, not to mention these weird jumps. Is there some common techinque for handling this, do I miss something? Thank you in advance.
  7. Hi all! Just want to let you know that we have released our new games, Tahoe Po! It's a small arcade games built using PhaserJS, and ported to android using the excellent Cocoon.IO. We create this games to promote our local delicacy from Kediri, Indonesia, especially local Tahoe/Tofu The games feature include Google Play Highscore/Achievement integration, native result sharing, shop/customization system, and many more! Check it out here: http://bit.ly/TahoePo If you have any feedback, do let me know! Thanks!
  8. My first HTML5 Game, Snaked.io (So exciting! ) Every since playing the famous revolutionary agar.io game, I was inspired to create my own "io" game, so here it is! I took the classic version of Snake, and made it multiplayer Snaked.io (Server may take a while to connect, and a bit laggy due to it being free from Heroku) Basically, what I want to know is (preferably 1-10 scale): Do you like the concept? How easy was it to understand how to play? What would you add/change? Any bugs? (For now, may experience lag) What do you think of the name of the game? Anything else that comes into mind, please add! Gameplay Objective of the game is to eat the gray squares causing you to extend your length, while avoiding crashing into yourself, or others. Become the longest of them all! Controls W or ^ - Up S or v - Down A or < - Left D or > - Right Enter - Chat Hope you enjoy this as much as I did making it! SCREENSHOTS Screenshot (1) Screenshot (2)
  9. I'm wondering if anyone know a way to do something similar to this example but with arcade physics. I'm Basically trying to make a worms like grappling hook in my platforming game. I haven't looked deeply into it, but looking at the p2 source it seems abit heavy for me to understand and integrate. Any ideas?
  10. Play the game! Video Trailer Snake Runner is a fast paced top-down endless runner game inspired by the classic Snake game. It introduces a new gameplay concept based on a single tap control movement scheme. Your goal is to move the snake through an endless dungeon trying to survive as long as possible. You need to eat all food on your way and avoid all deadly obstacles such as walls, barriers, electric fields and so on. To control the snake just press space bar or left click to turn the snake 90 degree's towards the closest pickup!
  11. Hello everyone, I'm making a basic tower defence game, and am trying to prevent towers being placed on the pathway. In this case, the pathway is everywhere which is not in this.layers.collision. The following code creates a sprite which is rectangular/square in shape. The size of the sprite seems to be coming from somewhere else in my code, can't pinpoint where, but I've made it smaller so it definitely does not overlap other tiles (used the debugger to visualise this). The x and y co-ordinates are the position of the mouse/input, translated to the top-left corner of it's tile. The tiles are 35 pixels square, so a mouse position of [358, 362] would become [350, 350]. this.pathwayPlacementRectangle = game.add.sprite(x + 8, y + 8, null); game.physics.enable(this.pathwayPlacementRectangle, Phaser.Physics.ARCADE); this.pathwayPlacementRectangle.scale.setTo(0.5, 0.5); var onPathway = true; if (game.physics.arcade.collide(this.pathwayPlacementRectangle, this.layers.collision)) { onPathway = false; } I've offset the rectangle a bit and made it smaller in case it was clashing with the edges of the collision layer. The problem is onPathway is always false, even when this.pathwayPlacementRectangle is not located over the collision layer. If I replace this.layers.collision with another group in the game, such as some moving sprites, the code works as expected. Similarly, if I replace this.pathwayPlacementRectangle with something else, like a group of sprites, the code again works as how you would expect. Possibly I'm doing something wrong with the sprite creation. Can anyone point me in the right direction please?
  12. Hi there, I'm creating a platformer game that is similar in art style and theme to Thomas Was Alone. I'm currently using the Phaser.ARCADE Physics system for my game cause it suits the theme well enough. However, I want to implement a jump mechanic that is similar that is similar to Thomas Was Alone. https://www.youtube.com/watch?v=aAfgZrt_93k As of right now, my jump mechanics is a simple: if ((this.player.cursor.up.isDown) && this.player.body.onFloor()) { this.player.body.velocity.y = -300; } What do I do to make it feel less 'space-like' and more 'springy'??
  13. I want to be able to destroy the bullet by collision, but if i use weapon.bullets.destroy();, all the bullets will destroy and the weapon will not work/fire() anymore. Like this: weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; //weapon.bulletKillType = //Kill the bullet when collision happens; or //weapon.remove(bullet); like in groups
  14. Ever wonder what would happen if your gamepad's buttons came to life? Join square in his adventures, save Hexagon and Trapezoid from the hands of Evil Pen! Bad Pad is platformer game mixed with a little arcading, shooting, puzzle solving and metroidvania elements, that being said it is still a platformer, so expect a lot of jumping and fair amount of dying along the way. Bad Pad is available for Early Access on Steam now! Devblog, free demo, media kit and more can be found here.
  15. Hello all! I was trying to trim the collision size of one tile in Tiled, but then in Phaser the body of that tile it's the same. Does anyone know if is it possible to use Arcade Physics from phaser to get the trimmed collision size of the grid? I am waiting for your response. Thank you so much tilemapAux.json tilemapAux.tmx
  16. How to detect the object from group when collided to player in p2. like: Arcade child from group ex:
  17. Hi I'm writing a endless runner with typescript+phaser. I haven't made much progress yet, right now it only generates an infinite platform and has a running player that can jump. Now its the jumping I'm having issues with... when the game starts, the bottom of the player (which is its Y anchor) is at 400, which is the top of the platform. The player runs along fine and has no issues what so ever till I jump. Once the player lands after jumping, it starts jumping up and down (a little bit, only noticeable by looking at its Y through console.log), and the collision bool (from game.physics.arcade.collide) starts to switch between true and false every frame. Also, after landing a jump the players Y is a little bit under the platform top. Here is the code: /// <reference path="defs/phaser.d.ts" /> class Game { game: Phaser.Game; player: Phaser.Sprite; platform: Phaser.Group; constructor() { this.game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: this.preload, create: this.create, update: this.update }) } preload() { this.game.load.atlasJSONHash('player', '/assets/player.png', '/assets/player.json'); this.game.load.image('grass_left', '/assets/grass_left.png'); this.game.load.image('grass_middle', '/assets/grass_middle.png'); this.game.load.image('grass_right', '/assets/grass_right.png'); } create() { this.game.physics.startSystem(Phaser.Physics.ARCADE); // Create player this.player = this.game.add.sprite(20, 400, 'player'); this.player.anchor.set(0.5, 1); this.player.animations.add('jump', [3]); this.player.animations.add('walk', [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); this.player.animations.play('walk', 20, true); this.game.physics.arcade.enable(this.player); this.player.body.gravity.y = 400; this.player.body.bounce.y = 0; this.player.body.velocity.x = 200; // Create platform this.platform = this.game.add.group(); this.platform.enableBody = true; var block = this.platform.create(0, 400, 'grass_left'); block.body.immovable = true; for(var i = 0; i < 10; i++) { block = this.platform.create((i + 1) * 70, 400, 'grass_middle'); block.body.immovable = true; } this.game.world.setBounds(0, 0, 999999999999999999, 600); } update() { if(this.platform.right < this.game.camera.x + 800) { var block = this.platform.create(this.platform.right, 400, 'grass_middle'); block.body.immovable = true; } console.log(this.player.y); var onPlatform = this.game.physics.arcade.collide(this.player, this.platform); if(!onPlatform) { this.player.animations.play('jump', 20, true); } else { this.player.animations.play('walk', 20, true); } // Input var cursors = this.game.input.keyboard.createCursorKeys(); // Jump if(onPlatform && cursors.up.isDown && this.player.body.touching.down) { this.player.body.velocity.y = -450; } this.game.camera.x = this.player.x - 200; } } window.onload = () => { var game = new Game(); } Here is some values each frame after landing a jump: Frame 1 Player Y: 397 Collision with platform: false Frame 2 Player Y: 397.1111111111111 Collision with platform: true Frame 3 Player Y: 397 Collision with platform: false Frame 4 Player Y: 397.1111111111111 Collision with platform: true Hopefully you can help me, I've been bashing my head on it for hours now, and its starting to hurt! Thanks in advance
  18. Hello, I'm working on a simple tile game using the Phaser framework (new to Phaser), but unfortunately I've stumbled upon a "bug" when using the Arcade collision method. I want all the tiles to stack on top of each other, but the tiles on top always go through the tiles below them. I've tried to come up with a solution, but I'm really stuck. I hope someone can help me. I've put my script on codepen, so you can test it there and see what I mean :
  19. Bad Run, is platformer runner and was created as a part of the Bad Pad saga, to expand the world, characters and story and for some extra fun, Bad Pad is my upcoming PC/Consoles platformer game. "Join Square's epic adventure and fight the infamous Evil Pen.Run, jump, dive, fly and shot your way through, but most importantly take Evil Pen down! It's up to you, are you ready?" Features: - Campaign mode including 4 episodes, 40 levels, missions and battles. - Endless mode, master your skills, collect coins and upgrade your character and buy new items. - Daily rewards and achievements. - Bad Pad comics, finish an episode to reveal more slides. - Original guitar driven music by Avishay Mizrav. - Supports Landscape and Portrait views. Bad Run can be download in Google Play for free, https://play.google.com/store/apps/details?id=com.headbangames.badrun If you have any suggestions or questions feel free to ask here or send us an email, have fun!
  20. Hey guys! I'm having another issue with my endless runner and arcade physics bodies. This time bodies seem to flicker for a frame after I have call kill/reset on their sprites. Basically I have three chunks which are laid out and scrolled on screen one other the other. Once a chunk has scrolled off the opposite side of the screen, the layout is reshuffled and it is positioned behind the previous chunks so it can scroll back on screen. Before reshuffling the layout, I forEachAlive -> member.kill(). This is because it's possible that no every child of the chunk will be used in the new layout, so I want to pool them. When I generate the new layout, I reset(x, y) the child. This seems to cause the body of the child to flicker on screen despite the chunk being off screen. I wrote an example and attached it to help demonstrate the issue I am having. example.zip
  21. Hi, guys. Try my new game Play on Scirra Arcade: https://www.scirra.com/arcade/action-games/mannequin-head-jumping-challenge-game-12746 Download for Android: https://play.google.com/store/apps/details?id=com.takenewgames.mcjh Download for IOS: https://itunes.apple.com/app/mannequin-challenge-game-jumping/id1178329270 Description The Mannequin Head - Jumping Challenge Game is realy hot new challenge! Come Join To Play! The Mannequin Head - Jumping Challenge is taking over the world! Play Now! Features: - 10 characters - Simple One Touch Control - Online leaderboard - Endlesss Gameplay Gameplay: - Tap to jump - Don't touch on horizontal platform - Collect diamonds to unlock new characters Follow Us: — http://www.facebook.com/takenewgamesofficial — http://twitter.com/TakeNewGames — http://plus.google.com/+TakeNewGames — http://vk.com/takenewgames — http://www.pinterest.com/takenewgames — http://www.youtube.com/TakeNewGames?sub_confirmation=1 More Games: — http://www.takenewgames.com
  22. I was trying to bring the sprite after the player, I don't want to use bringToTop function because it will bring on the top instead of just bringing it after the player. Example: the bottle is before the player, when the player get the bottle, it will get after like: sprite.getAfter(player); and when the player drop it, the bottle will back to its original position sorry for my english and thanks in advance!
  23. I'm having a problem here, I have a big tilemap and the light/sun doesn't follow my pointer/cursor when it reached the game's width, also I have same problem in shadows, and I also want to make the shadow of the player small, like a size of the player. Thanks in advance .
  24. Hey guys! I'm making an endless runner and I'm running into a weird issue with Arcade physics. Because my game is an endless running, I'm anchoring my player on the screen and moving the objects towards the player instead of using the camera. My issue is that I get collision events however none of the body.blocked booleans are being set, so I know a collision happens, but I don't know which side it happens on (up, down, or left). I'm checking for collision like such: this.game.physics.arcade.collide(sprite, this.chunks[0], levelHandler, null, ctx); this.game.physics.arcade.collide(sprite, this.chunks[1], levelHandler, null, ctx); this.game.physics.arcade.collide(sprite, this.chunks[2], levelHandler, null, ctx); Basically, what I'm doing is I spawn three chunks (or segments) of objects and position them one screen length apart from each other. I then scroll each group on screen towards the player. When a chunk is scrolled off the opposite side of the screen, I reposition it back behind the last chunk in the list so it can be scrolled back on towards the player. My 'levelHandler' is being called properly, and it's giving my the object that the player collided with. Again, my issue is the object.body.blocked booleans aren't being set, so I don't know whether the player hit the left side, top, or bottom of the object. Would this be because I'm not moving the objects by applying a velocity to the object's body? I'm moving the parent group of the objects so I don't have to iterate through all my objects to do that. Is there another way to get the information I want? Or am I going to have to write my own detection to get which side was hit after the collision happened?
  25. How to create a simple tree in top down game in a single tree sprite. I want the leaves of the tree blocks the player and the player blocks the trunk of the tree. I try to use group sort to ascending but the player will appear in a wrong part of the tree not in the trunk.