• 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
KB Toys

Using C++

34 posts in this topic

So I have recently watched several videos on C++. I understand the basics, but how can I apply this into developing a game? 

 

Thanks

0

Share this post


Link to post
Share on other sites

Why is this in the "Artificial Intelligence" forum? There is a "For Beginners" forum.

Sorry wasn't sure which to put it in.

1

Share this post


Link to post
Share on other sites

The way I look at it, any language is simply a tool. If you can describe how you want the game to work in terms of conditional logic and mathematical expressions on paper, you can then write it in C++ and run it. So, I believe that the more appropriate question is "How can I express a game in a strictly logical set of rules and interactions?" Translating to a programming language will follow.

Do you know any good videos I can watch to extend my knowledge on C++?

1

Share this post


Link to post
Share on other sites

 

The way I look at it, any language is simply a tool. If you can describe how you want the game to work in terms of conditional logic and mathematical expressions on paper, you can then write it in C++ and run it. So, I believe that the more appropriate question is "How can I express a game in a strictly logical set of rules and interactions?" Translating to a programming language will follow.

Do you know any good videos I can watch to extend my knowledge on C++?

 

I'm afraid not; the only thing that videos help for me is higher level math.

 

Programming is something that has always been a reading and hands-on experience kind of thing for me. Keep reading whatever you find, and learn to separate the good advice from the bad (prefer ones that quote the C++ standard). Make projects that become incrementally greater. Have you done the common "guess the number", tic-tac-toe, blackjack, and poker programming projects? Those are good starts.

Edited by Ectara
2

Share this post


Link to post
Share on other sites

Think of console programming like a king-fu master telling you to hit a bowl of water again and again.  It seems silly to you at the time, and ever so boring.  You want to be making engines and games with cool graphics, and here you are wasting your time with yet another console tutorial.  Yet there is good reason the master has given you those instructions...

 

 

Programming is essentially all problem solving. You have a problem and you break it into smaller problems. You break the problem down enough until you have something you can Google. Then you put all of the pieces together and you have a program. Then the program doesn't work and you have to figure out why. That is programming.

hehe... so true ;)

2

Share this post


Link to post
Share on other sites


I don't see where we are ones to judge what people learn from attempting to create certain programs.

I agree because everyone learns differently. What worked for you may not work for others so it is unfair to give a path for something that has no set path to learning.

 


So I have recently watched several videos on C++. I understand the basics, but how can I apply this into developing a game? 

I can understand where he is coming from. I've read many books and done tons of experiment programs as I learned. When I started out, I could set there and help other beginners fix their code no problem, but when it came to mine I couldn't think (I just locked up). Still do lock up on my own projects from time to time and have to force myself to just start typing code in hopes that the block will lift. 

 

Let me add my advice. Books have more detail than a video or tutorial will have and cover more. You can learn from the videos and tutorials, but if you want to know more about a feature in C++ then you need a book for that (I'd recommend Bjarne Stroustrup's The C++ Programming Language for a reference). Just keep programming and trying anything and everything you can and when you hit a snag, ask questions... lots and lots of questions.

1

Share this post


Link to post
Share on other sites

You can use C++ along with SDL to make video games.  Why don't you private message me?  I can help you make a Pong game using C++/SDL, and you can go from there :)

2

Share this post


Link to post
Share on other sites

According to me, the best way to learn C++ and proceed to game programming is to first get a book for C++. The best one I know of is Let us C++ by Yashwant Kanetkar or even C++ How to Program is good. Then get a book for Introductions to Data Structures and Algorithms and after these if you still wanna further your knowledge, you can also read Introduction to Cormen. Otherwise you can proceed with game programming using 2D APIs like ClanLib or Allegro for starters and then, move ahead to OpenGL for 3D development. All of these APIs are well documented, so I'm sure you can find a good book for the above. Also, only for the introduction part you can also refer to the book, Introduction to Game Programming Using C++, by Alan Thorn. Happy to help,

1

Share this post


Link to post
Share on other sites

start here (for free):

http://www.cplusplus.com/doc/tutorial/

 

then (much later) buy this:

http://www.stroustrup.com/4th.html

 

then (much much later) buy this:

http://www.amazon.com/gp/product/0321334876?ie=UTF8&tag=aristeia.com-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0321334876

 

all the while writing programs and asking lots of questions. If you're not interested in c++ specifically, and just want to get running with games, something like flash with flashpunk will likely be many times quicker for a basic game, and with lots more examples available. You can always move to c++ later.

 

If you want a basic project in c++ with SDL2 I can post something simple up.

1

Share this post


Link to post
Share on other sites

Yes, you can start at Cplusplus.com, but should really invest in getting C++ Primer 5th Edition by Stanley B. Lippman, Josee Lajoie, and Barbara E. Moo to learn C++ and The C++ Programming Language 4th Edition by Bjarne Stroustrup for a reference. The one place tutorials fail is that they don't cover nearly enough information to be really valuable which is why they are okay for getting your feet wet, but should be brushed aside for books (especially books that are known to be considered popular by other users). Scott Meyer is also a good author to get from so you should definitely invest in Effective C++, More Effective C++, Effective STL (as they all still cover some points that are still valid even though they are a little outdated) and keep an eye out for his new Effective book that he is calling Effective Modern C++ (but there is no release date mentioned last I knew).

 

I think Primer and Bjarne's book are the best two, but if you want you can also see what ISOCPP recommends ( https://isocpp.org/get-started ).

Edited by BHXSpecter
2

Share this post


Link to post
Share on other sites

 

So I have recently watched several videos on C++. I understand the basics, but how can I apply this into developing a game? 

 

Thanks

Let me help put that into perspective for you...

 

You've just watched several videos on how to use a hammer, and now want to build your own home.

 

Overdramatic twaddle, there's no need for expertise in the entire language, there's not a company I've ever worked for that would permit you to use it all anyway. C only has 30 odd keywords, get your head around loops and decisions and pretty much you're on a running start. A modern ide's autocomplete holds your hand through any most of the more complicated parts. 

 

Good luck KBToys, I hope you have fun learning, don't be out off at all. There's plenty of people and forums who will help if you get stuck.

-4

Share this post


Link to post
Share on other sites

1.) Learn C, I think they teach kids this in school nowadays

 

2.) Install Visual Studio Express, its free

 

3.) Start with C++ examples, Google for code and run it in Visual Studio

 

4.) Voila, you now know C++ :)

 

Collect as much code as you can and implement it in your game, at first do not try to invent anything yourself, its all on the Internet already. Use a framework like Cocos for more functions.

-2

Share this post


Link to post
Share on other sites

1.) Learn C, I think they teach kids this in school nowadays

 

2.) Install Visual Studio Express, its free

 

3.) Start with C++ examples, Google for code and run it in Visual Studio

 

4.) Voila, you now know C++ smile.png

 

Collect as much code as you can and implement it in your game, at first do not try to invent anything yourself, its all on the Internet already. Use a framework like Cocos for more functions.

Start at step two and go from there. C++ has evolved enough that the premise of learning C first is no longer worth it. You can certainly go back and learn C if you wish, but if you want to program in C++ then learn C++. I've been programming for a long time and C++ was my second language (BASIC being my first), but I went back and learned other ones just because I love programming languages. 

0

Share this post


Link to post
Share on other sites

"Why C? I see no reason to start with C rather than basic C++."

 

C++ at first may be confusing to him. I also started with BASIC first, in primary school then with C in high school. Then pretty much all other languages in university.

-1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0