I've made various updates to the gui. I made the main menu more functional and created a "play options" menu where you can choose the number of players and start the game. As I went, I fixed any bugs that cropped up and added a few more features, like a Label control. A favorite of mine is the messagebox dialog which is created the same way it is in Windows Forms: "clsMessageDialog.ShowMessage(string Message);". This way the code can alert me of errors without having to throw an exception. There are a few more improvements to make that I can think of at the moment, but I'm sure there'll be plenty of changes in the coming weeks/months. I'm still looking into clipping, but nothing has yet come up. Maybe I'll leave it be.
The state machine underwent some big improvements. It is now "far" along as opposed to "far enough" along.
Soon, I'll get to work on sound. I want to prepare as many helper classes as I can before I dive back into the game engine because I want to develop it knowing exactly what resources I have.
Comment please.
clevceo
Thursday, May 31, 2007
Monday, May 28, 2007
GUI, sound, procedural content
The state machine is just far enough along to test the GUI, which is now functional. I have a form control and a button control that are working wonderfully. I also learned to use the sprite font functionality added in the latest XNA update, and it is working wonderfully as well. I created a quick main menu form with "Play" and "Exit" buttons. It's amazing how easy it is now that I've made this helper class. I'm planning on using the class for the in-game heads-up display as well.
The only problem so far with the class is that it isn't totally independent. I'll need to put some work into it before I can reuse it in future projects. And I don't think I'll be releasing the source code. Besides, you can probably find better implementations elsewhere. I refuse to use them myself because I want to learn it the hard way. The hard way is the best way. I'd thank you to remember that.
One thing I haven't figured out yet with the gui is clipping. The only way I can imagine is to create a new texture for each control, but that would eat the resources. Maybe I'll leave it as it is and refrain from having any graphics on my controls that might run over the edge.
I'll finish up the gui quickly and maybe go on to a sound helper class. Maybe I'll test it with my gui. A "click" sound will play when you press a button. I don't know how much help the book will be. He'll want me to use his helper class again. I have a hard time reading code that isn't mine. Maybe I need to brush up on those skills, but I don't have the patience for it now. Besides, I want to figure out how to make the helper class myself. I don't want to copy his code. All I want are the base sound classes.
By the way, I've been looking into procedural content lately and I found this little post on Introversion Software's dev blog for their new game Subversion. They've created an engine that generates a city from scratch in a couple minutes. They even has a video demonstration. If you're interested, you can check it out here.
clevceo
The only problem so far with the class is that it isn't totally independent. I'll need to put some work into it before I can reuse it in future projects. And I don't think I'll be releasing the source code. Besides, you can probably find better implementations elsewhere. I refuse to use them myself because I want to learn it the hard way. The hard way is the best way. I'd thank you to remember that.
One thing I haven't figured out yet with the gui is clipping. The only way I can imagine is to create a new texture for each control, but that would eat the resources. Maybe I'll leave it as it is and refrain from having any graphics on my controls that might run over the edge.
I'll finish up the gui quickly and maybe go on to a sound helper class. Maybe I'll test it with my gui. A "click" sound will play when you press a button. I don't know how much help the book will be. He'll want me to use his helper class again. I have a hard time reading code that isn't mine. Maybe I need to brush up on those skills, but I don't have the patience for it now. Besides, I want to figure out how to make the helper class myself. I don't want to copy his code. All I want are the base sound classes.
By the way, I've been looking into procedural content lately and I found this little post on Introversion Software's dev blog for their new game Subversion. They've created an engine that generates a city from scratch in a couple minutes. They even has a video demonstration. If you're interested, you can check it out here.
clevceo
Tuesday, May 22, 2007
GUI, state machine, input, cursor
The base GUI helper class is basically complete and is ready for testing. However, the game isn't far enough along to test it yet, and I don't feel like taking the extra time to make a unit-test. Thus, I am now working on structuring the core game loop.
I'm creating a state machine that's a little cleaner than my last rendition. This time, each state has its own class, rather than all states being contained in one big class.
The input helper class is complete. I unit tested the mouse and keyboard input and they're working great, but I have yet to test the gamepad. The great part about the new input class is how customizable it is. For example, one player can have controls on multiple different inputs. The A button on gamepad 1 shoots and the B button on gamepad 2 jumps. Maybe shift on the keyboard runs. Heck, if I wanted to, I could assign one button to multiple players. I could even treat a control stick as a button. If it's moved in one direction a certain amount, it will be considered "pressed" like a button. This would work nicely for the triggers.
I unit tested the mouse with a new cursor class I made, which is working like a charm. It doesn't use the exact position of the OS's cursor. Instead, it has its own position and uses the movement of the OS's cursor to move. Also, it uses my input helper class, which means I can easily change what controls the cursor. For example, I could easily have the gamepad to control the cursor without much change to the code.
clevceo
I'm creating a state machine that's a little cleaner than my last rendition. This time, each state has its own class, rather than all states being contained in one big class.
The input helper class is complete. I unit tested the mouse and keyboard input and they're working great, but I have yet to test the gamepad. The great part about the new input class is how customizable it is. For example, one player can have controls on multiple different inputs. The A button on gamepad 1 shoots and the B button on gamepad 2 jumps. Maybe shift on the keyboard runs. Heck, if I wanted to, I could assign one button to multiple players. I could even treat a control stick as a button. If it's moved in one direction a certain amount, it will be considered "pressed" like a button. This would work nicely for the triggers.
I unit tested the mouse with a new cursor class I made, which is working like a charm. It doesn't use the exact position of the OS's cursor. Instead, it has its own position and uses the movement of the OS's cursor to move. Also, it uses my input helper class, which means I can easily change what controls the cursor. For example, I could easily have the gamepad to control the cursor without much change to the code.
clevceo
Sunday, May 20, 2007
GUI
I made some finishing touches to the input helper class and to the overall structure of the game, and then went to work on some interface stuff. I've basically copied Windows's method with a Control class, Container class, and all their methods and events, like OnPaint and MouseDown. I'm making some great progress on it. I have a cursor class that utilizes my input helper class to work, and once I get the basics of the gui going, I'll go on to make some controls like buttons, labels, and a few others. Eventually, I'll make a textbox. That will be an experience. And once I have all of these made, I think I'll somehow separate them from the game as a component that I can reuse in the future.
I've been thinking alot about the fog-of-war. I have a general idea of how I want to do it. However, I've also been thinking about adding "objects" to the map, obstacles that you would have to build around, so the map wouldn't be one big open area. It only makes sense. However, I've also been thinking that it would be interesting to make these objects affect the fog-of-war, so that if someone was building on one side of an object, they wouldn't see the other side. This would open up some interesting gameplay possibilities. However, I'm not sure exactly how to implement that. I'm not even sure how I'll implement the "objects" and all the collision testing involved.
Next in line is sound, which sounds pretty easy (no pun intended, really) with XNA.
Anyway, that's it for now. Comment.
clevceo
I've been thinking alot about the fog-of-war. I have a general idea of how I want to do it. However, I've also been thinking about adding "objects" to the map, obstacles that you would have to build around, so the map wouldn't be one big open area. It only makes sense. However, I've also been thinking that it would be interesting to make these objects affect the fog-of-war, so that if someone was building on one side of an object, they wouldn't see the other side. This would open up some interesting gameplay possibilities. However, I'm not sure exactly how to implement that. I'm not even sure how I'll implement the "objects" and all the collision testing involved.
Next in line is sound, which sounds pretty easy (no pun intended, really) with XNA.
Anyway, that's it for now. Comment.
clevceo
Friday, May 18, 2007
Book, Progress
The book isn't quite what I expected. He doesn't detail all the important classes like I wanted him to. Instead, he provides his own helper classes and shows me how to use those. However, he still tells the most important concepts, so I've been trying to figure out the classes from those. I really don't like using someone else's code if I don't have to. Another book is coming out in june written by someone from the XNA team. I hope that one is better.
Anyway, I've made progress. The one thing I've reused so far from the last run is the camera (psuedo-camera, 2D) class because it has alot of math I'd have to work through again. Unfortunately, since I wrote it, I discovered that there are more efficient ways to do that math, so I'll eventually have to rewrite alot of it anyway.
I redid my input helper class, which is now much more flexible and data-driven. Overall, things are going well. The structure is much more cohesive and organized than it was before. Now that I see the big picture, the development is much more efficient and effective.
And by the way, still no problems with Vista.
I just wanted to post my progress so my readers don't think I'm gone. I will finish Sever. I promise.
clevceo
Anyway, I've made progress. The one thing I've reused so far from the last run is the camera (psuedo-camera, 2D) class because it has alot of math I'd have to work through again. Unfortunately, since I wrote it, I discovered that there are more efficient ways to do that math, so I'll eventually have to rewrite alot of it anyway.
I redid my input helper class, which is now much more flexible and data-driven. Overall, things are going well. The structure is much more cohesive and organized than it was before. Now that I see the big picture, the development is much more efficient and effective.
And by the way, still no problems with Vista.
I just wanted to post my progress so my readers don't think I'm gone. I will finish Sever. I promise.
clevceo
Wednesday, May 9, 2007
Book
The Book has come, Wrox's Professional XNA Game Programming For Xbox 360 and Windows, by Benjamin Nitschke. I've only read the first chapter, but I've seen enough to know that there's alot I can learn, and thus alot I can change in Sever's structure. Hopefully I'll have time in the next few weeks to read through it so I can get back to work on Sever.
Anyway, this hiatus is only temporary so I can read up on XNA and become more productive and effective in my progress with Sever. Please keep checking back. I'll update on the things I'm learning and the ideas I'm coming up with for Sever. Thanks.
clevceo
Anyway, this hiatus is only temporary so I can read up on XNA and become more productive and effective in my progress with Sever. Please keep checking back. I'll update on the things I'm learning and the ideas I'm coming up with for Sever. Thanks.
clevceo
Friday, May 4, 2007
Starting Over, Book
I've had some ideas for the game the game that would require starting over, and I've been considering that anyway because I know what I'm doing now and I could really clean it up. Just yesterday I ordered a book on XNA. It's about time someone wrote a book on it. Anyway, this book should enlighten me and give me even more ideas, so at the moment, I'll put coding on hold and write my ideas down for later after I've read some of the book and have a better idea of the direction I want to take.
Comment.
clevceo
Comment.
clevceo
Subscribe to:
Posts (Atom)