Jump to content
  • Advertisement

XNA-3D-101

Member
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

120 Neutral

About XNA-3D-101

  • Rank
    Newbie
  1. XNA is Visual C#'s game "library"/framework. You'll want to check into that. XNA 3.0 works with Visual C# 2008 and XNA 4.0 works with Visual C# 2010. Both can be downloaded for free from Microsoft in their "Express" editions. Riemer's has got some 2D stuff. http://www.riemers.net/eng/Tutorials/XNA/Csharp/series2d.php Be aware that XNA 3.0 and 4.0 code are not fully compatiable. So, you have to match up the tutorials with the version. Probably the best thing to do is get a C# book and read it cover to cover. Then go write some simple C# stuff. After that doing 2D tutorials for XNA, like Riemer's stuff would be good. I hear there's some really good stuff on YouTube for XNA 2D tutorials. Honestly, I haven't really done 2D in XNA. I'm all about the 3D. I have been putting tutorials together at XNA3D101.com for XNA in 3D. Once you feel ready for it, I have some tutorials for C#/XNA for beginners starting out doing 3D in XNA. It's not intended to be the only source for someone learning XNA, but it's there to provide some tutorials that maybe aren't available elsewhere.
  2. XNA-3D-101

    Looking to start programming, where to start?

    C++ and C# outdated. ROFL :-) Where did you hear that from? I work in business IT and not the game industry. But I hear of lots of jobs for C# programmers. C++ jobs are a bit rare because very few businesses have use for such a powerful language as C++. After all, if you can program it in a week in C#, why pay someone to take 3 months to program it in C++? Still, C++ isn't going anywhere. I'm hearing the C++ is "evolving" with Windows 8 and whatnot, but that's not the same thing as "going away". Machine language is what the computer "speaks". If you want to get real technical, Machine Language is nothing but switch settings (the transistors in your CPU and memory are electronicly controlled switches that are either on (1) or off (0)). That's usually represented with bytes that have values between 0 and 255 where each byte is 8 electronic switches. Machine language is programming the computer by setting the switches by setting every byte a specific value. Now that's a dead language. Not because it's not awesome, but because Assembler is the same thing. Assembler just assigns mnemonics to the numbers. So just for example, you might have 32 46 29 in machine language. 32 might mean add the next number that comes up to whatever number is in the memory address provided in the next number. Or Add 46 to the value at memory location 29. Assembler allows you to write: ADD 46, 29 rather that 32 46 29 and makes it more clear what you're doing. But it's one for one with machine language. Essentially, it is machine language. When you get deep into C++, you find out that C++ is Assembly language. Instead of ADD 46, 29 you will have something like X +=46 which says to add 46 to the current value of X. But under the hood X is just a memory address that might be at location 29. When you dis-assemble Visual C++ you find that it's next to impossible to write better machine language code than Visual C++ does. It's just really good at it. That means C++ is direct control over the hardware. You just simply can't get any more powerful or efficient than that. So good luck replacing it. Unless Object Oriented Programming goes out of fashion, I don't see C++ going anywhere in the next decade. That doesn't mean it won't evolve. Most modern programming languages are just rehashes of C++. Java is basically C++. C# is basically beginner level C++ that calls the .Net library. It's like new languages can't even manage to do it better than C++; they just abstract it more and take it further away from machine language reducing the performance and power. Now things like Windows managed code are making things a bit more complicated. So, you have to have managed C++ and CLI and all that, but C++ is still as powerful as it gets. It's so powerful that no one even bothers writing Assembly language code anymore. Granted, modern machines are so powerful that you can afford to waste a whole lot of the computer's resources. Visual Basic, for example, is not nearly as efficient as C++ but it's a whole lot easier to learn. And there's the question of "maybe it's ok to be less efficient if it makes it easier and development time is shorter". C# is half way between Visual Basic.Net and C++. It reads a whole lot like C++, making it a little more difficult to learn, but it spends 90% of it's time calling .Net just like VB.Net to the point that the two languages look very similar. Anyway, to the OP, Visual Basic.Net is a good easy way to start learning programming. C# is just a little harder but a really good language to learn and not that much harder. I would not recommend C++ as a beginner language. I've seen people fail to learn easier languages. Yes. You can start by learning C++, but if it seems overly difficult definately take a few steps back and learn C# or VB. C# is very similar to C++ but just a whole lot easier because you don't deal with low level stuff. For example, you're going to have to get very familiar with pointers in C++. It's a difficult enough subject it gave me a bit of trouble in college even though I've been programming since I was 12. C# is similar but there are no pointers anywhere in the language. You just simply don't have to learn about pointers in C#. (Granted, eventually you need to learn about pointers but not at the beginner or intermediate level.) Oh. And most programming languages are similar. I mean, after all, all of them are used to program the computer. But they were all created with different purposes in mind. Basic was created to be easy for beginners and kids to learn. Visual Basic is just a modern version of that, but maybe not as common in the business world today as it once was. Pascal was created to teach college students to program "correctly" before Object Oriented Programming was popular. Assembler was created because it was easier than machine language and nothing else existed at the time. C was created as a powerful improvement over assembler that could be used across many platforms. (Assembler is specific to the CPU being used. Mac Assembler is nothing like Intel Assembler when you get into the specifics.) Java was created to be used on even MORE platforms without any code changes but ran through a virtual machine which is slower than C. C++ was created to make C object oriented. C# was created to compete against Java and leverage the .Net CLR. So they all have their advantages for certain things related to why they were created in the first place. Learning any computer language will make learning the next one a whole lot easier. And, yes, an array is an array no matter what language it's programmed in. In other words, a lot of what you learn in one language will apply directly to the others. Generally, the more powerful the language, the harder it is to learn and the more time it takes to get anything done in it. That's why no one does Assembler anymore, since C++ is a little easier but can do the exact same thing just as efficiently (with some rare exceptions). And that's why businesses don't want to hire C++ programmers (except game design companies who primarily want to hire only C++ programmers) when they can hire a C# programmer to do the same thing in 1/10th the time and just buy a more expensive and more powerful computer to make up for the performance lost. Businesses can afford to throw more hardware at a problem. But game design companies can't tell their customers "Well, we could have programmed our game in C++ so that you could run it on a $1,000 computer, but we decided to program it in VB.Net. But HEY, it will run JUST as well if you go buy a $5,000 computer to run it on. Oh. And by the way that will be $60 for the privledge of playing our game." So: easiest language VB.Net best language to start with if you can handle it: C# best language to know but one of the most difficult:C++ (C++ is actually a whole lot more than just C++. Good C++ programmers know Win32, ATL, STL, maybe MFC, and can tell you exactly how Windows works under the hood with things like multi-threading management using mutexes and semephores and large block memory management using page locking. In short, learning C++ is just the beginning of learning C++ for Windows. Learning C++ is actually the "easy" part and only about 1/100th of the journey.) Post Script: I actually got up out of bed after going to bed to write this because I forgot to tell you: you can download VB.Net Express edition or C#.Net Express edition for free from Microsoft. It's hard to beat that price. So, it won't cost you anything to give them a try. (For that matter, I think you can also download C++ Express edition for free too.)
  3. XNA-3D-101

    World, View, and Projection Matrices

    I don't know if it will help you, but you might read my Matrix tutorial. It's written for XNA and XNA does a lot of work for setting up you matrices for you. I haven't had to think about manually loading a matrix in a long time. Here's the tutorial: http://xna-3d-101.co...s/Matrices.html It looks like you're working in C++ with DirectX. So, this may not be terribly helpful if you have to load your own matrices. But Khan Academy has lessons on Matrices. I swear that I saw a good video on YouTube on the subject of using Matrices in game creation the other day. I thought I book marked it, but apparently I didn't and I can't find it. For 3D, you are going to be using 4 by 4 matrices. The camera matrix (called a View Matrix in XNA) should store your camera position and facing. Hopefully someone else will post something more helpful. Post Script: Ah HA! I found it. I think this guy does a pretty good job of explaining how matrices are loaded for 3D games.
  4. XNA-3D-101

    XNA Beginner

    Riemer's site is really good although I think he may have a mix of XNA 3.0 and XNA 4.0 code and they aren't fully compatiable with one another. They made some major changes to the Draw code in XNA 4.0 and XNA 3.0 tutorials have to be totally rewritten to work in 4.0. Riemer's books are really good too although I think they are all 3.0. Unfortunately, I haven't seen many good XNA 3D sites out there, especially for 4.0. That's why I created my own at XNA3D101.comand, if I can toot my own horn, I would love for you to check it out. It's still under construction, but all the source code is there for the first tutorial. I hope to write several more tutorials that cover a lot of similar things to what Riemer's tutorials cover and then eventually go beyond that. I take a very different approach. So, I think it's worth the time to go through the tutorials even if you've gone through Riemer's. Toy Maker's site is worth checking out but it's a mix of 3.0 and 4.0: http://www.toymaker..../XNA/index.html Really, there's some pretty good stuff on Whitiker's site too: http://rbwhitaker.wi...om/3d-tutorials I haven't seen a bad XNA book yet, but they are kind of all over the place. The 4.0 books tend to either be too advanced or too simple. For example this is one of my favorites: http://www.amazon.co...eywords=XNA 4.0 But it's nothing but how to program HLSL in an XNA environment. This one is a must read when you get to the Intermediate to Advanced level in XNA: http://www.amazon.co...eywords=XNA 4.0 It covers a whole lot of low level stuff. Honestly, I found your post because I was Googling to try and figure out the future of XNA. Microsoft just isn't saying. What I'm "feeling" is that XNA 4.0 is the end. XNA 4.0 will DEFINATELY run in Windows 8 from what Microsoft says. But it's a bit uncertain as to what kind of ability C# programmers will have to do 3D programming in Windows (Metro) in the future. Microsoft just isn't saying. They keep saying that you can write games in C# in Windows 8 (Metro) but they don't say whether that means text games or 3D RGP, racing games, FPS, etc. I'm "hoping" that DirectX will be so completly integrated into Windows 8 that you can easily write C# programs against it. I see a lot of reason to believe that XNA is being replaced by DirectX in Windows 8, but nothing certain. Either way, 90% of what you will learn with XNA will port directly over to any other platform you work with. I mean, building a skybox, or a terrain isn't an XNA thing. It's a 3D game thing. It doesn't matter what you're working in, you need to learn to build a skybox and a terrain and the basic concept is the same regardless of what you're working in. So stuff you learn in XNA won't be a waste even if they do away with XNA a year or two down the road. Windows 8 will run Windows 7, Vista, or XP games for backwards compatiability. It just doesn't run them as Metro apps. The real question is how will C# programmers create Metro games and will we still be able to do 3D in C# when creating Metro games. Microsoft seems to almost be avoiding that question.
  5. Check out XNA in C#. If you know C++ learning C# will take like 10 minutes. XNA allows you to create 2D and 3D games. It's essentially a C# wrapper for DirectX.
  6. XNA-3D-101

    Engine or API?

    I've never worked in the game industry. But one thing I can tell you is that 90% of game programing is not the framework but the algorithms. In plain English, what I'm saying is that it doesn't matter whether you learn DirectX, OpenGL, or XNA. None of them are going to implement something like a ROAM Level of Detail algorithm for you. You have to program that yourself. And that is what game development is all about. DirectX, OpenGL, and XNA don't create games; they draw to the screen. Drawing to the screen is not any more "creating a game" than grabbing a pencil and paper and drawing is "creating a game". It's just drawing. At least 90% of the game is totally independent of DirectX, OpenGL, or XNA. It's also largely independent of C++, Java, or C#. I mean obviously knowing C++ and DirectX will look good on a resume if you go to get a job as a game programmer. But you can be a world class expert in those subjects and not know the first thing about creating games. My advice: pick something and learn how to create games with it. It doesn't matter which. But I'll also tell you that my personal opinion is that it's best to start with C# and XNA because it's the easiest to get help with when you get stuck.
  7. XNA-3D-101

    Learning C#/XNA need some help...

    I assume you want to do 2D stuff. I haven't really seen a "bad" XNA book yet. The 4.0 ones tend to be really basic or really advanced though. The 3.0 books are better for the intermediate level, but they aren't fully compatiable with XNA 4.0. Riemer's tutorials (and really his 3.0 books) are a must. I've heard there's some good 2D stuff on YouTube. If you're wanting to do 3D, I'll recommend my own site: XNA3D101.com It's pretty new and still under construction, but there's enough there already to get a beginner started.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!