Search the Community
Showing results for tags 'fire'.
-
http://www.firehungry.online About [Fire Hungry] Fire Hungry is a friendly, fun 2d shooter io game. Play as your favourite snack and burn up others with your powerful rapid flames with a simple mouse click. Players must strive to reach the highest score! Have fun! Fire Hungry was created by Infamous Flames How to Play [Fire Hungry] Unlock a character or use the default skin. Type in a name of a choice and click the blue play button to start. Move your player around the mouse. Click to shoot. [Fire Hungry] Strategy Moving your player carefully with the mouse will make dodging fire bullets a lot easier from other players.
-
Hello. I am using phaser weapon plugin and want fire in forEach loop: var weapon = game.add.weapon(10, 'bullet'); enemies.forEachAlive(function(enemy){ if(enemy.name == 'p1'){ player.rotation = game.physics.arcade.angleBetween(player, ednemy); weapon.fireAtSprite(enemy); } }); If I have 5 enemies in a row, and only 3 if them have name = p1, after executing this code, player sprite is rotate to the last enemy, but there is only one bullet. What can I do here?
-
Hey, I've never used any procedural textures. Where do I place the procedural texture and .fx files to reference? Thanks - I'm sure it's obvious. DB
- 5 replies
-
- fire
- procedural
-
(and 2 more)
Tagged with:
-
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
-
Hey there! Catacomb Chaos is an endless action arcade game where you try to survive against unrelenting waves of skeletons. You can loot gold and purchase potions for your next life. Let me know what you think! Play here: https://sambrosia.gitlab.io/catacomb-chaos/ I learned some neat stuff making this. Engine design, ECS, and steering behaviors are some of the cooler things I experimented with for the making of this game.
-
@Deltakosh or @Sebavan or @RaananW Anybody got any idea how i make jet flame particle system ... I have a texture for the flame... But i have no idea what NUMBERS (all the babylon particle system properties like emit boxes and min and max start, etc...) to use to make a flame for a a space ship jet flame. Is there some CYOS type deal for particle system...??? Is there some examples for different kind a particle system that can be created with "Specified Settings"... ??? Or anything that show a beginner how to make various particle system... What is the rhyme and reason to the setting the particle system numbers ???
-
var player; var keys; var shootButton; var bullet; function create() { //game.add.sprite(0,0, 'background'); game.physics.startSystem(Phaser.Physics.ARCADE); //creates player player = game.add.sprite(0.45*600,600-50,'galaga'); game.physics.arcade.enable(player); // allows player to fire 2 bullets bullet = game.add.weapon(2,'bullet'); // when bullet leaves the screen, it will be destroyed bullet.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; // offset rotation bullet.bulletAngleOffset = 90; // prevents ship from auto firing bullet.autofire = false; // The speed at which the bullet is fired bullet.bulletSpeed = 400; //keeps track of how many bullets were shot bullet.shots = 0; // Tell the bullet to track the 'player' Sprite, offset by 16px horizontally, 0 vertically bullet.trackSprite(player, 16, 0); //enabling keyboard use keys = game.input.keyboard.createCursorKeys(); shootButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); } function update() { // Reset the players velocity (movement) player.body.velocity.x = 0; if (keys.left.isDown) { // Move to the left player.body.velocity.x = -150; } else if (keys.right.isDown) { // Move to the right player.body.velocity.x = 150; } else { //ship is idle } //shooting the bullet if (shootButton.isDown) { bullet.fire(); } } What I'm trying to do is prevent my player variable from autofiring(holding down space button to fire bullets.). I want the player to be able to shoot two bullets at a time, but only when the player presses the fire button rather than holding it. I was under the impression that bullet.autofire = false; would do the trick, but I was wrong. Am I using the autofire variable the wrong way?
-
I looked around for an example of FireMaterial, but no luck. I see a candle, but not a place where the source for this exists. I know there is a search-able playground list, but saw no search button on the PG. I coded something up based on setting properties based on what its Parse loaded. I did not do any adds of textures. Is it absolutely required? Basically, I wanted to a special effect where a mesh appears on a scene briefly on fire. The mesh may or may not have a UV. For this all I get is a white solid (with 50% alpha) for 250 millis. Does this even sound doable? /// <reference path="./Mesh.ts"/> /// <reference path="./queue/MotionEvent.ts"/> /// <reference path="./queue/EventSeries.ts"/> module QI { export class FireEntrance extends QI.Mesh{ // nothing to do in constructor, so leave it to super private _inlineSound : BABYLON.Sound; // todo /** @override */ public performCustomGrandEntrance() : void { if (!BABYLON.FireMaterial) throw "QI.FireEntrance: Fire Material library not found"; var materialHold = this.material; var fire = new BABYLON.FireMaterial("Fire Entrance", this.getScene() ); fire.diffuseColor = new BABYLON.Color3(0.8, 0.1, 0); fire.speed = 1.0; fire.alpha = 0.5; // fire.checkReadyOnlyOnce = true; // diffuseTexture, distortionTexture, opacityTexture this.material = fire; // queue a return to actual material var ref = this; var series = new EventSeries([ function(){ref.isVisible = true;}, // make visible new Stall(250, this._inlineSound), // stall for a while, starting sound function(){ // resume with original material & make any children visible as well ref.material = materialHold; ref.makeVisible(true); // eliminate resources fire.dispose(); // this._inlineSound.dispose(); } ]); this.queueEventSeries(series); } } }
-
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, but be aware that only one shell can be in view at a time! You have only 70 seconds to sink all enemy ships. They are not armed, but they are protected by the gun fire from a fortified enemy battery on the other side of the bay. And they are moving with different speeds. So you need to aim very carefully! The game ends if you fail to complete the mission within the 70-second time limit or if your tank is destroyed by enemy gun fire. Controls Use the left and right keys to move. Use the up or space key to fire. Screenshots
-
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.physics.arcade.moveToObject(bullet, game.input.activePointer, 500); bulletTime = game.time.now + 200; } }}This is what I have got so far, and this works. But it doesn't fire in the direction the ship is flying in. ps. I've calculated the angle with the following code: var anglePlayer = Math.atan2(o.y * 20, o.x * 20);anglePlayer *= 180/Math.PI;anglePlayer = 180 - anglePlayer;player.angle = anglePlayer;
-
Hello everyone, I'm html5 game programmer, I've done some simple games. Javascript pure (no frameworks, it is that I'm stubborn :)) In my current project, a set of sailboats, I need the boat sails to catch fire, and fire make optimized with particles, but not how to detect the pixels that correspond to sail the boat, there is some algorithm, anything?
-
Hi, I stared learing html5 game dev with the use of phaser engine and got few issues. 1. I host my app to google.drive and until it's loaded, there is black are on site. Is this something google specific? Can bee seen on: googledrive.com/host/0B929yjYvfjo7WlRySWhTUFVDRE0 2. I wanted to add left - right, right - left drag and drop (so let's say movement by sliding a sprite) and when i'm near the edges and do not release earlier my sprite, it's bouncing. It's probably by adding collideWorldBounds but is there a way to make it somehow better? Maybe i should use different code for edges handling. Example on this behaviour in link above, code available here 3. I would like to add to code above firing on slide on my sprite up but without moving sprite up. I just wanted to fire only one sprite at a time and be able to fire another only if this first hits another or leaves game area. So i added following code, but my code doesn't work as expected. I did not how to make it on slide, so for test purposes i did it only on inputDown player2blue.events.onInputDown.add(fire, this);then in fire() function i added this "if (!bullet)", as i thought add.sprite and rest of code by only available when there is no such sprite, but this allows me to fire only once so probably i messed up something here. function fire(){ if (!bullet) { bullet = game.add.sprite(player2blue.x, player2blue.y, 'bullet'); game.physics.enable(bullet, Phaser.Physics.ARCADE); bullet.checkWorldBounds = true; bullet.outOfBoundsKill = true; bullet.body.gravity.y = -2000; bullet.body.velocity.y = 50; }}Then my update() and collisionHandler() functions function update(){ game.physics.arcade.collide(opponent, bullet, collisionHandler, null, this);}function collisionHandler(){ bullet.kill(); opponent.kill();}No matter, if my bullet hits another sprite (here collision works ok, both sprites are killed) or leaves game arena, i can only fire once, without if statement, i can fire multiple times, but it's not what i want. If you could provide me with some tutorials for that i would be grateful.
-
Hi, I've finally released my first mobile game, Cosmo Starglider! Have you ever wanted to shoot robots in space with a laser-gun? Yeah, me too, but wake up that's not happening bub. Something you can do though is try my new game for free! It's in space so that's similar at least. You are Cosmo, alone in space, gliding among the stars with your jetpack. But an horrific amount of mysterious asteroids are in your way. How long can you survive? How far will you get? Right now you can only try to beat yourself and your closest friends, but get your practice going, because in a week you will be able to compare yourself with the rest of the world! Here's the link if you want to check it out (please do!): http://onelink.to/wh9anz/ (Newer mobiles recommended, inexperienced programming on my part can cause lag) Feedback wildly appreciated! You can do that by rating or on the links below! And for more info on our games and updates, find us here: https://www.facebook.com/PiggybackGames And on my twitter: @jagekiwi Go indiedevs, cheers!