3 Replies - 2940 Views - Last Post: 23 August 2012 - 06:14 PM Rate Topic: -----

#1 yamiks   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-August 12

Game development w/ c# and DirectX

Posted 06 August 2012 - 07:22 AM

So long story short im not a advanced programmer, but i hope to train and get experience to make my own, playable game.
So far i have gone to some lessons and learned somethings about DirectX.
what i wnat to know now is how to read MESH verticies(like i want to make fps and so far i have equasion for colision and i want to make like simple map or platform i can walk on but to walk on map i need to read verticies of hitboxes or 3d model map)
and so : how do you determine if you are colliding w/ hitboxes or 3d model (that is basicly hitbox)?
OR how do yoy read MEHS verticies?

Is This A Good Question/Topic? 0
  • +

Replies To: Game development w/ c# and DirectX

#2 modi123_1   User is online

  • Suitor #2
  • member icon

Reputation: 14097
  • View blog
  • Posts: 56,501
  • Joined: 12-June 08

Re: Game development w/ c# and DirectX

Posted 06 August 2012 - 07:23 AM

Moving to the 'game development' group.
Was This Post Helpful? 0
  • +
  • -

#3 BBeck   User is offline

  • Here to help.
  • member icon

Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: Game development w/ c# and DirectX

Posted 06 August 2012 - 11:22 AM

I'm going to suggest that you forget about DirectX, since you mentioned that you're doing C#. Instead, I recommend using XNA with C#. XNA is Microsoft's game development platform for C#. It's a free download for C# from Microsoft. It does basically what DirectX does, but is easier and is designed specifically to be used with C#.

I have an XNA tutorial here:


It covers the most basic parts of some of the things you are wanting to do, such as walking across the ground and making walls and other objects solid through collision detection.

You should also go through Riemer's tutorials:


This post has been edited by BBeck: 06 August 2012 - 11:23 AM

Was This Post Helpful? 0
  • +
  • -

#4 Mina-no-Hime   User is offline

  • D.I.C Head

Reputation: 98
  • View blog
  • Posts: 176
  • Joined: 23-August 12

Re: Game development w/ c# and DirectX

Posted 23 August 2012 - 06:14 PM

I second BBeck's suggestion to use XNA. But if you're still set on DirectX, you can look at SharpDX (http://sharpdx.org/). If you're using Managed DirectX, that's no longer a supported API and will really give you little of any value.

Reading vertices from a mesh file will be a different task depending on what format the file is in. XNA comes with built-in importers for many file types (FBX being the most well-implemented the last time I'd used it), and there are many more samples out there for other file types. I suggest looking at these to get an understanding of what is necessary to load these files. First, make sure you're comfortable with File I/O, and then look at some file format documents across the Internet. COLLADA is an XML-based format, and should probably be relatively easy to implement.

Collision detection is a whole other beast, and even XNA leaves most of that work to you. For specifically determining which is a hitbox and which is the display mesh, it's a simple matter of which mesh data you're checking against. For actually performing the collision calculations, your best bet is to start with a 3D physics library. For XNA, I suggest Henge3D for 3D collision detection as it's compatible with both Windows and XBox builds. http://henge3d.codeplex.com/

If you have no experience with 3D programming, you're going to find it a challenge to write a first-person shooter. My suggestion is to take some time and learn the basics of 3D math. It may help you realize your vision to start with a game engine such as Unity (Unity allows you to program projects in C# - http://www.unity3d.com/) for the purpose of developing the system. If you use Unity, you can start to implement things manually as you learn them - for example, by programming your own version of the FirstPersonController component provided within the engine.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1