Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Suggestions on random points/polygon drawing?


agmcleod
 Share

Recommended Posts

Presently I have a game that uses the canvas API to draw along a specified path. I'm wondering if there's a way to do this with Phaser. One option I'm also considering is cropping an image by the specified polygon shape. Any ideas?

 

The polygon will likely be the height of the game screen, and kind of zig-zagged along the side.

Link to comment
Share on other sites

I also need to draw polygons, and have tried using the "renderPolygon" function (in the "Debug" class) with no luck.
As far as I can tell, this function is broken, as I have successfully used other render functions in this class (such as renderLine and renderCircle).

 

Here is some example code that demonstrates how to use some of the render functions in the Debug class:

http://examples.phaser.io/_site/view_full.html?d=debug&f=debug+draw.js&t=debug%20draw

Get these working, and then try to use the renderPolygon function, and let us know how you go.

 

The error I get is described in the thread I started:

http://www.html5gamedevs.com/topic/4012-the-renderpolygon-function/

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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