Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Maega

DirectDraw and chat

This topic is 5660 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

I want to make a chat room for my game.. However, I don''t want to make it a Windows GUI.. I want something with DirectDraw. Question is.. Do I have to draw each player name that enters the chat room and the messages they type? Or is there an easier way to do it? Any suggestions would be appreciated

Share this post


Link to post
Share on other sites
Advertisement
Well, I wasn''t asked exactly about how to do a chat room..


I was asking how Id show it on screen .

Would I have to draw every message and every player that entered? Or would there be an easier way to do the chat (IE text boxes that show up nicely on top of a directdraw surface)

Share this post


Link to post
Share on other sites
I''m fairly sure you''d have to get the dc of the surface every frame in order to use any window gdi commands, and most people here would tell you using gdi is far to slow. Honestly its not to hard to make you own chat window using directdraw.. Just take it steps.. First you need a way of drawin texting and checking length of a stringin pixels. Then you need a function which breaks up a single (or several) chat buffer strings into the correct sizes based on pixell length. After that its just a matter of drawing the correct text in the right place.. Really it would take no more than a day to make a fairly decent system.

You dont get all the amenities of a windows textbox, but you do get a functional and fast chat window.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!