• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Inuyashakagome16

What sections of C++ do you need to know?

16 posts in this topic

I've been coming here for years, but finally I decided I’d become active and ask a question I’ve wondered for a long time;
What's really required for game programming? But let me explain a bit more what i mean. I already know C++ on a beginner and almost intermediate level. I've had classes for, python, C#, C++, and java. So I’ve seen a few languages and of course it comes back to C++ (for me at least) when it comes to game development.
So what do i really mean? When someone who's completely new to programming asks you "What's required to make a program?" you'll tell them a main function a variable (maybe) and some sort of print line for display. So I’m asking, do i need ____ in C++ game dev? Classes, functions, poly, inheritance, etc etc. What sections/subjects in C++ would one need to make a game? More or less because i know i need to brush up on C++ and I’ve found some good sources already, but I just wanted a general direction. I didn't want to jump into making a game/ learning Direct x and get lost and just quit.

(i'm guessing this subject is best suited for the beginners section.)
0

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1335198329' post='4934143']
That depends on the game, and it depends a lot on your personal coding style. You can write a complete game in conformant C++ without using a single structure or class. That may not be the cleanest way to write it, but it can be done.

My personal recommendation is to not worry about pre-learning concepts in programming. Go write a bunch of programs (games even) and when you find something that seems awkward or difficult, see if there's a tool or technique that can make it easier. Generally there will be.
[/quote]

Honestly i don't know what kind of game i'm really going for, more or less i just want to expand my knowledge and go for creating something C++ based graphics or not.
It would probably be easier to write a game like that :P but I wouldn't dare, because it would confuse me to the point where i would have to start over.
Pretty much just program till you hit a block or some sort of issue that just seems a bit much for what you currently know then just go out and learn something new? That's pretty much what i got out of that. :P
0

Share this post


Link to post
Share on other sites
That's the gist of it, yeah :-)

The best way to learn is practice. If you wanted to learn to ride a bike, would you spend all your time reading books and magazines about cycling, or would you go buy a bike and roll up and down the street until you got the hang of it?
1

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1335198329' post='4934143']
That depends on the game, and it depends a lot on your personal coding style. You can write a complete game in conformant C++ without using a single structure or class. That may not be the cleanest way to write it, but it can be done.

My personal recommendation is to not worry about pre-learning concepts in programming. Go write a bunch of programs (games even) and when you find something that seems awkward or difficult, see if there's a tool or technique that can make it easier. Generally there will be.
[/quote]

My first graphical game: a 2D shooter written in Pascal used only goto, global variables and the borland graphics functions (everything was made by filled rectangles or lines) so it is definitly possible to write a game with little to no knowledge of the language you use or even programming in general. (As long as you are persistent), Ofcourse i only managed to make 3 levels (hardcoded as i really didn't understand file I/O) before things got unmanagable but it was a game, i made it and at the time i was insanely proud of it.
0

Share this post


Link to post
Share on other sites
[quote name='SimonForsman' timestamp='1335203467' post='4934177']
[quote name='ApochPiQ' timestamp='1335198329' post='4934143']
That depends on the game, and it depends a lot on your personal coding style. You can write a complete game in conformant C++ without using a single structure or class. That may not be the cleanest way to write it, but it can be done.

My personal recommendation is to not worry about pre-learning concepts in programming. Go write a bunch of programs (games even) and when you find something that seems awkward or difficult, see if there's a tool or technique that can make it easier. Generally there will be.
[/quote]

My first graphical game: a 2D shooter written in Pascal used only goto, global variables and the borland graphics functions (everything was made by filled rectangles or lines) so it is definitly possible to write a game with little to no knowledge of the language you use or even programming in general. (As long as you are persistent), Ofcourse i only managed to make 3 levels (hardcoded as i really didn't understand file I/O) before things got unmanagable but it was a game, i made it and at the time i was insanely proud of it.
[/quote]
That's really impressive i think. I was just worried I would get to far in and I wouldn't be sure how to advance forward whether graphically or just base programming wise. But if you were able to do that with only a few things that i'm not really worried. :D
0

Share this post


Link to post
Share on other sites
After I've done lots of learning and periodically quitting, I've stumbled upon direct X and I was disappointed that not
even half of what I've learned was needed. What I really should have studied instead of console programming is
windows API.

But then again, lots of mistakes done and fixed, experience gained and style developed. It was "kind of" worth it.
0

Share this post


Link to post
Share on other sites
[quote name='theo2005' timestamp='1335206556' post='4934193']
After I've done lots of learning and periodically quitting, I've stumbled upon direct X and I was disappointed that not
even half of what I've learned was needed. What I really should have studied instead of console programming is
windows API.

But then again, lots of mistakes done and fixed, experience gained and style developed. It was "kind of" worth it.
[/quote]
Is windows API really that important?
0

Share this post


Link to post
Share on other sites
[quote name='Inuyashakagome16' timestamp='1335204624' post='4934184']
[quote name='SimonForsman' timestamp='1335203467' post='4934177']
[quote name='ApochPiQ' timestamp='1335198329' post='4934143']
That depends on the game, and it depends a lot on your personal coding style. You can write a complete game in conformant C++ without using a single structure or class. That may not be the cleanest way to write it, but it can be done.

My personal recommendation is to not worry about pre-learning concepts in programming. Go write a bunch of programs (games even) and when you find something that seems awkward or difficult, see if there's a tool or technique that can make it easier. Generally there will be.
[/quote]

My first graphical game: a 2D shooter written in Pascal used only goto, global variables and the borland graphics functions (everything was made by filled rectangles or lines) so it is definitly possible to write a game with little to no knowledge of the language you use or even programming in general. (As long as you are persistent), Ofcourse i only managed to make 3 levels (hardcoded as i really didn't understand file I/O) before things got unmanagable but it was a game, i made it and at the time i was insanely proud of it.
[/quote]
That's really impressive i think. I was just worried I would get to far in and I wouldn't be sure how to advance forward whether graphically or just base programming wise. But if you were able to do that with only a few things that i'm not really worried. [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
[/quote]

Just start small and you'll be fine (Pong is a great starting place), These days getting help is easier than ever aswell so don't be afraid to ask for help if you get stuck.


[quote name='Inuyashakagome16' timestamp='1335207065' post='4934196']
[quote name='theo2005' timestamp='1335206556' post='4934193']
After I've done lots of learning and periodically quitting, I've stumbled upon direct X and I was disappointed that not
even half of what I've learned was needed. What I really should have studied instead of console programming is
windows API.

But then again, lots of mistakes done and fixed, experience gained and style developed. It was "kind of" worth it.
[/quote]
Is windows API really that important?
[/quote]
No its not, it used to be when it was the only way to develop Windows applications but these days there are good cross platfrom wrapper libraries that take away most of the pain of dealing with the operating system directly.

I'd recommend avoiding the Windows API until you run into a situation where you have to use it. (For DirectX you probably have to use the Windows API to create a window and handle events but thats all and a decent tutorial will cover that for you) (If you go with OpenGL or a 2D graphics library you can avoid the Windows API entierly)

The Windows API is old, clunky and downright awful just like the X11 API for *nix and both of them have more or less been replaced by more modern APIs like .Net, Cocoa, QT, GTK, etc.
1

Share this post


Link to post
Share on other sites
[quote name='SimonForsman' timestamp='1335207147' post='4934197']
No its not, it used to be when it was the only way to develop Windows applications but these days there are good cross platfrom wrapper libraries that take away most of the pain of dealing with the operating system directly.

I'd recommend avoiding the Windows API until you run into a situation where you have to use it. (For DirectX you probably have to use the Windows API to create a window and handle events but thats all and a decent tutorial will cover that for you) (If you go with OpenGL or a 2D graphics library you can avoid the Windows API entierly)

The Windows API is old, clunky and downright awful just like the X11 API for *nix and both of them have more or less been replaced by more modern APIs like .Net, Cocoa, QT, GTK, etc.
[/quote]
Okay. I had planned on at some point diving into Direct X just because of how supported it is, but if you had to choose between Direct X and OpenGL to start with, what would you choose?
0

Share this post


Link to post
Share on other sites
Ideally you should develop a working familiarity with the entirety of C++, including classes, templates, STL, and all the rest. But it's a bit ridiculous to expect working knowledge before you ever begin coding. Code first, then use that experience to identify problem areas.

IIRC the commonly recommended project path is something like: a console guess-the-number game; [perhaps a more complex console game;] pong; Tetris; Pac-Man; a 2D platformer. Some people like to throw Space Invaders into the mix. Each one is a bit tougher than the last, and they all offer valuable experience, and are challenging yet tackleable projects for the aspiring hobbyist.

When you make the jump to graphics, strongly consider SFML; it has a windowing, events, and 2D graphics API that you can use without bothering with OpenGL, DirectX, or Win32 (which are all good to learn, but there's no need to learn two disparate things at the same time. Focus your efforts.)

As you code, you'll come across bits that you don't like how you solved them. Mark those bits so they're easily noticeable. Then when you finish your project (and not before, unles you've really and truly coded yourself into a corner) return to them and look for a better approach. Once you're satisfied, move on to your next project.

Then one day you'll wake up and realize that you've become a good programmer.
1

Share this post


Link to post
Share on other sites
[quote name='Inuyashakagome16' timestamp='1335211129' post='4934211']
Okay. I had planned on at some point diving into Direct X just because of how supported it is, but if you had to choose between Direct X and OpenGL to start with, what would you choose?
[/quote]

These days they are similar enough that it is an irrelevant choice for learning purposes, DX might be easier to learn properly as there isn't as many bad tutorials for it as there is for OpenGL (Alot of OpenGL tutorials cover the now deprecated immediate mode and as a beginner it might be hard to find the good ones).

Personally i would choose OpenGL anyway since it is more widely supported but my need for my code to run on non Microsoft platforms is fairly irrelevant for you. (If you do decide to learn OpenGL first then i strongly suggest that you ask for tutorial and/or book recommendations in the OpenGL section of the gamedev forums)

There are 2 things you need to be aware of when choosing a 3D graphics API:

1) DirectX is only for Windows. (OpenGL works on Windows, Mac, Linux, BSD, Solaris and a bunch of other systems. OpenGL:ES(Which is very similar) works on iOS and Android and many smaller mobile and embedded platforms)
2) Intels OpenGL drivers are worse than their D3D drivers. (You might only get OpenGL 2.x support on a Intel GPU that supports D3D10 for example).

That said: Don't jump into a low level 3D API yet, start with something like SFML.
1

Share this post


Link to post
Share on other sites
[quote name='SimonForsman' timestamp='1335230249' post='4934294']
[quote name='Inuyashakagome16' timestamp='1335211129' post='4934211']
Okay. I had planned on at some point diving into Direct X just because of how supported it is, but if you had to choose between Direct X and OpenGL to start with, what would you choose?
[/quote]

These days they are similar enough that it is an irrelevant choice for learning purposes, DX might be easier to learn properly as there isn't as many bad tutorials for it as there is for OpenGL (Alot of OpenGL tutorials cover the now deprecated immediate mode and as a beginner it might be hard to find the good ones).

Personally i would choose OpenGL anyway since it is more widely supported but my need for my code to run on non Microsoft platforms is fairly irrelevant for you. (If you do decide to learn OpenGL first then i strongly suggest that you ask for tutorial and/or book recommendations in the OpenGL section of the gamedev forums)

There are 2 things you need to be aware of when choosing a 3D graphics API:

1) DirectX is only for Windows. (OpenGL works on Windows, Mac, Linux, BSD, Solaris and a bunch of other systems. OpenGL:ES(Which is very similar) works on iOS and Android and many smaller mobile and embedded platforms)
2) Intels OpenGL drivers are worse than their D3D drivers. (You might only get OpenGL 2.x support on a Intel GPU that supports D3D10 for example).

