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

Is this normal?

11 posts in this topic

Hi so I am learning C++ and I am understanding what I am learning, in terms I know what they do, but I don't know how to apply them in a setting.

For example, I understand arrays and stuff, but I guess I don't understand how I would use it in a program? I am more just curious if this is normal to understand what I am learning does, I just don't know how to use it yet.

Hopefully this makes since, if not i'll try to clarify it a bit more. Thank's in advance!
1

Share this post


Link to post
Share on other sites
There is no good answer to your general question. All the features of the language have been added because there was a need for them.

I can give you examples of situations where arrays are useful:
* To represent a chess board, you can use an array of 64 small integers indicating what's in each square.
* A map in a RTS game is usually a grid of squares, which is represented as an array.
* A polynomial in one variable is an array of coefficients.

In C++ you very often will use std::vector instead of arrays, because they are more flexible (you can change their size dynamically).
1

Share this post


Link to post
Share on other sites
Well my question in general is, is it normal for me not to understand how to like make a program with it even though I know how to make one, and understand what it is, just not how to use it.
0

Share this post


Link to post
Share on other sites
I would like to tell you that all this stuff will come to you in time. There will be a point where it will sink in and you will get it. But you haven't told us how you are learning C++? There are many ways to learn C++, not all of them are equal. Hopefully your learning source assumes you don't know how to program at all? Books that teach specific languages sometimes target people who are already familiar with programming in general, and aren't very good for complete beginners.

Keep reading and practicing from lots of sources, and it will come in time!


As for arrays, they are a way to store data.

Most of programming involves only 2 things. Allocating memory for data, and operating on that data.

int a; will allocate space for 1 integer(whole number). You can assign a value to a and operate on it.
int a[10]; will allocate space for 10 integers [0-9].

A deck of cards is an array of 52 Card objects;

[code]
struct Card
{
int suit;
int value;
}

const int DeckSize = 52;
Card Deck[DeckSize];

You can use a loop, such as this, to iterate over the array
for (int i = 0; i < DeckSize; ++i)
{
Deck[i].Suit = whatever;
Deck[i].Value = whatever;
}[/code]
2

Share this post


Link to post
Share on other sites
Yes, in general it's perfectly normal that you might not immediately understand how to apply the concepts you're learning about. This will come with practice. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
2

Share this post


Link to post
Share on other sites
Many beginners ask this question, but you have to understand that a processor calculates basic instructions and branching logic. A GPU does the same thing but with floats and less branching and more parallelization of instructions. You have to understand that a programming language gives you maximum control over these basic instructions because it isn't software, it is a language, and you are controlling the instructions, albeit in a portable way (like in C/C++). For example, you may see a wall move, but the computer sees that as a model, made up of textures, texture coordinates (floats), texture bitmaps (array of values), and geometric world space coordinates (four floats for homogeneous coordinates). Also, if you are doing linear transforms, you will use matrices and/or quaternions for 3D games, and that is all using arrays, structs, and floats. My best advice is to pay attention and learn, as programming is useful in almost any field.
0

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1353737991' post='5003685']
This is entirely normal, and something you will experience again and again throughout your programming career as you discover new concepts over time.

Especially when you are starting out and inexperienced, it can be very difficult to understand the "why" of certain things, or the bigger-picture concepts of how to [i]use[/i] those things. Give it time and keep practicing, and you'll start seeing areas where things "itch" - you can't quite say why, but you know there has to be a better way to do things. Pay attention to those itches - they are usually a sign that you are ready to learn a new concept.
[/quote]

Ok thank you. I assumed it was normal, but I just wanted to make sure. Thanks for the posts guys makes me feel a bit better as I was kinda going "crap I don't know how I would use this yet xD".

Anyway I am learning from C++ sams teach yourself one hour a day and these youtube videos: http://thenewboston.org/list.php?cat=16

I really like the way he explains everything, makes it all make since and really like him, glad I found out about those videos before I started learning as he's a great teacher :P.
0

Share this post


Link to post
Share on other sites
Here is another helpful couple of resources. The first is an e-book, the second is a university page, and I would say that you could probably safely bet on the university page (Missouri S&T Computer Science Department) being 100% correct.

e-book: [url="http://newdata.box.sk/bx/c/"]http://newdata.box.sk/bx/c/[/url]
uni pages: [url="http://classes.mst.edu/compsci53/"]here[/url]

Hope this helps, these taught me a lot back when I was starting out with C++.

EDIT: The uni pages ARE videos, if there was any uncertainty. Edited by MrJoshL
0

Share this post


Link to post
Share on other sites
I do agree, it's perfectly normal since you are just starting out. Having worked with the Java language and some C++ for 2 years I like to think about programming as methologically thinking about the programming concepts and how these ideas and concepts connect and relate to things you seen before(ie: video games, word processors like microsoft word). I also think if you make a connection with what you learning now in programming with how the programmers make the video game(like world map, collision detection, game logic) it will make much more sense.

The other most obvious thing is practice coding and think and be aware. It is okay to rest your brain of course. But what I am going to say is programming is cumulative. What you do not know might prevent you from solving a problem. Ask people for help but also show what you have done already so people can actually see what you know and do not. The sky is the limit. Always seen patterns in code and how these programming structure varies. Stay active on forums and persevere with the problem that is troubling. Struggle with the problem and eventually you will be friends with the problem. As soon as you solve it, I guarantee you will say " that was not so bad after all." =]



Good luck and happy coding. Edited by warnexus
1

Share this post


Link to post
Share on other sites
[quote name='blade55555' timestamp='1353736821' post='5003682']
Well my question in general is, is it normal for me not to understand how to like make a program with it even though I know how to make one, and understand what it is, just not how to use it.
[/quote]

Sometimes it depends on what you are learning from, several popular C++ books are flooded with useful information but are described in such a ermm 'mathematical text book' way where you are often left wondering "so I know how to do this but where would I use it?", I would probably say "[Wrox] Beginning C++ by Ivan Horton" and "Programming principles C++ by Bjarne Stroustrup" are the only book I have came across that arent like this for C++, typically Apress / Wrox try to give ideas on where to use things.

Ofc then theres pointers which only made sense to me at least from delegates / ref / out in C#.

But to answer your question, yes it is normal but sometimes its not you its the book you are reading from
2

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