tips4design

Members
  • Content Count

    374
  • Joined

  • Last visited

  • Days Won

    3

tips4design last won the day on August 27 2015

tips4design had the most liked content!

About tips4design

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.tips4design.com
  • Twitter
    tips4designcom

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,050 profile views
  1. tips4design

    help me to understadn increment ?

    What are you trying to do in the second case? What is target value?
  2. tips4design

    ES6 code hinting in Webstorm

    Do you also use TypeScript now?
  3. tips4design

    (Solved) Need help translating AS2 code to HTML5

    He already does it with the bitwise OR.
  4. tips4design

    A Question About Browser Game Development.

    3D in the browser is the same as 3D on desktop. Browsers support WebGL which is similar (and easier) than the OpenGL used on desktops If you don't want to go that level you can start with something like https://threejs.org/ or https://www.babylonjs.com/
  5. tips4design

    Frame rate independent movement

    You have to set the position based on velocity and time (delta), not the velocity itself. Something like: body.x = body.x + body.velocity.x * delta;
  6. tips4design

    Cannot have " this" in prototype

    Replace the arrow function (a,b) => {} with an actual (non lexical-bound) function: function (a,b) { }
  7. tips4design

    Text vs BitmapText ( performance ), the conclusion ?

    BimapText was and is always more performant as far as I know.
  8. tips4design

    <mesh>.setEnabled() and .isEnabled() Useless

    @satguru Oh, so the issue is actually that the library is written in TypeScript but OP writes in JavaScript, so he doesn't get the TS warnings while coding and sees the normal, public _mesh variable from the compiled code. I actually did not know that TypeScript private is compiled to public members instead of locally enclosed private variables.
  9. tips4design

    <mesh>.setEnabled() and .isEnabled() Useless

    @satguru You can make properties private in JavaScript, eg: function MyClass() { this._mesh = 'test'; return { setMesh: (val) => this._mesh =val, getMesh: () => this._mesh } } var a = new MyClass(); console.log(a._mesh); // undefined console.log(a.getMesh()); // test a.setMesh('NEW'); console.log(a.getMesh()); // NEW
  10. tips4design

    Best Typescript/Phaser IDE?

    If he uses TypeScript he automatically gets intellisense, no need for another extension.
  11. tips4design

    Best Typescript/Phaser IDE?

    Currently Visual Studio Code is the best IDE for TypeScript by far (it's made by Microsoft, so is Typescript so it comes with default Typescript support). This is a no brainer, go with VSCode and you won't regret it. Get it here: https://code.visualstudio.com/
  12. tips4design

    500 HTML5 games in 4 years.

    Congratulations, this is really amazing, your productivity is incredible. That being said, I think that for the end-consumer it would be better to have fewer better, more polished games than having hundreds of mediocre games to choose from. I don't condemn what you are doing, it's a great business tactic and you will make many players happy, but I think players would be even happier to also be able to play very polished HTML5 games.
  13. tips4design

    Pixi, create app again after destroy?

    Nevermind, the issue is that the old canvas is still there, so the new canvas is added below it.
  14. tips4design

    Pixi, create app again after destroy?

    I have to destroy a PIXI app and create it later on the same page, but it doesn't seem to work. No error is thrown but it simply doesn't show anything after the restart. Here is the edited basic example (https://pixijs.github.io/examples/#/basics/basic.js ): var app; function create() { app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb}); document.body.appendChild(app.view); // create a new Sprite from an image path var bunny = PIXI.Sprite.fromImage('required/assets/basics/bunny.png') // center the sprite's anchor point bunny.anchor.set(0.5); // move the sprite to the center of the screen bunny.x = app.renderer.width / 2; bunny.y = app.renderer.height / 2; app.stage.addChild(bunny); // Listen for animate update app.ticker.add(function(delta) { // just for fun, let's rotate mr rabbit a little // delta is 1 if running at 100% performance // creates frame-independent tranformation bunny.rotation += 0.1 * delta; }); console.log(PIXI); } create(); setTimeout(() => { app.destroy(); setTimeout(create, 200); }, 1000);
  15. tips4design

    Mask out parts of an image?

    Thanks for your message. I have actually managed to make it work! So, I don't even use a renderTexture, I just add the cut-out sprite with blendMode set to 20 and that's all. One hack I had to make, is that normally the PIXI.Container does not use blend modes unless you add a filter to it. So I added a VoidFilter to the container and the blending mode worked.