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

Archived

This topic is now archived and is closed to further replies.

pfresh85

Little help please...

6 posts in this topic

I''ve been learning C++ for the past few months (I tried back during school but I gave up because it was too much of a workload). Right now I''m reading C++ for Dummies. Yes it isn''t the best book but it is the one my parents bought me so I live with it. Well I got through the beginning parts pretty well (first 6 or 7 chapters) just because it was stuff I had done before and was used to, stuff like loops and variables and basic stuff like that. I get to the first chapter on pointers. I understand it and it goes fine. Then the next chapter is more about pointers. And now they start doing stuff with them that I don''t understand (passing a pointer to a function and such). I''ve tried rereading it a few times and I still don''t get it. I decided I''d post this up and see if you guys can explain pointers as a whole better to me than the book does. I''ll try rereading the section again while I wait for a response. Thanks.
0

Share this post


Link to post
Share on other sites
I''m still a newbie, but I ''kinda'' know pointers. I don''t know how or what to explain but my advice is to read the next few chapters, and you''ll probably have a better understanding once you see what they''re used for.

Well, atleast that''s what I did!


Anonymous Programmer
0

Share this post


Link to post
Share on other sites
Ok I can try reading the next few chapters but this book seems to assume after they "explain" something that you understand it and then the next chapter is usually incorporating the ideas of the old chapter with something from the new chapter. Oh well all I can do is try.
0

Share this post


Link to post
Share on other sites
For starters you aren''t really stuck with just that book. I guarantee that virtually any information available in a c++ tutorial book is available online somewhere, it just takes a while searching to find. I''ll give you a quick pointer tutorial here though.

You probably already know this, but what a pointer basically does is specify a location in the computer''s memory where something can be found, whether it''s an int, a float, a struct, or an object of some type.

Some syntax first, in case you''re confused:

data_type *pointer_name;
pointer_name is the name of a pointer to something of type data_type.

&variable_name
is a pointer to the variable variable_name.

*pointer_name
is the actual data that pointer_name, um, points to.

Passing arguments to functions is one good use for pointers. Every time you call a function, the arguments passed to it are copied into an area of memory called the stack. The larger they are, the longer this takes. In a high speed, realtime application like a game these slow downs can waste valuable time. If you make the arguments pointers instead, you will save a lot of time because pointers are generally much smaller than whatever they point to and will therefore take less time to copy. Then you can just use the * operator on the pointers to access the actual data they point to.

Also note that when you pass an argument to a function you''re just passing a copy of it. If you make any changes to the argument variable it won''t affect the original. For example the function:

void foo(int n) { n=5 };

looks to some people like it changes the value of the integer you pass to it. But it doesn''t. If you declare int bar=3 and then call foo(bar), bar will still be 3. The argument is effectively a local variable so any changes you make are only local in scope. If instead you make the function:

void foo(int *n) { *n=5 };

This way the function takes a pointer instead of an integer as an argument, and changes the value at the address of the pointer to 5. So why is this different? A memory address always points to the same place regardless of where it is used, within the function or outside.

This example here is pretty pointless, but it should give you the idea and you can probably see where this could be useful. And keep in mind that this is juse one use of pointers.
0

Share this post


Link to post
Share on other sites
I followed you till about the last example then I got a tad confused. I'm going to check out some online C++ tutorials tomorrow and try and learn as much as I can. Tomorrow is my last day of summer so I hope to catch up on some C++ before school starts. Well thanks for the help.

EDIT: Now that I look back on what you said and I'm not deathly tired it makes sense. Ok I think that should help with my pointer dilemna. Now onto the next big thing.

Edited by - pfresh85 on August 7, 2001 11:08:13 AM
0

Share this post


Link to post
Share on other sites
Pointers specify indeed locations in memory were your object or datatype is stored. you can also use pointers to functions.
0

Share this post


Link to post
Share on other sites