• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
The Communist Duck

XNA or SlimDX?

13 posts in this topic

This is probably another one of those questions, but I have not found anything recent on it. That is, addressing XNA 4.0 and SlimDX March '11.

I am learning C# for some fun, and want to go into 3D. I originally planned to go for XNA, but the MSDN site scared me a little. It seemed very much to say 'XNA is for Windows Phone and XBOX!'. I know it does Windows too, but still.

I also remember hearing about SlimDX. It seems good, and the comparitive table seemed to slant in favour of SlimDX over XNA.

However, I am not a fan of writing very low level code.

Is there a decent, up to date comparison of the two, not just feature wise?
And if I want to make a 3D game just for Windows, should I prefer one over the other?
0

Share this post


Link to post
Share on other sites
Many people use XNA to write strictly Windows games to no ill effect. While XNA is designed to support WP7 and the 360, Windows is also a primary platform and functions just fine. The only difference are platform specific features of both WP7 and the 360 which are obviously unavailable on Windows (For example, xbox avatars on the 360 and touch input on WP7)

It's also worth noting that XNA is easier to learn and designed for your chosen language (C#). SlimDX is pretty much a verbatim wrapper for the native C++ libraries which carries with it some of the nuances and design choices that aren't typically dealt with in a managed environment.

SlimDX is an fantastic library, but if you are learning C# at the same time, I would recommend something higher level like XNA which takes care of most of the low level details. Once you get the hang of things and if you feel like you'd like more control over everything, you could certainly migrate to SlimDX.
2

Share this post


Link to post
Share on other sites
I think I am getting C# pretty well down. I messed with it a few years back, and C++/Python experience helps.

If SlimDX is a verbatim wrapper, I think I shall go for XNA. I assumed it was an XNA but at a slightly lower level. And technically it is then, just at a much lower level than I thought. :cool:

Thanks!

EDIT: Can anyone recommend a good book for XNA 4.0? I'd prefer to learn it right from the start. :lol:
1

Share this post


Link to post
Share on other sites
Though you seem to have made your decision already, I thought I'd share my experience wrestling with the XNA vs SlimDX question.

About 8 months ago, I decided to start work on a game project using C#. My initial investigation led me to XNA and I went as far as installing the SDK until I found information that put me off XNA and onto the SlimDX path. In the last few months I found out some additional things about XNA 4.0 which I didn't like, so I'm confident I made the right decision to go with SlimDX.

That said, my reasoning is no doubt different to yours, as I was looking for a lower level graphics API like DirectX or OpenGL rather than a game API. I also have misgivings about the long term plans Microsoft has for the PC side of XNA. In my personal opinion, SlimDX has more of a future.

In practise I find that SlimDX being a "verbatim wrapper" is actually quite a benefit, as I can read c++/DirectX code samples or books and very quickly translate them into C#/SlimDX.
0

Share this post


Link to post
Share on other sites
What information did you uncover that shifted your alignment toward SlimDX?
0

Share this post


Link to post
Share on other sites
Keep in mind these thoughts are coloured by my own bias:

The overall gist of what I found was evidence that Microsoft's plans for XNA (which covers PC, Xbox360 and WinPhone7) look to not include the PC. The Xbox360 is a static piece of hardware, whereas the PC has continued to develop, and now there's Directx10, 10.1 and 11, which the Xbox doesn't support. Microsoft's current strategy around XNA seems to be to standardize the API to allow developers to create games for the 3 platforms at once really easily. However, this flexibility comes at the price of supporting the PC's newer capabilities.

I tried to find out if XNA 4.0 supported DX10, 10.1 and 11, but I had trouble finding a clear answer, so I'm not sure if it does. In contrast, SlimDX supported Direct3D10 in 2008, and added beta support for Direct3D11 & Direct2D in August 2009. SlimDX tends to release a few times a year, whereas XNA is once a year.

I'd love to quote actual sources instead of giving vague comments, but I found it all through google, and now 8 months later, I can't remember where I read any of it. This is the only source I've read recently that I could actually find:

[url="http://www.theindiestone.com/lemmy/index.php/2011/03/08/the-perils-of-xna-and-the-death-of-an-indie/"]http://www.theindies...th-of-an-indie/[/url]

I encourage you to dig deeper and decide for yourself.

Microsoft's strategy makes sense if you assume that every coder knows DirectX/C++ just as well as they know C# and have plenty of time on their hands. If you want to use API's that are newer than 3 years old, you should use C++. If you want to cover several platforms, you should use XNA.

Alternatively, if you're not a c++ guru, and want to use C# *AND* make use of the latest API's, SlimDX is the way to go in my opinion.
0

Share this post


Link to post
Share on other sites
Both are valid choices. The support of lack thereof for anything past Direct3D9 isn't going to help or hinder you. The final look of your game will depend on your artist, not the version of the underlying API.
1

Share this post