That said: Don't jump into a low level 3D API yet, start with something like SFML.
[/quote]
SFML looks amazing. O_O i looked up a few games people have made with it and it looks very nice.
From the sounds of it, between DX and OpenGL its pretty much a double edged sword, either one is nice and unsupported or one that's supported but mostly on windows. >_> But i will for sure use SFML once I get a good handle on what I'm doing in C++ again. :) I'm started work on basic stuff far as C++ goes and little games so hopefully that'll advance into SFML soon.
0

Share this post


Link to post
Share on other sites
[url="http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx"]http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx[/url]

Its a good starting point, you'll be using C++ and SFML.
Its pong. But its a good structured version of pong that will put you in the right track to move into a more complex project once you're done with the tutorial.

Im quite a beginner but I suppose that SFML could be a better starting point than DX or OpenGL(?)
1

Share this post


Link to post
Share on other sites
[quote name='ReaCaer' timestamp='1335268284' post='4934404']
[url="http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx"]http://www.gamefroms...PP-Edition.aspx[/url]

Its a good starting point, you'll be using C++ and SFML.
Its pong. But its a good structured version of pong that will put you in the right track to move into a more complex project once you're done with the tutorial.

Im quite a beginner but I suppose that SFML could be a better starting point than DX or OpenGL(?)
[/quote]

That's a really nice tutorial thank you. :D I hope to go through that tutorial myself here soon. :D
0

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  
Followers 0