I was wondering if it is possible to manipulate text (Textfield object) so it will be wrapped around a sphere (Bitmap object) programmatically (see the screenshot examples).
What you are looking for appears to be full 3D-perspective-correct rendering and unfortunately this is not supported. Gideros is a 2D development environment and doesn't support any form of 3D rendering.
it might be boring and repetitive, but perhaps you could make a font to emulate this? Whatever you decide to do, good luck!
“ The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. ” - Tom Cargill
Could you use GIMP to create the ball with the number (easy with paths), make one for each potential number, pack them into a sprite sheet, and just use the one that matches the number you want?
Labor intensive, but maybe if you only have a few random numbers to generate it'd be feasible?
@dikkesnoek, if you are trying to make an 8 ball, there are two ways to go about it in Gideros
1. Use a font that has the numbers in perspective on a sphere (for 1 digit) 2. Use pre-rendered images of the ball with the numbers (Unless you want to have multi-colored balls) on the fly.
Thanks to all. The numbers must be separated from the ball because they will be generated randomly and the numbers can vary from 0 to 1000 for example. Also in that case creating a font is also not an option. The spheres are easily created with Illustrator. It would be nice if you could form the text object on the left and right side like the picture below. I don't know if you can treat a text object like a sprite and warp it a little bit.
you just have to generate with illustrator, or whatever you prefer, 31 bitmaps in fact (10 numbers for all positions, but the first is always nothing or 1 if it's between 0-1000), so it is not impossible if you really want it to look perfect. also probably faster then playing further with faking solutions. if it always ends with 0 then it is 9 bitmaps less to do.
edit: if you also want them to be symmetrical, then 20 bitmaps for 2-digit numbers and further 30 bitmaps for 1 and 3 digit numbers are needed, plus 1 for '1000' so that would be 51 bmps.
don't think, just turn your brain off and do it. otherwise you will realize how stupid it is to do such a thing by hand (but also i cannot think of a better solution), and probably from now on in every game of yours you will be eager to put a 3d ball with numbers. good luck
For 4 digits, you will need 4 sets of number = 41 bitmaps, if you want to cheat a bit, you will still need 31. I guess @keszegh has that to say before I could
Comments
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Thanks for your reactions. But is it not possible to bend/scale a Gideros text
object in a way that you can meet this effect?
I need to place random numbers on a sphere. When you put flat text on top,
it is not really a 3D sphere anymore.
Regards,
Marc
Labor intensive, but maybe if you only have a few random numbers to generate it'd be feasible?
if you are trying to make an 8 ball, there are two ways to go about it in Gideros
1. Use a font that has the numbers in perspective on a sphere (for 1 digit)
2. Use pre-rendered images of the ball with the numbers (Unless you want to have multi-colored balls) on the fly.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Thanks to all. The numbers must be separated from the ball because they
will be generated randomly and the numbers can vary from 0 to 1000 for
example. Also in that case creating a font is also not an option. The spheres
are easily created with Illustrator. It would be nice if you could form the text
object on the left and right side like the picture below. I don't know if you
can treat a text object like a sprite and warp it a little bit.
Regards,
Marc
if it always ends with 0 then it is 9 bitmaps less to do.
edit: if you also want them to be symmetrical, then 20 bitmaps for 2-digit numbers and further 30 bitmaps for 1 and 3 digit numbers are needed, plus 1 for '1000' so that would be 51 bmps.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
an array. I will think about this, thanks.
Marc
good luck
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Have a nice weekend,
Marc