What do you need to make a game?

This is a discussion on What do you need to make a game? within the Game Programming forums, part of the General Programming Boards category; I want to make a game that is similar to space invaders what languages would i need to learn(is c++ ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    42

    What do you need to make a game?

    I want to make a game that is similar to space invaders what languages would i need to learn(is c++ enough)?
    also what compliers would i need how long do u estimate it would take?

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    73
    C++ is a fine language to make games in. You will also need to learn a graphics library (such as OpenGL or Direct x). Most C++ compilers are capable of using some sort of graphics library. As for how long it will take, that totally depends on you! ^_^

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    42
    i dont understand what a graphics libary is

  4. #4
    Registered User
    Join Date
    Nov 2003
    Posts
    42
    i have learnt c++ to the exstent of this program
    Code:
    #include<iostream>
    using namespace std;
    int main()
    {
    cout<<"Select Add, Subtract or Multiply"<<endl;
    char response;
    cin>>response;
    switch(response)
    {
    case 'a':
    cout<<"You have chose Addition"<<endl;
    int a;
    int b;
    cout<<"Enter the two numbers you want to add "<<endl;
    cin>>a;
    cin>>b;
    int add;
    add = a + b;
    cin.get();
    cout<<a<<" plus "<<b<<" is "<<add<<endl;
    cin.get();
    break;
    case 's':
    cout<<"you have chose subtraction"<<endl;
    int c;
    int d;
    cout<<"please enter the two numbers you want to subtract"<<endl;
    cin>>c;
    cin>>d;
    int sub;
    sub = c - d;
    cin.get();
    cout<<c<<" minus "<<d<<" is "<<sub<<endl;
    cin.get();
    break;
    case 'm':
    cout<<"you have chose Multiplication"<<endl;
    int e;
    int f;
    cout<<"Enter the numbers to multiply"<<endl;
    cin>>e;
    cin>>f;
    int mult;
    mult = e * f;
    cin.get();
    cout<<e<<" multiplied by "<<f<<" is "<<mult<<endl;
    cin.get();
    break;
    }
    return 0;
    }
    /*******************************************
    *This Calculator was made by Charlie Helyes*
    *******************************************/

  5. #5
    Registered User
    Join Date
    Nov 2003
    Posts
    42
    so wat exactly is a graphics libary and how do i use it?

  6. #6
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    Take the time to read some material.

    Game Programming Links

    Do you even know what a library is? Read as much as you can on your own, most people aren't really willing to answer questions that can be found at those links.

  7. #7
    Registered User
    Join Date
    Nov 2003
    Posts
    42
    nope

  8. #8
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Read up on things. Search on Google. For starters, though, a library is a collection that is provided to simplify a task, such as making 2D or 3D objects and displaying them on the screen. That would be a graphics library (although they provide MANY more things then just that).
    Do not make direct eye contact with me.

  9. #9
    Registered User
    Join Date
    Nov 2003
    Posts
    42
    thanx for the info so a libary is sections of code you can use?

  10. #10
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    That isn't really a sufficient definition of a library. Yes, a library is a 'collection of code' that has already been made, but it is important to understand that a library is a pre-compiled binary, either a .lib file or a .dll file. They are all basically just .exe files, except .lib files are static which means there is a different copy made for every program that uses it, where all programs that use a .dll share the same .dll file (it's an important difference to understand).

  11. #11
    Registered User
    Join Date
    Nov 2003
    Posts
    42
    ok how do you acess the libary do you put commands in the code?

  12. #12
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    Also, the tab key is your friend. If your code looks as awful as that in your editor, debugging will be a mammoth undertaking.

    Use whitespace. When needed, use comments, but try to write code that needs none. Your comments should discuss the general nature of the code, not the specifics. E.g.:

    Code:
    	// Get rid of low bit count grayscales, and grab the transparent
    	// color
    	if (hastrns && color_type == PNG_COLOR_TYPE_GRAY && bit_depth != 16)
    	{
    		png_color_16p trans_values;
    		int num_trans;
    		png_get_tRNS(png_ptr, info_ptr, NULL, &num_trans, &trans_values);
    		PALKey = trans_values->gray;
    		// We need to manually transform the transparency info if
    		//   the bit depth is too low.
    		if (bit_depth < 2) PALKey = (PALKey << 1) | PALKey;
    		if (bit_depth < 4) PALKey = (PALKey << 2) | PALKey;
    		if (bit_depth < 8)
    		{
    			PALKey = (PALKey << 4) | PALKey;
    			png_set_gray_1_2_4_to_8(png_ptr);
    			png_set_strip_alpha(png_ptr);
    		}
    	}
    
    	// Get rid of low bit depth on grayscale images without transparency
    	if (!hastrns && color_type == PNG_COLOR_TYPE_GRAY && bit_depth <8)
    		png_set_gray_1_2_4_to_8(png_ptr);
    
    	// Make gray-alpha into RGB-alpha
    	if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA){
    		if (bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr);
    		png_set_gray_to_rgb(png_ptr);
    	}
    It's nicely indented, and each major section of code has a one line (sometimes a little longer) statement about what that block is supposed to do. If I found, for example, that my color keying was not working on my grayscale images with transparency, I could search my code very quickly to find the section of code I was interested in.
    Last edited by Cat; 11-10-2003 at 02:28 AM.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  13. #13
    Registered User
    Join Date
    Nov 2003
    Posts
    168
    Just a question but would using a Graphics Library differ from compiler to compiler or does it all use ANSCI (?) ?? If so, tell me a good one for Bloodshed compiler.
    -Felix
    Rots Soft
    If the facts don't fit the theory, change the facts.
    Albert Einstein (1879 - 1955)

  14. #14
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    Depends on how well-written the library is.

    You might find SDL to be to your liking -- http://www.libsdl.org/index.php
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  2. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  3. how do a make a room in a text game
    By Joe100 in forum Game Programming
    Replies: 18
    Last Post: 08-13-2003, 09:12 AM
  4. What would i need to make a game in 2d?
    By DarkViper in forum Game Programming
    Replies: 41
    Last Post: 12-25-2002, 06:28 PM
  5. Whats a very simple but good game i can try to make?
    By bluehead in forum C++ Programming
    Replies: 2
    Last Post: 11-06-2001, 09:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21