View previous topic - View next topic |
Author |
Message |
RedSlash Mage
Joined: 12 May 2005 Posts: 331
|
Posted: Fri Jan 11, 2008 1:05 am Post subject: |
[quote] |
|
Glad they've expanded support for it. With 2.0 and more tutorials available, I'll definitely have to check it out again one of these days.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
JimKurth Monkey-Butler
Joined: 01 Apr 2007 Posts: 53 Location: Houston, TX
|
Posted: Mon Jan 14, 2008 1:10 am Post subject: |
[quote] |
|
DeveloperX wrote: | Try your hand at C# XNA its very easy to learn.
Here are some good places to get started:
.
.
.
Goodluck, have fun. XNA is a lot of fun! :D |
I think I'm in love with VC# and XNA. I bought a book on making simple 2D games in XNA but the author cut out vital parts of the code snippets in it (he even says so on his website due to exceeding his page limit). I was frustrated before i knew this and was about to get very steamed as it was just like the learn VC++ 6 book I had because nothing worked. So, I calmed down, approached the code that I typed in and made my own thing. I learned how to add sprites to the program, change resolution, fullscreen/window, rotate/scale/tint/depth sprites, etc. all in about 8 hours total with no previous C# experience. It REALLY IS EASY TO PROGRAM WITH. I just can't believe it. It took me forever to find out how to import pictures to use because i was adding it but it was saying it couldn't find it in the project (i didn't know u had to add it from the content folder).
So I guess that means I need to move out of the QB realm with my project and go XNA and C#. Darn! I think it's better though cuz I don't want to spend countless hours working on a fast pixel-routine in ASM or getting memory routines to work properly and so forth.
BUT I still am having a low resolution! I'm not too keen on resolutions of 640x480 or higher for RPGs. I like em the way they looked on SNES. I'll use a 640x480 window but scale all of my graphics 2x.
Thank you Dev.X for getting me out there on XNA and C# _________________ Being a non-commission officer isn't easy. It it were, they would have given it to the officer corps.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Jan 14, 2008 8:41 am Post subject: |
[quote] |
|
JimKurth wrote: |
I think I'm in love with VC# and XNA. I bought a book on making simple 2D games in XNA but the author cut out vital parts of the code snippets in it (he even says so on his website due to exceeding his page limit). I was frustrated before i knew this and was about to get very steamed as it was just like the learn VC++ 6 book I had because nothing worked. |
Yeah it is beginning to irritate me that author continue to do that!
I have several hundred books, that I have used as references on how to do things, and since so many of them are missing large chunks of code that is required to get it to run, I never use the code verbatim.
I just look at the concept that the author is aiming for, then try to get it working myself.
When in doubt, I retreat to the documentation of whatever language/api/lib/etc that I'm using and look for the answers there.
Quote: | So, I calmed down, approached the code that I typed in and made my own thing. I learned how to add sprites to the program, change resolution, fullscreen/window, rotate/scale/tint/depth sprites, etc. all in about 8 hours total with no previous C# experience. It REALLY IS EASY TO PROGRAM WITH. I just can't believe it. |
Ahh great! You overcame a large obstacle by clearing your head and trying things on your own! Very good!
I took to c# in roughly 2 hours after downloading it.
After just under 2 months I'm still no guru, but I feel that I can write decent code at this point.
Quote: | It took me forever to find out how to import pictures to use because i was adding it but it was saying it couldn't find it in the project (i didn't know u had to add it from the content folder).
|
I use a certain method to make my life easier:
1. right click on the Content folder (if you dont have XNA Game Studio 2.0, then right click the Project) in the Solution Explorer window. Create a new Folder called "Textures".
2. right click the new Textures folder and create a new folder called "Sprites".
3. place your images in the Sprites folder (or Tiles if you're doing tiles,etc you get the point)
4. create a constant in your game public class like below
Code: |
namespace Foo
{
public class Bar
{
public const string SPRITE_DIR = @"Textures/Sprites/";
// also you need a Texture2D to draw
private Texture2D mySprite;
}
}
|
5. load your content in the LoadContent method:
Code: |
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
mySprite = this.Content.Load<Texture2D>(SPRITE_DIR + "heroSprite");
}
|
6. finally draw your sprite in the Draw method:
Code: |
protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.Black);
// TODO: Add your drawing code here
spriteBatch.Begin();
// draw your sprite
spriteBatch.Draw(mySprite, new Vector2(64, 64), Color.White);
spriteBatch.End();
base.Draw(gameTime);
}
|
and its really that simple :)
Quote: |
So I guess that means I need to move out of the QB realm with my project and go XNA and C#. Darn! I think it's better though cuz I don't want to spend countless hours working on a fast pixel-routine in ASM or getting memory routines to work properly and so forth.
|
Yeah but it is better that way. :)
I really want to sit down one day and locate all my QB code and then start a porting schedule to port all of it over to C#/XNA (of course I'll ditch all primitive drawing methods and convert to proper sprites & post-processing pixel effects etc..)
Quote: |
BUT I still am having a low resolution! I'm not too keen on resolutions of 640x480 or higher for RPGs. I like em the way they looked on SNES. I'll use a 640x480 window but scale all of my graphics 2x.
Thank you Dev.X for getting me out there on XNA and C# |
I agree on wanting the old-school rpg look.
However, a better approach is to use scaling (just make sure its linear and non-antialiasing or it will look all smoothed out)
You are most welcome. I'm happy that I could help.
Let me know if you need anything.
Goodluck with your games! _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
|
Page 2 of 2 |
All times are GMT Goto page Previous 1, 2
|
|
|
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 You cannot vote in polls in this forum
|
|