Jump to content

Drawing sprite lines to connect Sprites, in a pseudo-3D map


Recommended Posts

Ok, this is a difficult one:


I've "ported" a 3d rotating starmap to phaser: at the moment it uses canvas (bitmapData) to draw the map and uses canvas's update to rotate it.

It draws planet names, planets(circles) and connection segments between them.

It's working fabulously, but I need to substitute the circles for some actual sprites and the connecting lines with "sprite lines" (?).


My first approach was to prevent the actual algorythms from drawing on canvas directly by using some of the native Phaser methods, but I have found no example of this.


Instead I have found people drawing on canvases again, and - in more complex scenarios - a bit of a mixture (http://pedroalpera.com/phaser/playground/connectingsprites_example/)


What is the best solution?

Not really a fan of doing canvas lines and normal-game sprites together for coordination.

Everything in canvas would probably prevent me from animating the sprites and replacing lines for sprites?

Everything out of canvas would probably prevent me from drawing lines on the rotating map?


Is there some way to achieve this?

If so is there a proper way?



Link to comment
Share on other sites


  • Recently Browsing   0 members

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