Learning Graphics for Simple Games in C++: A Beginner's Guide

  • Context: C/C++ 
  • Thread starter Thread starter Thadis
  • Start date Start date
  • Tags Tags
    Graphics
Click For Summary

Discussion Overview

The discussion revolves around finding resources and guidance for a beginner in C++ programming who is interested in creating simple games with graphics, specifically a side-scrolling game or a maze game. Participants explore potential libraries, project ideas, and learning materials suitable for someone with limited programming experience.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant inquires about books that can help beginners add images to simple games in C++, expressing a desire to create a side-scroller for a school project.
  • Another participant suggests using existing libraries for rendering images and handling input, noting that developing tools for level design could be time-consuming.
  • There is a discussion about the feasibility of creating a maze game where the player dodges moving objects, which could be simpler to implement than more complex games.
  • A participant expresses interest in using graphics libraries as long as they provide proper credit, and seeks suggestions for project ideas that can be completed within a few months.
  • One participant mentions looking for books to learn C++ basics and seeks recommendations for books specifically focused on creating simple graphic games.

Areas of Agreement / Disagreement

Participants generally agree on the potential of using existing libraries and the feasibility of creating a maze game. However, there is no consensus on specific resources or books for learning graphics programming in C++.

Contextual Notes

Participants express varying levels of experience and knowledge in programming, which may affect their recommendations and the complexity of projects discussed. There is also uncertainty regarding the availability of suitable learning materials for graphics programming.

Who May Find This Useful

Beginners in C++ programming, educators looking for project ideas, and individuals interested in game development with limited prior knowledge of programming.

Thadis
Messages
43
Reaction score
0
I have a question are there any books that might show someone who is fairly new to computer programming how to add images for a simple game that is not just text based in c++? It mostly just be something fairly simple, like a side scroller(that would probably be as complex as I would want it for right now.). I am doing this for a school project and think this would be a good way to have something to show for me finishing. Are there any books that could teach me this even though I have very little actual programming knowledge as of now? or is this asking to much?
 
Technology news on Phys.org
Thadis said:
I have a question are there any books that might show someone who is fairly new to computer programming how to add images for a simple game that is not just text based in c++? It mostly just be something fairly simple, like a side scroller(that would probably be as complex as I would want it for right now.). I am doing this for a school project and think this would be a good way to have something to show for me finishing. Are there any books that could teach me this even though I have very little actual programming knowledge as of now? or is this asking to much?

Hey Thadis.

Depending on how much experience you have, you might be better off downloading some existing libraries that do all your hard stuff like rendering 2D or 3D images, user interface, and so on, while you write the actual gameplay code yourself.

If you want to hardcode the gameplay code in your executable, then I think you could do something in a short space of time.

You will need a graphics library that supports 2D scrolling capabilities. I've only ever done 3D games myself so I can't recommend any libraries out there for 2D-specific routines.

The input shouldn't be too hard, just use DirectInput and write some routines to handle your input code. Sound can be done by DirectX or using OpenAL. OpenAL is pretty good but I can't comment on the DirectSound part of DirectX.

The hit-detection and physics is a lot easier than 3D. If you don't have time to anything fancy just use an axis aligned bounding box in 2D (axis aligned means the edges are parallel to the axis).

The difficult thing will be to develop tools to make levels and game assets. If you hardcode levels as part of data in your executable then fair enough, but if you want to develop tools to make levels, then this will form a major chunk of your time. It doesn't have to be complex, but realize that things always take more time than you anticipate.

If you have specific questions about an area of game design I'll do my best to answer them (I used to do this kind of thing).
 
Thanks and yeah I might be able to use existing libraries as longs as I give them credit for it. If I do this then it would only probably be a very simple thing just to have something visible for them to see what I did because I do not know any other programs that actually show something besides just small things to someone who doesn't do programming it is not really that significant. If you would have any suggestions for a project idea that I could finish within a few months without much prior knowledge of c++ I am open to suggestions
 
One idea that comes to mind is a maze kind of game where you have to dodge things that move.

Basically you are an object (like a square for example), and you have to go from one point to the next without colliding with the rest of the world that moves.

With this kind of game you don't have to worry about special effects like bullets or any kind of complex animation. The levels should be a lot easier to design since you only have to describe the objects and their movement behaviors, and it without all of the bells and whistles that other graphic intensive games have, it would still be a pretty fun and challenging game to play.

I think this is definitely a doable thing given your time constraints.
 
Yeah that seems like something that I would be able to do and if I could get graphics into the program. I am not able to officially start my project till mid January though I think but I might contact you between then and May if I need help or I might post it on this forum or on of the c++forums
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 16 ·
Replies
16
Views
5K
Replies
69
Views
10K
Replies
15
Views
3K
Replies
3
Views
4K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
86
Views
2K
  • · Replies 102 ·
4
Replies
102
Views
3K
  • · Replies 7 ·
Replies
7
Views
1K
Replies
81
Views
7K