Hi - new here - I want to add text!(font)

Started by DarkMortar, June 20, 2007, 20:42:36

Previous topic - Next topic

DarkMortar

Hello,

Ok, I did search the forums, but I want to know the best and easiest way to add font, with various colors, italics, and bold, onto a 2D game
using lwjgl. In java2D this was very easy with drawString, but now I know I need to read font off a bitmapped image. Well I need help
on how to do this.

There are also things I want to do with lwjgl like fading to black, blur, and i would like to be able to change the colors of images.

Like lets say a player want to change the color of his star ship, well I would like it if he could change the color of it, without various
star ship images.

ty.

bobjob

is the game 2d or 3d?
if you want a simple way to do text like Graphics.drawString() you may want to look into some other stuff that uses lwjgl
for 2d try looking into: Slick
if its 3d mayb look into: the JavaMonkeyEngine

or else you may have to do it the long way in openGL
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13 there is a link to the lwjgl source at the bottom of the page

DarkMortar

My game is all 2D.

Is slick just as fast as lwjgl, i guess it is since it adds onto it?
Also, can slick do everything that lwjgl does, including the same openGL scales and color mods?

gregsimons

I looked on nehe site and if you look at the bottom of one of the tutorials the code has already been ported from OpenGL and a method for glprint has been given there. There are two lessons -  bitmap and outline fonts http://nehe.gamedev.net/lesson.asp?index=03 you can get the code from the bottom of there.

I also noticed another implementation when I was looking on google for lwjgl demos.

Hope this helps....

Im new to OpenGL as well so I've been researching as much as I can over the last few days.

DarkMortar

i just switched over to slick, its pretty good, it really helps with 2D, and fonts are easy when i see the javadocs and the sample programs.  ;D