• 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

277 Neutral

About SnprBoB86

  • Rank
  1. Extension methods have always needed to be defined in a static class like your SpriteManager class, but they are typically given an "Extensions" suffix on the name of the class to be extended. For example: "SpriteBatchExtensions" Nick just forgot to point out the static class bit in his tutorial, you should post a comment to him and let him know. Also, I don't agree with Nick that this is appropriate use of extension methods. Instead, I would declare Sprite.Draw with the signature `public void Draw(SpriteBatch batch)` to be used as `someSprite.Draw(spriteBatch)`. Why? Because it's simpler and extension methods don't really buy you anything here. Extension methods are really as syntactical sugar. They are useful for saving typing when you have helper methods that can be identified by the target object and method name (2 things) rather than a namespace (well, a static class name), target object, and method name (3 things). "user@microsoft.com".IsValidEmailAddress() vs EmailAddressHelpers.IsValid("user@microsoft.com") In the Sprite case, you have: spriteBatch.Draw(sprite) vs sprite.Draw(spriteBatch) Why bother with the extension method? It just confuses things! That said, Nick isn't necessarily wrong to suggest the use of extension methods here. It's just not the call I would have made :-)
  2. Quote:Original post by Koobazaur at least when I had ** ppSomething I knew exactly what was going on instead of having to wonder what is referencing what (not to mention extra flexibility). And wtf is up with the lack of template, errr, generic specialization? Seriously... You have nearly the exact same flexibility in C# and you can know "exactly what is going on" with great certainty once you learn the .NET model just as you learned the C++ model. C# can accomplish non-partial generics specialization through inheritance. For example: class SpecializedForBar : Foo<Bar> { //override virtual members of Foo }
  3. public Renderer(ref Bitmap DrawArea, ref cEntityManager EntityManager, ref cTimer Timer) { _DrawArea = DrawArea; //this doesn't do what I want _rEntityManager = EntityManager; _rTimer = Timer; } No, this is incorrect usage of "ref". You are not changing DrawArea, EntityManager, or Timer. Remove the ref keyword from all three and you will find that the code behaves 100% identically. Examine this test code: using System; using System.Collections.Generic; class UsingRef { static void AddTwo(int y) { y += 2; } static void AddTwo(ref int y) { y += 2; } static void AppendTwo(List<int> b) { b.Add(2); b = null; } static void AppendTwo(ref List<int> b) { b.Add(2); b = null; } public static void Main() { int x = 5; List<int> a = new List<int>(); AddTwo(x); Console.WriteLine(x); AddTwo(ref x); Console.WriteLine(x); AppendTwo(a); Console.WriteLine(a == null ? "null" : a.Count.ToString()); AppendTwo(ref a); Console.WriteLine(a == null ? "null" : a.Count.ToString()); Console.ReadLine(); } } Additionally, a nitpicky comment: your capitalization and naming conventions do not match the standard guidelines. Google-up the .net guidelines.
  4. Quote:really dislike the C#'s referencing model ><) That's because you are doing it incorrectly. You do not need any of those "ref" keywords that you included. http://forums.xna.com/thread/40480.aspx http://msdn2.microsoft.com/en-us/library/14akc2c7(VS.80).aspx In short: "ref" means to pass the VARIABLE by reference, not the object it points to. All reference types are, automatically, passed by reference. This means that returning a value is also automatically by reference!
  5. accidental double post
  6. Quote:Original post by LordShade If this situation occurs, it usually marks the time to re-examine your class structure. There are plenty of good reasons, not the least of which is containment with back-references. That is, some class A which has a list of B and each B only has one A, so you should be able to also navigate from the B back to A.
  7. You should try re-posting this question over at creators.xna.com XNA Framework and Game Studio Devs hang out there and provide a lot of official answers!
  8. Um, what would it mean to convert an "Example" into a bool? If you mean is not null like pointers in C, you can easily do: Example e = ...; if (e == null) or... if (e != null) otherwise, just define a function much like the ToString() if it makes sense to do so: class Example { ... public bool ToBool() { ... } }
  9. Curious: Unless you are planning to target Mono, why not use XNA?
  10. Check out http://www.xnaracinggame.com/ Is that serious enough for you? XNA Racing Game runs silky smooth on the Xbox 360 despite being somewhat unoptimized and utilizing only a single thread (XNA allows you to use up to 4 of the 6 hardware threads from the 360's 3 cores). Professionals and hobbyists alike are discovering the magic of XNA. Hobbyists are producing amazing results with limited experience and professionals are building prototypes and casual games in a fraction of the time and at a fraction of the cost of using C++. Jump in: http://creators.xna.com
  11. I might be wrong (never tried it) but I think you can declare and use a byte4
  12. new Vector2(210f,100f}, Should be: new Vector2(210f,100f), Notice the closing } should be a ) What other errors are you getting?
  13. Vector2[] block = new Vector2[] { new Vector2(200f,100f), new Vector2(210f,100f}, new Vector2(210f,110f), new Vector2(210f,120f) }; The whitespace isn't important.
  14. Oh, and there is a 1.1 release of XNA coming out very shortly which has many more math functions as well as font support. More information here: http://blogs.msdn.com/xna/archive/2007/03/08/announcing-the-xna-game-studio-express-update.aspx
  15. Use the XNA Framework! It obsoletes MDX2 (and indeed, it was born of the same code base)