GPWiki.org
GPWiki.org
It is currently Wed May 22, 2013 8:29 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Mon May 28, 2012 1:51 pm 
Level 1 Cleric

Joined: Thu May 24, 2012 2:33 pm
Posts: 13
I'm just wondering if you can change the default code when you make a Xna Window game project

I want to remove the summary code that is just annoying and add some other stuff.


Top
 Profile  
 
PostPosted: Tue May 29, 2012 1:07 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
Of course you can.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
PostPosted: Wed May 30, 2012 6:52 pm 
Level 1 Cleric

Joined: Thu May 24, 2012 2:33 pm
Posts: 13
Machaira wrote:
Of course you can.


So how can I do it?


Top
 Profile  
 
PostPosted: Thu May 31, 2012 11:07 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11182
Location: Abingdon, MD
Do what? Remove the summaries? Select them and hit the Delete key.

Add some other stuff? You'll need to be more specific.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
PostPosted: Thu May 31, 2012 11:15 pm 
Game Programming Guru

Joined: Mon Aug 16, 2004 8:24 pm
Posts: 1137
Location: USA, New York
Which version of XNA are you using? Here is how to do it in XNA 3.0:

XNA Templates

I imagine it's the same for XNA 4.0, except that they are stored here instead:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0


Top
 Profile  
 
PostPosted: Fri Jun 01, 2012 7:46 pm 
Level 1 Cleric

Joined: Thu May 24, 2012 2:33 pm
Posts: 13
Quote:
Do what? Remove the summaries? Select them and hit the Delete key.

Add some other stuff? You'll need to be more specific

I found out that I want to create a template that doesn't have the summary code in it and also add some code like "this.IsMouseVisible = true;" to make me work less on the coding (Yes, I'm a lazy bastard when it comes to things that i don't need to do :D).


Lachlan87 wrote:
Which version of XNA are you using? Here is how to do it in XNA 3.0:

XNA Templates

I imagine it's the same for XNA 4.0, except that they are stored here instead:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0


I'm using version 4.0.

This is not working at all, I notice that i can delete files in the XNA Game Studio 4.0 folder without anything to happen, this also means that I can't add a template there. I tried to look at other tutorials but they are too complicated to understand for me. Do you have an easy and straight to the point tutorial? and not a tutorial that explains everything since my main language isn't English.


Top
 Profile  
 
PostPosted: Sun Jun 03, 2012 7:29 pm 
Game Programming Guru

Joined: Mon Aug 16, 2004 8:24 pm
Posts: 1137
Location: USA, New York
You should simply be able to modify the files in that directory. I just tried it and it worked for me. I'm using Visual Studio 2010 and XNA 4.0

It's really very simple. Just unzip, modify, and rezip. Here's exactly how to do it:

1. Copy the template you wish to modify to your desktop, for example: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0\CSXnaWindowsGame-v4.0.zip

2. Unzip the files - by default Windows will put them in a folder with the same name as the zip file.

3. Edit the code files as desired (probably the game1.cs and program.cs files)

4. Zip them back up, but if you let Windows create a folder to put them in, make sure you only zip the contents of the folder. Otherwise there will be too many layers and VS won't understand.

5. Copy the zipped folder back to the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\CSharp\XNA Game Studio 4.0\ folder.

Run VS 2010 and it works!

Let me know you if need any clarification.


Top
 Profile  
 
PostPosted: Wed Jun 06, 2012 11:06 am 
Level 1 Cleric

Joined: Thu May 24, 2012 2:33 pm
Posts: 13
nope, still doesn't work. When i press new Project the template doesn't show. i could make a video of it when I make a template, to show you exactly what I'm doing.


Top
 Profile  
 
PostPosted: Thu Jun 07, 2012 2:43 am 
Game Programming Guru

Joined: Mon Aug 16, 2004 8:24 pm
Posts: 1137
Location: USA, New York
A video would be helpful. I created a copy when I did it, so I had two templates with the same name, one with my changes and one without.


Top
 Profile  
 
PostPosted: Thu Jun 07, 2012 2:43 pm 
Level 1 Cleric

Joined: Thu May 24, 2012 2:33 pm
Posts: 13
here is the video:
http://www.youtube.com/watch?v=oLlRnV5P ... el&list=UL


Top
 Profile  
 
PostPosted: Thu Jun 07, 2012 10:46 pm 
Game Programming Guru

Joined: Mon Aug 16, 2004 8:24 pm
Posts: 1137
Location: USA, New York
Confusing. . . I recreated what you did on my computer, right down to using WinRAR and all the code changes exactly as you did. It works for me, although it clearly doesn't for you.

One difference, however, what that I have VS 2010 Pro, not express. So my template path includes \csharp\ as I showed in my posts above.

Have you tried starting a normal XNA Windows game, making your changes, and then using the File->Export Template wizard? I see that you have that option even in the express edition. The wizard can automatically do all the proper placement of files, etc.

If the wizard doesn't work, it would suggest that there is something wrong with either your VS or XNA install.


Top
 Profile  
 
PostPosted: Sat Jun 09, 2012 9:47 am 
Level 1 Cleric

Joined: Thu May 24, 2012 2:33 pm
Posts: 13
but can I create a full template, when i create a template now it only create a "Class" template or Content template I can't smash them together. And it only create VC# templates not xna templates


Top
 Profile  
 
PostPosted: Sat Jun 09, 2012 8:25 pm 
Game Programming Guru

Joined: Mon Aug 16, 2004 8:24 pm
Posts: 1137
Location: USA, New York
If you PM me an email address, I could send you the template I made with the changes you showed in the video. . . then we would know if it's something we're missing in what you did / didn't do, or if it's your Visual Studio. Or maybe I can find time to put VC# Express on a computer here and see if my template works.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group