Jump to content

Search the Community

Showing results for tags 'bullet'.

  • 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
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • 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 19 results

  1. Hi, I'm new with Phaser, I'm wondering how can I create a group of enemies that appears at the side of the screen in a random Y position between 550px and 745 px, after they appear they need to start to fire to my character Right now I have a function to create the bullets and how they will be fired: createBullets:function(laserToFire,track,offsetX, offsetY, bulletDirection,fireRate,bulletSpeed){ weapon = gameSP.add.weapon(10, laserToFire); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; weapon.bulletSpeed = bulletSpeed; weapon.fireRate =
  2. Hello. I am using weapon.fire() function and I want to set special property for bullet, that apear after calling this function. I tried to use forEach: weapon.bullets.forEach(function(bullet){ if(bullet.target == undefined){ bullet.taget = 'prop1'; return; } }); weapon.fire(); but this does not work.
  3. I am making a platformer game which I have implemented a weapon fire method to shoot some projectiles. I find that I am unable to fire these projectiles along the X axis rather than the Y. Here is a that section of the code within the create function: weapon = this.game.add.weapon(1, 'bullet'); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; and the code within create for the bullet: if(this.cursors.down.isDown){ weapon.bulletAngleOffset = 90; weapon.bulletSpeed = 300; weapon.x = this.fNobleRanger.x; weapon.y = this.fNobleRanger.y; w
  4. In my platformer, the player has a number of different weapons (gun, energy blast, homing missile) and there may be a number of enemies (up to maybe 6) who will have one of the same weapons. From my understanding of the weapon plugin and tutorials, I should then be making a different weapon object for each of the players weapons and for each enemy. As I am wanting to attach a particle emitter to missiles I'm then going to extend the bullet class to make a missile. Question 1: I want autofire from enemies to fireAtSprite rather than just fire, I'm assuming the best way to do this is to ex
  5. 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 whi
  6. Hi guys! I'm new to Phaser, with basic knowledge of JS. I have a problem with my platform game, which I've started with this tutorial. https://phaser.io/news/2015/09/platformer-tutorial-part2 The code is different from every tutorial I've seen on Phaser main webpage, so It's hard for me to get in to. (no update, create, preload function in main is the beggining of all my problems)... I wanted to add a shooting system, which I learned from this: https://phaser.io/examples/v2/arcade-physics/group-vs-group I applied this code to the platformer engine, and I am not su
  7. Hello! I'm having a hell of a time trying figure out how to change Phaser Weapon plugins bullet speed after it's been shot. I also set "weapon.bulletSpeed" negative value, because by default it was going in opposite direction. I attached weapon to a spaceship sprite, but on "weapon.fire()" bullet goes backwards. Weapon definition. addWeapon: function(target) { var weapon; var weapon; weapon = game.add.weapon(100, 'bullet'); weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; weapon.bulletAngleOffset = 90; weapon.bulletSpeed = 5; weapon.trackSprite(target, (
  8. Hey All, We are a little late posting to this forum and I hope this is an appropriate section to place our post in. We have a Shoot-em-up Game Jam (of sorts) running all the way through 2015, in monthly installments, called.. #ShmupJam. So the basic idea is anyone with the skills to make a shmup, or a first time game in this genre, can participate in the monthly jam. Each month the era moves forwards in time. **updated 7th May 2015** We’ve added compilation images for waves 1-4! Wave 05 is ACTIVE! - http://jams.gamejolt.io/shmupjam05/ Wave 04 Games – http://jams.gamejolt.io/
  9. Hey everyone! So I'm pretty new to Phaser and I'm having a hard time making the player's bullets stop at a certain point (e.g killing the projectile at around 30px after its original position, etc). I want the player to have a limited projectile range and I'm just wondering how you can implement that because all my attempts of trying to figure it out have failed so far, so I'm seeking help from you guys... Thanks for any advise!
  10. I´m having a problem with the weapon plugin. When I use the function weapon.fire() it fires a bullet 90 degrees from the canon sprite (the one the weapon plugin is tracking). Any idea what I am doing Wrong? Thnxs!
  11. Update - the game is now available on Google Play as a native app: https://play.google.com/store/apps/details?id=com.afgt.naval The link http://www.askforgametask.com/mobile/games/naval/ Description Naval Battle is an HTML5 arcade game in which your mission is to destroy a fleet of enemy cargo ships before they deliver ammunition and provisions to the enemy troops. You are the commander of the VIC Victory, a fast light tank used by the Mobile Costal Artillery in defending a country against sea attacks. Your tank is armed with a limitless supply of anti-ship shells, bu
  12. After some research on Internet how to make bullet hell game with Phaser, no good tutorial found, so I decided to use 3rd framework, then I found bulletml.js, so I give it a try, running 3rd demo, work great. (3rd one is orginal, no dependency, also, bunch of Japanese in comment and on github page, maybe I should learn it...). So I tried to modify it without Phaser, work great too. After saw what it can do, I tried to make it work with Phaser, little hard for me to understand demo's code (I'm still a beginner). So I tried, got error: Uncaught TypeError: this.onTextureUpdate is n
  13. Hi Guys, So I'm flying a space ship using the accelerometer and gyro.js, with gyro.js I calculate the angle the ship is flying in. Now I want to fire a laser when I touch my mobile device's screen. The laser should fire in the direction the ship is flying in, no matter where the user touches the screen. I've searched for a couple of hours, but still didn't find a way to make this work. Any ideas? function fire(angle) { if(game.time.now > bulletTime) { bullet = bullets.getFirstExists(false); if(bullet) { bullet.reset(player.x, player.y + 8); bullet.rotation = this.game.physic
  14. Hello & Thanks , I am working on a javescript(only) game . I have the shooter(thrower) setup and moving via arrowKeys . And have initial setup for bullet(cowpie) . But I need help(example) setting cowpie up so that I can have multiple cowpies in play . var Cowpie = function () { var self = this; this.idTag = 'cowpie'; this.x = thrower.x; this.y = thrower.y; this.width= 64; this.height = 64; this.speedX = 0; this.speedY = 5; this.visible = true; this.directionY = -1; this.moveM
  15. Hello & Thanks : I am having trouble getting bullets to go : I get error :Uncaught TypeError: Cannot read property 'velocity' of undefined m-vertical-collision.js:124 Pls , what do I need to make this puppy go ? Thanks
  16. My character fires a bullet and how far it goes depends on what it hits or passes through. Box2D and other physics engines have useful callbacks for collision detection for moving objects, but this bullet would be rendered instantaneously so I figured raytracing would be the solution. How would I go about doing this?
  17. Hello, I want to switch sprite or frame when i fire. I use this for the moment but it's only working when i load the game. It's possible to switch sprite or frame in createMultiple(quantity, key, frame, exists) ? APP.bullets = game.add.group(); APP.bullets.createMultiple(10, random_card()); APP.bullets.setAll('anchor.x', 0.5); APP.bullets.setAll('anchor.y', 1); APP.bullets.enableBody = true; game.physics.enable(APP.bullets);function random_card() { var bullet var rand = Math.floor(Math.random() * 3 + 1); switch (rand) { case 1: bullet = "bullet1";
  18. Hi, I have an issue on my fire function. When i keep spacebar pressed collision between the bullet and the layer doesn't working. You can test it http://s475613576.onlinehome.fr/portfolio/jeu/jeu/warped/index.html create() {// bullet group APP.bullets = game.add.group(); APP.bullets.createMultiple(10, 'bullet'); APP.bullets.setAll('anchor.x', 0.5); APP.bullets.setAll('anchor.y', 1);}update(){if (APP.fireButton.isDown) { fireBullet(); }game.physics.arcade.overlap(APP.bullet, APP.layer, function(bullet, layer) { bullet.kill(); }, null, this);}}func
  19. Hello. I have seen several posts that talk about this topic. I do not understand what happens when the bullets hit platforms. Function when the collision occurs is not executed. This only happens when the bullet hits a group of platforms. This is my code create: this.bullets = this.game.add.group(); this.bullets.createMultiple(30, 'bullet'); this.bullets.forEach(utils.setupBullet, this); utils.setupBullet = function(bullet) { bullet.anchor.x = 0.5; bullet.anchor.y = 0.5; bullet.outOfBoundsKill = true; bullet.lifespan = 2300; bull
×
×
  • Create New...