Stating the Obvious

Started by
3 comments, last by SimonForsman 13 years, 1 month ago
Hello Everyone! I'm new to this forum, so I don't know the exact protocol for asking for help. Please bear with me.

I really, really, really, want to learn how to make video games. And forgive me for sounding arrogant, but I think I would be good at it. But there doesn't seem to be any books or internet articles for people like me who need thinks told to them very exactly otherwise they have no idea what's going on. Because of my apparent dim-wittedness when it comes to learning anything new, I have a ridiculously large amount of questions.

Basically, my main problems right now are that I don't really understand how to make an actual game with all the variables and methods that are explained in the books I got (SAMS teach yourself C++ and SAMS teach yourself Java in 21 days). Those books teach the language, but they're not really game oriented. In other words, I do know how to program, I just don't know how to actually make anything with it.

I'm not expecting to make any really fancy PS3-level graphics games right now. I was thinking about maybe starting with a text-based game, with minimal graphics. But I don't really understand how everything works. I can declare variables. I can make classes, that inherit from other classes, etc. But I don't really get how I can go from those ANSI-characters on my notepad to anything worth playing.

In case you all have better things to do than rattle off a big philosophical spiel about the making of video games, I do have some specific questions. I would really appreciate it if you could answer at least one. And I promise to continue the solemn duty, and answer other beginners' question once I have any idea what I'm doing. Without any further ado, here are my questions, in no particular order.

