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

MrMark

Members
  • Content count

    128
  • Joined

  • Last visited

Community Reputation

196 Neutral

About MrMark

  • Rank
    Member
  1. Hi guys I'm looking to buy a good, theory heavy, reference book on the fundamentals of computer graphics and the common algorithms used in 2D and 3D graphics programming. Any recommendations really appreciated.
  2. [quote name='SiCrane' timestamp='1338901877' post='4946436'] If I understand your question, start with [tt]delta = target - current[/tt]. If you want a clockwise rotation, and delta is negative add 360 degrees to delta. If you want a counterclockwise rotation and delta is positive subtract 360 degrees. [/quote] It works XD, Thanks for your help.
  3. Hi guys I've been spending an embarrassing amount of time on a fairly simple problem. In my 2D world each entity has an orientation (theta) which represents the direction it is facing. Given its current orientation and a target orientation, I want to find out: The change in theta required to achieve the target orientation, rotating clockwise. The change in theta required to acheive the target orientation, rotating counter clockwise. the closest I got was abs(current - target) for clockwise rotations, and -abs(current - target), for counter clockwise rotations. But that falls apart when you go past 0. This should be simple, but i can't seem to work it out. Please help
  4. Thanks for an awesomely detailed post haegarr. I was able to follow the maths (which is rare =P). Quick question, why are scene graphs deprecated ?
  5. Hi all I'm getting myself confused with rotations in 2D when rotating about a point about another point. I'm using a simple tree as my scene graph. Each node knows its position relative to its parent, and there is a root node that is the ancestor of all nodes. So when I move a node all of its children move with it. Rotations of a node about its parent are simple. But how do I rotate a node about another node ? What I could find on the internet talks about translating the origin to the node being rotated around, rotating it, then translating back. So based on that, I came up with: [list] [*]From the node to be rotated walk up the tree to the root node building a translation matrix (1) [*]From the origin node walk up the tree to the root node building a translation matrix (2) [*]inverse the origin node's translation (2) matrix [*]Form the origin translation matrix by multiplying matrix (1) by matrix (2), forming matrix (3) [*]Multiply the node to be rotated by matrix (3). It's now a vector relative to the rotation origin [*]apply rotation matrix [*]multiply the node by the inverse of matrix (3), its now a vector relative to its parent again. [/list] But that seems somewhat over complicated, which makes me think I'm either doing it wrong, or have found a convoluted way of doing something simple. Any help greatly appreciated.
  6. Personally I'd stick with the language you know Java and learn how to program games without getting tripped up by all of C++'s gotchas. A 5 second google came up with [url="http://jmonkeyengine.com/"]http://jmonkeyengine.com/[/url] which looks like a fairly full featured game engine. Good C++ code might be faster, but great art makes a game look good; without an AAA budget for an army of artists the speed benefits of C++ become academic. Another option is learning the scripting language built into a game engine. Like the unreal engine: [url="http://www.udk.com/"]http://www.udk.com/[/url]
  7. Hi guys Working on a game engine in 2d C# and currently working on the animation and entity classes. An entity has a set of animations can play and I'm tossing up between using enums or using strings as the key, ie Entity player = new Entity(); e.play("playerWalk") vs Entity player = new Entity(); e.play(playeranimations.walk); the latter would ensure at compile time that the call to play always contains a valid animation, while the former is far simpler to implement. Using the later, each different entity type would need its own enum, but that's not too bad as I can easily parse my sprite's xml metadata and add a bit of code generation as a pre compile step. I'm leaning towards the enum approach as it would eliminate one potential source of fauilts at run-time, but I feel like i'm abusing the concept of an enum, so other peoples opinions would be welcome. Here's my code if it helps visualise things Entity class: [code] public class Entity { private Dictionary<int, Animation> AnimationSet; public Enum Animations; public Entity(Enum animations) { AnimationSet = new Dictionary<int,Animation>(); Animations = animations; } public void AddAnimation(Enum id, Animation a ) { if (id.GetType() == Animations.GetType()) { int idint = Convert.ToInt32(id); AnimationSet.Add(idint, a); } else { throw new ArgumentException(String.Format("Incorrect Enum used, this entity uses '{0}' but passed in ' {1}'", Animations.GetType(), id.GetType())); } }[/code] Here's my unit tests - Shows the class in practice. [code] [Test] public void EntityConstruct() { Entity myPC = new Entity(new PlayerAnimations()); myPC.AddAnimation(PlayerAnimations.die, new Animation("afd", null, 1, 1, 1, 1, 1, 1, 1)); } [Test] public void EntityConstructFail() { Entity myPC = new Entity(new PlayerAnimations()); Assert.Throws(typeof(ArgumentException), delegate() { myPC.AddAnimation(TankAnimations.die, new Animation("afd", null, 1, 1, 1, 1, 1, 1, 1)); }); } enum PlayerAnimations { walk, run, die } // auto generated enum TankAnimations { roll, shoot, die } // auto generated[/code]
  8. Thanks for your reply The server needs to spinup each game instance as required. When players first connect they are given a list of games to pick from, they select one and if there isn't a game already waiting for players the server creates a new instance of that game and adds that player to it. When a second player comes along that also wants to play that game he is added the existing game instance, and the game begins. The game instances don't know or care they are on a server, all they need to do is respond to events such piece X to position Y, ensuring the rules of the game are followed. If each game instance was its own server, each instance would need its own port and have much more overhead. Hope that makes more sense.
  9. Hi guys I'm writing a multi-player server for web based flash games. Each game instance has 2-4 players, and each instance is completely independent of other instances. Different game types (ie chess and poker) can be run on the same server. Server uses a worker thread pool that uses application instances for locking; ie only one worker thread may access an instance at a time. In one project I have the server code that handles networking, scheduling, all the common low level stuff a game instance needs. It provides an abstract Application class that provides the interface* to the low level stuff that I want each different game type to inherent. *declared abstract application, not interface application as I wanted to put in some utility functions in there. This works fine if each game lives in the same project as the server, but when I tried to refactor a game out into its own separate project I run into circular dependencies, since: Server needs to be able to construct instances of a particular game type. Each game type needs to be able to inherent Application. I've been doing some googling, and it seems the 'standard' solution involves creating a third project that has an interface that both projects use...but that seems kinda hacky to me...is that really the best way to do what I'm trying to do ? Like if this was C++ I'd just make each game instance a static lib and link it in. Inversion of Control also comes up alot, but it seems very overcomplicated for what I'm trying to do. I don't need to be able to swap out server implementations, I just want each different game to live in its own project. Thanks for any help, Hope I gave enough detail.
  10. Quote:Original post by ernow #include in C++ is merely using the same header file in several projects To do the same in C# you place the file in one project and add the file to the other project by clicking the down-arrow on the Add button in the Add existing item dialog and choosing Link... That said: you might pick one of the two routes when using Silverlight and a (WCF?) service: 1. Perhaps Silverlight RIA Services might do this job for you or 2. Put the POCOs in a separate dll and refer to the dll in both projects An other consideration: if you are sharing a lot of code across client and service your design might be wrong... Thanks, adding as a link worked. You're right about code reuse being a sign of things going wrong. But in this case I'm sharing things my custom network protocol class (takes in raw data off the line and generates the proper internal messages), which needs to be in both projects.
  11. I'm developing a server that talks to a Silverlight client written in C#. The server and the client are separate projects, but I want to be able to share code between them. I've created a shared project, put all 3 projects in the same namespace, and added a reference to shared in both the client and server projects. But if I move a bunch of classes that were originally in the server project and try to access them in the server project it complains about 'ClassX is inaccessible due to its protection level'. Now I can resolve this by making ClassX a public class, but that means I have to expose all of its internals, which isnt something i want to do. Shared itself compiles fine, and if I place all those files back into the server project everything compiles and runs fine. I'm trying to achieve the same effect as #include in C++, and as all classes are in the same namespace I don't see why this isn't working. Am I approaching this the wrong way ? All I'm trying to do is make a bunch of utility classes accessible between two projects without copy and pasting them.
  12. Okay thanks, I skipped over that bit as i wasn't interested in addition. So it looks like its a odd design feature of .net maybe to subtly push you towards using int to avoid over/underflow bugs. But it still doesn't make sense for bitwise or. byte | byte is always going to be another byte. So why would the | operator return a int ??? or to put it another way: int operator | (byte a, byte b) {...} vs byte operator | (byte a, byte b) {...} Anyone know why its way it is ? It's not a biggy, but it's odd and annoying.
  13. Hey guys I'm confused as to whats going on here. Byte a = 1; Byte b = 2; a = a | b; // compiler error, Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?) adding a type cast fixes it fine: a = (byte)(a | b); However in the documentation: "There is a predefined implicit conversion from byte to short, ushort, int, uint, long, ulong, float, double, or decimal." So it should be doing the type cast automagically. BUT the bigger question is why would bitwise OR between two bytes return anything other than a byte ???
  14. I'm in the process of adding exception handlers to my existing codebase. When I mouseover the names of function calls it tells me the names of any exceptions that may arise, but doing that gets annoying after a while. Is there a way to tell the compiler to warn me about unhanded exceptions, or should I just be wrapping whole methods in try/catch blocks and deal with things that way. Using visual studio 2010 & .net 4
  15. We are sliding off topic, but what the hey. One thing I've always been curious about is the push to make only software, not hardware 'free and open source'. Why not hardware too ? You could build your own computer completely from scratch, optimize it for the task at hand, and learn how your system operates right down to the circuity - hardware raid controllers are far superior to software raid.