Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Aug 2012
Offline Last Active Jul 21 2014 05:21 PM

#4974122 My first C++ game

Posted by on 28 August 2012 - 08:28 AM

When it comes down to it, it's pretty much just a matter of opinion. Everyone learns in different ways using different tools in different languages, and many are proud of how far they have come (as they should be).
I was coming here to recommend these tutorials for you, but I think you first need to decide exactly how much "flexibility versus learning curve" you are willing to endure.
If you don't want to hassle yourself with learning how graphics are programmed, then you can use something like the Unreal Development Kit to delve right into simply making a game. But you will lose some flexibility, since you can only do what the SDK or API of your choice allows you to do. OpenGL and DirectX do require a lot of learning, and it practically never ends, but you will have full control over how things are rendered. XNA is a decent middleground, but I only briefly mentioned that earlier because you said that you were working with C++, and XNA requires the use of the .NET framework which means you would have to learn either C# or VB.NET.

So it basically all boils down to deciding exactly what you want, how much time you are willing to spend on it, and how far you want to go from there. You could always try different things if you feel as if something's not working out for you, but also the best piece of advice here is to keep at it until it becomes second nature. Good luck!

#4973491 My first C++ game

Posted by on 26 August 2012 - 09:39 AM

If you are exclusively targetting Windows, I'd actually start out by learning DirectX 9. OpenGL is cross-platform and pretty standard for most OS's and devices, but even with the utility libraries it has a lot of manual labor and gets quite intricate early on for a beginner. Many concepts between them are quite similar, and I do recommend eventually learning both, but DirectX is a better starting point IMO and AFAIK is the only way that you can port your games onto the Xbox360 platform (via the XNA Framework). However, if you haven't familiarized yourself with the basic Win32 API concepts of window creation and GDI graphics, then yes I would definitely recommend starting with OpenGL + utility libs. Alternatively, there are 3rd-party libraries such as SDL which are both cross-platform and fairly high-level, making everything easier, so there's something to think about as well.

Google is your friend. Type in the name of the framework you wish to use + "tutorial" or "example" and you will have nearly everything you will ever need right there.

Matrices are a mathematical structure primarily used in 3D graphics programming, and are a college-level concept derived from linear algebra. For graphics, they aid in the position, scale, rotation and translation of an object in 3D world-space. Before getting involved in them, I would definitely recommend sticking to a 2D environment where simple high-school algebra and trigonometry come into play using 2-dimensional Vectors.

To learn the syntax, just keep checking the API reference docs, samples/demos, and online tutorials. Bookmark the ones you are learning along the way if you need to.
As stated by the previous poster, the same applies for any API you are learning. For Win32 API stuff, check the MSDN.

As suggested above, a good place to start is a simple game of Tic-Tac-Toe or Minesweeper, or a card game like Solitaire. Once you've done that, I'd move on to something that uses 2D sprites, such as Pong, Asteroids or Tetris, and then move up to Tile-based games such as Mario, Zelda or virtually any 2D side-scroller or top-down RPG. By then, you should be prepared to implement 3D effects in a 2D environment (using 3D vectors), and perhaps you could even try a 2.5D isometric game like Starcraft or Diablo. Then, it's finally time to move forward into a fully 3D environment. A good place to start there would be a 3D space-shooter.

It's a long path but if you stick with it and don't skip any steps, you won't regret it later on. Personally, I've had to go back and forth over the years, learning everything out of order, and it's complicated my 3D programming skills to say the least. Good luck!