PDA

View Full Version : Deathmatch of Doom Chat :?



31337
04-19-2003, 11:00 AM
My current project, Deathmatch of Doom, is coming along great. Its a 3d multiplayer first person shooter with a server-client implementation and its really sweet so far. Today I just started writing the server code and it is really nice.

I wanto make it so players can chat amongst themselves. What would be the best way to get these messages and display the messages of other people like Quake 3 does or Half-life. I need to project the messages and the partially completed messages onto my 3d plane neatly. Any suggestions for a nice library that will do the trick or something of that nature?

PS: I will *NOT* use GLUT.

31337
04-19-2003, 12:13 PM
I'm looking for an alternative of DoRasterString();

JustHanging
04-20-2003, 01:59 AM
Hi,

You want to draw some text? If so, put the characters in a texture and draw them using quads.

-Ilkka

31337
04-20-2003, 08:20 AM
Definatly not cool :P

Isn't there a printf() of OpenGL somewhere??

HS
04-20-2003, 09:57 AM
Actually I think printf() is NOT cool http://www.opengl.org/discussion_boards/ubb/biggrin.gif

shinpaughp
04-20-2003, 11:13 AM
Or use some function like wglUseBitmapFonts (raster pos) or wglUseOutlineFonts (translate, rotate, etc) or look at fonts in the FAQs section which has a few links to libraries for fonts.

Only way I know of that you will be able to use printf for text is if you create a console window. Not what you want.

31337
04-20-2003, 12:35 PM
I tried doing the wgl deal but it didn't work. Does anybody know a place that can explain using Microsoft's text functions that are within wgl? Thanks

shinpaughp
04-20-2003, 01:09 PM
fontBase = glGenLists(255);
err = glGetError();
if (err)
DoError();
SelectObject(m_hdc, GetStockObject(SYSTEM_FIXED_FONT));
if (!wglUseFontBitmaps(m_hdc, 0, 255, fontBase))
DoWinError();


OR




GLYPHMETRICSFLOAT agmf[255];
HFONT fontol = CreateFont(-1, -1, 0, 0, FW_THIN, 0, 0, 0, ANSI_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | | FF_ROMAN, "Arial");
SelectObject(m_hdc, fontol);
BOOL font = wglUseFontOutlines(m_hdc, 0, 255, 1000, 0.0f, 0.1f, WGL_FONT_POLYGONS, agmf);

if (!font)
DoWinError();
glListBase(1000);



[This message has been edited by shinpaughp (edited 04-20-2003).]

31337
04-20-2003, 07:20 PM
Thanks a lot! I'll try that out ASAP but for now because, necesito dormir pero, tengo escuela manana.