• 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

1140 Excellent

About Finalspace

  • Rank

Personal Information

  • Location
  • Interests
  1. Sure it is. Service locator just bundles a bunch of statics together. Look at java, they use it all over the place - especially with hashtables mapped to named instances. Absolutly great for performance... I personally would never use such a pattern, because i rather pass the instance around. If i require more than one instance, there must be something wrong with my design and i need to decouple them by making them independent. Or in worst case use a context state structure which bundles the instances i need together. And keep in mind: Globals are evil, the evil inside the evil of the evil itself from the core of all evil. Just use a class static field -> Its the better global after all... or not? Seriously globals are fine, when you have just a couple of them and know how to use them properly. My applications has at max two globals, one for logging and one for storing operating system states. Please give more details, i dont understand the question.
  2. If you really want to have global access to some managers, you can use a service locator pattern: // Code not tested! class ServiceLocator { private: static TextureManager *_textureManagerInstance; public: template<class T> static T* get(); template<class T> static void set(T* instance); }; ServiceLocator::_textureManagerInstance = nullptr; template<> TextureManager *ServiceLocator::get<TextureManager>() { return _textureManagerInstance; } template<> void ServiceLocator::set<TextureManager>(TextureManager *textureManagerInstance) { _textureManagerInstance = textureManagerInstance; } TextureManager *textureManager = ServiceLocator::get<TextureManager>(); // and somewhere in the init-phase: ServiceLocator::register<TextureManager>(textureManagerInstance); But try not to use a hashtable for storing the instances, just use a static field for each manager and use template call for each type. This way you have one central place storing all global instances and must not think about it anymore. When you get multiple instances for a manager, then this wont work obvisouly.
  3. I commited a intense update with a full rewrite of the rendering and font system. I implemented a command-buffer like system, so rendering is independent from the graphics api now, which is great. Also i use STB_truetype to load and calculate fonts, so i get much better looking fonts and can finally adjust the size as well. But it seems i got a bug in regards using glDrawElements, crashing the rendering when glTexcoordPointer is used. Therefore i just draw the elements by byself and IFDEF´ed out the glDrawElements part.
  4. Unreal

    Everything is physics driven and i basically want 2D destruction in a 3D top-down view. I havent found a setting how to configure the collision behavior... Also i havent found a event yet how to get and control the created pieces. This is no problem, because its a simple game with just a few actors (Maybe 100 at max). Also the pieces gets removed after some time (Gravity pulls them down into a kill trigger - when i solve the issue above)
  5. I am playing around with destructions a bit, so i created a destructuable mesh, added it to a destructable compontent and tested it with a few actors beside each other. When something hits it fully breaks into pieces, which are fine - but then the pieces damage the neighboring actors as well... which is not want i want. - How can i setup the destructable component, that it never gets damaged when something hits it (I want to call ApplyDamage manually byself) ? Also the pieces gets thrown in all 3 directions, but i want to be limited to some Plane. - What must i set to limit the created pieces to a certain plane - like for example to the XY plane (for rotation as well) ? I played around with the settings, but its far too much properties to tune - so its hard to find the right ones.
  6. I have two kids in age of range 3 - 7, so there are distractions all the time - doing stuff on weekends are only possible when i am fully alone, which do not happen a lot. Therefore most of the time i do private projects at 8 pm after the work when the kids are at least in the process of sleeping. But this may get interrupted with other distractions, like showing movies, playing games, housework, etc. Especially playing games kills a lot time... but well its fun... Maybe i should just uninstall all games from my dev-machine... Regards motivation, i lose this very fast when i hang on problems for too long. This increases expotentially when there are things which dont work regardless what i do. This is the reason why i never finished a single game since i started programming over 20 years ago, but i can make prototypes at least.. At work this seems to not happen to me, i just sit down and figure out a solution always. But there i have much more time and can focus much better. In addition when i code i do it for much too long - most until midnight and this is very bad for my health, getting not much sleep. Therefore the idea from Kylotan seems great, i will try that.
  7. This would be so nice, but to simple for mankind: enum set MyFlags : uint32_t { A, // 1 B // 2 C // 4 }; static void DoSomethingWithFlags(const MyFlags flags) { if (flags & MyFlags::A) { } // Or using the "in" operator if (MyFlags::A in flags) { } }
  8. Thanks, i will have a detail look.
  9. HTML5

    If you dont want to use a external editor, you can simply write your own. In Javascript this is a piece of cake, especially with HTML5 and Canvas. - Just define a tilemap array, a tilesize and a way to store mouse position and button states. - Add a event listener for mousemove, mousedown, mouseup and convert the client coordinates into screen coordinates and store the button states respectively. (You need to take the canvas scale into account!): var mouseX = e.clientX * (canvas.width / canvas.offsetWidth); var mouseY = e.clientY * (canvas.height / canvas.offsetHeight); - In your render loop, you convert the mouse coordinates into world coordinates and calculate the tile position for the current mouse position (Its a simple divide by the tile size) and draw rectangle by the tile position multiplied by the tile size (You may need to take camera translation and scale into account as well) - At this point you have all tools you need to make your own tilemap editor. You need some reference, here is one: http://root.xenorate.com/final/jsstuff/platformer/demos/realcollisions.html
  10. Conclusion: Screw type safety, screw enums and use define and uint32_t only. Done - so it will compile in C-89 and C++ just fine. But i stick with this for now: enum { MyFlags_A = 1, MyFlags_B = 2, MyFlags_C = 4, }; typedef uint32_t MyFlags; For all the standards and definitions and shit, i dont understand why the C++ commitee still does allow enumeration values to be set directly. As a matter of fact, it should´t be allowed so set its type as well.
  11. Thats a good solultion, seems i have missed your post there... Problem solved.
  12. I have no idea why it wont compile, i made a branch and checked in the enum operators - last try before i give up: https://github.com/f1nalspace/final_game_tech/blob/enum_nonsense/final_platform_layer.h https://github.com/f1nalspace/final_game_tech/tree/enum_nonsense/demos Can someone open it up in vstudio - at least reproduce the bug?
  13. finalstate *sigh* A single enum will compile, but a second one will break it! I tested it on vs 2015 and 2017: Adding a second enum compiles... will test it out in my library...
  14. Well at this point i have given up. Now i will use enums for single states only and use this for my flags - compiles in C and C++ (For C i require prefixing anyway...): typedef struct fpl_KeyboardModifierType { uint32_t value; } fpl_KeyboardModifierType; const uint32_t fpl_KeyboardModifierType_Alt = 1 << 0; const uint32_t fpl_KeyboardModifierType_Ctrl = 1 << 1; const uint32_t fpl_KeyboardModifierType_Shift = 1 << 2; const uint32_t fpl_KeyboardModifierType_Super = 1 << 3; inline fpl_KeyboardModifierType CreateKeyboardModifierType(uint32_t value) { fpl_KeyboardModifierType result; result.value = value; return(result); } static void doSomethingWithKeyboardModifiers(fpl_KeyboardModifierType modifiers) { if (modifiers.value & fpl_KeyboardModifierType_Ctrl) { // ... } } Sure i lost type safety that way, but its better than nothing...
  15. For me enums are just a group of named integers, so i can access it in C++ by Enum::A and in C Enum_A. How i use them, is up to me - maybe i just want flags, maybe i want single states? I dont care. If i want extra hard type safety, i just use enum class - but most of the time i just want grouped flags, so i dont accidently set a keyboard_flag on a init_flag... Thats all i want for safety. Is that so hard for c++? Other languages like c# and even old pascal can do this right. Hmm i know that inline is just a "hint" to the compiler, but this is totally wrong... maybe i need some template magic to get it to compile and behave.