As I've just managed to upload my first Windows Store release of a previous play Win32 game I thought why not document my way there.
The game itself, HitBlock Deluxe has grown over the years and I think it's quite a neat game. Luckily I a few years ago I had the idea to allow user created stages to be uploaded and shared. Those user shared levels are now over 1000 single stages!
As I've checked out the Universal Windows Platform (UWP) I noticed it should be doable to port the game. The code is C++ with interfaces for various DirectX objects. So this led me to the decision, should be doable.
I set up a new blank project and began adding the game files. First thing to notice: Actually quite a lof of the Win32 ecosystem is there, but also a few APIs are missing. In most cases changing calls to their xxxEx counterpart solved the problem. One of the bigger problems was CreateThread not being available. Fortunately a async .NET API was available, which albeit horribly clunky with CLR, worked after introducing a few ugly static wrappers to interface with pure C++ code.
So in the end almost the same code runs on C++/Win32 and C++/CLR/UWP. Yay!
More to come about the store upload...
If you want to take a peek, the game is available in the store as HitBlock Deluxe.
I still have no idea if the game generally works for everyone, so if you try and it fails somehow, please let me know!
↧