starting with xna

Started by
14 comments, last by iko 14 years, 9 months ago
Quote:Looks much easier than C++/SDL like before, and it seems to place much more of a focus on programming the actual game logic since the graphics part is much easier.

If you want to get straight into programming game logic, I would advice to use a rendering engine instead. I have used OGRE in the past, with just about 50 lines of code (in my case C++) you are ready to go. Using the scene manager you can load objects into the scene with just 3 lines of code, and with a few more lines you can move them around or play animations. This way you can get started on game logic almost instantly, while you are still learning how 3D graphics work, making it easier when in the future decide to make your own engine.


Making your own engine always takes time and is complicated, no matter what language you are using. I wouldn't pay to much attention to those "this language is easier" discussions, it's what they said years back in programming class in school about Java, and 85% failed at the second test. IMO, the book, tutorial, teacher or whatever is going to learn to using the language is of much bigger influence then the choice of language. Some languages might be a bit easier then others, but just about any language can be screwed up without a good guide. When talking about more intense graphics based stuff, then you will need to learn shaders which have their own languages.
Advertisement
I've been thinking about aspects of game development a lot in the last couple days since I've decided to get back into it, and I'm realizing I have no idea how to do most basic things. For example, I know the basic idea of collision detection via bounding spheres/boxes, but I have no idea how to cut down the number of collision tests so that you're not testing every possible combination of objects for collisions, only close ones. Things like that.
Perhaps you should take a look at a open source physics engine to see how it's done. I haven't got much experience with it myself, I used ODE for a bit last year but physics were eventually cut from the game (wasn't really required for the type of game, so we concentrated more on AI movement) so I didn't use much of it. But what I saw of it was pretty nice, and I think by using a physics engine you should get an idea how it works, and then you can just look at the code to see how the actual implementation is (in case of an open source physics engine that is).
Quote:Original post by d33ts
I've been thinking about aspects of game development a lot in the last couple days since I've decided to get back into it, and I'm realizing I have no idea how to do most basic things. For example, I know the basic idea of collision detection via bounding spheres/boxes, but I have no idea how to cut down the number of collision tests so that you're not testing every possible combination of objects for collisions, only close ones. Things like that.

Funny you asked since Microsoft actually has a whole series of tutorials on that on the XNA website:
Collision Series 1: 2D Rectangle Collision
Microsoft really really wants to see XNA succeed as you can see all the money they are pouring into all the various tutorials/updates to XNA. They never did that for managed dx:(
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
So what would be the benefits/drawbacks of using XNA rather than a prebuilt game engine like ogre or irrlicht?
One really cool thing about XNA is that you can develop games for Windows, but also deploy those games to your Xbox 360 or even Zune. I'm pretty sure it's the only language that can do that (besides what professional game developers use). I'f you're making a 2D game, XNA is one of the easiest languages to use; it handles creating a window / graphics device and all that tedious stuff needed for C++ DirectX and lets you concentrate more on the actual game. I still haven't quite gotten the hang of 3D XNA yet though...

This topic is closed to new replies.

Advertisement