From XNA to DirectX/DirectXTK, a Bizzy Bee conversion series

Sign in to queue

Description

Tess Ferrandez, If broken it is, fix it you should, just posted a great series where she, an admitted C# Dev playing in C++, converts her Windows Phone 7 based Bizzy Bee app, Bizzy Bees - A XNA for Windows Phone 7 game building walkthrough, from XNA to C++, DirectX/DirectXTK.

Bizzy Bees XNA to DirectX/DirectXTK

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.

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

image

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.

As Tess says, each post in the series is nicely digestable and easy to follow...

Here’s a few more links you might find interesting:



The Discussion

  • User profile image
    Jules

    So we are all rather sad that Microsoft gave up on XNA and managed C# game development. I tried to work through this example, but DirectX and C++ programming just puts me off, and drains all my energy.

    Which is why I use MonoGame to convert all my XNA games into Windows Store and Windows Phone 8 Games. Also with the Xamarin licence I have ported my games into Android. I just love C#.

  • User profile image
    Mark

    Really useful tutorial...Thanks

Add Your 2 Cents