The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
Please vote in the Forum Structure Poll. Polling will close at 2PM EST on January 21, 2025.

Microsoft XNA Programming Thread

SamuraiRockSamuraiRock Registered User regular
edited January 2009 in Games and Technology
Preface: sorry if there's a thread regarding this already, XNA is too short a search term ;)

Microsoft XNA is some kind of game-specific IDE. I think.

I'm a university student with courses behind me using C++, Java, various .NET languages, and man, once when I was like 9 I learned Logo.

Has anyone here had any experience with the XNA studio, and would like to share their experiences? What exactly does it do? Is it some kind of nice way to access DirectX APIs and things? Does it plug in to Visual Studio or is it it's own thing? I'm interested in fooling around with it, but I don't want to bother downloading it (dialup!) if it's pretty lame. I'm also more interested in hearing about it from other people than the friendly description on the website.

I'm interested in using it to just do simple things at first, like draw an image on the screen, move it with arrows etc - is this the sort of thing it expedites, or is it an entirely different beast?

SamuraiRock on

Posts

  • JamesDMJamesDM Registered User regular
    edited January 2009
    XNA Studio is like Visual Studio.

    IIRC it is similar(or based on) C#, generally I hear it is pretty easy to pick up and use with pre-made objects for things that are common among XNA games(such as controller input, resolution settings and menus) Generally if you have experience in C++ or any kind of object oriented programming experience you should be able to pick it up fairly easily. It is geared towards ease of use when first learning and creating games but if you would like to develop for the XBOX360 platform you need to know it I think.
    It is exactly what you described it as, a gaming specific IDE.

    *edit*
    Usually the first thing I do when I want to work with something new(even before downloading) is read some of the tutorial documentation. Usually within the first few lines you will get an idea of the code structure and within the first chapter the capabilities of the language.

    JamesDM on
    If you have any complaints about this poster then feel free to: Иди на хуй, Сучьи :D

    Steam, PSN, XBL, Xfire and everything else JamesDM
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    You're probably best served asking in the Community Games thread. Lots of people in there have posted work onto Xbox Live. A lot more have knowledge of the infrastructure.

    http://forums.penny-arcade.com/showthread.php?t=73938

    Shady3011 on
  • ShadowrunnerShadowrunner Registered User regular
    edited January 2009
    I had some questions about XNA that I was going to post in the beginner programming thread (for lack of a better place), but this looks like it might be more appropriate...

    I'm a fairly experienced programmer (8-10 years) and I was thinking of playing around with XNA as a hobby project. Are there any good online C# resources for someone that has lots of Java/C/Perl experience? Or is it easy enough to pick up that it's not worth it. Also, does anyone have recommendations of good XNA starter books or online tutorials? All the XNA books I found on Amazon either seem to have poor reviews or are geared toward older releases of the framework.

    Shadowrunner on
  • AiranAiran Registered User regular
    edited January 2009
    C# is syntactically near idential to Java. It's pretty easy to pick up with some online tutorials. The XNA Creator's Club has nice examples if you're going the gaming route. Not sure about books, I've learnt mostly with online resources so far.

    Airan on
    paDudSig.jpg
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    Does C# have a garbage collector? I do hate memory management.

    Shady3011 on
  • JamesDMJamesDM Registered User regular
    edited January 2009
    Airan wrote: »
    C# is syntactically near idential to Java. It's pretty easy to pick up with some online tutorials. The XNA Creator's Club has nice examples if you're going the gaming route. Not sure about books, I've learnt mostly with online resources so far.

    This is pretty much the best answer, the creator's club is a great way to learn the basics then if you want more advanced tutorials you will know enough to venture out on your own.

    JamesDM on
    If you have any complaints about this poster then feel free to: Иди на хуй, Сучьи :D

    Steam, PSN, XBL, Xfire and everything else JamesDM
  • CyberJackalCyberJackal Registered User regular
    edited January 2009
    Shady3011 wrote: »
    Does C# have a garbage collector? I do hate memory management.

    Yes.

    CyberJackal on
  • tastydonutstastydonuts Registered User regular
    edited January 2009
    Shady3011 wrote: »
    Does C# have a garbage collector? I do hate memory management.
    Yes, it does.

    tastydonuts on
    “I used to draw, hard to admit that I used to draw...”
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    I still remember how my professor said C# was a failed endeavor by Microsoft to introduce it as the new C. C is the new C, of course. Not that it's relevant here. I always just found that funny.

    Shady3011 on
  • DiannaoChongDiannaoChong Registered User regular
    edited January 2009
    learn c#, and then you practicably know xna, I dabbled in it, and it is pretty awesome. Being able to run the same code on a zune, 360 or windows platform is pretty awesome.

    DiannaoChong on
    steam_sig.png
  • templewulftemplewulf The Team Chump USARegistered User regular
    edited January 2009
    Shady3011 wrote: »
    I still remember how my professor said C# was a failed endeavor by Microsoft to introduce it as the new C. C is the new C, of course. Not that it's relevant here. I always just found that funny.

    Salmon'd for "Bwah?" It's positioned as the new Java, not C.

    As for XNA, it is indeed awesome. It does a lot of heavy lifting where you had to do it yourself with DirectX before. The Riemers tutorials do a good job of acquainting you with the basics, but he saves the best snippets for his books.

    If I ever get around to it, I'll write up a beginning-to-end developer diary for my current XNA game.

    templewulf on
    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    templewulf wrote: »
    Shady3011 wrote: »
    I still remember how my professor said C# was a failed endeavor by Microsoft to introduce it as the new C. C is the new C, of course. Not that it's relevant here. I always just found that funny.

    Salmon'd for "Bwah?" It's positioned as the new Java, not C.

    From what he told me, they wanted to build a successor to C/C++ that actually was an Object Oriented Language.

    Shady3011 on
  • templewulftemplewulf The Team Chump USARegistered User regular
    edited January 2009
    Shady3011 wrote: »
    templewulf wrote: »
    Shady3011 wrote: »
    I still remember how my professor said C# was a failed endeavor by Microsoft to introduce it as the new C. C is the new C, of course. Not that it's relevant here. I always just found that funny.

    Salmon'd for "Bwah?" It's positioned as the new Java, not C.

    From what he told me, they wanted to build a successor to C/C++ that actually was an Object Oriented Language.

    Is he thinking more from the business perspective? That makes more sense, but from a development standpoint, I have a hard time comparing the two as similar tools.

    templewulf on
    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    templewulf wrote: »
    Shady3011 wrote: »
    templewulf wrote: »
    Shady3011 wrote: »
    I still remember how my professor said C# was a failed endeavor by Microsoft to introduce it as the new C. C is the new C, of course. Not that it's relevant here. I always just found that funny.

    Salmon'd for "Bwah?" It's positioned as the new Java, not C.

    From what he told me, they wanted to build a successor to C/C++ that actually was an Object Oriented Language.

    Is he thinking more from the business perspective? That makes more sense, but from a development standpoint, I have a hard time comparing the two as similar tools.

    Yeah. It was usually business when he talked about Microsoft. That or stack smashing their code.

    Shady3011 on
  • DelzhandDelzhand Agrias Fucking Oaks Registered User, Transition Team regular
    edited January 2009
    Shady3011 wrote: »
    Does C# have a garbage collector? I do hate memory management.
    Yes, it does.

    But the power of today's machines makes it largely irrelevant. It's still much, much faster than Java. I mean, I wouldn't write an OS with it, but for games it's perfectly adequate. Moreover, if you're enough of a programmer to notice and care about the difference between managed/unmanaged, you could probably write a game in a faster language anyway.

    Delzhand on
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    Delzhand wrote: »
    Shady3011 wrote: »
    Does C# have a garbage collector? I do hate memory management.
    Yes, it does.

    But the power of today's machines makes it largely irrelevant. It's still much, much faster than Java. I mean, I wouldn't write an OS with it, but for games it's perfectly adequate. Moreover, if you're enough of a programmer to notice and care about the difference between managed/unmanaged, you could probably write a game in a faster language anyway.

    Yeah. I realize modern PCs don't need so much meticulous data management. It's just my professors (pretty much all of them) made it a point to drive that point every chance they got. From a design point, it makes perfect sense to plug your holes. It has more to do with the fact that I'm a lot more comfortable using assembly and C than more dynamic languages.

    Shady3011 on
  • gjaustingjaustin Registered User regular
    edited January 2009
    I had some questions about XNA that I was going to post in the beginner programming thread (for lack of a better place), but this looks like it might be more appropriate...

    I'm a fairly experienced programmer (8-10 years) and I was thinking of playing around with XNA as a hobby project. Are there any good online C# resources for someone that has lots of Java/C/Perl experience? Or is it easy enough to pick up that it's not worth it. Also, does anyone have recommendations of good XNA starter books or online tutorials? All the XNA books I found on Amazon either seem to have poor reviews or are geared toward older releases of the framework.


    www.ziggyware.com has some pretty good tutorials too

    And like the others said, if you can program Java you can program C#. I'm sure you can find a simple summary of the differences with a quick google search.


    Shady3011 wrote:
    Does C# have a garbage collector? I do hate memory management.

    It does. As long as you correctly handle your event registrations, you shouldn't have to worry about memory leaks at all.

    Though if you're planning on targetting the 360 or Zune, you have to be a little more careful. My understanding is that their GC isn't as advanced (i.e. it isn't generational).

    gjaustin on
  • El GuacoEl Guaco Registered User regular
    edited January 2009
    Shady3011 wrote: »
    Does C# have a garbage collector? I do hate memory management.
    Yes, it does.

    While I do hate explicit memory management, there's no excuse for not knowing the difference between stack and heap memory in C#. It is still important enough to know how this works because it can affect the performance of your program. Not disposing of unneeded objects can create a lot of extra work for the GC which can bring your program to a halt while it figures out what to do with your mess. Just because the GC can handle it doesn't mean you should be careless about allocating objects and not disposing them.

    Also, I think you guys should try to keep this discussion in the other thread pertaining to XNA. Either that or rename it to something like "XNA programming discussion" and keep it on topic.

    El Guaco on
  • GrimReaperGrimReaper Registered User regular
    edited January 2009
    Shady3011 wrote: »
    templewulf wrote: »
    Shady3011 wrote: »
    I still remember how my professor said C# was a failed endeavor by Microsoft to introduce it as the new C. C is the new C, of course. Not that it's relevant here. I always just found that funny.

    Salmon'd for "Bwah?" It's positioned as the new Java, not C.

    From what he told me, they wanted to build a successor to C/C++ that actually was an Object Oriented Language.

    Microsoft's long, long term plan is to go over entirely over to C#. The massive big bonus of it running in an vm is that you can do a level of security that is far more tighter than native running compiled code for the processor. There was a whole bunch of cool stuff shown off a bit ago with some videos from MS people demonstrating a demo OS written entirely in C#, was pretty impressive.

    Just dug out a link, Singularity.

    I think their long term plans are to move over to singularity. Frankly I cannot emphasize how long term those plans are.

    Also on the whole speed thing on JAVA versus C#, from my understanding of what I've heard for hard numbers Java is supposedly faster. But the big things C# has is user interface speed, essentially perceived speed and java is a bigger memory whore. Although I wouldn't be surprised if MS do hide some of the memory overhead of the .net framework when it's running.

    EDIT: He's also got a point about the C thing, a few years ago when I heard about C# everyone was talking about it being MS' attempt to replace C. Java never really came into conversations as similar as they are in concepts.
    And in a way it hasn't really succeeded, if you look at the number of stuff written in C it's phenomenal. And how many everyday apps are written in C#? Most C# apps I've used fall into a few categories. 1. Simple configuration application. (used to configure some server software or something or other) 2. Some simple application. 3. Application written by MS. 4. XNA games. 5. Web server .net stuff

    We haven't really seen any "killer" C# apps. There was a rumour a while back that MS were rewriting Office from the ground up in C# but supposedly hit performance and memory issues. I've no ideas if that's true though.

    GrimReaper on
    PSN | Steam
    ---
    I've got a spare copy of Portal, if anyone wants it message me.
  • gjaustingjaustin Registered User regular
    edited January 2009
    GrimReaper wrote: »
    And in a way it hasn't really succeeded, if you look at the number of stuff written in C it's phenomenal. And how many everyday apps are written in C#? Most C# apps I've used fall into a few categories. 1. Simple configuration application. (used to configure some server software or something or other) 2. Some simple application. 3. Application written by MS. 4. XNA games. 5. Web server .net stuff.

    You might be surprised by the number of banks and brokerage houses that write their trading applications in C# with Windows Forms. I'd name names, but for that NDA I signed.

    Then again, maybe that's why so many are failing :)

    gjaustin on
  • JCRooksJCRooks Registered User regular
    edited January 2009
    There are plenty of apps and tools being written in C#. Heck, same with Java. But you're right, they're not your typical programs, because C/C++ still wins in the speed and "not needing anything else to run" department.

    I am a huge fan of managed code in general. I'm big into C# now and into Java back in school. I would be very happy never to write native code for the rest of my life. I'm looking forward to the time where typical apps aren't written in C/C++ anymore. It'll still probably take a few decades for that to happen, but I'm certain that day will come. No one wants to do memory management and such if they have to.

    JCRooks on
    Xbox LIVE, Steam, Twitter, etc. ...
    Gamertag: Rooks
    - Don't add me, I'm at/near the friend limit :)

    Steam: JC_Rooks

    Twitter: http://twitter.com/JiunweiC

    I work on this: http://www.xbox.com
  • templewulftemplewulf The Team Chump USARegistered User regular
    edited January 2009
    JCRooks wrote: »
    No one wants to do memory management and such if they have to.

    Exactly. I know how to write a linked list, but goddamn if I don't love me some std::list. Similarly, I work in an environment where you have to clean up your memory leaks (without destructors!), but I wouldn't if I could choose not to. I used to do everything in C++, but Python, C#, etc. actually make things much more productive.

    templewulf on
    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • JCRooksJCRooks Registered User regular
    edited January 2009
    templewulf wrote: »
    JCRooks wrote: »
    No one wants to do memory management and such if they have to.

    Exactly. I know how to write a linked list, but goddamn if I don't love me some std::list. Similarly, I work in an environment where you have to clean up your memory leaks (without destructors!), but I wouldn't if I could choose not to. I used to do everything in C++, but Python, C#, etc. actually make things much more productive.

    Not to mention the security impacts of this too. How many viruses, worms, trojans, etc. have taken advantage of not cleaning up properly, going out of bounds, etc.? Plenty.

    Certainly managed apps (C#/Java) aren't completely immune either, but they are so much more inherently easier to write secure code for.

    JCRooks on
    Xbox LIVE, Steam, Twitter, etc. ...
    Gamertag: Rooks
    - Don't add me, I'm at/near the friend limit :)

    Steam: JC_Rooks

    Twitter: http://twitter.com/JiunweiC

    I work on this: http://www.xbox.com
  • GrimReaperGrimReaper Registered User regular
    edited January 2009
    gjaustin wrote: »
    GrimReaper wrote: »
    And in a way it hasn't really succeeded, if you look at the number of stuff written in C it's phenomenal. And how many everyday apps are written in C#? Most C# apps I've used fall into a few categories. 1. Simple configuration application. (used to configure some server software or something or other) 2. Some simple application. 3. Application written by MS. 4. XNA games. 5. Web server .net stuff.

    You might be surprised by the number of banks and brokerage houses that write their trading applications in C# with Windows Forms. I'd name names, but for that NDA I signed.

    Then again, maybe that's why so many are failing :)

    294168009_b25decaddf.jpg

    ;-)

    GrimReaper on
    PSN | Steam
    ---
    I've got a spare copy of Portal, if anyone wants it message me.
  • JCRooksJCRooks Registered User regular
    edited January 2009
    I seriously hope you're joking. The collapse of the banking industry has little to with what language their trading apps were written in and more with the corrupt or risky practices and business decisions that were going on.

    Sorry if you were being sarcastic. Not exactly in the best mood at the moment.

    JCRooks on
    Xbox LIVE, Steam, Twitter, etc. ...
    Gamertag: Rooks
    - Don't add me, I'm at/near the friend limit :)

    Steam: JC_Rooks

    Twitter: http://twitter.com/JiunweiC

    I work on this: http://www.xbox.com
  • DelzhandDelzhand Agrias Fucking Oaks Registered User, Transition Team regular
    edited January 2009
    I for one would never miss the opportunity to post the Oh Snap Flowchart, so I assume he's just some kind of funnyman.

    Delzhand on
  • Shady3011Shady3011 Registered User regular
    edited January 2009
    JCRooks wrote: »
    templewulf wrote: »
    JCRooks wrote: »
    No one wants to do memory management and such if they have to.

    Exactly. I know how to write a linked list, but goddamn if I don't love me some std::list. Similarly, I work in an environment where you have to clean up your memory leaks (without destructors!), but I wouldn't if I could choose not to. I used to do everything in C++, but Python, C#, etc. actually make things much more productive.

    Not to mention the security impacts of this too. How many viruses, worms, trojans, etc. have taken advantage of not cleaning up properly, going out of bounds, etc.? Plenty.

    I always find out of bounds exceptions to be the funniest kinds of mess ups. These seem to pop up a lot on the PSP since it's the reason why homebrew is so popular.

    Shady3011 on
  • gjaustingjaustin Registered User regular
    edited January 2009
    JCRooks wrote: »
    I seriously hope you're joking. The collapse of the banking industry has little to with what language their trading apps were written in and more with the corrupt or risky practices and business decisions that were going on.

    Sorry if you were being sarcastic. Not exactly in the best mood at the moment.

    Don't worry, I'm kidding.

    No need to apologize either. I decided to post that in jest myself, because I expected someone else to post it and actually be serious.


    Anyway, to push us back on topic, I found XNA incredibly easy to get started with. Sure, doing C# programming professionally helps, but getting sprites up on the screen and input working was simple. I've put some time into getting a basic 2D engine working (Menus, Camera, Collision Detection, etc), I just can't decide which game idea to actually use it on.

    gjaustin on
  • SamuraiRockSamuraiRock Registered User regular
    edited January 2009
    I think I might make my first project in C#/XNA a financial institution simulation. For the sake of realism.

    Seriously though, I shall download this and then constantly bring this thread back to life asking questions about it! Tally-ho!

    SamuraiRock on
  • DelzhandDelzhand Agrias Fucking Oaks Registered User, Transition Team regular
    edited January 2009
    Well, we veterans will help where we can. I've been using XNA since it came out.

    Delzhand on
  • HandkorHandkor Registered User regular
    edited January 2009
    Delzhand wrote: »
    Well, we veterans will help where we can. I've been using XNA since it came out.

    Yes we'll try to help.

    Handkor on
  • El GuacoEl Guaco Registered User regular
    edited January 2009
    GrimReaper wrote: »
    EDIT: He's also got a point about the C thing, a few years ago when I heard about C# everyone was talking about it being MS' attempt to replace C. Java never really came into conversations as similar as they are in concepts.
    And in a way it hasn't really succeeded, if you look at the number of stuff written in C it's phenomenal. And how many everyday apps are written in C#? Most C# apps I've used fall into a few categories. 1. Simple configuration application. (used to configure some server software or something or other) 2. Some simple application. 3. Application written by MS. 4. XNA games. 5. Web server .net stuff

    We haven't really seen any "killer" C# apps. There was a rumour a while back that MS were rewriting Office from the ground up in C# but supposedly hit performance and memory issues. I've no ideas if that's true though.

    I'm old enough to remember J#, but the details are fuzzy. But MS has had .NET in the works for a LONG time. First there was there was the fight between Sun and MS when MS had the audacity to produce it's own flavor of JavaScript without permission. At the same time they were preparing a Java-like language to compete with Sun's platform. After a huge lawsuit and settlement, MS dropped the J# moniker and it's confusing branding and relabeled the entire platform. C#, even before it got labeled that, was always intended to compete with the Java platform. They wanted a Java-like language/platform but wanted to keep their hooks into the Windows API. Thus, .NET. And while C# is loosely based on C/C++ syntax, it is more alike to Java in terms of OOP, but in my opinion, does a better job of OOP while giving you the .NET framework as a bonus.

    As a .NET professional, and someone who is currently looking for their next job, I am somewhat surprised (and pleasantly so) how much C# has taken root, especially in areas that are traditionally out of the MS world. Financial companies are moving away from mainframes and Cobol and such to .NET platform and the demand for C# programmers is fairly high considering the state of the economy. That said, I don't think you need a "killer app" to show that C# is a strong and viable language for commercial development. The fact that you can do a job search on monster for "senior .net developer" and get hundreds of hits in the Boston area alone speaks for itself.

    El Guaco on
Sign In or Register to comment.