1. What is an API?
2. Is an API the same as an IDE?
3. How do you make games with graphics?
4. How do you make games that utilizes keyboard keys and not just clicks? (I have some idea about this, but I'm not sure)
5. Are Java and C++ pretty good programming languages, or should I learn a better one?
6. How do you... (not sure how to ask this exactly) "control" graphics in video games?
7. Do you have to buy the extremely expensive Adobe Flash Professional in order to develop for it?
8. 3D graphics... are they "controlled" in the same manner as regular graphics? obviously, they require more general processing power...
9. What are best programs to use when doing any of the tasks I have mentioned? (programming, graphics, etc.)
10. What exactly is a rhubarb?

I probably will have more questions, but those are all I can think of right now. Thank you all, in advance!
-Lazy Lazuli
Advertisement

Hello Everyone! I'm new to this forum, so I don't know the exact protocol for asking for help. Please bear with me.

I really, really, really, want to learn how to make video games. And forgive me for sounding arrogant, but I think I would be good at it. But there doesn't seem to be any books or internet articles for people like me who need thinks told to them very exactly otherwise they have no idea what's going on. Because of my apparent dim-wittedness when it comes to learning anything new, I have a ridiculously large amount of questions.

Basically, my main problems right now are that I don't really understand how to make an actual game with all the variables and methods that are explained in the books I got (SAMS teach yourself C++ and SAMS teach yourself Java in 21 days). Those books teach the language, but they're not really game oriented. In other words, I do know how to program, I just don't know how to actually make anything with it.

I'm not expecting to make any really fancy PS3-level graphics games right now. I was thinking about maybe starting with a text-based game, with minimal graphics. But I don't really understand how everything works. I can declare variables. I can make classes, that inherit from other classes, etc. But I don't really get how I can go from those ANSI-characters on my notepad to anything worth playing.

In case you all have better things to do than rattle off a big philosophical spiel about the making of video games, I do have some specific questions. I would really appreciate it if you could answer at least one. And I promise to continue the solemn duty, and answer other beginners' question once I have any idea what I'm doing. Without any further ado, here are my questions, in no particular order.

1. What is an API?
2. Is an API the same as an IDE?
3. How do you make games with graphics?
4. How do you make games that utilizes keyboard keys and not just clicks? (I have some idea about this, but I'm not sure)
5. Are Java and C++ pretty good programming languages, or should I learn a better one?
6. How do you... (not sure how to ask this exactly) "control" graphics in video games?
7. Do you have to buy the extremely expensive Adobe Flash Professional in order to develop for it?
8. 3D graphics... are they "controlled" in the same manner as regular graphics? obviously, they require more general processing power...
9. What are best programs to use when doing any of the tasks I have mentioned? (programming, graphics, etc.)
10. What exactly is a rhubarb?

I probably will have more questions, but those are all I can think of right now. Thank you all, in advance!
-Lazy Lazuli


1. an API (Application Programming Interface) is to put it simply, a collection of functions that you use for a specific purpose (It could be to communicate with your OS, your graphics card a third party application, or pretty much anything you can think of).
2. No, an IDE (Integrated Development Enviroment) is essentially a bunch of tools that are grouped together in one (hopefully) nice coherent package, most IDEs consist of atleast a code editor and a compiler but the popular ones have lots of other nice functions aswell.
3. You use a graphics API or engine (There are both low level APIs that are close to the OS and high level APIs or engines)
4. This depends on the language and sometimes the platform you're using. (For C++ its platform dependant, for Java you use the KeyListener interface)
5. They're both good enough, better is subjective.
6. With code, a simple example:

void main() {
bool ProgramIsRunning=true;
Sprite playerSprite = loadSprite("player.bmp");
while (ProgramIsRunning) {
int playerx=50, playery=50;
if (keyLeftisPressed) playerx--;
if (keyRightisPressed) playerx++;
//... same for up/down with playery

drawSprite(playerSprite,x,y);
}
}

7. No , you can make flash applications using something like FlashDevelop instead (It is a pure code editor though so you don't get the drag&drop rad tools that adobes flash professional has)
8. Yes, its done in a similar way, rather than having x and y for object positions you tend to need a third z component for 3D though (and rotations, collision detection, etc, etc all get a bit more complicated when working in 3 dimensions, if you're familiar with basic linear algebra its quite easy)
9. Basically you want one IDE, For C++ you got Microsoft Visual Studio(Windows) XCode(Mac) Code::Blocks(Win/Mac/Linux), for Java you got Eclipse, then you might also want some tool to create your graphics with, anything from mspaint to photoshop works for 2D and for 3D you got gratis software such as Blender or Truespace or cheap alternatives such as Milkshape3D (There are also the really expensive one such as Maya and 3dsmax but those are definitly not in the pricerange for someone who is just starting out), You probably also want some tools to record sound and music (Other gd.net members should be able to offer some good advice there)
10. http://en.wikipedia.org/wiki/Rhubarb
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

Hello Everyone! I'm new to this forum, so I don't know the exact protocol for asking for help. Please bear with me.

I really, really, really, want to learn how to make video games. And forgive me for sounding arrogant, but I think I would be good at it. But there doesn't seem to be any books or internet articles for people like me who need thinks told to them very exactly otherwise they have no idea what's going on. Because of my apparent dim-wittedness when it comes to learning anything new, I have a ridiculously large amount of questions.

Basically, my main problems right now are that I don't really understand how to make an actual game with all the variables and methods that are explained in the books I got (SAMS teach yourself C++ and SAMS teach yourself Java in 21 days). Those books teach the language, but they're not really game oriented. In other words, I do know how to program, I just don't know how to actually make anything with it.

I'm not expecting to make any really fancy PS3-level graphics games right now. I was thinking about maybe starting with a text-based game, with minimal graphics. But I don't really understand how everything works. I can declare variables. I can make classes, that inherit from other classes, etc. But I don't really get how I can go from those ANSI-characters on my notepad to anything worth playing.

I'd say the first step then is trying to figure out how you'd replicate a game you already know. Like hangman, tic-tac-toe, guess the number, tetris. You need to learn how to break down any game into its rules, then compose those rules in a way the computer understands. Like guess the number. It consists of a random hidden number (variable) that you repeatedly ask for a guess for until the user is right. Usually you respond with "to high" or "too low" based on how the number compares to the users input.



1. What is an API?
2. Is an API the same as an IDE?
3. How do you make games with graphics?
4. How do you make games that utilizes keyboard keys and not just clicks? (I have some idea about this, but I'm not sure)
5. Are Java and C++ pretty good programming languages, or should I learn a better one?
6. How do you... (not sure how to ask this exactly) "control" graphics in video games?
7. Do you have to buy the extremely expensive Adobe Flash Professional in order to develop for it?
8. 3D graphics... are they "controlled" in the same manner as regular graphics? obviously, they require more general processing power...
9. What are best programs to use when doing any of the tasks I have mentioned? (programming, graphics, etc.)
10. What exactly is a rhubarb?
[/quote]
1) Aplication Programer Interface. Its a set of functions that comprise a usually common set of actions. OpenGL is an API that provides a way to display 3d images to the screen. FMod is an API for playing sound. etc. Just like c++ has functions like std::sort(), an api will have functions that you call like PlaySound().

2) An Integrated Development Environment, like Microsoft Visual Studio Express 2010, is a suite of tools used to make programs. It usually consists of an editor that helps you write and navigate your code. It comes with the compiler to turn the code into an executable. And it comes with a debugger so you can explore bugs in your application when it isn't working as expected.

3) The exact same way you make games without graphics. You can play tic-tac-toe on paper just as easily as you can refrigerator magnets. The visual representation can usually be abstracted away from the core of what makes a game. But, once you want to put graphics to something, you use an API like OpenGL to display models (created in a tool like Maya or Blender) on the screen using shaders to light and color the objects.

4) What ever OS you are on should have an API for extracting the state of the keyboard and mouse.

5) Pick a language, learn to program. For the most part, many of the programming languages are identical in functionality. You may find something like Python with the Pygame API a bit easier than C++, as C++ usually means a lot more code to write. You may want to skip these entierly. You could pick up a tool like the Unity engine and learn the scripting language for that, as it would give you access to everything at a state where it is easier to make a game.

6) User input -> modify variables like position -> re-display the character at the new position? Your question is a bit too general to answer in a sentence really.

7) Don't know. In general you will have to purchase programs to develop stuff. Sometimes there are opensource tools available, sometimes there aren't.

8) back to #6? still not sure how to answer this. But yes, 3d is about the same as 2d.

