Puflo Posted November 9, 2017 Share Posted November 9, 2017 I want to create a ball inside a circle line, is there any way to do this in Phaser? Link to comment Share on other sites More sharing options...
icp Posted November 9, 2017 Share Posted November 9, 2017 Yes, you could use bitmapData to draw the circle : http://phaser.io/examples/v2/bitmapdata/radial-gradient And bitmapText to draw the number : http://phaser.io/examples/v2/demoscene/font-from-bitmapdata Puflo 1 Link to comment Share on other sites More sharing options...
Skeptron Posted November 9, 2017 Share Posted November 9, 2017 Graphics are quite a simple solution to your issue : https://phaser.io/examples/v2/display/graphics Puflo 1 Link to comment Share on other sites More sharing options...
Puflo Posted November 9, 2017 Author Share Posted November 9, 2017 7 minutes ago, icp said: Yes, you could use bitmapData to draw the circle : http://phaser.io/examples/v2/bitmapdata/radial-gradient And bitmapText to draw the number : http://phaser.io/examples/v2/demoscene/font-from-bitmapdata What is the difference between bitmapText, text and graphics, bitmapData? Which one should i use for mobile games? Link to comment Share on other sites More sharing options...
icp Posted November 9, 2017 Share Posted November 9, 2017 You should use the one with best performance for mobile. Here's a top: 1. .png sprites 2. bitmapData 3. graphics You can read more here: Link to comment Share on other sites More sharing options...
Puflo Posted November 9, 2017 Author Share Posted November 9, 2017 Okay, i have a little question; how can i draw a colored circle with bitmapdata? Couldn't find anything in examples. Link to comment Share on other sites More sharing options...
icp Posted November 9, 2017 Share Posted November 9, 2017 http://phaser.io/docs/2.6.2/Phaser.BitmapData.html#circle Link to comment Share on other sites More sharing options...
Recommended Posts