다음을 통해 공유


Bizzy Bees XNA to DirectX/DirectXTK – Introduction

Since I am done holding my breath waiting for XNA to make a return I have decided to start developing 2D games in DirectX instead. To get things started I sat down with my friend Johan Lindfors at Coderox to port my XNA walkthrough and in this series will basically be a direct copy of that walkthrough but using DirectX/DirectTK instead of XNA.  The game we are going to implement is a subset of my game BizzyBees which you can download and play for Windows Phone for free.  It’s also available for Windows 8 written in javascript.

imageBizzy Bees is super simple.  It is raining flowers, and the task at hand is to match up same colored flowers with same colored bees to remove them before the flowers reach the bottom of the screen.  Rainbow flowers can be matched with all bees and if you match a rainbow flower you score a point.

I’ve divided the walkthrough into 8 small articles to make the information a bit more digestable

1. Setting up the base project with DirectX and DirectTK
2. Creating the game assets (sprites and fonts)
3. Drawing the scene – Background/Foreground/HUD
4. Adding flowers
5. Making things move
6. Adding bees
7. User Interaction
8. Tidying up and adding finishing touches

 

 

If you want to follow along, you can download DirectXTK (DirectX ToolKit) from codeplex. DirectXTK is a toolkit that sits on top of DirectX enabling you to use XNA like constructs like the SpriteBatch, SpriteFont etc. making the transition from XNA to DirectX fairly easy and it comes directly from some of the guys that made XNA so it’s good stuff:)

Disclaimer: I am not really a C++ developer since I work mainly in C# so keep that in mind when you look at the code since there might be better ways to do things.  I welcome any and all comments that could make things better.

Comments

  • Anonymous
    August 13, 2014
    Anything but Unity3d, thank you! PS: why not MonoGame. PPS: every vote helps: visualstudio.uservoice.com/.../3725445-xna-5

  • Anonymous
    August 14, 2014
    Hi Den, I've tried MonoGame and it's great but I had some issues with Touch on Windows Phone so I decided to go closer to the metal:)  and yepp, I have voted:)