ANX on Windows 8

May 8, 2012 at 9:11 AM

As many of you know XNA will be gone in Windows 8.
I would love to be able to port my C#, XNA games from WP7 to W8.

Did anyone work on trying to port a game to Windows 8?

Would ANX be able to help with a simple 2D game using only spriteBatch?

 

Since this is my first post Its a bit rude to kick off with questions...

I would like to give credit to the developers of ANX. The idea is amazing.
Is the project still alive? Is ANX beeing activly developed?

You should open a donation section...

 

Thanks!

May 8, 2012 at 4:27 PM

It would definitely be possible to port a WP7 game to W8 with ANX.  I'm not sure how much of the Metro stuff ANX handles for you, but you can definitely use ANX to keep most of your XNA code intact.

As for it being actively developed...I have no idea.  I asked a question a month ago and got no answers, and the Source Code section hasn't really been updated.

Coordinator
May 16, 2012 at 6:44 AM

Currently I'm working for some weeks on this topic. It is highly experimental code so I didn't released it yet.

The plan is, that you will be able to create games for Windows 8 metro style "the xna way" with ANX.

Jun 21, 2012 at 7:18 PM

Any updates on this project especially regarding this topic? It seems like DirectXTK ( http://directxtk.codeplex.com/ ) features some approaches that may be useful to the ANX Framework.

Jun 26, 2012 at 4:11 PM

I am also eagerly watching the progress of this project. I am hoping to use it to combine 3D elements with XAML elements in Metro applications. Is there any chance for release around the same time as Win 8?

Coordinator
Aug 10, 2012 at 10:15 AM

@Dilli: I made a SpriteBatch of my own before DirectXTK was released. The approach is similar. Thanks for the advice.

@Josh: Astor commited some WPF stuff some days ago and he's working on the win8 version. I hope to receive a full version of Win8 with my Technet subscription in the next couple of days (maybe 15th August), After installing this on my machine I will continue the work on the win8/metro RenderSystem and support Astor with his efforts.

Aug 13, 2012 at 2:08 PM

As a short update on this topic, I got a first XNA-Game to work which only clears the background with a color.

This test-app also passes the Metro-App Certification Validation test!

So we're making great progress and hopefully we get some spritebatch fun working in the following days. :)

Sep 6, 2012 at 12:12 AM

I'm interested in learning how to use ANX in a C#/XAML app, can we hope to see some tutorials or some form of guidance for getting started?

Anywhere I can hang out (IRC?) to tune in for more up progress?  What should I be reading in the meantime?

 

This looks pretty promising!

Developer
Sep 7, 2012 at 8:33 AM
Edited Sep 7, 2012 at 8:35 AM

If I understand you correctly the WpfEditor sample might be a good starting point for you. 

To get you started you can read the XNA documentation on MSDN, as ANX is source compatible you will be able to use nearly evrything from it.

If you capable of understanding German you can have a look at the indidev forum where some discussion about ANX are hosted.

Best regards

floAr

Sep 13, 2012 at 12:34 AM
Edited Sep 13, 2012 at 12:41 AM
COmega wrote:

I'm interested in learning how to use ANX in a C#/XAML app, can we hope to see some tutorials or some form of guidance for getting started?

Anywhere I can hang out (IRC?) to tune in for more up progress?  What should I be reading in the meantime?

 

This looks pretty promising!

I know it is not quite the same, but I have been working on a control library and GUI Editor in XNA.  Instead of using XAML to hold the controls properties, I instead use XML.  I believe I am getting much the same effect.  One thing I like about XML is that it is pretty well universal.  Here is a small XML document showing the properties of a Screen.  I simply used class properties and XmlSerializer, then wrote my code where the controls draw and update based on the property values stored in the XML document.

 

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfScreen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Screen Name="Screen0">
    <Buttons />
    <CheckBoxes />
    <Forms />
    <Labels />
    <MenuStrips />
    <Panels />
    <RadioButtonGroups />
    <TextBoxes />
    <ToolBars />
    <Text>Screen0</Text>
    <Location>
      <X>0</X>
      <Y>0</Y>
    </Location>
    <Size>
      <Width>800</Width>
      <Height>600</Height>
    </Size>
    <BackColor>
      <R>255</R>
      <G>255</G>
      <B>255</B>
      <A>255</A>
      <PackedValue>4294967295</PackedValue>
    </BackColor>
    <ForeColor>
      <R>0</R>
      <G>0</G>
      <B>0</B>
      <A>255</A>
      <PackedValue>4278190080</PackedValue>
    </ForeColor>
    <TabCount>0</TabCount>
    <CurrentTabIndex>1</CurrentTabIndex>
    <Enabled>true</Enabled>
    <Visible>true</Visible>
  </Screen>
</ArrayOfScreen>
Sep 13, 2012 at 4:05 AM
Edited Sep 13, 2012 at 4:14 AM

Here is an article I found about setting up XNA in VS2012.  Basically they suggest skipping the installation of XNA Game Studio altogether and building the solution from scratch.  That solution would mean working around the content pipeline (at least to some extent), but if I understand it correctly, the ANX developers are already looking at alternate solutions to that.

http://www.c-sharpcorner.com/UploadFile/iersoy/developing-xna-apps-in-visual-studio-2012without-xna-gs/

Sep 17, 2012 at 6:43 PM

@AstrorEnales You mentioned you got a skeleton Windows 8 app running with ANX. Any chance you could share that code?

 

Sep 18, 2012 at 3:49 AM
Engicoder wrote:

@AstrorEnales You mentioned you got a skeleton Windows 8 app running with ANX. Any chance you could share that code?

I was able to get a skeletal app running with XNA, but not with ANX.  I know they are working on a XNA to ANX converter which is supposed to be released with version 0.44, but that isn't out as of yet.  For the XNA app, I mostly followed the tutorial attached to the link on my last post.  If you want my code on that, I can post that if you want.

Just so you know, the content pipeline doesn't seem to work, so you will have to work around it.  What I had to do to load a Texture2D/image was to copy it into x86\Debug, then used FileStream to load it in.

FileStream stream = File.OpenRead("Generic.png");
genericBG = Texture2D.FromStream(GraphicsDevice, stream);

I wasn't able to figure out how to load fonts in.  One possibility that I ran accross is to use Nuclex.

Hopefully this helps some...

Jay

 

Coordinator
Sep 19, 2012 at 7:43 AM
Edited Sep 19, 2012 at 7:44 AM

The best way to use ANX on Windows 8 including the Content Pipeline is the following:

- install Windows 8

- install Visual Studio

- install XNA Game Studio

- create a XNA Game project including a Content Project

- add all the content you need to the content project and compile it to XNB-files

- create you ANX project using the ANX-Win8-Libraries (you should build them from source)

- copy the XNB files to the content subdirectory of your compiled ANX-game like in XNA

- load XNB files using the ContentManager

 

I'm currently working on making this workflow more mature and easy. I hope I can provide a working sample soon...