Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    387963

XNA

Sign in to follow this  
Stompy9999

92 views

Back at the end of August, I downloaded the XNA Game Studio Express Beta. Until this weekend, I really hadn't experimented with it at all. I had glanced at the SpaceWar code, but I hadn't really written a program of any sort.

It occured to me yesterday that I probably should learn XNA, given the fact that this framework will eventually allow me to develop games for my Xbox 360. Being able to have my games played on a game console has been something I've wanted since I started to program. So, with that in mind, I decided to experiment a little with XNA.

So after a few minutes, I had a blank window. It would have taken less, but I made sure to reformat the code so it wasn't like this:

public int stuff() {
int i = 4;
}

I personally can't stand that formatting, it confuses me a great deal. Sadly for me, all the template code you're given is formatted like this.

Anyways, I decided then that I should learn how to draw a sprite. A few minutes later, I drew a hand drawn picture I had made to the screen. I must say it was quite easy. What suprised me was that I was under the impression that I would be required to use the 3D coordinate system. I found that I could actually use the coordinate system I'm already familiar with from programming 2D games.

At this point, I pretty much realized that anything I could do in SDL, I could also do in XNA. Given enough time, I could probably recode Blocky Man in XNA. There are a few issues though. For instance, having to create a masked image for transparency. One of the main reasons that I started using Allegro, and later SDL, is because of color key transparency. However, I think I could get over that difficulty, and it might end up helping in some respects. I was thinking that I might try to code a robotron clone with stick figures and such. It would also have vehicles that take advantage of XNA's sprite rotation capibility. That would be a pretty cool side project.

With the regards to 2D sprite drawing, the documentation was very helpful. I can't say the same for 3D rendering, which I wanted to try out. When I created a program from the 3D code given in the documentation, it didn't render anything. I tried many different variations, with no luck.

I wish the package came with some examples. I know SpaceWar is supposed to be a big example, but I didn't really find it helpful. Especially, since I can't seem to play it without a common controller. It would be nice to have specific example programs, like "rendering a triangle" and "transformations". However, I know that several sites are currently creating such tutorials.

Apparently, in December, the full package will come out. I think at that time I'll really start to use it, but until then, I'll just stick to C++ and SDL. December isn't really that far away anyways, and I can't say Blocky Man will be done then either(probably not). However, I'm really looking forward to seriously using XNA, and maybe getting a game running on my 360.

I did become a member on OpenXNA. I don't think I'll have any content for a little while, but I wanted to make sure no one took the name "Stompy"[lol]

------Completely unrelated-----------------------------------------------

I saw "Flags of our Fathers" today. It's a great movie, and I definetly recommend it. Quite an interesting way to tell a story in a movie, but
it seems to work well. Basically, most of the actual Iwo Jima scenes are
told as flashbacks that the soldiers are having. It's a good idea, but it
can make the timeline seem confusing at times. I'm always a fan of World
War II movies, and this one is pretty good.

-------------------------------------------------------------------------
Sign in to follow this  


5 Comments


Recommended Comments

I can't offer up much help on the other XNA topics, but XNA Spot has a walk-through of how to get keyboard input working for the basic Space War game here .

Share this comment


Link to comment
You can change the formatting settings for C# Express Edition/Game Studio Express (Tools menu item, Options, Text Editor - C# - Formatting) and then reformat the document (ctrl+e then ctrl+d) which should take care of that automatically (it does for me.)

Good luck!

Share this comment


Link to comment
Hey,

From memory you can use colour-keys with textures by specifying the RGB value when you load the texture. That colour will then be considered 100% transparent black.

I don't know if there's any special trick you need to do to get this in XNA as I haven't used it yet. Sorry.

Regards,
Lachlan.

Share this comment


Link to comment
Oops, I missed your transparency statement. You can do alpha transparency in XNA using an alpha layer (png, tga, etc) and then when you call SpriteBatch.Begin() you can specify SpriteBlendMode.AlphaBlend and it'll automatically setup alpha blending for you.

RobLoach, Krisc, and I are work on some articles and projects at OpenXNA.

HTH!

Share this comment


Link to comment
Well, if it is possible to have color keys with XNA, than I'm even more on board than before. I'll probably switch to using XNA after I finish Blocky Man.

I got my account on OpenXNA, Just in case I decide to make something with it and post it.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!