• 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

931 Good

About TheAngryPlatypus

  • Rank

Personal Information

  • Location
  1. You might want to look into the std algorithms (include <algorithm> and <numeric>). That stuff can eliminate a lot of for-loops and it works on vectors sets, lists etc. all the same way. For your example it would look like this: #include <vector> #include <set> #include <numeric> #include <iostream> int main() { std::vector<int> v{1, 3, 5, 7, 11}; // the vector sum using accumulate from <numeric> header. std::cout << std::accumulate(v.begin(), v.end(), 0) << std::endl; std::set<int> s{1, 3, 5, 7, 11}; // same function for the set. std::cout << std::accumulate(s.begin(), s.end(), 0) << std::endl; return 0; }
  2. Just a thought about the design: Those InitiationSettings seem to be just a collection of data that is used to initialize the graphics system. And which graphics system is used will be decided at compile time. Your solution uses run-time-polymorphism combined with up-casting and preprocessor switches. I think the run-time switching part is not necessary here, as is the polymorphic class for the init data.   I thought of something like this: struct InitiationSettings { std::string title; int width; int height; bool vsync; bool fullscreen; }; void GraphicsFactory::init(const InitiationSettings& settings) { #ifdef USE_OXYGINE_RENDERING oxygine::core::init_desc oxygine_desc; //copy over settings to oxygine_desc oxygine::core::init(&oxygine_desc); #endif } But you may have other reasons to use your version, so its just some input, because i don't like putting data into abstract classes :)
  3. template <typename T, size_t MemoryPoolNumElements = 8192, size_t Alignment=16, size_t NumPagesPerMemoryPool = 16, typename T_Size=uint16_t, uint8_t MemoryPoolGroupElementsExp=5, size_t ReserveSize=16> using Vector = typename MemoryPool<T, MemoryPoolNumElements, Alignment, NumPagesPerMemoryPool, T_Size>::template MultipleObjectsAllocator<MemoryPoolGroupElementsExp>::template Vector < ReserveSize > ; Does this work? The "typename" in front of MemoryPool is important because you are using an inner type(def) of a templateed:   edited: A and those extra ::template identifiers are important. I found this link which should explain everything.
  4. Calculation for projection matrix in the table DirectX RH the denominator for factors C and E has to be (n - f) not (f - n).
  5. I consider a pointer cast more ugly than a nice typesafe template :) . But static_pointer_cast should work in VS10.   My resource system has improved drastically by deviding it to respectively one resource cache by resource type.
  6. Design Patterns: Elements of Reusable Object-Oriented Software Clean Code: A Handbook of Agile Software Craftsmanship
  7.   You can explicitly add entities to systems like this (assuming Entity is just an identifier): class System { public: void add(Entity e); protected: std::vector<Entity> m_entities; }; // update example void MoveSystem::update(EntitySpawner& spawner) { for( auto &e : m_entities ) { Position& position = spawner.get<Position>(e); Velocity& velocity = spawner.get<Velocity>(e); position += velocity; } } Or you let the system query combinations of Components, no adding needed: void MoveSystem::update(EntitySpawner& spawner) { std::vector<Entity> entities = spawner.getEntitiesWithComponents<Position, Velocity>(); for( auto &e : entities ) { Position& position = spawner.get<Position>(e); Velocity& velocity = spawner.get<Velocity>(e); position += velocity; } } I used EntitySpawner here like you did , which may not be the best name for what it does.   These are only two incomplete examples, there are dozens of design possibilities for components and systems. For the second approach I can suggest to have a look at entityx .
  8. I would do it this way: std::vector< std::unique_ptr<Component> > prototype; // ... parse JSON and create/add components to prototype // store prototype somewhere // create an entity from prototype Entity e = createEntity(); for( auto &comp : prototype ) { e.attach( comp->clone() ); } For this approach your components need a virtual clone function. With the use of CRTP u can automatically create it: class Component { public: virtual ~Component() { } virtual Component* clone() = 0; }; template <class Derived> class TComponent : public Component { public: virtual Component* clone() { return new Derived(static_cast<Derived const &>(*this)); } }; class Position : public TComponent<Position> { ... };  
  9. Hello Texus.   After a short look in your TGUI code, I think the problem is the Window class. First: the naming is confusing. In a GUI I expect a window to be a widget. In your case Window is a renderer and should act like a root for your widgets as well. (Thats why it inherits from Group but not from Object)   My idea: I would get rid of the Group class and put all its code into GroupObject. Then let window contain a GroupObject named root. (or inherit a RootObject or Desktop etc. from GroupObject)