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?
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?
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! ^_^
i dont understand what a graphics libary is
i have learnt c++ to the exstent of this programCode:#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* *******************************************/
so wat exactly is a graphics libary and how do i use it?
Take the time to read some material.
http://cboard.cprogramming.com/showt...threadid=33318
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.
nope
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.
thanx for the info so a libary is sections of code you can use?
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).
ok how do you acess the libary do you put commands in the code?
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.:
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.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); }
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.
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.
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.