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

Do we use pointers in game programming?

13 posts in this topic

I'm learning c++ from basic and I have reach the pointers subject.

should I skip it or learn it, its alot of stuff to learn about, do I realy need to spend time on it?

Is it gonna help me to program games? 

0

Share this post


Link to post
Share on other sites

From a learning perspective, pointers are absolutely vital for dynamically allocated memory.  There are newer alternatives to regular pointers, but they all more or less work the same way.

Thank you.

1

Share this post


Link to post
Share on other sites

More importantly than learning about pointers themselves, IMHO, is that learning them is a great first step to learning about memory. This will be invaluable later on as you gain more experience, especially when it comes to optimization (whether for speed or other types of targets).

2

Share this post


Link to post
Share on other sites

I concur with the above posters.  If you were interested in game development only, than you could use a tool very specific to it, like Unity, Gamemaker, etc...  But, since you are going the C++ route, which in my opinion has nothing wrong with it(except that it can take longer both learning and using, but with more control over code), I'd say you need pointers very much.  Technically, you use a form of a pointer any time you would dynamically create an object, and in games, you tend to dynamically create lots of objects, like enemies, bullets, etc...  Now, there are technically alternatives, but in any case, you should indeed learn the theory and then if you don't use them later, OK.  Then, if you need them in order to apply some API, you'll know what you are doing.  Even the "simple" Irrlicht engine uses pointers all over the place.

1

Share this post


Link to post
Share on other sites

Pointers are vital in other languages too, but they're usually called something else, such as 'references'.

Caveat: many of those languages do not let you do raw pointer arithmetic, casting voids, or other dangerous tricks that you can do with real C/C++ pointers. But understanding pointers and memory is vital for a deeper understanding of computing, if you are looking for that.

0

Share this post


Link to post
Share on other sites

Pointers are vital in other languages too, but they're usually called something else, such as 'references'.

 

There's a big difference between pointers and references from a "learning" point of view.  References are "magic", so they're much easier to understand (or rather, not understand).  I don't necessarily think that's healthy, but you don't really need to understand how pointers work, or even memory at all for that matter, in a lot of higher level languages.

1

Share this post


Link to post
Share on other sites

I'm learning c++ from basic and I have reach the pointers subject.

should I skip it or learn it, its alot of stuff to learn about, do I realy need to spend time on it?

Is it gonna help me to program games? 

 

Learn it. The most basic SDL example uses pointers. GDNet's own article where a basic Snake game is described (made with SDL) uses (NEEDS) pointers, too.

 

Yes, it will help you (actually, it will ENABLE you to) program games. In C++, pointers are a necessity for passing by reference rather than by value, callback functions, and dynamic memory allocation. Even if you use a library that uses references rather than pointers where possible, like SFML, you need to know that a reference is a constant pointer that can't be null and is dereferenced automatically.

 

Some (pardon the pun) pointers to articles I like:

Ted Jensen's Tutorial on Pointers and Arrays in C

The Function Pointer Tutorials

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