Xna load level from text file




















So… thank you very much! March 26, at pm Reply. June 4, at am Reply. Tnkx, Justin. June 21, at am Reply. Hope that helps! June 22, at am Reply. March 13, at pm Reply. Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:.

Email required Address never made public. Name required. Follow Following. Sign me up. It can't be that easy Can it? Improve this question. Dave Voyles Dave Voyles 1 1 silver badge 18 18 bronze badges. Add a comment. Active Oldest Votes. So it avoids situations like I assume you know what each character represents since you have the rest of the code.

Improve this answer. I'm just saying it's not necessarily a critical error. Thank you gentlemen. SomeGuy SomeGuy 1 1 silver badge 9 9 bronze badges. And thank you for your response! Sign up or log in Sign up using Google. Collectives on Stack Overflow. Learn more. Asked 8 years, 5 months ago. Active 8 years, 5 months ago.

Viewed 2k times. Improve this question. Benny Hill 6, 4 4 gold badges 39 39 silver badges 58 58 bronze badges. Uffe Puffe Uffe Puffe 1 1 silver badge 12 12 bronze badges. The only way I can to something like this is using XML. Add a comment. Active Oldest Votes. ReadAllLines path ; And File. Improve this answer. Cole Campbell Cole Campbell 4, 1 1 gold badge 14 14 silver badges 19 19 bronze badges. I have my level1. There are no importers which handle this file type.

This is good for models, textures, sounds, music, And I guess it has the advantage of making your content "obfuscated" such that only XNA apps can read them, and you can't easily take them back to their original source format. You can even make the source content files contain less or different information, build a ContentProcessor that treats that input and adds data that the game will be interested in pre-compile things at build-time.

I believe it's better than writing your own parallel content pipeline because it's already there. I'm pretty sure that everything in the content pipeline get's converted to XNB at compile time.

This is annoying if I want to have a level editor or the ability for people to drop new levels into their level files folder and be able to play it. True, but there are ways around that. I wish they'd make that process simpler, but it's still possible.

Alright, that might be alright then. Level 0. Shawn Hargreaves wrote a nice little blog post on using XML and the content pipeline, here. And Java2s. Googling stuff like "reading xml c sharp" will net you alot of articles too, and if you throw in XNA as keyword as well you'll probably end up with more info about the content pipeline, serializing and such.



0コメント

  • 1000 / 1000