GPWiki.org
GPWiki.org
It is currently Tue Jun 18, 2013 9:51 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: What's the difference?
PostPosted: Mon Jan 09, 2012 3:27 am 
Prolific Poster

Joined: Sun Jan 08, 2012 10:26 pm
Posts: 22
Hey,

Just a quick question, What's the difference between C# and XNA? Do they both have the same syntax? I am learning C# but I'm not sure which is better for game programming.

Thanks in advance.

_________________
Ghost of John Trailer:

http://www.youtube.com/watch?v=W1Ddgec36Jk&feature=youtu.be


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 3:34 am 
Funky Monkey

Joined: Thu Sep 09, 2004 1:17 pm
Posts: 1567
Location: burrowed
XNA is a graphics library, basically wrapping DirectX to be accessible in C#. You might want to look up what API means.
In terms of hardware accelerated graphics your choices are basically OpenGL and DirectX, and other Frameworks that wrap those in nifty functions to be easily usable (XNA basically being one of those).

_________________
Long pork is people!

wzl's burrow


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 3:47 am 
Prolific Poster

Joined: Sun Jan 08, 2012 10:26 pm
Posts: 22
So it's a bit like lwjgl for Java?

_________________
Ghost of John Trailer:

http://www.youtube.com/watch?v=W1Ddgec36Jk&feature=youtu.be


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 4:10 am 
Grand Optimizer
User avatar

Joined: Mon Jan 17, 2005 6:01 pm
Posts: 353
Location: Canada
XNA is a framework plugin for C# (and apparently any dot net language). It takes care of things like graphics/animation, sound, user input, that sortof thing. It sits on top of DirectX so that you don't have to muck with raw DirectX code yourself (its fairly complex so that's a good thing). You install the XNA plugin for your C# IDE, and then when you go to make a new project, you get the option "XNA Framework 4.0 Game". What it does is it basically sets up a "template" for you. You get a LoadContent() method, a Draw() Method, Initialize(), and Update() to name a few. If you click RUN right off the bat, youl get a blank 'game' running at 60+ fps with its own working game loop. All you have to do is load your custom content, and add your game logic.

So your actual coding will still happen in C#, but youl get new commands and techniques that come with XNA.

Very powerfull and easy.

_________________
"None are more hopelessly enslaved than those who falsely believe they are free."
"It is no measure of health to be well adjusted to a profoundly sick society."
"Hope is the first step on the road to dissapointment." -Jonah Orion
http://tankzgame.blogspot.com


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 4:20 am 
Prolific Poster

Joined: Sun Jan 08, 2012 10:26 pm
Posts: 22
Okay, excellent :D I just installed XNA so that I can code some epic gamez! I am working in a text based game at the moment though :P

_________________
Ghost of John Trailer:

http://www.youtube.com/watch?v=W1Ddgec36Jk&feature=youtu.be


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 4:26 am 
Grand Optimizer
User avatar

Joined: Mon Jan 17, 2005 6:01 pm
Posts: 353
Location: Canada
cool :P

That's a good place to start if you're just learning the language.

_________________
"None are more hopelessly enslaved than those who falsely believe they are free."
"It is no measure of health to be well adjusted to a profoundly sick society."
"Hope is the first step on the road to dissapointment." -Jonah Orion
http://tankzgame.blogspot.com


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 4:42 am 
Prolific Poster

Joined: Sun Jan 08, 2012 10:26 pm
Posts: 22
THanks :) I'll remember to upload it and share it with the forums once I have a stable release ;)

_________________
Ghost of John Trailer:

http://www.youtube.com/watch?v=W1Ddgec36Jk&feature=youtu.be


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 1:34 pm 
Funky Monkey

Joined: Thu Sep 09, 2004 1:17 pm
Posts: 1567
Location: burrowed
Jimbo wrote:
(its fairly complex so that's a good thing)


Is it? ;)

I personally don't like the way the content pipeline works, and there's a bunch of annoyances going on with the effects and custom meshes, so i don't like it all that much. It is certainly fast and easy to work with, if you don't want anything extraordinary. Theres a good bunch of third party code for importing and playing skeletal animation, physics and all that good stuff.

But for a text adventure, pure C# will be good enough :)

_________________
Long pork is people!

wzl's burrow


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 3:12 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11199
Location: Abingdon, MD
weezl wrote:
I personally don't like the way the content pipeline works, and there's a bunch of annoyances going on with the effects and custom meshes, so i don't like it all that much.

You don't have to use the content pipeline and you can replace a lot of other stuff if you want. That's the great thing about it not being a game engine.

weezl wrote:
It is certainly fast and easy to work with, if you don't want anything extraordinary.

Define "extraordinary. A bunch of awesome games have been done in XNA. The Sunburn engine adds even more awesomeness.

weezl wrote:
But for a text adventure, pure C# will be good enough :)

Not if you want to get it on the Xbox 360. ;)

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

Microsoft XNA MVP


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 4:53 pm 
Funky Monkey

Joined: Thu Sep 09, 2004 1:17 pm
Posts: 1567
Location: burrowed
I'm not going to argue with you being an MVP :P

Have fun playing textadventures with xbox controllers then :D

_________________
Long pork is people!

wzl's burrow


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 9:54 pm 
Grand Optimizer
User avatar

Joined: Mon Jan 17, 2005 6:01 pm
Posts: 353
Location: Canada
Quote:
Not if you want to get it on the Xbox 360.


lol, can u imagine the reaction of your typical Xbox gamer to a text game?

"OMG wherez all DA l33+ grAFixXX?? Why cant I MOVE, how do i SHOOT ahhhhh" *smashes controller* ....

"..."

"...maaaaaa..... need money for a new controller...."

_________________
"None are more hopelessly enslaved than those who falsely believe they are free."
"It is no measure of health to be well adjusted to a profoundly sick society."
"Hope is the first step on the road to dissapointment." -Jonah Orion
http://tankzgame.blogspot.com


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 9:56 pm 
Super-dooper pooper scooper
User avatar

Joined: Tue Oct 11, 2011 8:08 pm
Posts: 170
:rofl

You have, in verbatim, described my friend when I showed him a 2D game on the Xbox.
He just couldn't understand that not all games were 3D. :doh


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 10:23 pm 
Prolific Poster

Joined: Sun Jan 08, 2012 10:26 pm
Posts: 22
Lol, I wonder Xbox gamers reaction to the text based game in Black Ops xD

_________________
Ghost of John Trailer:

http://www.youtube.com/watch?v=W1Ddgec36Jk&feature=youtu.be


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 10:43 pm 
Funky Monkey

Joined: Thu Sep 09, 2004 1:17 pm
Posts: 1567
Location: burrowed
Quote:
You see an urban area crossing. There's a corpse lying on the floor. What are you doing?


Go Left

Quote:
You die of a Head shot. Replay? Y/N


:thumbs

_________________
Long pork is people!

wzl's burrow


Top
 Profile  
 
PostPosted: Mon Jan 09, 2012 11:04 pm 
Super-dooper pooper scooper
User avatar

Joined: Tue Oct 11, 2011 8:08 pm
Posts: 170
Relevant XKCD.


Top
 Profile  
 
PostPosted: Tue Jan 10, 2012 12:21 am 
Greatest webcomic ever xD


Top
  
 
PostPosted: Tue Jan 10, 2012 12:25 am 
Prolific Poster

Joined: Sun Jan 08, 2012 10:26 pm
Posts: 22
Oops, sorry, I posted that xD Didn't know I wasn't logged in :P

_________________
Ghost of John Trailer:

http://www.youtube.com/watch?v=W1Ddgec36Jk&feature=youtu.be


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 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