All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. vornay

    Google GameSnacks

    https://www.gamesnacks.com "Bite-sized HTML5 games, accessible to everyone." https://www.gamasutra.com/view/news/358551/Google_wants_to_bring_HTML5_titles_to_lowend_devices_with_GameSnacks.php "Google has announced a new HTML5 platform called GameSnacks that's designed to help devs bring quick, casual games to any device."
  4. The track editor is finally done! It took a lot of coding, so hopefully not too many bugs. 🤓 And there's a new single race mode where you race other peoples tracks. Looking forward to seeing what tracks people make! 😃 https://drift.team/
  5. 3mb seems to be too low. How do you keep the final game size below 3mb. Do you guys include sounds??
  6. I want the bullets to fire in the direction the ship is facing such as in this example: https://phaser.io/examples/v2/arcade-physics/asteroids-movement I have followed the same code structure but my bullets don't fire in the direction I'm facing. Code: // Initialize the Phaser Game object and set default game window size const game = new Phaser.Game(325, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update }) function preload () { //player assets game.load.spritesheet('player', 'assets/player_spaceship/tempShipSpsritesheet.png',80,60,2); game.load.image("bullet", 'assets/bullet.png'); } //bullet variables var bullets; var bulletTime = 0; var ebulletTime = 0; function create () { //Player Variables ---------------------------------- MAX_VELOCITY = 200; // pixels/second DRAG = 100; // pixels/second game.physics.startSystem(Phaser.Physics.ARCADE); playerbullets = game.add.group(); playerbullets.enableBody = true; playerbullets.physicsBodyType = Phaser.Physics.ARCADE; playerbullets.createMultiple(10000, 'bullet'); playerbullets.setAll('anchor.x', 0.5); playerbullets.setAll('anchor.y', 0.5); playerbullets.setAll('outOfBoundsKill', true); playerbullets.setAll('checkWorldBounds', true); player = game.add.sprite(game.width/2,game.height,'player',0); game.physics.enable(player, Phaser.Physics.ARCADE); player.body.maxVelocity.set(MAX_VELOCITY) player.body.drag.set(DRAG) player.anchor.set(0.5); player.body.collideWorldBounds = true; //Environment -------------------------------- game.stage.backgroundColor = "#4488AA" //Controls ----------------------------------- cursors = game.input.keyboard.createCursorKeys(); game.input.keyboard.addKeyCapture([ Phaser.Keyboard.SPACEBAR ]); } function update () { //Centers screen game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.scale.refresh(); if (cursors.up.isDown){ game.physics.arcade.accelerationFromRotation(player.rotation, 200, player.body.acceleration); //player.animations.play('thrusters', 30, true); } else{ player.body.acceleration.set(0); } if(cursors.left.isDown){ player.body.angularVelocity = -300; } else if(cursors.right.isDown){ player.body.angularVelocity = 300; } else{ player.body.angularVelocity = 0; } if(game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR)){ PlayerBulletFired() } } function PlayerBulletFired () { if (game.time.now > bulletTime)//adds a delay to the bullet time { bullet = playerbullets.getFirstExists(false); if (bullet) { bullet.scale.setTo(0.2,0.2); bullet.reset(player.body.x, player.body.y); bullet.rotation = player.rotation; game.physics.arcade.velocityFromRotation(player.rotation, 400, bullet.body.velocity); bullet.body.velocity.y = -400; bulletTime = game.time.now + 50; } } }
  7. Yesterday
  8. Regarding your case - yes, 5k sprites is too much, only something like ParticleContainer can handle that, and even then - you'll have like 100k javascript objects in memory total, because each sprite is lightweight but not that lightweight You can put tiles into graphics with beginTextureFill - it'll have like 20k objects and it wont re-upload vertex buffer every frame. pixi-tilemap wont spawn any objects, it can just upload buffer once when after you refill your tiles list, and all next calls are cheap, only asking for GPU to render that particular tilemap. RenderTexture caching can convert your map to 1 or 2 sprites, but eats gpu memory, 4 bytes per pixel. Choose your destiny.
  9. Welcome to the forums! Another tilemap thread. Please use search for this particular subforum on "tilemap" word. You can also search at https://github.com/pixijs/pixi.js/issues My latest explanation: https://github.com/pixijs/pixi-tilemap/issues/75#issuecomment-589615977 Tilemap is an advanced (not basic) , advanced algorithm that requires developer to write its own code and not just CTRL+C stuff from examples. PixiJS gives only low-level components that can be used with high-level algos people produce. When you write it, you actually feel like engine creator and not just like a person who uses one of existing solutions. I posted the same answer with different details like 30 times already. I hope you can forgive me that I cant give you compilation of all those threads Of course I would like someone to actually go through all that and compile article for PixiJS wiki ( https://github.com/pixijs/pixi.js/wiki ). We are waiting when that hero arrives.
  10. Hi all, I'm currently working on a new game which uses large tilesets and renders 9 Containers as map layers. Each map contains 24*24 tiles and each tile is 32px*32px. Currently I'm adding each tile from the tileset as a sprite individually (only if the tileIndex for that tile is > 0). So if I were to have a fully loaded map it would contain a total of 5,184 Sprites. I'm guessing that this is inefficient and I feel that I could combine the bottom two layers into a texture, as these are Ground Layers on the map. The player will walk over these anyway and they are unlikely to ever change until the player switches map and thus reducing the Sprite usage by 1,152 (2 layers worth). I've looked at the docs and online examples to see if there's anything that could be helpful here but have been unsuccessful in getting it to work as I'd expect it to. Please help.
  11. Nothing to do with HTML5 games. Locking.
  12. VR or Virtual Reality is an interactive platform which when used can deliver a 3D experience with respect to any products or services across the globe. In other words, it helps in creating an artificial environment within which users can interact with any elements- be it a gaming character, a car, receiving training or education and lots more. For more details, click here: https://bit.ly/2VaYzTu
  13. Magnum

    Laby

    Hi all, I would say that following the various problems encountered with my host, the site changes address. Find BZHGames on https://bzhgames.xyz. Good game !
  14. Very late reply, but I was looking for a solution to the same issue. I don't think nemoDreamer's anser would work, it seems to just look for an image, not texture atlas frame. I'd also avoid using underscore as in the first reply, but you can do something with Phaser only methods like this: function hasFrameName ( { atlasName, frameName } ) { return this.state.cache.getFrameData( atlasName ).checkFrameName( frameName ) }
  15. Yeah, Panda hasn't been updated almost 1 years guess enpu will never update it....at least, Notify in official website 'News' and 'BUY NOW' page that the editor is closed off and stop support as a temporary. I decided to use Construct 3.... Phaser 3 is not my choose because I worry phaser 3 code is not work on phaser 4....phaser 5 at the future
  16. Last week
  17. I've added a pr to make updateText public!
  18. Oh, im so stupid, @eXponeta already answered you The demo is awesome, it'll be a pleasure to dig into the problem
  19. Thanks for your replies. I opened a GitHub issue with info and demo: https://github.com/pixijs/pixi.js/issues/6424 See the demo at: https://www.pixiplayground.com/#/edit/jogREV4Vj-gqrZTLI_Hoh
  20. Actually, it can also be a browser bug. Please post a demo.
  21. Oh, I've got it I didnt see that you use TS, my fault. The function is private.https://github.com/pixijs/pixi.js/blob/295495bd46b6dc2df736e374f272b0bb3e1c6ee2/packages/text/src/Text.ts#L143 You can complain about it in pixijs issues or even make PR to unprivate it. Just mention that there are threads where people recommend to use this function from outside. For now just use "as any" Before you ask "why didnt pixijs team think about that", look in other places - many functions of ThreeJS are scope-locked, no way to get to them!
  22. I am making a 2d shooter game and i am trying to add a collider between the bullets and the enemy so that the bullet doesn't go straight through the enemy but i am getting an error I am new to phaser btw here is the code for my projectile class. The class is instantiated whenever the player clicks class Projectile { constructor(scene, x, y) { this.scene = scene; this.game = scene.game this.x = x; this.y = y; this.projectile_sprite = scene.physics.add.sprite(x, y, 'bullet') this.projectile_sprite.setScale(0.02); let yCur = this.game.input.mousePointer.y; let xCur = this.game.input.mousePointer.x; let rad = Phaser.Math.Angle.Between(this.x,this.y,xCur,yCur); this.scene.physics.moveTo(this.projectile_sprite,xCur,yCur,1000) function bulletCollide(projectile){ projectile.destroy(); } this.physics.add.collider(player.player_sprite,this.projectile_sprite,bulletCollide(this.projectile_sprite)); } }
  23. Welcome to the forums! Unfortunately, I cant help with fixing your demo even if you post it, because Im taking rest from pixiJS, you have to wait someone else. However, I can point out which things can happen with extract: 1. Y axis reversal. 2. premultiplied alpha 3. all pixels are zero. It depends on whether you take pixels from the main buffer or temporary renderTexture, It also depends on device and "antialias" setting of renderer context. In your case I dont understand why do you ever need canvas() getImageData, if there's pixels() method that returns array. To know EXACTLY what is going on there, you have to read extract source code: https://github.com/pixijs/pixi.js/blob/dev/packages/extract/src/Extract.ts#L183 PixiJS uses "readPixels" method of WebGL. Yes, there were many bugs in that method already. Maybe you are using old version of pixijs. What can you do : 0. check pixijs version 1. report to pixijs github issues 2. try modify that method from outside or write your own method that takes pixel based on "readPixels". The best practive is: 1. take pixel from screen just after it was rendered, in app render() method. Yes, override it, make your own app: https://github.com/pixijs/pixi.js/wiki/v5-Custom-Application-GameLoop 2. you can render it in temporary renderTexture instead, Extract plugin has a few lines of code about that - you can even make it 1x1 pixel and . In taht case you can do it anytime. If you want more iunformation, please search in this subforum for "Extract" or in pixijs issues.
  24. Set canvas.width = 0 for text elements destroy() ? good idea, but that kind of things are better handled at https://github.com/pixijs/pixi.js/issues . If possible, please make a PR.
  25. Users have been reporting a problem for a long time where after some time playing the game, chat messages and player names (both of which use Text elements) would disappear and some time after that, the application would crash. As I don't have an iOS device, I installed XCode on a Mac OS VM and started to debug. I found out that most of the memory is consumed by Canvas instances, that don't seem to be garbage collected. I did a search on Google and found this https://github.com/openlayers/openlayers/issues/9291, could this be related? I will set the Canvas element's size manually to see if this fixes the issue, and will report with my results.
  26. Offroad Mania 1.0.5 updates: + added tires deformation + hide controls (show if started from select window) + save window mode settings Video https://www.youtube.com/watch?v=oleFrssowII
  27. Thank you! Now we work on updates for Steam. I prefer native mobile version, but look at this link https://store.steampowered.com/steamlink/about/
  1. Load more activity