Jump to content
  • Advertisement
Sign in to follow this  
Guimo

Render vertical text

This topic is 5045 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!