Jump to content
  • Advertisement
Sign in to follow this  
NIAB

How to code a basic game ..

This topic is 4254 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
well, i want to start in graphic programing, not start at basic,
if possible. as to get used to coding graphics, understand?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ^^

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!