HackUberGeek
Shared on Fri, 12/22/2006 - 07:26First post about learning XNA
Second post about learning XNA
Well, I am getting into building the actual game I hope to make. My clan mates already know the basic premise since I forced them into giving me ideas. Anyway, it’s going to be a Super Mario Brothers like side-scroller.
My first task yesterday was to get a few images ready to be sprites. I can’t draw, but that didn’t seem to stop me. I got five backgrounds ready, all which would work if set right next to each other. So really the plan is to make it look like one background 5 times as wide as the screen that loops over and over. I set it up several times as different widths, more on that later. Then I built my main character. I have more to do since it’s not at all animated. He is just frozen in space, but for now it’s good enough. Having never made an animated Gif I didn’t try, although I have a how-to on that. I can also animate the thing programmatically, so I have to figure out what will work best for me. I have actually seen the code that moves through the frames of an animated gif in synch with the program, as well as the one to build an animation on the spot, but didn’t look at it at all.
So then I took my “art” and fired up a new project in the TorqueX app I mentioned yesterday. I still like that I can convert the target platform with one of their apps, but to use their main app to build a game, I have yet to get excited. I actually assumed that this thing was going to win my heart, and when the 30 day demo was up, I was going to buy it for $150. So far, I won’t do that. It gives an easy way to import art work and set up properties about it, but overall when I look at a premade game, and a blank project, I have a hard time breaking the game down to reconstruct one myself. Maybe I need to find more to read on this thing, but so far I feel like I am making more progress working directly with the code itself.
After tinkering with the TorqueX program for a bit and getting nowhere, I went back and worked directly out of the XNA Game Studio again. I found some code that I could adapt to do just what I had planned for the background. In just a few minutes, the wonder world I had created came alive, but horribly squished and cut off. (All sky, no ground) Now my images were 1280x720 worthy, but the program from what I could see look like it was working at 800x600, and after some poking around I found that I was right. I didn’t, and still don’t know where the code had pulled it from. It may be the default, but I want to find that somewhere before I speak it as Gospel. What I did find was some code to hard code the background to a width and height. It’s a solution that is good enough for today, but I want to stretch the height to what’s available and leave the width alone (it’s a side-scroller, so let it scroll). Now I am not sure if I altered the background, or the whole application. I think I altered the whole application. Overall though, I am ok with what I have.
Then I tried to add in my main character. I tried to pull code from another game, basically to place the sprite in the left hand corner, let it run back and forth, and it had jump too, but I was going to save that for the next step. After adding in all my code to the same app where I had my backgrounds, I blew the thing up. I saw immediately what I had not caught, some of the objects were being used in different ways between the two sets of code I stole... ah… borrowed… from open source games. I decided to just get the running man working in its own app first, even though I was confident with some find and replace that I could get it working. Well, as I went through it the second time, it became clear that there were no controls for the controller. Just keyboard controls. That pissed me off, and I was done for the night. I have games that use BOTH too, but I don’t think I have any that are just for the 360. I will have to start looking into those more complex examples and see what I can learn from it. Overall, I am enjoying this.
- HackUberGeek's blog
- Log in or register to post comments
Comments
Submitted by Baine on Fri, 12/22/2006 - 07:58
Submitted by rabbmasterflash on Fri, 12/22/2006 - 08:00
Submitted by HackUberGeek on Fri, 12/22/2006 - 08:05
Submitted by Baine on Fri, 12/22/2006 - 08:11
Submitted by HackUberGeek on Fri, 12/22/2006 - 09:11