9) It really depends on what interests you. There are many tools like GameMaker, and Unity, that can get you making a game with a lot less programming background. There is also programming if you are more interested in the lower level stuff like actually writing shaders and graphics pipelines.

10) It's obviously a herbaceous perennial plant.
Okay, wow, thank you all. If I could just bother you for a little while longer, I do have some more questions...

1. What is a game engine?
2. Are game engine's commercially available? or open source? both?
3. so, generally, with 2D images (I plan to start with 2D images at first), you basically just load the file? That sound a lot simpler than I originally thought...
4. Simon Forsman, with that code that you mentioned, the "Sprite" class and the sprite methods would be part of an API? And you basically import the entire API into the program? Also, is the code that you used C++?
5. Continuing from question 3 and 4, would that be a similar process to make things like backgrounds? What about, say... not sure exactly what this is called, but that thing that goes over the game, kind of like a... skin, I guess, and it displays information, sometimes has a built-in menu?
6. How would you figure out how the graphics layer over top of each other, and are laid out in the final program? just a bunch of trial and error?
7. What is a good starting API for just basic 2D graphics? I like the looks of the one that Simon used in his example...
8. How do I figure out which API to use for keyboard keys?

Again, thank you. I promise this is the last set of questions. From here, it's onward to making games! wish me luck!

-Lazy Lazuli

Okay, wow, thank you all. If I could just bother you for a little while longer, I do have some more questions...

1. What is a game engine?
2. Are game engine's commercially available? or open source? both?
3. so, generally, with 2D images (I plan to start with 2D images at first), you basically just load the file? That sound a lot simpler than I originally thought...
4. Simon Forsman, with that code that you mentioned, the "Sprite" class and the sprite methods would be part of an API? And you basically import the entire API into the program? Also, is the code that you used C++?
5. Continuing from question 3 and 4, would that be a similar process to make things like backgrounds? What about, say... not sure exactly what this is called, but that thing that goes over the game, kind of like a... skin, I guess, and it displays information, sometimes has a built-in menu?
6. How would you figure out how the graphics layer over top of each other, and are laid out in the final program? just a bunch of trial and error?
7. What is a good starting API for just basic 2D graphics? I like the looks of the one that Simon used in his example...
8. How do I figure out which API to use for keyboard keys?

Again, thank you. I promise this is the last set of questions. From here, it's onward to making games! wish me luck!

-Lazy Lazuli


1. a game engine is basically a set of libraries and tools that take care of alot of the low level details for you.
2. There are both commercial, freeware and opensource game engines available.
3. Yes you load the file store it somewhere (a struct or class) and use a function to draw it, most graphics APIs and game engines have functions for this.
4. The code i mentioned is psuedo code, the Sprite class would be part of the engine or graphics API (you could also write your own if you really wanted to but its a bit of work)
5. It depends on the engine you're using, if you are using a pure graphics API rather than an engine then you draw the background, menus, etc in the same way as you draw everything else.
6. Again it depends on the API, some support layers (i.e something like drawsprite(sprite,x,y,layer) , others just go by the order in which you draw the sprites (with later draws overwriting earlier ones), for 3D graphics you tend to have a depth buffer so each rendered pixel has a depth value that later renders are tested against.
7. The one i used was just made up, SFML, allegro and SDL are all fairly popular for 2D graphics, and they also provide functions for input, sound , etc
with SFML you'd load and render a sprite like this:

#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow mainWindow(sf::WindowMode(800, 600), "Window Title");
sf::Image image;
if (!image.LoadFromFile("sprite.bmp")) //also supports .tga , .png, .dds and a bunch of other formats
{
// Error...
}
sf::Sprite sprite
sprite.SetImage(image);
while (mainWindow.IsOpened()) {
sprite.SetPosition(50,50); //x,y
sprite.Rotate(90); //rotate 90 degrees
mainWindow.Draw(sprite);
mainWindow.Display();
}
return EXIT_SUCCESS;
}

8. Again it depends on the platform, libraries such as SFML and SDL all have keyboard support but you can also use for example the Windows API or DirectX (DirectInput)
For SFML its the sf::Input class, building on our code above ...


#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Input.hpp>
int main() {
sf::RenderWindow mainWindow(sf::WindowMode(800, 600), "Window Title");
const sf::Input& input = mainWindow.GetInput();
sf::Image image;
if (!image.LoadFromFile("sprite.bmp")) //also supports .tga , .png, .dds and a bunch of other formats
{
// Error...
}
sf::Sprite sprite
sprite.SetImage(image);
sprite.SetPosition(50,50);
while (mainWindow.IsOpened()) {
if(input.IsKeyDown(sf::Key::Left)) sprite.Move(-5,0);
if(input.IsKeyDown(sf::Key::Right)) sprite.Move(5,0);
mainWindow.Draw(sprite);
mainWindow.Display();
}
return EXIT_SUCCESS;
}


I can't seem to get the code indentation to look right for some reason but you should get the idea anyway.

SFML works on Windows, Mac and Linux and is available here: http://www.sfml-dev.org/
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement