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

kanato

Members
  • Content count

    350
  • Joined

  • Last visited

Community Reputation

568 Good

About kanato

  • Rank
    Member
  1. You should be responding to mouse move events instead of using a timer. There's simply no way to track the mouse over every single pixel it crosses when it's moving at high speed, so you need to just keep track of the last point you drew at, and when you get a new mouse position event, draw a line to connect the two points.
  2. Is your code optimized? Make sure the optimize code check box is unchecked in your project properties, or that you are using the debug configuration and try it again. The other time I can think of when this can happen is if the code is stopped inside a call to a native function. If that's the case, do "Step out" once to get the current instruction back inside managed code.
  3. You can't "really" multiply a quaternion by a vector. But quaternions are used to represent rotation matrices and you can multiply a matrix by a vector. Multiplying a quaternion by a vector like that is an abuse of operator overloading, IMO. I would say try using Matrix.CreateFromQuaternion(quaternion) * myvector to do the multiplication. Oh, and you can't do *this in C#...
  4. In your finalizer, you should store the handle ID in an external list and then check that list periodically and release the buffers in that list. Or if you want to throw an exception for an unreleased resource, you should do it there instead of the finalizer thread.
  5. probably something like List<string> data = new List<string>(); data.AddRange(from someString in myList select someString where IsValidData(someString )); and then write the function IsValidData to do your data validation.
  6. Call methodInfo.MakeGenericMethod: http://msdn.microsoft.com/en-us/library/system.reflection.methodinfo.makegenericmethod.aspx
  7. AFAIK, the only way to release a loaded assembly is to load it into a separate AppDomain at the beginning, and then unload the AppDomain.
  8. Would it be preferred to use CultureInfo.InvariantCulture instead of CultureInfo.GetCultureInfo("en-us")?
  9. Ah, yes. You can write your own Invoke and BeginInvoke methods to handle this sort of thing. A general way to do that sort of thing would be like this: class DebuggerThreadInterface { Thread myThread; List<MethodToInvoke> methods = new List<MethodToInvoke>(); class MethodToInvoke { public Delegate Method; public object[] Args; } // Check to see if the method being called is on the correct thread public bool InvokeRequired { get { return Thread.CurrentThread != myThread; } } public void BeginInvoke(Delegate method, params object[] args) { lock(methods) { methods.Add( new MethodToInvoke { Method = method, Args = args } ); } } public void Invoke(Delegate method, params object[] args) { MethodToInvoke x = new MethodToInvoke { Method = method, Args = args } ); lock(methods) { methods.Add(x); } bool executed = false; while (!executed) { Thread.Sleep(10); lock(methods) { executed = !methods.Contains(x); } } } void ThreadMain() { while(shouldRunThread) { ExecuteMethods(); // do important stuff, and maybe call Thread.Sleep } } void ExecuteMethods() { lock(methods) { while (methods.Count > 0) { methods[0].Method.DynamicInvoke(args) methods.RemoveAt(0); } } } } This assumes the MTA thread is run on the DebuggerThreadInterface.ThreadMain method, and that method runs in a loop that maybe checks stuff, sleeps when it needs to, so that it can check to see if methods have been added to the invoke list. Depending on your needs, you may benefit from an approach which is more tailored to your problem domain. (Note: I wrote the above code off the top of my head and it's untested, and may not be the best thread handling code avaialble. Use at own risk :)
  10. What makes you think it runs in STA? Are you setting the apartment state before calling Start on it? Have you checked GetApartmentState on the thread after starting it? You might check Thread.CurrentThread.GetApartmentState in the method that fails to make sure it's running on the thread you think it is.
  11. Create a separate thread to run your debugging commands on, and call SetApartmentState on it to change it to MTA. If you want to run GUI commands on that thread, you must use the Invoke or BeginInvoke methods on your WinForms objects.
  12. When you call GL.GenTextures, you get an integer that you store in the variable target. You need to store that and use it in your call to GL.BindTexture when drawing with the texture.
  13. Because a cast throws an exception if the object being cast is not of the desired type. You want to either use the "is" operator first to see if a cast will be valid, or use the "as" operator to do the cast and check for null afterwords. DialogueTreeNode node = e.Node as DialogueTreeNode); if(node != null) { activatesQuestComboBox.SelectedIndex = node._activatesQuestID; } // or: if(node is DialogueTreeNode) { DialogueTreeNode node = (DialogueTreeNode)e.Node; activatesQuestComboBox.SelectedIndex = node._activatesQuestID; }
  14. Yeah, I don't like it either. It isn't too bad usually, because the field will be private and only visible within that class so the "damage" from breaking the convention is mitigated. I prefer to use the convention of prefixing member fields with 'm' and static fields with 's'. You don't _have_ to follow the convention on this unless your employer says otherwise.
  15. There's no download link on the page.