Jump to content

Raycasting in Phaser 3 porting an V2 example


Recommended Posts


Since I started quite recently with Phaser 3, I'm not too familiar with "how all the concepts worked in V2". In an attempt to port a raycasting example from V2 to V3 I got stuck on the part where `bitmapData` is used. Apperantly it no longer exists in V3 and from what I read on this forum "one should create their own". Whilst this is mentioned a couple of times, no concrete examples are given. So my question is, how would I procede? This is the original raycasting example I try to port.

    this.bitmap = this.game.add.bitmapData(this.game.width, this.game.height);
    this.bitmap.context.fillStyle = 'rgb(255, 255, 255)';
    this.bitmap.context.strokeStyle = 'rgb(255, 255, 255)';

Of course, if there is a better approach or an alternative way of approaching the raycasting I'd love to hear it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...