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

zalzane

Members
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

191 Neutral

About zalzane

  • Rank
    Member
  1. I know you've put a lot of thought into your way of avoiding globals, but your editor example is a good example for passing references. At first many may think, I have this model editor and it can only do one model at a time. I've made a model editor and made the same assumption. Sure if that's true, just use a global or singleton rather than a more complex organization just to avoid using globals. But really, will an editor only store ONE model? Maybe this editor allows you to load a character model, but it can also load attachments like weapons. The editor can manipulate the character and the attachments. It seemed like only one model was needed, but after adding more functionality, now you need more than one. So when you open a dialog or tool in the editor, the dialog or tool will need to be passed a reference of what it will manipulate. I'll admit my example really wasn't that great, but inheritance based global access isn't around to replace something like a class full of references.   An infinitely better example would be an static-inheritance class giving access to something like the graphics device. On one of my older projects, the "sprite" class is typically accessed very far down the call stack. From the entrypoint of the program, you have to go through a few layers of gamestate logic, then UI logic, then all the way at the bottom is the sprite class. The sprite class needs access the graphics device, or whatever class is handling the graphics device. Instead of passing down a reference to the graphics device down a dozen layers of call stack, the Sprite class would inherit from a static class that contains the graphics device.   This way, access to the graphics device has to be explicitly defined through the use of inheritance, and any usage of the graphics device can be found by just looking at all the child classes that inherit from it. In addition, it's one less piece of trash floating around the global namespace.   I'll admit it's hacky as hell, but I'd rather have an ugly hack than restructure 10k lines of UI logic.
  2. One of the clever, but more contraversial alternatives I've found for sharing data between classes is to use inheritance/static fields. Let's say you're programming a 3D editor of some sort, and a list of vertexes in your model has to be shared between many classes. The options in this thread include simply passing the list as a parameter, setting up a singleton, or setting up a container class that gets passed at runtime.   With my inheritance method, you set up an abstract class that contains protected static fields for shared information - such as the list of vertexes that has to be shared. Any class that needs access to those vertexes would inherit the abstract class.   This can be extended into a tree of inheritance to allow different child classes to have different read/write permissions on the abstract class' fields, but I would restrain myself from doing this too much at risk of ending up with 3-4 depth inheritance trees.   The most significant issue with this model is that without the proper visualization tools, maintaining code that runs under this system can be very complicated, especially if you have poor docs.  In addition, if someone else was to read your code without knowing what you're doing - it's likely they would get very confused very fast. If you use this system extensively, I suggest writing an addon/macro for your development environment that lets you inspect what kind of inherited fields each class has without actually opening up the abstract class.
  3. Triangle strips are a major pain in the ass, especially when you're programatically generating geometry. Don't use them.   Depending on how you generate the terrain, it may be faster to just generate it each time the game loads rather than loading it from a file. I have a demo that uses opencl to generate terrain, and it can generate terrain an order of magnitude faster than it would take to load said terrain from disk.   For figuring out which triangle the mouse is mousing over, check this out.  http://xbox.create.msdn.com/en-US/education/catalog/sample/picking_triangle   You can basically copypaste their code for it.
  4. You could construct a linked list to represent the planet's mesh.     enum Direction{ Above, Below, Left, Right }; struct Vertex{ float phi; float theta; float r;  float cost; Vertex *neighbors; };   Using this method, the only real effort required is in the initial assembly of the linked list. For pathfinding you would just iterate through the linked list like you would for a normal array.
  5. pretty much anything i've done involving c++ has been riddled with gotchyas, I hope I never have to use that language again
  6. Here's a short list of features that C# has that java doesn't. To be quite frank, C# was really designed to be a 'better' Java, and has succeded in many aspects. http://msdn.microsoft.com/en-us/library/s1ax56ch.aspx - Value types vs. reference types http://msdn.microsoft.com/en-us/library/dd264739.aspx - Named and optional arguments http://msdn.microsoft.com/en-us/library/8627sbea.aspx - Built-in events http://msdn.microsoft.com/en-us/library/bb397687.aspx - Lambda expressions http://msdn.microsoft.com/en-us/library/d5x73970.aspx - Value types allowed as generic parameters; generic constraints http://msdn.microsoft.com/en-us/library/ee207183.aspx - Co/contravariance http://msdn.microsoft.com/en-us/library/ms173171.aspx - Delegates http://msdn.microsoft.com/en-us/library/9fkccyh4.aspx - Methods are not overridable by default http://msdn.microsoft.com/en-us/library/e59b22c5.aspx - Better interop support with unmanaged code http://msdn.microsoft.com/en-us/library/y31yhkeb.aspx - Pointers http://msdn.microsoft.com/en-us/library/x9fsa0sw.aspx - Properties (getters/setters) http://msdn.microsoft.com/en-us/library/8edha89s.aspx - Operator overloading http://msdn.microsoft.com/en-us/library/hh156513.aspx - 'async' methods http://msdn.microsoft.com/en-us/library/ms229005.aspx - More flexible exception throwing* http://msdn.microsoft.com/en-us/library/5cyb68cy.aspx - Ability to allocate memory not managed by the GC http://msdn.microsoft.com/en-us/library/system.io.aspx - Standard IO library that is not complicated and overly verbose ================================================================================ * adding 'throws' to a method in Java requires snowballing changes to all methods that make use of that method, which requires changes to those methods, etc... http://hexus.net/mobile/news/android/38789-google-android-ported-java-c-blazing/ Also, Java being more portable than C# is partially incorrect. Through Mono, you can compile C# code for a huge variety of platforms including Linux, Mac, PS3, and loads more I can't remember. The only problem with C# is that we'll never know if it ends up being a microsoft patent trap.
  7. [quote name='greenthingsjump' timestamp='1349612353' post='4987657'] Thanks! Im new and know I want to get into game programming. I have no Idea where to start. Everyone says C++ Is the way to go... for games. I would was thinking of doing 2d games for now just to get a good understanding of how to develop them. Then later move on to something more advanced. I will be reading in depth on python and lua now. Thanks! [/quote] C++ is the industry standard for games so a lot of people suggest it, but it's a horrible starting point for a beginner looking to make their own games. I back the python recommendation.
  8. Quadtrees tend to be very computationally expensive, and even worse - tend to do lots of heap allocations in loops. I couldn't tell you without looking at your code, but it may be possible that the problem is the garbage collector. If you wanted to stay using c#, you may be able call the GC class and have it clean up after every node is created. It's unusual that the garbage collector would block you that badly unless you were doing LOTS of heap allocations that keep the variables alive for periods of time where the garbage collector can't figure out if it should treat the variables as a short-lifespan object or a long-lifespan object. I suggest you read this article and become more acquainted with the GC. http://msdn.microsoft.com/en-us/library/ms973837.aspx
  9. Everyone in this thread is a naysayer. The first thing you do to create a game engine is to program several games. Take note what kinds of tools and algorithms you reuse in each game, and build a framework off those algorithms. Needless to say, once you've programmed several games, you won't actually be a beginner anymore.
  10. The only people I've ever met who consider C++ to be an adequate solution for creating videogames are people who have never programmed in a language that wasn't C++. The only reason it's still around is because it's what everybody uses, so if you're hiring C++ programmers for a game, you have a lot more choice than if you're hiring haskell or C# programmers.
  11. [quote name='xhh' timestamp='1348224219' post='4982312'] XNA/C#? I've heard bad things about it. I've also heard it's slowly dying. [img]http://public.gamedev.net//public/style_emoticons/default/mellow.png[/img] I also like distributing games as single-file executables or at least very few files. With XNA you have to distribute the XNA Framework. [/quote] You probably heard that from some other thread in the beginner's forum. I would take it with a grain of salt, this isn't necessarily a good place for the kind of business analysis involved in determining whether or not microsoft is going to drop XNA. However, it's extremely unlikely microsoft plans on dropping C# any time soon. They invested far too much money and resources to drop it and go back to C++. Assuming I'm wrong and microsoft drops XNA -and- C#, it would ultimately be irrelevant because of mono and monogame.
  12. Whether or not microsoft condones C#/XNA is irrelevant in the long run thanks to mono/monogame.
  13. I had the same problem as you OP. C++ was my first language, however after using it for quite awhile I would still have issues with what I call "macro code", or code that dictates how larger parts of a program interact. For me that encapsulated how classes should interact with each other, inheritance, doing #includes correctly, and a few other tidbits. Unfortunately I have never found a text that really teaches how to create good macro code. Here's how I dealt with it and maybe it will help you out. Eventually what happened is I started programming in another OOP language, C#. For C#, OOP is very much more set in stone, and after programming a medium sized project with it, I learned more about OOP than I had learned in almost a year and a half with C++. However this didn't solve my issues with learning how to prevent #include circles, I eventually said 'screw it' and switched over to C# completely. To this day I've never had to tolerate C++'s god-awful translation unit system since then. [spoiler]I promise I dont work for microsoft[/spoiler]
  14. [quote name='Olof Hedman' timestamp='1335894725' post='4936471'] Are successful big game companies really that sloppy in how they hire? [/quote] Big video game companies suffer the same issues as normal companies. There are HR people who have no idea what they're doing. There's a few who do. I would expect the HR guy at Valve or Dice for example to know their shit a lot better than an HR guy at EA or Activision. I'm not saying that every video game HR rep is an idiot, but based on my experience with HR people who hire for any kind of technical job, many of them don't actually know what they're looking for in a new hire other than making sure they fit the job description. Your results may vary.
  15. I believe this may be a scenario where it would be a good idea to assist with pathing speeds through caching. I assume you're making some kind of adventure game with towns and roads and such. When the world is generated you might be able to cache the roads and the locations where they lead to and kinda "add them" into your current pathfinding solution. For a case in which something is pathing from one side of the map to another, I imagine this would cut down the path generation time by a few orders of magnitude, in addition to having it so npcs actually use roads.