Metro app with 2D graphics in C #

I made some views and I cannot find a good way to write a 2D tile / sprite based on a C # game for Win8. According to the MSDN documentation:

You can use managed code languages ​​such as C # and Visual Basic to develop 2D (and lightweight 3D) games.

The problem is that I cannot figure out how to do this. The reason I would like to use C # is because I already have a lot of code written for Windows Phone that I would like to reuse.

Can someone tell me how I will write a fairly effective 2D tiled / sprite game MetroUI for Win8? The only thing I can find is to use C ++ and DirectX.

[EDIT]

To clarify, I don't care what I use (WinRT, DirectX ...) while I can send to the application store and write my code in C #.

+4
source share
5 answers

If you are familiar with the DirectX API, you can use SharpDX, available through http://sharpdx.org . It mainly provides the DirectX API in C #. As far as I understand, if you are going to download applications to the store, SharpDX should be in order and meet the requirements, but I would look into it further before going too deep.

In addition, not all functions are currently available (for example, Direct2d is not fully certified for Win8 Metro).

+3
source

If your game uses simple graphics, you can use the Rice library for a modern user interface , it provides the GDI + interface that will be used in XAML / C # / VB.NET Windows 8 Modern user interfaces, it works by drawing on XAML canvas.

0
source

If you are looking for something quick and easy, check out the XAML Physical Assistant project;

http://physicshelperxaml.codeplex.com/

It is based on the farseer engine and comes with sample applications. There are several games already released with it.

http://www.andybeaulieu.com/Home/tabid/67/EntryID/223/Default.aspx

0
source

See: [Example XAML Images] ( http://code.msdn.microsoft.com/windowsapps/0f5d56ae-5e57-48e1-9cd9-993115b027b9/sourcecode?fileId=102748&pathId=677969581 )

The page and samples provide some code for processing NineGrid and WriteableBitmap Image.

0
source

Now you can use Win2D (open source, released by Microsoft for Metro / WinRT applications), which provides hardware acceleration of 2D rendering.

0
source

Source: https://habr.com/ru/post/1397945/


All Articles