Sponsors

Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

New Member?


Register Zunecentive FAQ Members List Calendar Search Today's Posts Mark Forums Read

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack Thread Tools
Old 05-28-2008, 09:09 PM   #1 (permalink)
Zuner
 
Join Date: Sep 2007
Posts: 52
Reputation: 12
$zB: 35
Donate
Default .txt Viewer

I'm trying to make a simple .txt viewer for testing purposes. But every time I try to deploy I hit a snag:

Code:
Error	1	Cannot autodetect which importer to use for "WaroftheWorlds.txt". There are no importers which handle this file type. Specify the importer that handles this file type in your project.	C:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\ZuneGame2\ZuneGame2\Content\WaroftheWorlds.txt	WarOfTheWorlds
It is in the Content section but I'm not sure how to go about using a .txt file. Keep in mind I'm very new to C#.



DaDillsta is offline   Reply With Quote
Remove Advertisements Sponsored Links
Advertisement
 
Old 05-29-2008, 06:37 AM   #2 (permalink)
Developper
zB Programmer
Experienced Zuner
 
Khao's Avatar
 
Join Date: May 2008
Location: Québec, Canada!
Posts: 104
Reputation: 25
$zB: 89
Donate
Default

I'm not 100% sure about this but here's what I believe is the problem :

The 'Content' section is used to hold .. well.. content, game content to be more exact. So you put things like pictures and sound effects in that. When you try to compile the game, the compiler (Visual Studio) will run trough everything that's inside the Content section and see if it is a file format it can handle as Content. It accepts things like .jpg .gif .png .wav .mp3 but not videos or text files or flash files etc..

This is to make sure that you don't put inaccessible content because the XNA framework only knows how to load textures and sounds (it probably loads more things for the windows and xbox versions like 3D models)
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


My website is down! Temporary download link :
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


Feel free to contact me to get my msn/gtalk address if you develop games, I love to help and I know a lot about programming!

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



Khao is offline   Reply With Quote
Old 05-29-2008, 07:28 AM   #3 (permalink)
Zuner
 
Join Date: Sep 2007
Posts: 52
Reputation: 12
$zB: 35
Donate
Default

Yes, yes. I understand that but I was pretty sure C# had native support for .txt extensions, at least in a Windows Form?



DaDillsta is offline   Reply With Quote
Old 05-29-2008, 07:57 AM   #4 (permalink)
Developper
zB Programmer
Experienced Zuner
 
Khao's Avatar
 
Join Date: May 2008
Location: Québec, Canada!
Posts: 104
Reputation: 25
$zB: 89
Donate
Default

You can use .txt files with the XNA framework on the Zune, they just can't be added to the 'Content' section reserved for game content.
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


My website is down! Temporary download link :
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


Feel free to contact me to get my msn/gtalk address if you develop games, I love to help and I know a lot about programming!

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



Khao is offline   Reply With Quote
Old 05-29-2008, 08:37 AM   #5 (permalink)
zB Programmer
Experienced Member
 
LedZepp's Avatar
 
Join Date: Mar 2007
Posts: 950
Reputation: 107
$zB: 610
Donate
Default

You could possibly do this with an xml file though, the content folder accepts xml files, and that would actually make it easier for you, you could have the xml file hold pages instead of just the whole text file, and when the user presses down(or something) it rotates through the pages.
You could then make a little program on the computer that takes in txt files and converts them to your xml files. And then people could just post up the xml files of books after they make them.



LedZepp is offline   Reply With Quote
Old 05-29-2008, 09:15 AM   #6 (permalink)
Jr. Member
 
SimReality's Avatar
 
Join Date: May 2008
Location: Seattle, WA
Posts: 398
Reputation: 60
$zB: 341
Donate
Default

Just click on the .txt file in your project (in Visual Studio). Now look at the Properties window. You will find a property called Build Action. Switch that to None. Now you won't get that error. Then find the property called Copy to Output Directory and switch that to Copy If Newer. Now your project will copy that file to the Zune anytime you update it. That's it. No need for all the weird XML workarounds or junk like that.
__________________
Nick Gravelyn
Microsoft MVP - DirectX/XNA

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



SimReality is offline   Reply With Quote
Old 05-29-2008, 05:11 PM   #7 (permalink)
Zuner
 
Join Date: Sep 2007
Posts: 52
Reputation: 12
$zB: 35
Donate
Default

Ok, thanks for the tips. Like I said I JUST started learning C# and I really have no clue what I'm doing and I thought I had finally figured it out but when I deploy it to the Zune, nothing. The Zune goes to loading, black screen, and then it resets as if the code didn't effect it at all. I'll probably upload the code later and see if anyone can help me figure it out, I'm just a newb at coding in this language, lol.



DaDillsta is offline   Reply With Quote
Old 05-29-2008, 06:54 PM   #8 (permalink)
Jr. Member
 
SimReality's Avatar
 
Join Date: May 2008
Location: Seattle, WA
Posts: 398
Reputation: 60
$zB: 341
Donate
Default

Then learn C# before trying to learn XNA. You're just shooting yourself in the foot by jumping in that quickly. The people who try to learn C# with XNA are usually the ones who, ten months later, still struggle with the basics.
__________________
Nick Gravelyn
Microsoft MVP - DirectX/XNA

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.



SimReality is offline   Reply With Quote
Old 05-29-2008, 09:01 PM   #9 (permalink)
Zuner
 
Join Date: Sep 2007
Posts: 52
Reputation: 12
$zB: 35
Donate
Default

Yes I have been reading Teach Yourself C# in 24 hours, and I'm planning on reading Pro C# and the .NET 3.5 Platform 4th Edition, but I was also in the process of learning PHP, so I'm kind of backed up right now, and I felt like I wanted to try something useful, oh well. I'll just stick to C# for now.

I uploaded the source to:

http://rapidshare.com/files/11874250...iewer.rar.html

So if anyone wants to look at it or edit it to work for their use, go ahead.

Last edited by DaDillsta : 05-29-2008 at 09:11 PM.



DaDillsta is offline   Reply With Quote
Old 05-30-2008, 12:05 PM   #10 (permalink)
Experienced Zuner
 
Join Date: May 2008
Posts: 207
Reputation: 12
$zB: 170
Donate
Default

Quote:
So if anyone wants to look at it or edit it to work for their use, go ahead.
Does it work?



cable729 is offline   Reply With Quote
Old 05-30-2008, 12:28 PM   #11 (permalink)
Zuner
 
Join Date: Sep 2007
Posts: 52
Reputation: 12
$zB: 35
Donate
Default

No it doesn't output anything when deployed, I uploaded it so that a dev could maybe fix it or just some random person who wanted to try to edit it to make it work?

By the way, I'm still in the process of trying to get this to work, I haven't given up just yet.

Last edited by DaDillsta : 05-30-2008 at 12:34 PM.



DaDillsta is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 03:08 AM.

 
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC8
vB Ad Management by =RedTyger=
(C) ZuneBoards 2006-2007