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

WhiteChocolateMocha

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

376 Neutral

About WhiteChocolateMocha

  • Rank
    Newbie
  1. I haven't seen this posted anywhere on the site, so, Valve held a presentation a few months ago on porting their Source engine to Linux. It goes into detail on how to use modern OpenGL and getting the best performance out of it. It's an hour long video - a great wealth of info.   [media]http://www.youtube.com/watch?v=btNVfUygvio[/media]
  2. I have a weird phenomena where everything is rendered in the lower left corner of the window. Calling glViewport(0, 0, 1024, 768) doesn't help. Neither does calling glfwSetWindowPos or glfwSetWindowSize. Manually repositioning the window helps, but I shouldn't have to do this. I don't have anything in app that ties window repositioning to OpenGL. Is anyone familiar with this problem and know of a solution?   I made a video demonstrating the problem http://www.youtube.com/watch?v=kdwHvqSv42w&feature=youtu.be
  3. OpenGL

    I say continue with the fifth edition. I have both, and am constantly going back to the early edition because some things are just better explained, like UBOs and PBOs (the latter is hardly mentioned at the end of the book in the 6th ed). Explanations in the newest edition are pretty terse. Also, the reference is cut out in the 6th ed; I guess it was to save some trees. I hardly ever used the reference, but it was a nice addition. Stick with the 5th version, and when you're ready to move onto atomic counters and compute shaders, the 6th version will be ready for you. Also have a look at g-trunc OpenGL reviews, if you haven't already. It'll put things into perspective of where OpenGL was back in the day, and where it is heading - especially when it come to the bind to edit model. ARB_bindless_texture anyone?
  4. OpenGL by default looks down the -z axis. Setting your triangle z coords to -1 should help GLfloat pos[] = { -0.5, -0.5, -1.0, 0.5, -0.5, -1.0, 0.0, 0.5, -1.0 };
  5. You can use Apple's first party tools. If you're using Xcode, then in the menu bar go to Xcode-> Open Developer Tools -> More Developer Tools -> then download the xcode graphics tools for your OS. Open the .dmg and click OpenGL Profiler. Copy the executable to the list box, then in the menu select Views->Breakpoints then check "Break on GL Error". Back in the main view, highlight the app so that "launch" is no longer grayed out, and hit that. This is how I debug my apps, and it's pretty good. 
  6. Sorry, I was still typing my message. So composition is just combination of objects? It doesn't matter if they can be changed at run time or not. That's what the strategy pattern is for.
  7. Thank you, jpetrie. You first paragraph definitely puts things into perspective. I definitely looking for a way to use my shiny new toy. I wrote many GL classes before. One with regular member functions and all state encapsulated. I wasn't happy with that solution. It was too immutable. I also tried inheritance. I wasn't too happy with that. There was this nagging voice saying "Don't use inheritance. Use composition." I got that from you gamedevers. But I think I got my definition of composition wrong. But are composition and the strategy pattern really different? One allows you to interchange state. The other allows you to interchange behavior. Are there any other differences besides that? If there is, then I don't have any understanding of this.
  8. Hello, I bought the book Head First - Design Patterns. After reading about the Strategy Pattern I tried to implement it in a OpenGL Window class. namespace bj{ class GL{ private: HWND windowHandle; HDC deviceContext; HGLRC renderContext; int exitCode; /* Sets the windows class to use with the window. Returns a string containing the name of the window class*/ std::tr1::function<std::wstring(GL &)> register_class; /* Function that adjusts the size of the window and creates the window. This algorithm must set the GL's windowHandle and deviceContexts states.*/ std::tr1::function<void(GL &, const std::wstring &, int &, int&)> create_window; /* This function describes the pixel format of the renderer and sets up a rendering context. The GL's rendering context state must be set. */ std::tr1::function<void(GL &)> setup_gl; /* This function is called when the window is resized. It should reset the viewport and projection matrix. */ std::tr1::function<void(double, double)> resize; /* Do any initialization here. */ std::tr1::function<void(GL &)> initialize; // Main run loop. This functor must be set std::tr1::function<int(GL &)> run_loop; public: // Get DC HDC get_dc(){return (deviceContext);} // Set DC void set_dc(HDC dc){deviceContext = dc;} // Get RC HGLRC get_rc(){return (renderContext);} // Set RC void set_rc(HGLRC rc){renderContext = rc;} // Get Window handle HWND get_window(){return (windowHandle);} // Set Window handle void set_window(HWND window){windowHandle = window;} // Reset the register_class functor void reset_register_class( std::tr1::function<std::wstring(GL &)> register_class){ this->register_class = register_class; } // Reset the create_window functor void reset_create_window(std::tr1::function<void(GL &, const std::wstring &, int &, int&)> create_window){ this->create_window = create_window; } // Reset the setup_gl functor void reset_setup_gl(std::tr1::function<void(GL &)> setup_gl){ this->setup_gl = setup_gl; } // Reset the resize functor void reset_resize(std::tr1::function<void(double, double)> resize){ this->resize = resize; } // Reset the initialize functor void reset_initialize(std::tr1::function<void(GL &)> initialize){ this->initialize = initialize; } // Reset the run loop void reset_run_loop(std::tr1::function<int(GL &)> run_loop){ this->run_loop = run_loop; } // Returns main loop exit code int get_exit_code()const{return (exitCode);} // Constructors GL(); explicit GL(std::tr1::function<int(GL &)> run_loop); // Destructor ~GL(); // Executes everything int run(); }; // Standard function object for registering a window class class DefRegisterClass{ public: std::wstring operator()(GL &gl); DefRegisterClass(); DefRegisterClass(WNDPROC win_proc_); private: WNDPROC win_proc; }; class DefCreateWindow{ public: void operator()(GL &gl, const std::wstring &className, int& width, int &height); }; class DefSetupGL{ public: void operator()(GL &gl); }; class DefResize{ public: void operator()(double width, double height); }; class DefInitialize{ public: void operator()(GL &gl); }; // Standard class that contains a static function for handing // windows messages. class DefWinProc{ public: static LRESULT CALLBACK WinProc(HWND, UINT, WPARAM, LPARAM); }; // Converts win32 error messages to strings std::string format_message_win32(DWORD errorID); } // Namespace bj #endif GL_TEMPLATE_HPP I was wondering if this is the correct way to go about it using the strategy pattern. If anyone could point out anything I did wrong, it would be greatly appreciated. Also just to clear it up, the strategy pattern IS composition?
  9. Learning the language and learning coding standards are two different things. Bjarne Stroustrop has written then definitive guide on C++ with his The C++ Programming Language book. The problem is that it's very hard reading, and not something you would learn the language from. He's written another book which looks aimed at college students. That should be helpful. I don't remember the name of the book, but it's wouldn't be hard to find. Just search on amazon.com for his books. He's only written a handful. For coding standards, Scott Meyers Effective series are a must, pretty much. Effective C++ and Effective STL are great book on what/when/how and why to use something. These books show the dos and don'ts of the language. His other book More Effective C++ is pretty helpful too. It explains some low level details of how vtables are implemented and the overhead you get of using dynamic objects and stuff, but the book seems really more about learning neat tricks with the language - but again, this might aid you in your directx programming.