Render vertical text

Started by
3 comments, last by Guimo 19 years, 6 months ago
Hi! I would like to port a simple 3D game I developed some time ago to a cellphone. Considering my target cellphones has a vertical screen, I would like to render all vertically (so it resembles more a PC screen). I want to use Java J2ME. I also want to use the standar text functions in order to save memory and code. So I was thinking about rendering the desired text in an Image and then rotate the resulting image into the screen. The problem is that final images with the text dont have an Alpha component and MIDP wont allow colorkey (unless someone can point me how to do it). So the option I have in mind is to create a rendering function in order to render with colorkey to my target. That would require per pixel work and that may slowdown all the app. Please, if someone has a better way to do it please tell me how... Luck! Guimo
Advertisement
Um... would it work well enough for your purposes to just write the String one letter at a time, each on a new line one under the other? :s
No it wont work, I want the celphone to be horizontal, not vertical. I want the keys to be on the right (or left) so they work like a gamepad. I don't know if I'm being clear...

Luck!
Guimo



Oh, you mean like you're expecting the user to turn the phone around 90 degrees in order to play the game. Heh.

Let the screen size be x by y.

Make a "back-buffer" Image which is y by x (even if the phone's display is already double-buffered). Draw all your stuff on to that, as though pretending your phone really had a y by x display. You can do all your normal transparent-drawing type stuff here... if you drawString, it will draw with transparency, ditto if you drawImage with a transparent (immutable; probably loaded from a PNG) image.

Then rotate that *final image*, and blit it to the screen.
You are a genius... never thought it that way...

Thank you very much!
Guimo

This topic is closed to new replies.

Advertisement