Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Coming from XNA, I would use the content pipeline and create XML files for game objects. However, if I changed something in the XML, I would need to do a rebuild of the project so it will create the XNB file.

Do I need to create XML files on my own and create* encrypt/decrypt process and XML parser? Or should I simply hard code (since any changes would need a rebuild anyway)?

Most of the things in my game project will be random. However, the base types (like Armor types) will be static. Meaning one type of armor will give 20% armor. And another type of armor will give 50% armor.

  • I do not want to use any third party solutions. I want to do everything myself so I can learn how to handle these situations.
share|improve this question
    
This doesn't sound like it really has anything to do with DirectX programming. –  XGundam05 Sep 19 '14 at 16:30
    
What do you mean? Of course it does. With XNA people would say use the content pipeline. I am asking what people do in Direct X. That is why I asked if I need to create XML and create my own parser and encryption process, or just hard code it since there is no content pipeline in DirectX. It sure seems to be related to Direct X to me..... –  Ethosik Sep 19 '14 at 16:34
1  
In XNA, you didn't have to use the content pipeline to load xml files. DirectX is a rendering api, XNA was a game framework built on top of DirectX. You could replace DirectX with OpenGL and have the same question (as it currently appears). –  XGundam05 Sep 19 '14 at 16:38
    
Why does this matter? I explained I am coming from XNA and using Direct X and asking what people do to handle loading game data. I am asking about Direct X not Open GL. If they are the same, fine, what is the common solution then? –  Ethosik Sep 19 '14 at 21:08
    
So it's really a "what technology should I use?" question, then? –  Darth Melkor Sep 19 '14 at 22:48

1 Answer 1

If you are deciding to get down in the dirt with low level DirectX api coming from XNA, you are in for some shocks -- there is no content pipeline that you don't create for yourself, and so many things you take for granted in XNA just don't exist at the low level, so you'll be writing a lot of engine code if you are planning anything more than the simplest of demos... This is in fact what I've been involved with for the last couple of months... building an engine around SharpDX/DX11 in C#... Our team is coming out of an XNA/Unity background, and despite a lot of progress so far -- we don't have much beyond materials(shaders)/meshes/input/HUD implemented and tested at this point... physics integration is in progress and we have lots more engine features planned... but there is still a long way to go :)

If you want to keep to the more XNA level of abstraction you may want to look at SharpDX.Toolkit.. it provides and XNA-like interface but fully backed by DX11 instead of DX9 but doent have content pipeline support... If you are hooked on the content pipeline features then look at Monogame...

So if you do decide to play in the dirt, you can forget about XNB files.. you will be loading your mesh and texture data directly from the various model and image formats supported by the raw DX11 API, or integrating with a more capable asset library like AssImp (asset importer for C#)

I just read your OP a bit closer and it seems sort of like you are talking XML as data to drive the game... in that case if you stick with C#/SharpDX you can embed the XML as a resource in your assemblies and visual studio will handle rebuilding when you make changes. Short of knowing more about the language and API you are planning to use, there isn't much more I can say

share|improve this answer
    
I guess I am looking at what most DirectX developers do. Is it better to separate data from the code, even if changing the data requires rebuilding? Or is it okay if I hard code how much damage a weapon type does for example? I do not mind a lot of coding. I hate reading tutorials like "How to display text in DirectX" and see "Download this library to do it". I do not want to use a library, I want to use pure Direct X to learn how everything works. –  Ethosik Sep 19 '14 at 16:07
    
Who can say what "most" do as programmers like to hide that sort of deep internal detail as much as possible... There is virtually nothing you can do to prevent someone from patching you app to change key values to give some advantage in game play. You talk about "Pure DirectX" when DX has NOTHING to do with how your game stores or manipulates seed data and game state.. DX is just about graphics and rendering. There is a clear demarcation here where you are just going to have to choose a technique and USE it because anyone telling you a BEST way is expressing an OPINION. –  Ascendion Sep 21 '14 at 20:43
    
When I specified pure direct x, I was referring to just that. I said that because I was not using managed direct x. Either way it doesn't matter. I was explaining what I was using. People obviously will know what I mean when I say pure direct x. Also, direct x can be used for more than just graphics and rendering. I read somewhere that somebody used Direct3D to do encryption. –  Ethosik Sep 23 '14 at 4:38
    
@Ethosik, DirectX is for graphics programming and getting things onto the GPU. As far as Encryption goes: (roughly) Encryption = bit twiddling. GPU = super fast and efficient bit twiddler. DirectX = interface with the GPU. DirectX != random general purpose programming. –  XGundam05 Sep 24 '14 at 17:31
    
Um...I do know what Direct X is. You guys sure know how to make somebody feel like an idiot. Did I specifically ask for a Direct X API call to handle game object management? NO. Look at my questions. I asked if it would be better to create my own encryption and Xml reader, or hard code my game data. That....Is....ALL. I did NOT ask for a Direct X API call to do this for me. So why are we discussing "Direct X is a graphics API"......I KNOW IT IS! –  Ethosik Sep 24 '14 at 21:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.