How to code a basic game ..

Started by
19 comments, last by kimi 17 years, 4 months ago
now, id like not to learn texted based things, because i want to understand graphic games. not texted based i possible .. i was wondering how i could learn/create an asteroid type SHIP, not game, but ship, as in movement, and shooting, so i could learn from that, and not try to understand everything else .. i need to know how to import graphics, and all this kind of stuff. i hope some one can help. thanks :D
Advertisement
I don't know what tools you are using, but I'm new also and I found that using windows forms in visual studio is a pretty easy way to get started. When you create a Windows Forms project most of the code is generated for you and you can add controls/objects to the default form like buttons and piture boxes. After that you can add events to the differnt controls/objects to make them do things. For instance you could make a piturebox move across the form by pressing a button or key no the keyboard. It's pretty simple as you just have to change the x y coordinates for the control/object. If you look at the pre generated code in the middle of the form you can get an idea of how to do it.
im using DevC++. but could you help me with some commands and stuff?
Quote:Original post by NIAB
im using DevC++. but could you help me with some commands and stuff?
You may find it's not quite as easy as 'some commands and stuff'. Developing a game (even a very simple one) can be quite a complicated endeavour :)

Also, based on your other recent post it looks like you're still learning the basics of C++, in which case you might not be quite ready to dive into graphics programming.

You might also take a look at this thread. There's some info and links there which could be useful to you.
well, i want to start in graphic programing, not start at basic,
if possible. as to get used to coding graphics, understand?
Well see, the thing is that C++ alone cannot do graphics, you need to use something like SDL, Allegro, OpenGL, or DirectX. Until you know C++, however, you aren't going to be able to understand these. You seem like a good candidate for trying out Game Maker....google it.
Most objects like windows have been precoded and exist in a library like windows.h or other libraries made by micrsoft. You could probably make your own window, but I don't think many people do that. You have to learn the libraries functions, what they do, and how to use them. To do that you probably need a book that explains windows programming. It's probably best to learn the basics of coding, creating functions, and creating classes first though. If you want to program in windows it's probably easier to download the free visual studio.
hahaha, ive used gamemaker, i know how to use it. i knew C++ had to use
something to do graphics, i just never understood how. is there anywhere
i can learn just how to use these functions or other things to a basic
extent?

thanks ^^
Quote:Original post by NIAB
hahaha, ive used gamemaker, i know how to use it. i knew C++ had to use
something to do graphics, i just never understood how. is there anywhere
i can learn just how to use these functions or other things to a basic
extent?
That's the problem: hardly anything in C++ is 'basic'.

Any reason you're set on C++? There are other languages with which you could probably get going a lot quicker (I think this is discussed a bit in the thread I linked to).

If it has to be C++, then you need to pick a platform and graphics API or APIs and get to work :) Several options were mentioned above (SDL, Allegro, etc.). Tutorials can be found online for many of these.

For more specific advice, you may have to ask more specific questions.
well, isnt C++ used in major games coded today?

This topic is closed to new replies.

Advertisement