[XNA 4.0][Series] The Project Setup

Discussion in 'Game Development' started by GoldBl4d3, Dec 14, 2012 with 20 replies and 1,196 views.

  1. GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345
    The Project Setup (1.0)
    In this tutorial we will cover the basics of starting a new game project and how to configure the game properties to suite the environment of our game. This tutorial is for absolute beginners. However, experienced programmers may comment and help others.
    Skill Level: Easy
    Time to Complete: 10 Minutes

    Special Links:
    http://www.microsoft.com/en-us/download/details.aspx?id=27599


    #1.1 Selecting a Project Type

    Their are two main types of game projects you can build. First being a Windows Game, second being an Xbox 360 Game. Windows Games can be distributed freely depending on the author of the game. Xbox 360 Games can be built and deployed on the Xbox 360 console. This requires a one hundred dollar annual license. Then your game must be submitted for peer review and pass. Once it has passed, it will be displayed in the Xbox Live Indie Games marketplace.

    For the purpose of this tutorial, we will be using a Windows Game Project. Name the project what ever you want.

    [​IMG]


    #1.2 What is where?


    When your new Windows Game project has finished loading, you will be introduced to your games main control class. Within this class you will see a lot of comments (green text). Please read and fully understand them all. Once you have done so, remove it all. You should end up with a screen like this.

    [​IMG]

    On the right hand side is our Solution Explorer. Here we can see our main project, and our Content Project. Our content project is a special project used to hold all of the games content and process it though using something called the content processor.

    [​IMG]


    #1.3 Setting up the Graphics Processor


    Now lets get our games window size setup. This size can be anything you want. If you are making an Xbox 360 game. You will want to set your back buffer width to 1280 and your back buffer height to 720.

    For the purpose of this tutorial I will use the screen size of 880x520. I will also be setting the MultiSample option to true. This allows Anti-Alias to kick in for any object that is less then 1 pixel by position. So if my asset were at the position (100, 100), anti-alias would not kick in. However if my position was at (100, 100.5), anti-alias would kick in to smooth that edge.

    Then finally we apply out changes. All of this code will be held under the Game1 constructor method.

    [​IMG]

    #1.4 Unloading our Content

    Now our last thing to prepare before we can start building our game is to unload our content. Our content (when loaded) is loaded in to memory. By unloading it, we remove it from memory. Then we dispose the content manager because we are ending the games process.

    [​IMG]


    Thank you for reading and following along. If you have any questions please post below. Please watch out for the next parts in the series. Please note this tutorial is small as it is part of a series. This tutorial will just prepare the user for the start of the series.
     
    • Like Like x 5
    Last edited: Dec 14, 2012
  2. Nagato

    Nagato NAH YEAH

    Messages:
    7,493
    Ratings:
    2,839
    I'm having compatibility problems.

    [​IMG]
     
  3. OP
    GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345
    Use C# express with 3.0 framework.
     
    • Like Like x 1
  4. Nagato

    Nagato NAH YEAH

    Messages:
    7,493
    Ratings:
    2,839
    Thanks. :smile:
     
  5. imGol2den

    imGol2den Life Goes On!

    Messages:
    1,056
    Ratings:
    396
    i feel like xna is out of data a little? compared to other engines
     
  6. OP
    GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345
    Yes it is, but it is still used for learning. Its also not an engine, but a framework extension.
     
  7. MatthewH

    MatthewH Member

    Messages:
    1,612
    Ratings:
    615
    XNA is like he said an extension. It allows you to do more with basic softwares (compared to full game engines). It's a beginner framework so people can get their feet wet in the coding side of things.

    GoldBl4d3, you should continue the series. I've never actually used XNA myself so I couldn't. :tongue:
    It's a good base for newbies.
     
  8. imGol2den

    imGol2den Life Goes On!

    Messages:
    1,056
    Ratings:
    396
    Ik what it is, i was just saying. But thx for the correction, ive made some cool xbla games with it on my jtag
     
  9. Liquid44

    Liquid44 Banned

    Messages:
    1,153
    Ratings:
    553
    lol makes XNA a beginner framework? I've never used it but there is nothing stopping the programmer from implementing highly advanced techniques.
     
    • Like Like x 1
  10. MatthewH

    MatthewH Member

    Messages:
    1,612
    Ratings:
    615
    Never said anything about someone using more advanced techniques; I'm saying, it's not a full game engine which is good to people who are just looking to get a little experience on the coding side.
     
  11. Liquid44

    Liquid44 Banned

    Messages:
    1,153
    Ratings:
    553
    And I'm saying why would you consider it good for "little experience". Just because it is not labelled as an engine does not make it limited. If anything it is harder to use than a full engine because with a UI all you do is drag and drop stuff.

    I sure as hell would not consider this project made someone who wanted a little experience on the coding side:
     
  12. OP
    GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345
    Flight dynamics alone = :banghead:

    Xna is no way is a beginner framework nor something for small experiences. It is just portrayed that way because indie developers aren't that advanced with it usually. Xna like C++ and DirectX is the framework that creates the big game engines. That being an example.

    Also, engines are not just drag and drop systems. Much coding most go in to an engine to make a good game.
     
    • Like Like x 2
  13. MatthewH

    MatthewH Member

    Messages:
    1,612
    Ratings:
    615
    ^ This

    Also, look back at what I said...
    I never said that it's not used for advanced things, ever. I simply did not go in depth about it. It's not like Unity where there's more of an interface. It's all coding. So, to clarify, once again, what I said. It's good for beginners who are just wanting to do the coding side of things.
    And once again, I feel like I must state this, I'm not saying it can't be used for other things other than beginner stuff.

    If you still don't understand what I'm saying, well. Deal with it.
     
    • Like Like x 1
  14. OP
    GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345
    Haha, I know what your saying. No need to explain to me.
     
  15. MatthewH

    MatthewH Member

    Messages:
    1,612
    Ratings:
    615
    I was explaining to the other guy who didn't seem to get it. :tongue:
     
    • Like Like x 1
  16. Liquid44

    Liquid44 Banned

    Messages:
    1,153
    Ratings:
    553
    lol lets have a quick review.

    Do you not realise what you are typing or just being oblivious...
     
    • Like Like x 1
  17. MatthewH

    MatthewH Member

    Messages:
    1,612
    Ratings:
    615
    Ugh...I feel like you're not understanding anything are you? I'm not explaining again. Gold, if you want to...go ahead. I'm sick of stupidity right now...

    Anyway, back on topic. Seriously, you should continue this series. Would be good for the guys just getting into the programming side of game development.
     
  18. OP
    GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345

    Man ive done this before. I mean something different than what I typed. It happens, its not a big deal. This is just one of those situations where he wasn't focusing on what he was typing. Lets just end this.

    coldfire202

    No I will not be continuing the series haha, but thanks for that.
     
  19. MatthewH

    MatthewH Member

    Messages:
    1,612
    Ratings:
    615
    GoldBl4d3 why not? :frown: STOP DOING YOUR WORK AND CONTINUE SOMETHING THAT IS COMPLETELY IRRELEVANT TO EVERYTHING!
     
    • Like Like x 1
  20. OP
    GoldBl4d3

    GoldBl4d3 VIP VIP Retired

    Messages:
    3,778
    Ratings:
    1,345
    Lol ight.
     

Share This Page