Jump to content
  • Advertisement

Archived

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

kingpinzs

Question about wrighting text to screen

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

Is it easier to use directx to write text to your game screen or is it easier to use windows GDI to wright to my game? compiler dev-cpp I am using c++ as the languge There is no harm in asking so the old saying goes [edited by - kingpinzs on February 19, 2004 6:04:02 PM]

Share this post


Link to post
Share on other sites
Advertisement
Dude I can make a console programe just fine. I was asking in my windows window what is easery to display font.
I got GDI to work but I was using TextOut so it would dispaly the text on the screen in the same place no matter were my window was. So I needed to do it differntly.

It does not matter to me if dev-cpp is an integrated development environment or a compiler "
A program that translates source code into object code"
I am using Dev-cpp in its default sate so the real compiler is
gcc.exe and g++.exe. That is completely irrelevant to my question I was just trying to let you know what language and environment I was using to make my programs


Got any ideas

[edited by - kingpinzs on February 19, 2004 6:14:48 PM]

Share this post


Link to post
Share on other sites
to print out text, GDI is easier:

www.winprog.org for Win32 tutorial.


PS: it is "write" not "wright". and it is "where" not "were".

Share this post


Link to post
Share on other sites
Dude " Rocket05 " my game I can spell all the words backswords if I want to or in my own language

[edited by - kingpinzs on February 19, 2004 6:16:31 PM]

Share this post


Link to post
Share on other sites
GDI is generally slow and is limited to 2d text, as far as I know.

D3D you can get all fancy and have 3d fonts and stuff.

Share this post


Link to post
Share on other sites
This is off topic... but in a DOS type app what is the code for clear screen in C++

And how do i Square root? and say and

like

if(c 'and' b == 0)
std::cout<<"Not enough information"<<std::endl;



[edited by - TheNerdTk421 on February 20, 2004 11:23:04 AM]

Share this post


Link to post
Share on other sites
TheNerd :

For clearing the screen, use system( "cls" ). (I don't remember in what header the system function is defined, but I'm sure 2 minutes of Google and you'll know).

For taking a square root, use "sqrt". Again, I can't remember where it is.

The logical 'and' operator is '&&'. The bitwise one is '&'. Once again, google for them if you want to know operator precedence or search the forums if you want to know the difference between logical and bitwise.

EDIT: in the above case, you should be using if((b==0)&&(c==0))

Kingpinzs :

The easiest way is to use GDI.
The hardest, but more powerful way, is DirectX.

And you have things like SDL or OpenGL around which can help you out as well.

Victor Nicollet, INT13 game programmer



[edited by - ToohrVyk on February 20, 2004 11:31:33 AM]

Share this post


Link to post
Share on other sites
you need cstdlib for system("cls") and cmath for sqrt(), oh and he dont need to write if ((a == b) && (a == c)), its enough with if (a == b && a == c)

[edited by - Eriond on February 20, 2004 12:36:15 PM]

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.

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!