PixelPicoSean

Members
  • Content Count

    278
  • Joined

  • Last visited

  • Days Won

    4

Reputation Activity

  1. Like
    PixelPicoSean got a reaction from ivan.popelyshev in Best tools for graphic designers to work for Pixi.js   
    You can find a tool to generate JSON file and write a custom PIXI loader for it. I've done similar stuff, here's my in-house framework: https://github.com/pixelpicosean/voltar It is PIXI based, and I have scripts to convert Godot scenes into JSON and load. I've gone that way too far, even heavily modified PIXI to support this workflow though. You can do same thing without modify PIXI at all, only write scripts for features you want (layout with containers/sprites) which I think is fairly easy.
  2. Like
    PixelPicoSean got a reaction from blackhawx in Move group of sprites   
    You need to call setVelocityX on each of them, by using a loop or Call action:
    Phaser.Actions.Call(malos.getChildren(), function(go) { go.setVelocityX(100) })  
  3. Like
    PixelPicoSean reacted to B3L7 in Tilemap & File Pack Project Template   
    I've created a template to illustrate the concept of levels generated from dynamically loaded tilemaps from a single level scene.
    Phaser 3 Tilemap & File Pack Project Template
    Demo

     
    Questions and feedback are welcome!
  4. Like
    PixelPicoSean got a reaction from squilibob in Adjusting sprite collider offset after scaling a sprite   
    PR made, you can check it out here
    You can modify phaser source code with changes from this PR, so you can continue to make awesome games 
  5. Like
    PixelPicoSean reacted to Zionviller in Vertical gaps between tilemap columns [Solution: this.cameras.main.roundPixels = true;]   
    Thanks! A little update, it appears another solution that uses WEBGL is to change the property roundPixels to true.
    e.g. this.cameras.main.roundPixels = true;
  6. Confused
    PixelPicoSean got a reaction from ExcitedBeginner in Running into trouble making my first game   
    Game instance should not be used for creating objects and input event handling, use the scene instead.
    // Create objects from a method of scene this.add.sprite(...) // Subscribe to input events of a scene this.input.on('pointerdown', function(event) {}, this)  
  7. Like
    PixelPicoSean got a reaction from ExcitedBeginner in Running into trouble making my first game   
    There're no Signals in Phaser 3 any more. For input events you can do this:
    pause_label.on('pointerup', function(event) {}); And enable input listeners:
    pause_label.setInteractive();  
  8. Like
    PixelPicoSean got a reaction from s4m_ur4i in Prevent a game object to be affected by the velocity   
    var columna = this.physics.add.group({ gravityY: 0 });  
  9. Like
    PixelPicoSean reacted to Gio in Ideas for funding of small game dev studio   
    Disclaimer : I'm no expert, although I've managed to successfully raise some venture capital funding for my company so I have a bit of experience with it.
    Having said that... are you really, really sure that you really want to do this? It's important to know what you want to get out of it.
    Nobody is ever going to give you money for free. It's always a tradeoff.
    Firstly, it's going to take a lot of time and effort to get your first round of funding. When I first did it, I had a very strong background that helped me make a case that people wouldn't be wasting their money by giving some to me. Even then, it took several months to finalise our first VC deal. Think about it, several months. Do you want to spend several months trying to raise funding (which may or may not work out), or do you want to spend that time making a product that you can sell? It's really one or the other, you won't have time for both.
    Secondly, all the money that you may get for example from "EU funding for small business", as you say, comes with some strings attached. In most cases, the EU funding will be for creating new jobs in your area. This will be different on a case-by-case basis, but basically it boils down to something like "for every 10k euros that we give you, you have to hire a new employee". But you said that you don't particularly want to spend your time managing people, so consider that carefully: if you are successful, you'll spend much less time coding and much more time managing people (after spending time trying to hire the right people), writing monthly reports for your investors, etc.
    A lot of people that seek initial "seed" funding for their business, just do it to have some psychological reassurance, not because they really need the money. It's just to say "Hey look, someone has given me X amount of money to work on my idea, it means it's not such a crazy idea after all". It's just to validate your idea. Sometimes you want to prove this to yourself, sometimes you want to convince the people close to you. And it's great when it works out, but it does come at a (big) cost. You've spent time and energy to get a good deal, and that's most likely affected your original plans - maybe you didn't want to hire as many people as you had to. And once you hired them, maybe you can't work on your original idea anymore because you need some short-term money to pay for the salaries.
    To be honest, what was suggested above, i.e. find a part-time job to pay your bills and spend the rest of your time working on your projects until they're ready to ship and generate revenue, is not a bad idea in many cases - I wouldn't dismiss it so quickly.
    Good luck
  10. Like
    PixelPicoSean reacted to fariazz in Tutorial - How to make a game in Phaser 3   
    Hi everyone, just wanted to share my tutorial on how to make a simple frogger-style game in Phaser 3 (including some camera shake and fadeout effect)
    Hope you like it!
    How to make a game in Phaser 3
  11. Like
    PixelPicoSean got a reaction from Cudabear in How to Create a Loading Scene in Phaser3   
    Add a files array to config of your loading scene and add put whatever images you want to use into it. Those files will be loaded before preload method is called, so you can use them to create the scene and subscribe to progress event inside the preload method.
    Load progress with file payloads example
  12. Sad
    PixelPicoSean got a reaction from Milton in HTML5 export of Unity flappy bird is 714KB?   
    That 72K is not size of the "core", but a complete flappy bird game. So the package already includes 2D and sound support at least, which is already usable for me. The only thing is to find how to integrate JavaScript SDKs.
  13. Thanks
    PixelPicoSean got a reaction from PBMCube in How to Create a Loading Scene in Phaser3   
    Add a files array to config of your loading scene and add put whatever images you want to use into it. Those files will be loaded before preload method is called, so you can use them to create the scene and subscribe to progress event inside the preload method.
    Load progress with file payloads example
  14. Thanks
    PixelPicoSean got a reaction from AdamRyanGameDev in How to Create a Loading Scene in Phaser3   
    Add a files array to config of your loading scene and add put whatever images you want to use into it. Those files will be loaded before preload method is called, so you can use them to create the scene and subscribe to progress event inside the preload method.
    Load progress with file payloads example
  15. Thanks
    PixelPicoSean got a reaction from zedacapitinga in upgrade phaser version   
    https://github.com/photonstorm/phaser-ce
  16. Thanks
    PixelPicoSean got a reaction from zedacapitinga in upgrade phaser version   
    Phaser 3 is quite different from Phaser 2, so you can only upgrade to latest 2.x (CE versions are great)
  17. Thanks
    PixelPicoSean got a reaction from alexandernst in Rotate bullets position in rotation of gun   
    I've modified your code, now it should work as expected. There's still a problem with your bullet's move direction, you need to use a Point/Vector2 or an angle to control that.
    class Bullet extends Phaser.GameObjects.Sprite { constructor(scene) { super(scene, 0, 0, 'bullet'); this.speed = Phaser.Math.GetSpeed(400, 1); } fire(x, y) { this.setPosition(x, y); this.setActive(true); this.setVisible(true); } update(time, delta) { this.y -= this.speed * delta; this.x -= this.speed * delta; if (this.y < -50) { this.setActive(false); this.setVisible(false); } } } class Gun extends Phaser.Scene { constructor(config) { super({ key: "Gun" }) } preload() { this.load.html("gun", "gun.html", 50, 50); this.load.html("bullet", "bullet.html", 20, 20); } create() { this.gun = this.add.image(400, 300, 'gun'); this.key_left = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.LEFT); this.key_right = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.RIGHT); this.bullets = this.add.group({ classType: Bullet, maxSize: 10, runChildUpdate: true }); this.input.on("pointerdown", (event) => { let bullet = this.bullets.get(); if(bullet) { let offset = new Phaser.Geom.Point(0, -this.gun.height / 2); Phaser.Math.Rotate(offset, this.gun.rotation); bullet.fire(this.gun.x + offset.x, this.gun.y + offset.y); } }); } update() { if(this.key_left.isDown) { this.gun.angle -= 1; } else if(this.key_right.isDown) { this.gun.angle += 1; } } } var config = { width: 800, height: 600, type: Phaser.CANVAS, parent: 'phaser-example', scene: [Gun], physics: { default: 'arcade', arcade: { gravity: { z: 300 }, debug: true } } }; var game = new Phaser.Game(config);  
  18. Thanks
    PixelPicoSean got a reaction from alexandernst in Rotate bullets position in rotation of gun   
    First in the bullet class:
    class Bullet extends Phaser.GameObjects.Sprite { constructor(scene) { super(scene, 0, 0, 'bullet'); this.speed = Phaser.Math.GetSpeed(400, 1); // Use velocity for movement // Note that `velocity` is a built-in property // if you are using any of the physics engines // of Phaser this.velocity = new Phaser.Geom.Point(0, 0); } // Pass direction to bullet as 3rd param fire(x, y, direction) { this.setPosition(x, y) .setActive(true) .setVisible(true) this.velocity.setTo(0, -this.speed) Phaser.Math.Rotate(this.velocity, direction) } update(time, delta) { // Update position based on velocity this.x += this.velocity.x * delta; this.y += this.velocity.y * delta; if (this.y < -50) { this.setActive(false); this.setVisible(false); } } } And fire the bullet:
    bullet.fire(this.gun.x + offset.x, this.gun.y + offset.y, this.gun.rotation); But I suggest look at physics engines of Phaser that have all these features built-in, there're tons of physics examples available that you take as a reference.
  19. Thanks
    PixelPicoSean got a reaction from alexandernst in Rotate bullets position in rotation of gun   
    The default group factory create a Group instance, while this.physics.add.group create a PhysicsGroup and that is what you need. Looks like that example uses old methods that no longer exist, you can take a look at other examples and experiment.
  20. Thanks
    PixelPicoSean got a reaction from alexandernst in Rotate bullets position in rotation of gun   
    // image this.physics.add.image(0, 0, 'bullet'); // sprite this.physics.add.sprite(0, 0, 'bullet'); Take a look at this example, and you will know how to create `Bullet` instances.
    BTW. you don't need to call `Phaser.Physics.Arcade.Image.call(this, scene, ...)` when `super(scene, ...)` is already called, they do the same thing.
  21. Thanks
    PixelPicoSean got a reaction from alexandernst in Rotate bullets position in rotation of gun   
    Sorry my fault, it should be `this.scene.physics.world.enable(this)`
  22. Thanks
    PixelPicoSean got a reaction from alexandernst in Rotate bullets position in rotation of gun   
    Change your fire method to:
    fire(gun) { this.lifespan = 2000; this.setActive(true); this.setVisible(true); this.setRotation(gun.rotation); // angle is in degree, rotation is in radian var offset = new Phaser.Geom.Point(40, 0); Phaser.Math.Rotate(offset, gun.rotation); // you can only rotate with radian this.setPosition(gun.x + offset.x, gun.y + offset.y); // this.body.reset(gun.x + offset.y, gun.y + offset.y); // var angle = Phaser.Math.DegToRad(gun.body.rotation); this.body.world.scene.physics.velocityFromRotation(gun.rotation, this.speed, this.body.velocity); this.body.velocity.x *= 2; this.body.velocity.y *= 2; }  
  23. Like
    PixelPicoSean got a reaction from pixelhijack in Phaser 3 Scene / Phaser 2 State - passing data to init when start   
    So you can simply pass all the level configs from the boot scene to the one you used for levels. And by using a boot and even a preloader scene, you can load JSON from somewhere and pass it when all the assets are loaded to LevelScene (or whatever you call it).
  24. Like
    PixelPicoSean got a reaction from pixelhijack in Phaser 3 Scene / Phaser 2 State - passing data to init when start   
    It should work as samme said, the data send with start function will be passed to both init and create method of the scene.
  25. Like
    PixelPicoSean got a reaction from BitfoxGames in Bruh.io - Battle Royale in your browser!   
    Wow, that is a nice game with really great multiplayer support. I'd suggest disable collision with walls in ghost mode, so players can focus on the battle between survivals without distractions.