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


  • Content count

  • Joined

  • Last visited

Community Reputation

316 Neutral

About SirKnight

  • Rank
    Advanced Member
  1. Have you tried using cgGLSetDebugMode(CG_FALSE)? This will avoid the numerous glGetError calls the runtime makes internally. Remember there's also a Cg forum at NVIDIA's developer site where many NVIDIA engineers roam, several from the Cg teams. http://developer.nvidia.com/forums/index.php?showforum=14
  2. OpenGL

    Check this out: http://www.dxquake3.dsl.pipex.com/
  3. Don't use string for this. Use a single char. It's also better for a beginner to avoid using those C++ classes like string and use character arrays instead for strings. They will learn a lot more and become better programmers by doing that. A long time ago, that's what my programming teachers said and I now understand why. Plus, it's faster to do if( ch == 'y' ) assuming ch is a char than it is doing if( ch == "y" ) if ch is of the string class type.
  4. To have your game loop back again, use just that a loop. Any loop would work, but in this case I'd probably use a do { } while(); loop. Make the condition of the while false if the user wants to exit. For random numbers, use the rand() function. See here: http://www.cplusplus.com/reference/clibrary/cstdlib/rand.html That page also has a number guessing example that allows the user to replay the game just like you want.
  5. Quote:Original post by Anon Mike I don't think the C++ standard specifies the size of bool. Google says that older versions of both gcc and MSVC had bools larger than 1. As other have mentioned bool/true/false are C++ things. BOOL/TRUE/FALSE are Win32 things. Win32 is fundamentally a C API not C++. In general if a function takes a BOOL it's ok to give it a bool. If it returns a BOOL you can stick it in a bool but you may get a (benign) compiler warning. If a function takes or returns a BOOL* then you have to use a honest BOOL*, failing to do this by casting away the compiler's complaint can corrupt memory. Since a BOOL is really an int you have to follow the rules of C. e.g. this is potentially invalid code: BOOL b = Foo(); if (b == TRUE) Whatever(); ...because it's possible for b to be (say) 2 and the test fails. I wouldn't worry much about that. If Foo returns BOOL, then unless the programmer has gone completely insane (which happens ;) then Foo will be returning TRUE or FALSE and everything will be fine. A bad programmer would return numbers directly instead of TRUE or FALSE in this case.
  6. Quote:Original post by Sneftel true is a C++ keyword referring to one of two possible values for the bool type. TRUE is a macro declared in windows.h that evaluates to -1, which is useful if you're programming in C (blah blah C99 blah) and don't have a real bool type. Since the Windows API was written for C, not C++, they use that convention. I've always seen the windows headers define TRUE to 1, not -1. Not that it matters a whole lot but still. It is more common to see true being 1 though. As of visual studio 2005, it's defined as 1 in windef.h FYI. :)
  7. Well I started with C when I was a sophomore in HS and the book I had was called something like "Teach yourself C in 21 days." I found it to be quite good. After a year of learning C on my own I took Computer Science I when I was a Junior and then Computer Science II as a senior which taught C++ at the time. I also used any website about programing I could find to help. Google will find some good stuff I hear. ;) I also have an older edition of C++ How To Program by Deitel and I thought it was a great book as it covers a lot and describes things well IMO. The newest edition even has a game programming section using the OGRE engine. I think a good thing for you to do is check out a public library or even a Barnes and Noble. Spend a few hours in there looking at all the C++ books and read through a chapter or two and see what you think. If you have any more questions give me a holler. :) I used to teach C++ as a side job while in college too BTW. :)
  8. OpenGL

    Remember to check out http://nehe.gamedev.net
  9. Quote:Original post by trouble2007 Hi, I had that problem but fixed it by having glTexGeni(GL_S, GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR); glBindTexture (GL_TEXTURE_2D, tex); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); The sphere rotates and everythign rotates fine, but the image(earth texture) is mapped several times instead of being stretched on the whole sphere. Any help would e greatly appreciated. Thanks! Use glTexParameteri with GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T.
  10. OpenGL

    D3D FX effects for the most part work just fine in Cg. FX support has improved by a large amount in the past year. Try it out and see how it works. If you have any problems, report them on the Cg forum at developer.nvidia.com/forums.
  11. OpenGL

    Keep in mind that calls like cgGLSetStateMatrixParameter internally does a glGetDoublev call which stalls the pipeline (killing performance). You're better off inverting the matrix in your main app (search for fast matrix math libraries) and sending the result to Cg through a CGparameter. I would advise against this function unless you really HAVE to use it for some reason.
  12. Use a namespace. This is the kind of thing namespaces are for. :)
  13. Have you tried if( keys[VK_RETURN] && keys[VK_ALT] ) or something like that?
  14. Quote:Original post by cdoty "When do you intend to remove your floppy from the slot?" That's what SHE said! ;) Sorry...just HAD to say it.
  15. In addition to binding the program, cgGLBindProgram also sets up parameters and textures. So it's definately a function you want to minimize calling.