Link to post
Share on other sites
I didn't like XNA because of the content pipeline thing. Last time I used XNA -- which was awhile ago and not very extensively -- I felt like I was basically forced to compile all of my assets into the executable itself, which made user modification sort of impossible, which undercut what I was trying to do. Also rebuilding because I changed some sprite got annoying.
0

Share this post


Link to post
Share on other sites
[quote name='MeshGearFox' timestamp='1303697704' post='4802516']
I didn't like XNA because of the content pipeline thing. Last time I used XNA -- which was awhile ago and not very extensively -- I felt like I was basically forced to compile all of my assets into the executable itself, which made user modification sort of impossible, which undercut what I was trying to do. Also rebuilding because I changed some sprite got annoying.
[/quote]The content pipeline is there for those who want to use it. Otherwise, ignore and load your own files. You can even use XNA's handy functions that let you load textures from external files.

The content pipeline is only some big, evil, limiting feature to those who can't read the API documentation, and spread kneejerk FUD over dev forums.

2

Share this post


Link to post
Share on other sites
[quote name='MeshGearFox' timestamp='1303697704' post='4802516']
I didn't like XNA because of the content pipeline thing. Last time I used XNA -- which was awhile ago and not very extensively -- I felt like I was basically forced to compile all of my assets into the executable itself, which made user modification sort of impossible, which undercut what I was trying to do. Also rebuilding because I changed some sprite got annoying.
[/quote]

The content pipeline doesn't build content into the executable. It merely compiles the various files you put in it into an intermediate format readable by all platforms. All files are accessible to user modification if you write tools for them, and the 3D model format is actually FBX, which is heavily supported by various modeling tools. If you change any files inside the content project, you don't rebuild the whole application application. All it does is convert the single file you added to it, and nothing more.

You also don't need to use the content pipeline at all for the most part. The only time you actually need to use them is for effect files and sprite fonts.
1

Share this post


Link to post
Share on other sites
Also, the content build is a separate project in the generated workspace. If you change a file, you only rebuild the content project, not the whole thing.
0

Share this post


Link to post
Share on other sites
If you're not using the pipeline, is there actually a compelling reason to use XNA over other game APIs?

And to reiterate, I haven't used XNA since 3.0, and I don't remember the support for non-pipelined files being particularly good /at that time/.

0

Share this post


Link to post
Share on other sites
[quote name='MeshGearFox' timestamp='1303753153' post='4802731']
If you're not using the pipeline, is there actually a compelling reason to use XNA over other game APIs?

And to reiterate, I haven't used XNA since 3.0, and I don't remember the support for non-pipelined files being particularly good /at that time/.


[/quote]
Short answer: Certainly!
Long answer: But it depends ultimately from person to person.


If you've been using unmanaged DirectX, the reasons might not be as compelling, but XNA conforms to the design of C#. The components like vertex buffers are designed a little more sensically (as of XNA4), things like render targets are easier to use, all of the boilerplate is already written for you, you already have access to good model and sprite rendering right out of the box, the effect framework is a bit easier to use. You don't need to worry about all the silliness like lost device handling, etc.

All that said, I have, myself, started moving towards SlimDX. Use the right tool for the job, everyone. XNA is a fantastic framework for DX9. But if you want to support 10 or 11, your only choice is SlimDX and that will likely never change until the next XBOX console is released and they intend on having an XBLIG on it as well (lets all hope!).
1

Share this post


Link to post
Share on other sites
[quote name='MeshGearFox' timestamp='1303753153' post='4802731']
And to reiterate, I haven't used XNA since 3.0, and I don't remember the support for non-pipelined files being particularly good /at that time/. [/quote]What kind of 'support' are you talking about? If you want to load a file, use C# file reading capabilities and load it. Use of XNA doesn't change that. Some of the XNA datatypes like textures even have member functions to load directly from a file.

The content pipeline is simply a great tool to take all your source assets and convert them into quicker to load formats, and put them all into a big database file, similar to all other games that get published. It's like making a WAD for doom. The allegro game library can also do the same thing for you.

The content pipeline will also keep all the linked files up to date automatically by adding new versions of the file in automatically. The converted files from the pipeline are quick to load because they are stored in formats where they can be streamed into memory instead of parsed and constructed at runtime.

This also doesn't stop users from using their own data. If you want users to be able to mod and change game data, just let them put them own files in the folders, and check if they exist at runtime.

If an override file exists, load it. Otherwise grab the default one from the content pipeline. Simple.

As for why use XNA over slim DX? XNA is an entire game framework, not just an API wrapper.

If you're more of a graphics programmer and you want to use bleeding edge features to make graphical demos. Use SlimDX.

If you want to make an actual working game, XNA will help you get started a lot faster. All the base functionality is there. You just worry about your content and design for the most part. There is also close to endless documentation, articles, and tutorials.


XNA is a multiplatform game programming framework.
SlimDX is a DirectX wrapper for C#.

It's an apples and oranges comparison. They are both great, but not directly comparable.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0