Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2010
    Location
    IL
    Posts
    4

    Red face Some Noob C++ questions!

    Hello! I'm a very beginner programmer and in my 14 years of life I've always been interested in games on a deeper level. I've picked up "Beginning Programming in C++ for DUMMIES!" book and I've learned things so far like variables, functions, and loops. It's really interesting so far and I'm rather excited! So enough backround info!

    1. How will console programs eventually turn into video games? I've heard that there's things like libraries that supposedly add on to the language.. are these libraries like directx? and do these libraries just add functions?

    2. What is OpenGL?

    3. What's the difference between int, char, and bool?

    4. What exactly does the code do in a video game? Like is the engine completely code? and is it always in one language? (See question #2 )

    Thanks for all the help in advance.

  2. #2
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,812
    Welcome to the site

    Check out the free VTMs HERE for answers to at least some of these questions! The first 10 videos in the C++ SoftwareEngineering series are also free for anyone to watch...

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  3. #3
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    Quote Originally Posted by mrblue View Post
    1. How will console programs eventually turn into video games? I've heard that there's things like libraries that supposedly add on to the language.. are these libraries like directx? and do these libraries just add functions?
    Libraries help with that. They provide functions for things like drawing animations on screen or playing sounds. They usually do not add functionality to the language itself but rather contain code that would be too complicated to write yourself. In theory though, you can do everything a library can with just the core language.

    2. What is OpenGL?
    OpenGL is one of those libraries used for 3d graphics, i.e. it allows your C++ program to talk to the graphics card.

    3. What's the difference between int, char, and bool?
    The way they are interpreted by the language in a given context. for an example, consider the following code fragment:
    Code:
    int i = 65;
    char c = 65;
    bool b = 65;
    std::cout << i << "\n" << c << "\n" << b << std::endl;
    They may also differ in other terms like size, but that depends on the compiler and shouldn't be your concern right now.

    4. What exactly does the code do in a video game? Like is the engine completely code? and is it always in one language? (See question #2 )
    There is a core that is code and lots of stuff like level data, textures and sounds that is used by that code. Larger projects often use multiple languages since not all languages are well fitted for all problems.
    A special kind of language used in games are the shader languages used to program modern graphics cards. Don't worry too much about them now though.
    For now, you will need to get a solid understanding of how programming works in general. You will get to the gory details in time. This will require a few years of work, so don't get impatient. It will be well worth your efforts

  4. #4
    Join Date
    Dec 2010
    Location
    IL
    Posts
    4
    @fatgav Thanks for pointing me towards those videos, I only watched the 10 videos that were featured on the homepage. I'll definitely watch them!

    @ComicSansMS Thanks you for your explanation

    I'm sure I'll think of more questions as time goes on ha

    edit: +rep

  5. #5
    Join Date
    Jul 2003
    Location
    Germany
    Posts
    310
    Quote Originally Posted by mrblue View Post
    2. What is OpenGL?
    Like DirectX, OpenGL is a grafics library to display 3D scenes in realtime. OpenGL is build to work on all kinds of platforms and with many programming languages. DirectX works with PCs and xBox and is made by Microsoft.

    Quote Originally Posted by mrblue View Post
    3. What's the difference between int, char, and bool?
    Int are whole Numbers like 1, 2, 3, 4... or 872
    Char are letters/symbols like "A", "b", "c" or also symbols of numbers like "7"
    Bool can only have 2 values. True (1) or False (0) Is good to store information that can be either yes or no like DoorIsOpen = false;

    PS.: Youll be able to find a lot more indepth infomation at http://en.wikipedia.org ;-)
    Last edited by Quio; 01-07-2011 at 05:26 PM.

  6. #6
    Join Date
    Dec 2010
    Location
    IL
    Posts
    4
    Thanks quio i found your explanation for int char and bool very helpful! As for wikipedia, I find that the information is pretty dense and I end up getting side tracked with all the other words i have to click on! nonetheless, +rep

Tags for this Thread

Posting Permissions

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