Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Question about C++
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Danjen




PostPosted: Wed Oct 29, 2008 7:52 pm   Post subject: Question about C++

So like, does this language support any graphics, or is it all terminal based?
Sponsor
Sponsor
Sponsor
sponsor
Zampano




PostPosted: Wed Oct 29, 2008 8:08 pm   Post subject: Re: Question about C++

http://compsci.ca/v3/viewtopic.php?t=9678
Yes.
Danjen




PostPosted: Wed Oct 29, 2008 8:10 pm   Post subject: RE:Question about C++

Huh... Thanks! Very Happy
[Gandalf]




PostPosted: Wed Oct 29, 2008 8:12 pm   Post subject: RE:Question about C++

Assuming this is a serious question... Yes, C++ can do graphics, operating systems, databases, rocket ships, it can even conquer the world. Come on, the majority of video games are at least in part programmed in C or C++! Of course, it's not as easy as Turing.
Danjen




PostPosted: Wed Oct 29, 2008 8:18 pm   Post subject: RE:Question about C++

Actually, I'm kind of excited to learn this language, I got a hefty book for free from one of my teachers, and it didn't really seem to explain it. This definitely helped though.
Tony




PostPosted: Wed Oct 29, 2008 8:36 pm   Post subject: RE:Question about C++

Except that all the graphics are done outside of C++, by the rendering engines (see link quoted above). If you are interested just in this graphical API, C++ is probably not the best tool to help you learn it.

OpenGL comes with bindings for about every language, including Python, Ruby, Scheme, and even *sigh* PHP.

You can go with even higher level packages like SDL or even XNA (although that last one will limit you to .Net only).

Point is, unless you are taking an upper year University course in Graphics, writing your own rendering engine, you are not actually drawing anything with C++.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Rigby5




PostPosted: Wed Oct 29, 2008 11:14 pm   Post subject: RE:Question about C++

Anything output to the screen has to use libraries in order to be compatible and compliant with other programs that open windows.
And unless you actually want to turn exact pixels on and off, you need to learn a graphics library API that does the detail of more complex objects like polylines, circles, ovals, fonts, etc., for you.
Windows has the old GDI Graphic Display Interface), or DirectX, while Linux has the lower level XWindows, or above that, KDE or Gnome.
Danjen




PostPosted: Thu Oct 30, 2008 9:26 am   Post subject: RE:Question about C++

So if I want to make a typical Windows game, I should be using VB instead of C++?
Sponsor
Sponsor
Sponsor
sponsor
md




PostPosted: Thu Oct 30, 2008 9:42 am   Post subject: Re: RE:Question about C++

Danjen @ 2008-10-30, 9:26 am wrote:
So if I want to make a typical Windows game, I should be using VB instead of C++?


No. You should use the most apropriate language you know.

Really, most libraries, operating systems, programs, etc. are written in C or C++. Learning them is usually something that will be useful in the long run. Learning them specifically to write a game may not be the best idea.
Rigby5




PostPosted: Fri Oct 31, 2008 11:34 pm   Post subject: RE:Question about C++

You need to decide what kind of game you want to write.
If it is a slow strategy game, then the old GDI Windows API is fine, and that is easy to lean in C.
If you need more speed, then you need to learn the C++ interface APIs to DirectX.

Here is an online tutorial for Windows game programming C++:
http://www.hwg.org/services/classes/cgame2.html
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: