• 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

469 Neutral

About shaqb4

  • Rank
  1. Thanks a lot for the explanations. This entire discussion made was very clear and easy to understand. :)
  2. I think I understand. So the call to VertexAttribPointer only affects the currently bound ARRAY_BUFFER VBO and no other type? 
  3. That makes so much more sense, thank you! :)   Just to make sure I understand what's happening, though.   First, you create the 2 VBOs. Then You create the VAO. By binding the VBOs while the VAO is bound, they are added to the VAO. The Attrib calls allow the vertices to be used for rendering. Is that correct or close?
  4. I just started learning OpenGL and decided to use the LWJGL in java to begin. I'm following the tutorials on their wiki, but I'm confused about something in the DrawElements tutorial.   In the tutorial, they create a VBO containing the vertices (four corners) of a rectangle and add it to a VAO. Then they create a VBO that contains the order the vertices are to be drawn, but this one isn't added to the VAO.     Here's the code where they're created: float[] vertices = { -0.5f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.5f, 0.5f, 0.0f }; vertexCount = vertices.length; FloatBuffer verticesBuffer = BufferUtils.createFloatBuffer(vertexCount); verticesBuffer.put(vertices); verticesBuffer.flip(); byte[] indices = { 0, 1, 2, 2, 3, 0 }; indicesCount = indices.length; ByteBuffer indicesBuffer = BufferUtils.createByteBuffer(indicesCount); indicesBuffer.put(indices); indicesBuffer.flip(); vaoId = GL30.glGenVertexArrays(); GL30.glBindVertexArray(vaoId); addedVBO = GL15.glGenBuffers(); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, addedVBO); GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verticesBuffer, GL15.GL_STATIC_DRAW); GL20.glVertexAttribPointer(0, 3, GL11.GL_FLOAT, false, 0, 0); //Vbo is added to Vao GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0); GL30.glBindVertexArray(0); unaddedVBO = GL15.glGenBuffers(); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, unaddedVBO); GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesBuffer, GL15.GL_STATIC_DRAW); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0);     Here's the code where they're rendered: GL30.glBindVertexArray(vaoId); GL20.glEnableVertexAttribArray(0); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, unaddedVBO); GL11.glDrawElements(GL11.GL_TRIANGLES, indicesCount, GL11.GL_UNSIGNED_BYTE, 0); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0); GL20.glDisableVertexAttribArray(0); GL30.glBindVertexArray(0);   Is there a reason one VBO is added to the VAO and one isn't? Would it make a difference if it was added?Also, it occurs to me as I write this that maybe adding one to the VAO allows you to use both VBOs at the same time during rendering?  
  5. Thanks for the replies, everybody. :)   I'd like to put it on github because one.) I figure being able to use github would be a useful skill and 2.) It would make it easier to get feedback on my code.   Also, my next game will probably need a timer also, so I might as well change the code now. The problem I'm having is that I don't know what I could change. I could get rid of some  member functions, change names, etc. I looked up other implementations for a Timer class, but they were mostly just slight variations of the one I have now. Any suggestions? (I'm not trying to ask you to change the code for me, I just want ideas for what I could change).
  6. A few weeks ago, I finished  a pong clone with SDL and planned on putting it up on github. Some of my code is taken directly from the Lazyfoo tutorials found at http://lazyfoo.net/SDL_tutorials/index.php.   Specifically, I used the Timer class taught on the following page, as well as the apply_surface functions found in the first few starting tutorials. http://lazyfoo.net/SDL_tutorials/lesson13/index.php   In his FAQ he states    Q: Can I use your code to make a game? "Q: Can I use your code to make a game?   A: Basically my rules are: 1) If you're using it for a closed source program, go nuts. 2) If you're using it for an open source program, please cite the chunks of code you used with something like:   /*This piece of code was originally from Lazy Foo' Productions (http://lazyfoo.net/)*/   3) I you're using it for a GPL, LGPL or other such program which gives public rights to the code, I'm going to have to say no. 4) If you're using it for a tutorial, you're going to have to use your own original code."     You still need contact me and show me specifically the code you plan to use and what you're going to do with it so I can approve."         I contacted him, but after a few weeks there hasn't been a reply. So my question is what should I do now? As far as I can tell, my options are to either wait for a response or change the code. I can't think what I could change in the Timer class, though. It's pretty straight forward, with start, stop, pause etc. I assume just changing the variable names wouldn't count as making it my own?   Any recommendations for how I could make the code my own would be appreciated. (such as other ways to implement a Timer). 
  7. Thanks, that was a great answer. It cleared it up perfectly.
  8. Thanks, I think I'm gonna go with github for now. This is a little off topic, but how do you actually build or compile a project that's on github. Do you just open up he project in an IDE and build it? For example, i saw that torque3d was on there, so if I wanted to turn that repository/source into a usable product/executable, is that how I'd do it (I know that most of these projects have places to download binaries and such, but I'm just curious)?   Sorry if this is a stupid question.
  9. I finally finished my first game, a pong clone, and would like to share it and get some feedback. I'm not sure what the best way is to do that though. Should I use github or a similar service, make my own website/portfolio or are there other alternatives I could use? I can't wait to see what people think and thanks for the answers in advance!
  10. Thanks, all the answers are great! I don't think I'll need the more complicated state machines for a while, but it's nice to at least have an idea of how people do it. I can see from the responses that there're a lot of ways to implement game states. Are there reasons to use one way over another in specific situations, or is it more just a matter of preference?
  11. I'm making a pong game with c++ that currently has two states, GameState and MenuState. The way it is now, both states are methods of the Game class. The Game class has all the instance data that both methods/states use (so paddles, ball, menu buttons, etc). Is it bad practice to make a gamestate a method rather than its own class?   This is how my main function is right now   #include "Game.h" int main( int argc, char* args[] ) { Game game; game.Run(); return 0; }   And the Run function   int Game::Run() { if (error) { return 1; } //The frame rate regulator, passed to GameState Basic_SDL::Timer fps; //Which player scored (left or right), passed to GameState int scoreKeeper = 0; rightPaddle.setAI(true); //While the suer hasn't quit while (quit == false) { if (!paused) { GameState(fps, scoreKeeper); } else { MenuState(); } } //Clean up clean_up(); } It works fine this way, I'm just not sure if making each state a method is looked down upon. Any other advice on how to implement game states would be appreciated also . 
  12. Unity

    Should I post this in a different place?
  13. I was recently given the 3D Game Studio A8 game engine as a gift. I was just wondering how it compares to other engines such as Torque 3d, unity, udk and other well known engines. Is it good? Strengths and weaknesses? I'd just like to get an idea of whether it's considered to be a good engine or not.
  14. Thanks rip-off, it works great.
  15. Thanks, I finally got it to work with the following modified constructor. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] [CODE] Lobby::Lobby(const Lobby& l) { if (l.m_pHead != 0) { m_pHead = new Player; *m_pHead = *l.m_pHead; Player* pIter = m_pHead; Player* pHeap; while (pIter->GetNext() != 0) { pHeap = new Player; *pHeap = *pIter->GetNext(); pIter->SetNext(pHeap); pIter = pIter->GetNext(); } } else { m_pHead = 0; } } [/CODE] Your explanations helped a lot.