Sign in to follow this  
Gorgoo

Some questions about game programming

Recommended Posts

I've been trying recently to learn how to program some basic games in (for lack of a better term) "real" programming languages. So far, the closest I've come is in Game Maker, but I've got experience doing more basic applications in Java, Visual Basic, and (to a lesser extent) C++. Unfortunately, none of that experience includes graphics or timing, which are integral to most games, so I have a few questions. First, is timing that difficult? It seems like updating the game at a constant rate and getting user input shouldn't be too hard of a concept to grasp, but like I said, I haven't done it before. Are there any pitfalls I should watch out for? Also, what should I do about graphics? I know that there are a lot of available graphics APIs, but I don't know enough about them to choose one to focus on. For example, if I were using Java, should I use Java2D or one of the libraries that offers OpenGL access (like LWJGL or JOGL)? With C++, there's OpenGL too, but then there's Allegro (which has the benefit of including other game-related functions, but may have disadvantages I don't know about) and SDL (which seems to also do things other than handling graphics). Finally, I have a question about multithreading. Most tutorials on game programming that I've seen mention multithreading, but don't explain it that well, beyond giving an example in code. Is it necessary to know for 2D games? From what I know of it, it seems important, but that might be a misconception. Assuming it's necessary to keep the game running well, though, is there a site or tutorial anyone knows of that presents a good explanation of how it works? Thanks, and sorry for the long post.

Share this post


Link to post
Share on other sites
Fortunately, you don't need to know any of the things you've mentioned to make a text-based game. Don't think about graphics yet - making your game graphical will add lots of complexity and require that you learn another API. You can make plenty of cool games that are text based, and doing so is a natural step in the progression to bigger and better (and graphical) games.

As far as timing, you're right - it is a simple concept to grasp, but it's not necessary yet. Multithreading most likely won't be needed for the games that you will be making, so again, don't worry about it.

These are all good concerns, but for basic games they're typically not needed. You should definitely start with text games as you'll still have a lot of work to do, for example how you're going to architect your system, how you're going to represent your game entities (i.e. class hierarchies), etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this