Creating a new XNA Xen project

Mar 31, 2009 at 2:45 AM
Edited Mar 31, 2009 at 2:55 AM
First, I would like to say that the xen framework is a pretty solid framework and I would really like to use it in the future. The work is simply outstanding! =)


Now to my issue, the tutorials are awesome but I can't figure out how to create a new XNA project which references the Xen framework or documentation on how to do it properly. 

It would be nice if I could include the Xen framework in my solution so that I can make changes to the framework if i need to... When I include the Xen and Xen.Ex projects the compiler wants Xen.Graphics.ShaderSystem.dll. Why is this dll not part of the Xen project dll?

Also, whats the xen prebuild.bat file doing? Whats this custom shader tool?

Again like I said before, the tutorials are great but it would be nice if there was some minimal documentation on getting started with Xen.





Edit: I found some answers here:
04/OCT/08
Version 1.0

Initial Release

-----------------------------------------------------------------------------------------------------
-- Build notes:

Prebuild will build the xen DEBUG binaries.
Xen DEBUG builds perform a lot of extra runtime checks, and also provide extra statistics.

Xen RELEASE builds run faster, but provide fewer runtime checks.



-----------------------------------------------------------------------------------------------------
-- The CustomTool and registerFX / prebuild:


Before trying to use xen, run the 'prebuild' batch file.


The 'unregister FX' batch file removes the Visual Studio shader plugin used by xen.
The 'prebuild' batch file registers the plugin and builds the debug xen libraries and model importer.







-----------------------------------------------------------------------------------------------------
-- Xna Notes:

Xen currently supports XNA Game Studio 2.0, Windows and the Xbox360.
Zune support for GS3.0 is not planned.






-----------------------------------------------------------------------------------------------------
-- Xen Dlls:

There are 5 parts to xen:


Xen.dll -- the main API .dll
Xen.Ex.dll -- extensions, helpers and experimental classes
Xen.Graphics.ShaderSystem.dll -- shader interfaces


Xen.Ex.ModelImporter.dll -- Content pipeline model importer for Xen.Ex
Xen.Graphics.ShaderSystem.CustomTool.dll -- Visual Studio 2005/2008 CustomTool plugin



Most applications will use all three xen runtime .dlls and the content importer.
However if you are very brave the ShaderSystem could be used on its own.



-----------------------------------------------------------------------------------------------------
-- Visual Studio shader plugin:

Xen includes a Visual Studio custom tool for compiling shaders.
This is the largest part of the xen API.

A detailed description of how it works and how to use it can be found in Tutorial_03 (custom shader)


-----------------------------------------------------------------------------------------------------
-- Xen on a higher level...


Xen is an attempt to make using Xna a more reliable experience.
It is not a game engine, it is an API.

Because of this, xen replaces large portions of the Xna API.
This includes the XNA Game class, which makes xen less suitable for converting existing Xna projects.

Design decisions made in xen have larger scale project reliability in mind.

Some of the worst offenders in Xna are:

The Effect system,
Managing render targets,
Vertex/Index buffers (Declarations, streams, etc),
Render state managment

Xen provides complete replacements for all of these, which form the major parts of the API.


-----------------------------------------------------------------------------------------------------
-- Getting started: The Example project


The Tutorials project can be loaded by opening ./xen/Tutorials.sln, this uses the 'prebuild' xen build.

The Tutorials project is not flashy. It is a series of very small applications designed to show one
feature at a time, starting with the base Application class.


Take a moment to read them, they demonstrate the fundamentals in xen with a minimum of fuss.
Mar 31, 2009 at 4:09 AM
Edited Mar 31, 2009 at 4:11 AM
When creating a new project that references Xen, you need to reference the Xen libraries. Xen.dll and Xen.Ex.dll can be referenced by adding both the Xen and Xen.Ex projects to your solution. Then select your project’s references, right click, add reference, and select the projects from the projects tab. Or you could reference the dlls directly and not include the Xen projects in your solution. There’s no source available for Xen.Graphics.ShaderSystem.dll, so you’ll need to reference the file directly.

Your content project will need to reference Xen.Ex.ModelImporter.dll, which again you can either do directly or reference the existing project. The custom shader tool compiles your shader effect (.fx) files into c# sharp files. So it’s important that you don’t add your .fx files to your content project, add them to your game project, and set them to build via the custom shader tool, XenFX. Check out the properties of the .fx files in the tutorials to ensure your settings match.

edit: fixed crazy copy n paste markup.
Apr 1, 2009 at 2:10 AM
Thanks for the reply! =)

Im guessing I will need to change the references to the xbox release versions every time I want to move the project onto an xbox.
Coordinator
Apr 3, 2009 at 9:34 PM
Edited Apr 3, 2009 at 9:35 PM
The best bet with an Xbox/PC project is to have two copies of the solution, each with a copy of the C# project in them. You need to sync the code files in each however.
There are quite a lot of differences in the project which simply changing the references won't change.
You can look at the main Xen solutoins for an example of this (Xen.sln and Xen_x360.sln in the src directory)
May 21, 2010 at 9:25 AM

I prepared this step-by-step tutorial for some students of mine: 

http://sites.google.com/site/sirhans/assorted-files/step-by-step-tutorial-creating-a-new-xen-project-xna

It describes how to make a new empty project and integrate the code from tutorial_01.

 

@StatusUnknown - Here's a link to the word document: 

http://sites.google.com/site/sirhans/assorted-files/step-by-step-tutorial-creating-a-new-xen-project-xna/Instructionsforyourfirstxenproject.docx?attredirects=0&d=1

Would you consider adding this, or something like it, to the Xen project to make it a little easier on the n00bs?  Actually, I am not really new to XNA but I found that going from looking at the Xen tutorials to creating my first stand-alone project took a few hours of thinking and tinkering.