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

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




PostPosted: Thu Sep 01, 2005 2:09 am   Post subject: Graphics?

Hi, i was wondering how hard it would be to make a 2 D ball in C++?

I ask because i didn't see any pong games, or other little graphic games.

Is it really complex? or somthing as easy as turing **drawfilloval(x,y,5,5,1)**


Thanks!
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Thu Sep 01, 2005 3:18 am   Post subject: (No subject)

C++'s standard libraries do not include any kind of graphics functionality. This is because C++ is designed to work with many different operating systems and hardware environments, and different operating systems and hardware platforms have greatly differing capabilities, and ways of dealing with graphics.

In short, yes there are ways to do graphics with C++. They're not going to be easy, though.
[Gandalf]




PostPosted: Thu Sep 01, 2005 11:48 am   Post subject: (No subject)

Some possibilities are:
-Using OpenGL, DirectX, or one of the many other graphics libraries that are available for C++.
-Using the Windows API and have some basic (probably 2d) graphics inside a window.
-You can probably find some more basic 2d graphics libraries on the internet, I know there is one that comes with Borland C++. These would work more like the Turing graphics, basically just draw something inside the prompt.

If you are going to use these though, keep in mind, as wtd said that your program will probably be limited to your operating system.
TokenHerbz




PostPosted: Thu Sep 01, 2005 4:09 pm   Post subject: (No subject)

ok im on a win 98.....

I think ill try the 1st one, but 1st im trying to learn about FUNCTIONS

Is there a forum / topic explaining them, there uses, atc:??

im going to attemt to make a pong game, so wish me luck...

after though...
[Gandalf]




PostPosted: Thu Sep 01, 2005 4:17 pm   Post subject: (No subject)

Ok, learning OpenGL is good, but its very difficult, most 3D games are made in these, but that is at a much higher level. If you are learning OpenGL without knowing functions then you will miserably fail. It's true.
I suggest against making a pong game at the moment because, again, you need graphics and those seem above your current level.

Right now you don't know functions? Well, I recommend against learning them in C++. If you have no previous experience with them, then you should first try using them in a higher-level language like Ruby (even Turing Surprised). A function is a procedure that returns something (rather, a procedure is a function that returns nothing), like the result of a calculation that you can then assign to a variable, output, manipulate, or do a wide variety of things to.

Before learning to use graphics in a language like C++, make sure you know object-orientation, classes, objects, etc.

Hope this cleared up some things for you Smile.
1of42




PostPosted: Thu Sep 01, 2005 5:32 pm   Post subject: (No subject)

Yeah, don't even bother with OpenGL until you have most of the basic language (preferably all of it) completely mastered.
rizzix




PostPosted: Thu Sep 01, 2005 6:15 pm   Post subject: (No subject)

either way... hmm.. i might as well mention it here... OpenGL is written in C not C++.. so OOP is not necessary, to use the OpenGL.. although i'd recommend it.. but since soo many (here anyways) can't really get the hang of it (OOP i.e).. is suggest against using it.. learn the (procedural) basics... learn it well.. program well.
[Gandalf]




PostPosted: Thu Sep 01, 2005 6:41 pm   Post subject: (No subject)

Yes... Indeed...
The same is the case for most of the other options, so what else to do? Stay text based? Sure, but if you are inclined on trying graphics then..?
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Thu Sep 01, 2005 7:15 pm   Post subject: (No subject)

[Gandalf] wrote:
Yes... Indeed...
The same is the case for most of the other options, so what else to do? Stay text based? Sure, but if you are inclined on trying graphics then..?


Yes, staying with text is best for quite some time. There is a lot you can learn with never touching a graphics library.
[Gandalf]




PostPosted: Thu Sep 01, 2005 8:22 pm   Post subject: (No subject)

I think something I read about Turing puts it best...
http://holtsoft.com/turing/essay.html wrote:
Little has been said about Turing's graphics and nothing has been mentioned about its powerful string handling capabilities. However, these are two features which make Turing an exciting language with which to satisfy the programming requirements of the curriculum. The graphics are easy to use and offer an interactive, fast moving, and interesting introductory programming course to younger children. "... we've turned the focus on graphic and music because very simply, that is a way of motivating the kids. You can teach them a loop with a dry example or you can teach them how to bounce something around the screen and they realise that they are learning it..." (Turing Teacher C).

Particularily the last part. It's more interesting to people when they handle graphics, although not always best.
wtd




PostPosted: Thu Sep 01, 2005 9:14 pm   Post subject: (No subject)

Programming is about building blocks. First you work on one thing, and then another. Each skill you learn is the foundation for others to come.

If you build on top of a weak foundation, then you not only need to repair that foundation, but you also have to fix everything built on top of it. This is the problem teaching graphics early on poses. Graphics are just plain complex. To approach that problem without a solid foundation of programming skills is a waste of time.
TokenHerbz




PostPosted: Thu Sep 01, 2005 11:46 pm   Post subject: (No subject)

Ok well i know how to put info, get info, use int's, i know how to use the 3 loops, and the if's...

I figure thats all i need to know atm for making a pong game.

But, i suppose ill try to learn more, befor getting into it...
wtd




PostPosted: Fri Sep 02, 2005 12:11 am   Post subject: (No subject)

But not how to use functions. Smile

This is an important skill, since every bit of executable code in C and C++ is organized into functions.
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  [ 13 Posts ]
Jump to:   


Style:  
Search: