Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Deathmatch of Doom Chat :?

  1. #1
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    183

    Deathmatch of Doom Chat :?

    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.

  2. #2
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    183

    Re: Deathmatch of Doom Chat :?

    I'm looking for an alternative of DoRasterString();

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2002
    Location
    Espoo, Finland
    Posts
    599

    Re: Deathmatch of Doom Chat :?

    Hi,

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

    -Ilkka

  4. #4
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    183

    Re: Deathmatch of Doom Chat :?

    Definatly not cool :P

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

  5. #5
    Intern Contributor
    Join Date
    Jan 2003
    Posts
    88

    Re: Deathmatch of Doom Chat :?

    Actually I think printf() is NOT cool

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    601

    Re: Deathmatch of Doom Chat :?

    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.

  7. #7
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    183

    Re: Deathmatch of Doom Chat :?

    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

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    601

    Re: Deathmatch of Doom Chat :?

    Code :
    	fontBase = glGenLists(255);
    	err = glGetError();
    	if (err)
    		DoError();
    	SelectObject(m_hdc, GetStockObject(SYSTEM_FIXED_FONT));
    	if (!wglUseFontBitmaps(m_hdc, 0, 255, fontBase))
    		DoWinError();
    OR

    Code :
    	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).]

  9. #9
    Junior Member Regular Contributor
    Join Date
    May 2002
    Posts
    183

    Re: Deathmatch of Doom Chat :?

    Thanks a lot! I'll try that out ASAP but for now because, necesito dormir pero, tengo escuela manana.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •