Jump to content
  • Advertisement
Chopdops

Tried To Learn The Hard Way

This topic is 497 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

I am a newbie programmer trying to learn game programming. I have had minimal experience with python so i wanted to learn the basics of C++ because I've heard its the best for game programming. I then read a primer book and made a quite robust little object oriented text game (at least where text games are concerned for me.) After having no success in finding a way to learn 2d game programming with C++ I dived headfirst into learning C++ 3d game programming with books like "Introduction to 3D Game Programming With DirectX11" and "Game Coding Complete." I am having trouble taking grasp of the concepts put forth in the book like 3d and object oriented encapsulation for hierarchies for game objects and that kind of stuff.  My question is what should I read or do to understand these things better that's comprehesible and easier to get into pertaining graphics and structure. I just want to make a simple game maybe pong or something not some crazy 3d matricy vertex rendering collision physics lighting mumbo jumbo, at least not at first. Should I look more into python pygame stuff or Unity? Or is there hope for beginners in C++?

Share this post


Link to post
Share on other sites
Advertisement

Have you considered learning a engine?

 

A tutorial on how to render a sprite with C++, will give you more info than a book on programming games.

Here is one for you: https://learnopengl.com/#!In-Practice/2D-Game/Rendering-Sprites

A book is like a large summary, it isn't focused on one part. Instead you should just learn what you need step by step.

 

A good idea is to think of what you need to do next, then to just learn that part first.

Share this post


Link to post
Share on other sites

C++ isn't fast by itself. It has the potential to be fast in the hands of a skilled and experienced programmer that knows how to make the computer dance. Since you don't yet have that knowledge, C++ is perhaps more a hurdle than an advantage for you.

That high speed comes at the cost of everything else, like nice error messages, memory management, and a smart programming language that tries to help you.

 

If you want to pursue in C++ anyway, it doesn't come with tons of libraries to do just anything you may want to do. They have chosen to fill that gap with 3rd-party libraries. So there are 2D libraries available on the net, such as SDL2, or Allegro (haven't looked at that in a decade or so).

There are also tutorials for such libraries, like http://lazyfoo.net/tutorials/SDL/index.php

 

The Python version of the above library is called Pygame at pygame.org . The interface to SDL is a lot simpler in that case, not to mention Python is much more beginner friendly, so you may want to go that route.

 

Share this post


Link to post
Share on other sites

If you aren't interested in the nitty gritty of "crazy 3d matricy vertex rendering collision physics lighting mumbo jumbo". Take a look at game engines. Unreal might be the right choice for you since you have a C++ background, but I'd also consider Unity. Spend a weekend with both and see which one you like better. 

- Eck

 

Share this post


Link to post
Share on other sites

So, remembering back to when I started to code I got into it kinda like how you seem to be, I jumped into some books - Ironically was the DX9 version of the DX11 book youre reading pretty sure based on the title.

Things do seem to get pretty confusing pretty fast when you jump straight into working on stuff like that at the books tend to introduce / use a concept and then move on a lot of the time - so a good thing is to take it slow when working through them, even re-do exercises to make sure you totally understand them etc, but C++ is a big, hefty language with a lot of things you can do wrong so it can be a slow learning process.

In terms of you mentioning struggling with like objects / hierarchies, there was something I read in a book once (cant remember which) that was pretty simple advice but really did help - Objectify everything you can, even just in day to day life - Basically, just in things you use daily try to think about how they could relate etc for example a Pen and a Pencil, they share a lot of things, could be grouped into Writing Tools etc.

But there is always hope for people who learn to code in C++, its what I encourage people to learn to code in, because its one of the least forgiving to learn so if you can master it.. you can basically code in anything ;p (trial by fire eh?)

Share this post


Link to post
Share on other sites

  • 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!