Sign in to follow this  

C# and Direct x

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am new to game programming and would like if somebody could point me in the right direction to making a 2d game using direct X. Example code using direct x in C# would be great. I am trying to do a space invaders game. ie. scrolling screen and blowing everything up that comes in your way.

Share this post


Link to post
Share on other sites
Hey there, pmaguire!

There's two ways to approach the problem of making a 2D game: either use DirectDraw or simulate 2D using Direct3D. The second route will make things generally "nicer" (ie. lighting effects), but will be a bigger pain to wrap into a 2D engine. I recommend using managed DirectDraw.

The resources aren't too numerous on this topic, but these should get you well on your way if you've got some experience with 2D programming already:

-> The examples included with the MDX9 SDK (no brainer :P)
-> (http://www.kuhnstall.de/tutorials.html) Guides you through writing a nice little breakout game
-> (http://www.thecodeproject.com/cs/media/mdx_tutorial1.asp) Another one for getting started with DirectDraw (with another installment I believe elsewhere on TheCodeProject)

It's a toughy getting started with little resources, I know, but keep at it and you'll get something shiny going! :)

Share this post


Link to post
Share on other sites
Hi pmaguire,
As HopeDagger said you either use DirectDraw or Direct3D, they has their own pros and cons. But I suggest you to use Direct3D so that you can also explore 3D abilites of managed directx and use them in your 2D game. For examples you can also check below link

http://www.c-sharpcorner.com/Games.asp

Good Luck...

Share this post


Link to post
Share on other sites
Try These

<<http://pluralsight.com/wiki/default.aspx/Craig.DirectX.HomePage>>
<<http://www.c-sharp.co.uk/>>
<<http://members.gamedev.net/managedworld/home.html>>
<<http://www.drunkenhyena.com/>>
<<http://triplebuffer.devmaster.net/>>

Share this post


Link to post
Share on other sites

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this