Cedric

Members
  • Content Count

    69
  • Joined

  • Last visited

About Cedric

  • Rank
    Advanced Member
  • Birthday 05/29/1997

Contact Methods

  • Skype
    decrossercedric

Profile Information

  • Gender
    Male
  • Location
    Belgium, sint-niklaas, oost-vlaanderen

Recent Profile Visitors

786 profile views
  1. Cedric

    Phaser integration

    Hello Awesome people, I litterly just bought the personal construct 2 license since it is on sale. I know there is a coding side of it or something to do with scripting in js Can I use phaser inside construct 2 ? or has anyone tried to implement such idea ? I realy like gamedevving using phaser and es6/es2015 it is just awesome so if I could combine that with construct his visual tools that would be awesome Very kind regards, Cedric
  2. Cedric

    Resolutions and scaling

    looks really good how did you code it ? is it with phaser or is it a plugin ?
  3. Cedric

    Resolutions and scaling

    how did you get the info on the right ? (in green letters)
  4. Cedric

    Resolutions and scaling

    hi all, Can you give your feedback on this articale and how I can do the same with code instead of consturct 2 ? https://www.scirra.com/tutorials/1126/multiple-screen-sizing-for-all-mobile-devices Very kind regards, cedric.
  5. Cedric

    how to remove the tilesprite debug messages?

    thank you for your response
  6. Hello everyone, Does anyone of you know how I can disable the tilesprite debugging messages? example in the attachment Very Kind Regards, Cedric
  7. Cedric

    es2015 game referencing between classes

    I fixed the issue by passing in the game as a parameter. The problem was that I was referencing the game of the current class which was declared differently. So when I used the right declaration and passed it in as the game parameter then it worked like it should.
  8. Cedric

    es2015 game referencing between classes

    in the book it is the prototype itself which is calling the addBarrier method. So I called it inside the class. But I have no idea how to use it or fix it :/
  9. Dear people of this awesome community, I am strugeling to get the spawning system working. I keep getting the error: src\js\objects\Barrier.js:9 Uncaught TypeError: Cannot read property 'width' of undefined(…); Barrier.js : import GlobalVars from "./GlobalVars"; import playGame from "../States/PlayGame"; class Barrier extends Phaser.Sprite { constructor(game, state, speed, tintColor) { super(game); this.game = game; this.state = state; var positions = [(this.game.width - GlobalVars.tunnelWidth) / 2, (this.game.width + GlobalVars.tunnelWidth)/2]; var position = this.game.rnd.between(0, 1); Phaser.Sprite.call(this, game, positions[position], -100, "barrier"); var cropRect = new Phaser.Rectangle(0, 0, GlobalVars.tunnelWidth /2, 24); this.crop(cropRect); game.physics.enable(this, Phaser.Physics.ARCADE); this.anchor.set(position, 0.5); this.tint = tintColor; this.body.velocity.y = speed; this.placeBarrier = true; console.log("barrier placed"); } update() { if (this.placeBarrier && this.y > GlobalVars.barrierGap) { this.placeBarrier = false; playGame.prototype.addBarrier(this.parent, this.tintColor); } if (this.y > this.game.height) { this.destroy(); } } } export default Barrier; import GlobalVars from "../objects/GlobalVars"; import Barrier from "../objects/Barrier"; class playGame extends Phaser.State { constructor(game) { super(game); } create() { console.log("game starts running"); //setting general color this.tintColor = GlobalVars.currentColor; //tunnel this.createTunnel(); //ship this.createShip(); //smoke particle effect this.createSmoke(); //barriers this.barrierGroup = this.add.group(); this.addBarrier(this.barrierGroup, this.tintColor); } update() { this.updateSmoke(); this.checkForSwipe(); } ..... addBarrier(group, tintColor) { var barrier = new Barrier(this.game, this, GlobalVars.barrierSpeed, tintColor); this.add.existing(barrier); group.add(barrier); } } export default playGame; I am following a book I bought called: create HTML5 vertical endless runner. can anyone hint a tutorial or give a solution? Thanks in advance Very Kind regards, Cedric
  10. Cedric

    Resolutions and scaling

    @Tom Atom how does your giving article compare to the code given by @VitaZheltyakov
  11. Cedric

    Resolutions and scaling

    @VitaZheltyakov what should be my game's resolution ? the window.innerwidth ?
  12. Cedric

    Resolutions and scaling

    @Tom Atom I am planning on using pixel art so the blurriness is not an issue. As far as screen res go what are my options? I'm only planning on releasing to mobile so no need to worry about browser UI I think. @VitaZheltyakov ok thanks
  13. Cedric

    Resolutions and scaling

    @VitaZheltyakov if I would use the code you provided, can I put all my sprites in one big group and set the group's scale to the scale_ratio ? @Tom Atom thank you for reply tom I will definantly check out your tutorial I will get back with updates on how the development is going Also what do you think of this article ? http://gamedevelopment.tutsplus.com/articles/quick-tip-what-is-the-best-screen-resolution-for-your-game--gamedev-14723
  14. Cedric

    Resolutions and scaling

    Hello everyone, The magority of tutorials you can find on the internet regarding the making of mobile games all cover the actual gameplay. But I can't find a good tutorial on the actual setup of the game like choosing the screen res and how to scale the game so it will work on almost all devices. I do not necessarily mean a step by step rundown, which would actually not be a bad idea. Can you someone give me a guideline on how to understand, use and setup a game for full mobile release? Thank you so much in advance, Very kind regards, Cedric
  15. Cedric

    phaser with es6

    haha I understand then I just need to be more creative