General Question

Mariah's avatar

Is there a specific name for this programming concept and can you recommend a website or book I could use to learn about it?

Asked by Mariah (18829 points ) October 3rd, 2011

I learned a little C++ in a class during my senior year of high school and since then I’ve been practicing what I know, but haven’t really learned much new.

I’ve also been playing with Game Maker, which is a program that allows you to create games via drag-and-drop programming.

I’m okay at both but now I’d like to meld the skills. I’d like to try making games that are programmed from scratch instead of via drag-and-drop. But all my programming so far has been text-based and I have absolutely no clue how to program something – without using Game Maker – involving imagery. I also don’t know how to learn because I don’t even know the proper name for this concept in order to google it! Can you help me?

Observing members: 0 Composing members: 0

7 Answers

koanhead's avatar

It’s hard from your question to establish what sort of programming you mean more specifically than just “graphics programming”.
My advice to you is to investigate C++ graphics libraries, find one that seems to do what you want, and read its documentation.
It might be helpful if you talk about what OS the program will run on (not all libs will compile to all platforms) and what specifically you mean to make it do.

Mariah's avatar

@koanhead Thanks. I’m having trouble articulating this. I know how to create an object and give it properties but what I’m hoping to learn to do is associate a “sprite” with that object and create programs with graphical interfaces. I don’t even know if this is something that people use C++ for so maybe my question is nonsensical. I am such a noob.

gorillapaws's avatar

You’re going to want to find a framework that does the types of games you’re interested in in the language you prefer. Then you’re going to need to learn the API’s of that framework so you can build your game (unless you want to build your own game engine from scratch—which is insane).

If you’re not totally set on C++, you might want to learn Python (it’s easier and prettier than C++) and play around with Pygame which would be a great tool to use for learning how to write games. There are a lot of tutorials available for it.

Alternatively, you could look at a toolkit like Unity 3d which is a graphical toolkit that allows you to build very complex scripts in either C#, javascript, or Boo (which is based on Python). This kit is more professional and can be used to create professional quality games. Here is a video that shows you the kinds of things you can do with unity.

koanhead's avatar

@Mariah Well, you’re ahead of me- I don’t know C++ at all.
You’re asking for two different things here. Game graphics (sprites and such) are covered in @gorillapaws’ answer- and I heartily endorse his recommendation of Python. The only real reason to use a compiled language line c++ instead of an interpreted one like Python is speed of execution; as a beginner you are unlikely to need your programs to be that fast, and the more rapid development cycle of interpreted languages is likely to be more valuable to you. Of course, if you are doing it this way to learn c++ as opposed to just learning programming, then that advice is moot.
The other thing you are asking for, a graphical user interface, is covered under the general heading of GUI toolkits or GUI libraries, etc. Of these I can recommend WxWidgets or Qt as I’ve worked indirectly with each in the past and know they work well.

ratboy's avatar

To clarify some of the terminology of the previous posts, a framework is basically a precompiled library along with an application programming interface (API) that permits your program to call the subroutines in the library. The library (for game programming) is a collection of routines that provide a high-level interface to the graphical and audio hardware using the low-level routines provided by your platform (windows, linux, etc.). The API (assuming C++) is a collection of header files containing function definitions for drawing, etc.You include the headers in your source code just as you do for the standard libraries. The executables are attached to your compiled code at link time. If you google game programming in c++ tutorial,” you’ll find many freely available frameworks to choose from.

CheckDavid's avatar

I just recently found a chat room, that represents a community of game developers. I am a newbie, but I am sure the rest can help you.

You can login through here I guess.

http://mibbit.com/?channel=%23gmakerorg&server=irc.mibbit.net

gorillapaws's avatar

I just wanted to clarify @koanhead‘s excellent post when he makes the statement:

“The only real reason to use a compiled language line c++ instead of an interpreted one like Python is speed of execution; as a beginner you are unlikely to need your programs to be that fast, and the more rapid development cycle of interpreted languages is likely to be more valuable to you.”

By speed of execution, we’re talking about the kind of thing that you have to be slamming the CPU/Graphics cards to notice. Any game a beginner will create will run incredibly fast with an interpreted language such as Python, but it would probably be a bad choice for a 1st person shooter with high-rez graphics. You don’t have to worry about a sprite-based puzzle game or platformer running slowly because you’re using an interpreted language.

Also, after re-reading my post, I think my description of Unity 3d may be a bit misleading. It is a tool that can be used to create professional games, but it’s been designed to be easy to work with. You can drag in 3d assets (it does 2d as well), and select various settings via the GUI, and then link them up to scripts you write to govern the behavior of those objects. It’s a very slick implementation, and it appears to be a great way to make some impressive games with much less difficulty than would otherwise be achievable using other techniques.

The video I linked demonstrates making a simple game in less than an hour, that involves throwing a ball at objects and watching them topple with realistic physics. He’s got several other free tutorial screen casts as well.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther