Thursday, May 20, 2010

Daily Developer: Day 73

Brought over "player" object from my other game and cleaned it up to compile in my new game.  Will work on adding a movable component next.

Duration: 00:20

Wednesday, May 19, 2010

Daily Developer: Day 72

Spent some time fiddling with the OptionsManager, the portion that reads and writes options from an XML file.  Have that working again, but the place I moved it to doesn't allow for it to be accessed by other portions of the application.  I'll have to work out a better location for it, or have it return an object that can be passed around.  I'll likely put some effort into that tomorrow, as well as creating a new base for future games.

 Duration: 00:24:52

Tuesday, May 18, 2010

Day 71: Early Morning Fun

I've been getting up earlier the past week or so, and today I woke up even earlier, so I had some time to spend on game development.

Mostly, I was doing some pretty mundane stuff.  I removed some extra things that were left over from my other game but didn't pertain to this one.  I also created a base version copy of the current game to have an easy place to start from when I create other physics based games.

Needed to cut it short this morning, since it was time to take my daughter to school and for me to go to work.  I know I spent at least 10 minutes, possibly 20 on it today.  I'll have to update my tool to automatically save the time to a file when exiting.

Duration: ~20

Sunday, May 9, 2010

Daily Developer: Day 70 -- Back to it again

My first real obstacle with testing my consistency was the preparation of our old house for sale.  Clearly, I was unable to clear the hurdle and have been spending most of my time since on getting the old house ready for sale, buying a new house, moving our stuff from the old house to the new house and putting everything where it belongs.  Now, however, I am finally ready to take the steps back into my daily software development.

Something I noticed about returning was that it was more intimidating than I thought it would be.  Perhaps not intimidating, but I was less inclined to start back up after stopping than I was to simply continue when I had not stopped.  I suppose the whole routine thing does make a difference.

Today, my efforts focused on getting the menu screens into the base game and getting it to run without crashing.  Then, I resolved all the StyleCop issues.  I now have a base game to begin with.  Tomorrow, I will start by labeling the build as a good base and then working the first version of the new game.

Duration: 00:36:44

Thursday, April 1, 2010

Daily Developer: Day 69

It is easy to get out of sync with routines.  I am in the process of buying a new house and selling the old one, and it is providing enough of a distraction that I was able to drop my daily routine.  Hopefully this will be my return to it.

I started a brief design document based on the previously detailed requirements.  I didn't get far into it before determining it would be a good time to create the project and add the third party elements that I knew I was planning on using.  I have added the farseer physics engine, and started looking at the game state management pieces again.  The game state management is less straightforward than simply including.  Tomorrow, I'll pull the necessary components and get it all compiling.

Duration: 00:33:59

Tuesday, March 23, 2010

Daily Developer: Day 68 - The New Game

Nothing gets the imagination going like the start of a new project.  Based on some of the accidental gameplay I discovered in my ToxicGrowth project, I started brainstorming for my new game that I am designating "Project Elasticity."

While there is a lot I don't know about how I want everything in this game to behave, I did take the time to pick a starting point.  I am going to use one type of gameplay to start with, with the expectation that there will be a variety of fun ways to play and styles to choose from.

I used Freemind to come up with some of my general ideas, then I selected some of the details and created a basic requirements document in Google Docs that only covers the one aspect of the game I am currently interested in.

My goal for tomorrow is to take the concepts outlined in my requirements document and try to solidify them a bit in a design document.  Since I am working on a small portion of a game that could be pretty big, it shouldn't take too long to come up with a basic design.  Though, I did notice as I was describing things in the requirements doc that there were several concepts that were much bigger than the simple sentences it took to describe them.

Duration: 01:07:56

Saturday, March 20, 2010

Daily Developer: Day 67 - The Return

Things have settled down enough that I am able to return to my daily routine.  My task today was to simply get re-acclimated with the game and the code itself. What I've determined is that I really don't think that game as it currently is has much potential for ever being fun.  So, instead of slogging along, trying to force it to be something that it will never be, I think I am going to retire it.  I might post the code somewhere, in case it is interesting to anyone, but I think it is time to move on to other games.

Working on this game has sparked some other ideas for other games.  I think my goal for the next couple days is going to be try to nail down the details of how I want my new game to perform.  I might actually *gasp* write out a quick little requirements document so that I have a guideline for what I am expecting.  At the very least, I anticipate that this will help me determine what makes a requirements document into something that is truly useful, something that I think I would be able to pull over into my job.

Duration: 00:15:33

Sunday, March 14, 2010

A Brief Hiatus

I have been taking a short break from my "Daily Developer" activity since I have had an offer accepted on a new house and am in the process of trying to get my current house "show worthy."  Once I have finished this, which I am hoping will be tonight or tomorrow, I should be able to return to my game development.

Tuesday, March 9, 2010

Daily Developer: Day 66

I added an upper limit to the number of growths that can be displayed at once.  This has highlighted that the issue seems to be that something isn't being cleaned up properly in the background, since even when it reaches a limit much lower than the 3000 I was seeing problems at, it eventually starts to lag like it had before.  I'll need to investigate further.

I also re-added the health system for the growths.  Now, when they are shot, they decrease in level until they hit zero and disappear.  However, I think the pool I created is causing troubles with this, since the growths stop spawning after enough are shot, since they are being pulled out of the pool with zero health.  This should be easy to fix.

There still might be something to this game, or maybe not.  However, I at least want to get the bugs worked out before I call it "done."  I have an idea that would use multiple avatars, but it could take advantage of all the work I've done already, so it makes sense to keep ironing out the issues.

Duration: 00:19:16

Monday, March 8, 2010

Daily Developer: Day 65

I received a response to my post from yesterday.  It suggested that I use a pool of enemies: instead of constantly creating new ones, when one is destroyed, put it into the pool and reuse it.  I gave it a shot, but was still seeing the issue.

 Something else he asked was how many items I had on the screen at once.  I guessed about 100, but after the pooling didn't help, I decided to print the growth count to the screen. 

What I had overlooked was just how quickly spawning four new growths for every existing growth would become unwieldy.  Instead of being an issue at about 100, the slow down was starting at about 3000.  I don't think that there will ever be a need to have that many items in the real game, so I think it is a non-issue.

Next on the list of things to look at is to re-enable the collision of the growths with the projectiles and then making sure that the growths revert to previous stages first instead of simply being destroyed outright.

Duration: 00:24:31

Sunday, March 7, 2010

Daily Developer: Day 64

Today was a day of exploration.  I decided that the most reasonable way to approach resolving the game freeze issue I am having is to see what others have done to avoid it.  I looked through some of the posts at the CodePlex forums for farseer and have a couple of ideas, but there is nothing definitive.  So, I registered and wrote a post asking for assistance.  Hopefully, someone who has already solved this problem will be able to guess at what is going on.

Duration: 00:21:51

Saturday, March 6, 2010

Daily Developer: Day 63

I added the check for the boundary back for the projectiles, destroying them if they cross it. I duplicated this functionality for the growths as well. I also remove the excess object from the physics engine, so it seems that things are being properly destroyed now.

I adjusted the collision detection for the growths to only cause a destruction if they bump something other than another growth. This needs to be updated further to properly use the health functionality instead of immediately destroying the growths. Also, the projectiles need to get similar collision detection, since they are not being destroyed until they reach the edge of the screen.

With too many growths on the screen at once, the game bogs down and crashes. I'll need to address this. Possibly, it will be taken care of when I add the death sequence for the player.

Duration: 00:33:48

Friday, March 5, 2010

Daily Developer: Day 62

I removed the old collision detection manager from the project and removed all references in the code. Added a quick test collision detection routine and it looks like it is in the right spot. I did notice that it doesn't complete destroy the objects with the calls I make. I think I've forgotten to remove both objects associated with each displayed object from the physics engine, instead only removing one.

Also, I noticed some odd behavior in a couple of places and made some notes in the code. I also found an issue where it crashes when it tries to create a new growth in a location that one had already been created. The way it is being stored was because I was doing all my own collision detections, so I should be able to simplify that area.

Duration: 00:31:31

Thursday, March 4, 2010

Daily Developer: Day 61

I solved the problem of the projectiles colliding with the shooter when fired by assigning a different CollisionCategory to each. Then, I set the growths to collide with everything and the shooter and projectiles to only collide with the growths. So, now that works nicely.

It took a bit longer than I expected, so I will pull out the old collision code and create the new collision code tomorrow. I also need to either create a barrier around the edge of the board, or to destroy anything that goes outside its bounds.

Duration: 00:42:46

Wednesday, March 3, 2010

Daily Developer: Day 60

Following the pattern I already established, I reworked the shooter to use the Farseer physics engine. Since I have all the objects sharing the same base, and I've already re-factored it to do most of the physics stuff, it was mostly just a matter of making sure the old things weren't being called any longer and that the new properties were being set correctly.

I still need to disable collision detection, since all the objects in the game correctly collide with one another. Because the projectiles collide with the shooter when fired, sending the shooter flying about wildly, I'll either need to recalculate where the projectiles are generated (so that they no longer originate from the center of the shooter), or just create other collision groups and make is so that the group the shooter is in doesn't collide with the group the projectiles are in. I am leaning toward the second, since it should also help with processor time.

Duration: 00:19:46

Tuesday, March 2, 2010

Daily Developer: Day 59

I progressed at moving over to using Farseer for all the game objects. I re-factored the Growth object, moving all the Farseer specific stuff into the base object that the projectiles also share. After a bit of debugging, I was able to get the projectile created and moving properly.

Next steps include porting the player controlled avatar to use Farseer. I need to disable and discard the old collision detection routines and then use the detection that Farseer is already doing. After that, I need to tweak some settings, since I notice significant slowdowns with a large number of items. Though, that may be reduced once the old collision routine is disabled.

Duration 1:00:00

Monday, March 1, 2010

Daily Developer: Day 58

It looks like the experimentation with the sample project I created paid off. I was able to get the growths to move and collide with one another. The avatar and the projectiles now need to be moved to use the physics engine. Also, the collision detection I created needs to be disabled and reworked to use the engine. This shouldn't be too tricky, since it handles most of the work and I just need to trigger on particular collisions.

I also noticed that if a large number of the growths form, it drastically lags the game. I need to put a check in to destroy anything that goes off screen, but I think that there might be some other optimizations that I'll need to look at, too.

Duration: 00:26:04

Sunday, February 28, 2010

Daily Developer: Day 57

I finally bit the bullet and created a new project to fool around with the farseer physics engine. After copying pieces of the simple game project that is provided at their site, I modified it to allow the addition of extra circles into the game. I think that this will help me get things moving in my shooter.

I believe I was neglecting to create new geoms for all the new items. Tomorrow, I'll take a look and see if I can get it working correctly.

Duration: 00:24:36

Saturday, February 27, 2010

Daily Developer: Day 56

I had company in town and took a day off from working on my game. I was also getting a little frustrated and felt I just needed some time away.

I found a much simpler example that I downloaded. After looking through the code, I tried to port some of the code over, but it didn't seem to do what I wanted. Instead, it now seems that the projectile and movement portion is flaky, since some is maintained by the physics engine and some is maintained by hand.

Not sure what I really want to do from here. I would like to try to get the physics working with my game, but I don't know that it would help make it any more fun, so I don't know that I want to spend a long time working on it.

Duration: 00:19:38

Friday, February 26, 2010

Daily Developer: Day 55

I stubbornly returned to trying to figure out why the physics engine wasn't interacting with my code. It looks like I am doing everything that I need to, but I am still missing something, since my test move doesn't seem to do anything.

I think it really might be time to try to experiment outside of the game... but it just seems like I must just be missing one little thing. We'll see.

Duration: 00:26:01

Wednesday, February 24, 2010

Daily Developer: Day 54

I moved the drawing into the Growth object. I copied over some farseer code from their examples and tried to get the growth to move, but I am not yet having success. I think I will try to create a simple project for experimenting with the farseer stuff and then use that knowledge to implement it in my game.

Duration: 01:07:57

Daily Developer: Day 53

Refactored the GrowthManager to handle the drawing of the individual growths. Added the farseer physics engine into the game screen and then spent some time thinking about how to replace what was currently being done with the farseer code.

Duration: 00:34:59

Monday, February 22, 2010

Daily Developer: Day 52

Downloaded the farseer physics engine from Codeplex. I played around with the demos provided. I copied the engine into my solution directory and added it into SVN. Then, I added it to my game solution.

I started looking through the way I've been doing things like creating new objects and collision detection and compared it to the way it could be done in farseer. It will take some re-factoring, but having a physics engine will take care of a lot of details for me, and will make modifying game-play elements much easier.

Duration: 00:37:51

Sunday, February 21, 2010

Daily Developer: Day 51

Watched the remainder of the previously mentioned video, skipping past some of the areas that I already had experience with.

Duration: 00:32:14

Saturday, February 20, 2010

Daily Developer: Day 50

Watched to time mark 35:00 of the second video. Started skipping ahead since some of it really should have just been edited out. Will try to finish the rest in the next couple days.

Duration: 00:16:11

Friday, February 19, 2010

Daily Developer: Day 49

Pretty easy again. Finished watching the first XNA video and started watching the second one. Will probably try to finish viewing tomorrow.

Duration: 00:32:43

Thursday, February 18, 2010

Daily Developer: Day 48

Continued watching the video about XNA game development. Almost completely done with the first video and am looking forward to playing around with the Farseer physics engine after I am done watching both videos.

Duration: 00:32:29

Wednesday, February 17, 2010

Daily Developer: Day 47

My friend, Jason, found a site that has a show called dnrTV. He recommended the shows on XNA development, so today's work consisted of watching the first half of the first video.

The video is about the process of making a quick and dirty XNA game reusing as much code as possible. It starts by introducing the farseer physics engine as a good way to manage collision detection.

I might have advanced my game along as far as is worthwhile. I don't know that it will ever be something that is a "fun" game. But, that doesn't mean it was unsuccessful or a waste of time. I've learned how to use a number of different tools, the benefit of different coding practices, as well as getting a good feel how to work in the XNA Framework. While the game might be a bust, I am glad I put the effort into this particular game since I had been wondering about making this game for years. At least I know now that it isn't as much fun as I'd hoped, but I don't need to wonder about it any longer.

That said, instead of abandoning it, I think I am going to expand it and try to incorporate some of the elements from this video and farseer. It may evolved to an interesting game. Maybe if the items were moving it would be more challenging.

Duration: 00:36:08

Tuesday, February 16, 2010

Daily Developer: Day 46

Today, I changed the default resolution from 800x600 to 1024x768. I also updated my collision detection class to dynamically calculate the collision grid based on the resolution instead of relying on it being 800x600.

I also stuck a stub in for a high score screen. I still need to create the backend for recording the high scores, and will also need to look into how to display them on the screen.

Duration: 00:21:30

Monday, February 15, 2010

Daily Developer: Day 45

Spent a good deal of time just looking through the code, thinking about some of the different elements that could be worked on. I finally settled on addressing some ToDos I had left in the code for myself, the most notable being that I can now adjust the resolution.

Unfortunately, the collision detection is hardcoded to assume 800x600. I'll look at fixing that tomorrow.

Duration: 00:38:46

Sunday, February 14, 2010

Daily Developer: Day 44

Transcribed some of my handwritten notes into mind-map format using FreeMind. I started Visual Studio, but never got around to actually coding anything in it. Will probably continue putting my ideas into the mind map tomorrow and try to expand on it with some extra brainstorming.

Duration: 00:28:44

Daily Developer: Day 43

I was still visiting with the family, but I worked in my minimum of 15 minutes. Without access to my development tools, it was limited to some brainstorming and note taking. This is a good thing, since some good ideas finally got recorded and will probably be worked on in the following days.

Friday, February 12, 2010

Daily Developer: Day 42

Visiting my parents and siblings, so today I took the opportunity to have my brother install and play around with the game for a bit. It took about 15 minutes to download and install all the stuff, as well as opening the XBox controller for PC that he had sitting around. I'll see if I can get him to fool around with the game and give me some feedback.

Thursday, February 11, 2010

Daily Developer: Day 41

Today, I reworked how I calculate the score needed to advance to the next level. Then, I played around in the game for a bit, trying to find some default values that seemed reasonable. I hard-coded the values into the game for the initializing case, but it still writes and reads everything from the options.xml file.

I also updated the main screen to display the name of the game plus the version number. Then, I put it up for review here: Toxic Growth v0.1.0.237 Feel free to download and take a look. If it crashes, most likely you are missing .NET 3.5 or XNA 3.1. which you can get here:
Let me know what you think. All feedback is welcome, but please note that zero effort has been put into graphics or sounds, yet. My focus has been on making a game that is fun, so game-play has been my primary concern.

Duration: 00:48:50

Wednesday, February 10, 2010

Daily Developer: Day 40

Added my new options to the options menu. I also spent some time messing around with some more ideal default settings. I think I need to adjust the way the next level is calculated, since the later levels occur too quickly. I will probably finish that up tomorrow. Then, I want to add the version number to the start screen, label the version in SVN and the distribute the latest game.

Duration: 00:42:26

Tuesday, February 9, 2010

Daily Developer: Day 39

Added a "rate increase" to both expansion and spawning. And, I made this configureable via the options.xml file. I also included a "NextLevelScore" in the options file. Now, whenever the level * NextLevelScore is met or exceeded, I subtract the rate increase values from the "time till next spawn / expansion" values. This means that the better the player does, the faster the game is.

I think I might distribute the latest version tomorrow for extra feedback.

Duration: 00:50:07

Monday, February 8, 2010

Daily Developer: Day 38

Today was a pretty uninspired day. I adjusted some of the unit tests, and updated the GrowthManager to return counts to help verify testing properly. I ran into a problem, however, when I tried to run the tests. The textures for the growths were not set, and it was causing null reference exceptions. Thinking about this now, it occurs to me that the real problem is the the GUI elements are mingling so freely with the game code. I need to separate these a bit before I can continue testing effectively.

Tomorrow, I will attempt to refactor the GUI elements away from the management elements. I also want to introduce a gradual increase in the rate of spawning and expanding, since I think that this will make a "complete" game mode.

Duration: 00:32:10

Sunday, February 7, 2010

Daily Developer: Day 37

Added some tests to the GrowthManager. In doing so, I realized that there were a number of changes that would make testing much easier (mostly adding return values to the methods that were just returning void.) The process of adding tests is also revealing some dependencies the objects have on one another. Currently, all of the manager objects are static. While this is convenient for being able to access them where ever they are needed, it is also detrimental in that sometimes the different managers are directly dependent on one another. I'll need to think about the structure and consider adding some interfaces.

Duration 0:20:00

Time Tracker Project

Now that I've established my daily ritual of developing my game, I've decided to expand into other projects, as well.

The "Time Tracker" application was something I wrote very quickly at the beginning of my daily development as something to help keep accurate time of how long I was working on my game development. It was very simplistic in that it had a hard coded value for the project being tracked and that new projects could not be added to the list.

Today, I used some of my experience with my other tools and updated the project to adhere to StyleCop standards. I added support for saving and loading the project list from an XML file. Additionally, you can now add new projects simply by typing into the combobox and hitting enter. Obsolete projects can be deleted by selecting the project from the list and then clicking the delete button.

My next steps include:
  • Adding a pause button.
  • Stopping previous project when Start is clicked for another project.
  • Adding logging support to see the details of when a project was worked on and for how long.
I may eventually add this to SourceForge as well, but I want a more complete product before I do that.

My goal for this project is to work on other developer stuff for about an hour a week. I'll do more as I am inspired.

Duration 1:25

Saturday, February 6, 2010

Daily Developer: Day 36

Continued adding unit tests to my game. The projectile are pretty well covered and I moved on to addressing the growths. I figure I'll get the different "managers" that I've created covered and that should be most of the code. Once I have the growths and the grids covered, I might take a break to make some changes with collision detection.

Duration: 00:32:05

Friday, February 5, 2010

Daily Developer: Day 35

After seeing first hand some of the benefits of NUnit at work, I decided that it was a good time to incorporate it into my game. I downloaded NUnit and installed it on my PC. After a little confusion, I was able to setup another project that I called "ToxicGrowthTests". I wrote a couple of little tests and verified that the system ran. Had to run the nunit-x86 executable to get it to test properly. I got a good way into testing the Projectiles and then decided it was time to call it for today.

While I have been spending quite a bit of time on things that are not directly development related, I know that working with these tools is worthwhile and can easily save me a lot of time later, if I need to change things. Since I am about to start analyzing and researching the motion of objects and collision detection and likely making some changes there, I like the assurances that I can get from having the code verified to be behaving like I expect.

My plans are now to continue adding the unit tests to my game until I have complete coverage. After that, I am planning on the collision detection enhancement. I might also look into FxCop, but am currently unsure exactly what benefits I can get from it.

Duration: 1:32:10

Thursday, February 4, 2010

Daily Developer: Day 34

Through a little extra research, I discovered that the StorageDevice, part of the GameServices element, is not included without a full premier account. So, I removed the Xbox safe way and now rely on "System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)" to get me to a reliably safe location to save files.

I also updated the write routine to make it a little more robust. There are probably some extra steps I can take to ensure that it is not going to crash, but I'll return to that later.

I might need to just go over some notes tomorrow and try to decide what should be my next focus. I'm also toying with the idea of some NUnit tests.

Or, I might research collision a bit more, since there is only the appearance of movement right now; projectiles disappear from one position and then reappear a predefined distance further along, making it possible for very fast projectiles to skip over the growths altogether. Yes, I think this will be tomorrow's focus.

Duration: 00:53:54

Wednesday, February 3, 2010

Daily Developer: Day 33

Researched how to correctly obtain the "correct" location to save my game settings. However, I did this by using StorageDevice and this caused a GamerServicesNotAvailableException because I do not currently have a premier license. I figure that when I get a game to the point where it would be worth testing on an XBox 360 I would purchase the account (and then buy an XBox 360). I posted on the XNA forums looking for suggestions on how to handle the options saving.

Duration: 00:57:16

Tuesday, February 2, 2010

Daily Developer: Day 32

Some actual coding today. And, it really makes a noticeable difference. Now, while you are playing the game, a score is displayed on the screen, incrementing by one each time you shoot a growth. When you bump into one of the growths, the game is over and you are taken to the "Game Over" screen. It displays your score and allows you to quit or start a new game.

Tomorrow, I think I am going to mess with a number of different options.xml files to experiment with finding a setting that is fun.

I also might need to think about "levels." Starting the game at a slower spawning and expansion rate and then increasing it as you achieve certain point values.

Also need to tinker with allowing the health of the growths to be adjusted via options.

Duration: 00:46:55

Monday, February 1, 2010

Daily Developer: Day 31

Added support for saving and reading the options values to a file, "options.xml". This should make it easier to create a variety of settings files and try to decide which settings are the best together. It also allows for finer tweaking of the settings by editing them directly with a text editor.

This section still needs some cleanup, but works well enough for now. I will probably tweak it a little bit more tomorrow and then redistribute to those interested in trying it for me.

As the code is now becoming more complex, I am thinking that I've overlooked NUnit long enough. I will probably look at that tomorrow or in a couple of days.

Duration: 00:53:58

Sunday, January 31, 2010

Daily Developer: Day 30

Whew! Finished off the remainder of the StyleCop issues. Tomorrow I should be able to start looking at any number of more interesting things. Will probably work on making the menu options save to disk.

Duration: 00:45:53

Saturday, January 30, 2010

Daily Developer: Day 29

A very painful hour of wading through StyleCop issues. I think the lesson here is that I needed to install this at the beginning, before the issues could accumulate to over 600. I am now down to about 100 left. Probably another day to finish that off.

Also, during my daughter's swim class, I spent some time just thinking about elements of the game, and took some notes.

Duration: 01:50:00

Friday, January 29, 2010

Daily Developer: Day 28

Just lots and lots of StyleCop issues. Some of it is painful, but it really helps organize the code. Also, I am finding areas that aren't used anymore or need to be adjusted.

I am under 400 warnings now, and hopefully will be able to plow through the rest tomorrow.

Duration: 00:54:26

Thursday, January 28, 2010

Daily Developer: Day 27

Most of today was spent correcting StyleCop warnings. In fixing them, I've refactored and commented quite a bit, so it is a useful exercise.

Also looked up and installed Cool Commands. It is an old add-in for VS2005, but with a tweak it works in VS2008 as well. It allows the copying of references, but the part I love is the "Locate in solution explorer" option that you get when right-clicking on the file tab.

Will probably keep slogging through the StyleCop warnings over the next couple days. Then, I'm considering installing Nunit. As for development, I'll need a way to keep score and the menus need some help as well.

Duration: 01:12:05

Wednesday, January 27, 2010

Daily Developer: Day 26

I have redistributed my game to some friends after realizing I had missed a couple of files. I have been getting some feedback and recording the notes.

Since I was interested in hearing more from people before I made additional changes, I went for a low-thought day and downloaded and installed StyleCop. Started going through the long process of correcting the code to match the rules. Also installed GhostDoc to help with generating the headers.

No additional "real" developments occurred.

Duration: 01:47:53

Tuesday, January 26, 2010

Daily Developer: Day 25

Finished hooking up the options settings to actually interacting with the game. Test played for a bit, and then uploaded the demo game to some friends to test.

Duration: 01:07:49

Monday, January 25, 2010

Daily Developer: Day 24

I spent a bunch of time adding options to the options menu in anticipation of letting some others take a look at it. I wanted them to be able to mess with the various options until they could find a "fun" setting. I added support for several of these in-game, but will need to spend some more time hooking up the rest before it is ready to be shared.

Duration: 02:05:21

Sunday, January 24, 2010

Daily Developer: Day 23

The game is fully included in the menu system now. By quitting the game and then re-selecting "Play Game" it starts over properly. I also added keyboard support as well as a menu option that toggles between keyboard and gamepad. Did some minimal refactoring as well.

Tomorrow, I think I will focus on adding some extra options to the menu and then try to support them in-game.

Duration: 01:02:51

Saturday, January 23, 2010

Daily Developer: Day 22

I modified my game to be part of GameStateManager, as a separate screen class. It wasn't hard, but it was time consuming. And, now I have a lot of clean up todo, both on the old game.cs file as well as the new screen file. But, it was worth it, as I now have a menu that controls the game, allowing for quitting and restarting without issue.

Duration: 00:50:02

Friday, January 22, 2010

Daily Developer: Day 21

I found an example for "GameStateManagement" that would allow for menus and pausing. I ran the demo and was pleased. I grabbed the files and included them in my game, but do not have things hooked up properly. As it is, it still goes directly to my game. I think it looks like I'll need to insert the screenmanager code at a higher level, that will then call into my game play. I might experiment with replacing the code in the sample where their "game" is with something else just to see how my stuff might fit in.

I will probably be moving my game into a "screen object".

Duration: 00:37:13

Thursday, January 21, 2010

Daily Developer: Day 20

Wow, have I really been doing this for 20 days straight? Well, right at the beginning, on Day 2, I had fallen asleep early accidentally and didn't have time to work on it until the next day at lunch. But, I tried to double up on that day, and haven't faltered since. It is neat to see the kind of progress that can be made with only 15 minutes to one hour of work per day.

Today, I fixed the targets to grow along the same grid, so that they mesh properly when they meet up. Conveniently, this also resolved the collision issue. I then added support for different levels and a health system for the targets. It is now set to expand and then upgrade to the next level. And, it now takes four hits to destroy a target, but it will drop levels and only be destroyed at level 0.

The collision detection came much faster than anticipated. I have a couple of things in mind that I can work on. I need to work on a scoring system. I also need to create an actual beginning and ending to the game. Adding in menu support would be a good way to manage some of this, so I might do that first.

Some more complicated things involve the actual game play itself. As the game currently stands, it really is pretty boring. I have a couple of ideas that I will probably play around with, but I think this will come after the other items.

Duration: 01:00:12

Wednesday, January 20, 2010

Daily Developer: Day 19

I updated the GridManager to use centers instead of positions and corrected boundaries. This helped with collision detection. Updated target expansion to not overlap other targets. This mostly works, but I have not completely updated the collision detection, and there are occasionally targets that overlap.

Also, the BoundingSphere I am using is quirky: sometimes sharing the same point counts as intersecting, and sometimes it doesn't. I'm going to have to look at that. Since I am doing this as a 2D game, I might abandon the BoundingSphere and write my own bounding code.

Within a couple days, I hope to have the collision and expansion down. I think I might experiment with forcing the targets to use integers only for coordinates, so that it doesn't look as sloppy at the point where one group bumps into the other.

Duration: 01:08:49

Tuesday, January 19, 2010

Daily Developer: Day 18

I decided that the easiest way to solve the lag issue with collision detection was to break the game field up into a grid of 100x100 boxes. Whenever a new target was created, I would associate it with the appropriate box. Thus, each projectile only has to be checked against the targets in it's box.

I implemented this with a quick class that I called the GridManager. I was able to reuse my existing collision detection code with only a reordering of the loops (I was looping through the targets first, with the projectiles being checked within) and a call to the GridManager to get the appropriate, smaller lists to search through.

I anticipated that there would be some flaws in my quickie algorithm, and I was not disappointed. As expected, there were some targets near the edges of the boxes that were not being checked for collisions. I will need to check the current box, plus the boxes next to it if the position of the projectile plus the radius of the targets would place it near the edge.

I also was using the position by default, which is just the upper left corner of the sprite I am using. I think I will need to store this using the center of the objects to get more accurate results. Most of the objects already can return their centers. I just need to make sure that they are being used instead of position.

Duration: 00:34:50

Monday, January 18, 2010

Daily Developer: Day 17 part 2

I spent a second round this evening adding expanding to the target spawning phase. The concept behind the game is that there are targets that spawn randomly, that if left untouched, grow additional targets to the north, south, east and west of them. This was implemented effortlessly, partly due to the TargetManager I implemented yesterday.

The issue now is that there is a clear need to optimize my collision detection. Getting the basic elements of the game in place, I used simple methods that I knew I would need to refactor later. The collision detection works fine for small numbers of projectiles and targets, but not as well when there are larger numbers of both objects.

I spent some time browsing the XNA forums and found some suggestions. Most of them involve dividing the objects into groups that need to be checked for collisions, and those that don't. For what I am doing, probably the easiest to do would be to use a grid, dividing the gameboard into much smaller sections. Then, each object will be sorted into the box it is in prior to collision checking occurring.

Working on optimizing the collision detection will be my goal for tomorrow.

Duration: 01:07:29

Daily Developer: Day 17

Ran home at lunch today and spent a little bit of time finishing up the initial refactor of my ProjectilesManager. Everything now works like it did before, with hidden better internal stuff. The next task will be to work on the more complicated spawning pattern I want the enemies to use.

Duration: 00:18:57

Sunday, January 17, 2010

Daily Developer: Day 16

Less exciting, yet still important, work today. I decided there was a need to have manager objects for the targets and the projectiles.

I completed the creation of the target manager and moved most of the handling of the target creation and destruction there. Then, I made sure the game still worked.

Then, I started moving stuff over for the projectile manager. But, it is going to be more than a simple copy-paste of what I did with the target manager. Hit the hour mark and decided that it would have to wait until tomorrow.

Duration: 01:00:45

Saturday, January 16, 2010

Daily Developer: Day 15

Messed around with adding sound effects and playing music in the background. Started the complicated task of thinking about the best way to handle the complicated spawning pattern I want for the targets.

Duration: 00:52:36

Friday, January 15, 2010

Daily Developer: Day 14

Today was even more exciting since I actually had someone else other than myself "play" the game. My six year old daughter saw it and wanted to play. Really, there isn't much to it right now, but she had fun moving the guy around and shooting the blobs. I was inspired at that moment to make the target generation random so that we wouldn't need to keep restarting. I also added the ability to spawn more at the push of a button. Fun.

Spent a lot of time talking with a friend and working out the calculation for accurately specifying the speed of the projectiles. Finally got that working.

Did a little refactoring. Created a quick bitmap for the targets instead of just drawing circles. Added that into the game, but now collision detection is off a bit. Will need to investigate, but will save that for tomorrow.

Duration: 01:00:04

Thursday, January 14, 2010

Daily Developer: Day 13

Today was actually very exciting. Well, as exciting as software development gets. Hey, it excited me, anyway.

I created a simple "projectile" sprite and a simple class to support it. I added support to fire using the right thumbstick, firing the projectile in the direction pressed. I also added support to destroy both the projectiles and targets upon collision. So, it is a real shooter now in that you can actually shoot and destroy stuff. Almost time to put the achievements in.

Things I need to work on next include:
  • Destroying the projectiles when they collide with the boundaries of the game (right now they last forever or until they hit a target.)
  • Making the creation of new targets more random, instead of the diagonal line they spawn in now.
  • Fixing the speed of the projectiles. I currently support firing in all directions with the right thumbstick. However, it uses the severity of the push on the stick to determine speed. So, there are faster and slower projectiles.

Duration: 00:58:14

Wednesday, January 13, 2010

Daily Developer: Day 12

Finished check to ensure shooter stays within bounds. Calculations are interesting since the size of the sprite is bigger than the size of the shooter and I needed to account for this.

I also did some basic, minor refactoring.

Tomorrow, I am ready to start with the actual projectiles the shooter will be firing at the targets. Should be interesting, but not too hard, I don't think.

Duration: 39:37

Tuesday, January 12, 2010

Daily Developer: Day 11

I picked up where I left off yesterday: trying to figure out how to detect if the shooter was moving off the edge of the window. After struggling with this for a little bit, and realizing that it shouldn't be this complicated, I decided that it was now a good time to start refactoring.

I have been keeping track of almost everything in the main game object. I do have a target object that I had created early on, but had been keeping track of a number of shooter properties separately. So, I created a Shooter class and moved over all the code pertaining to it from the game class.

It also occurred to me that there were a number of elements that were going to be shared between the shooter and the targets, like Position, for instance. I created a base class, as well as an interface, and started moving shared elements into the new structures.

I will continue with my refactoring tomorrow, and maybe I will eventually get back to calculating the boundary, now that it should be easier. I am also thinking about creating the "ammo" object for the actual shooting part of the game.

Was on a roll today and had to pull myself away as I started to exceed an hour. I don't want to burn myself out, and a good motivator is to stop when you already know what is coming next.

Duration: 01:03:30

Monday, January 11, 2010

Daily Developer: Day 10

Spent a bunch of time jotting notes in my notebook while hanging out at my daughter's gymnastics lesson. Have a solid idea of the things I want to work on next.

Duration 00:23.38

Did some calculations to correct the collision detection. I was using the upper left corner of the object as the center my BoundingSphere, and the collision was off. Added support for making sure the shooter stays on the screen, but need to apply some additional logic to again use the center instead of the upper left corner.

Duration: 00:17:16

Sunday, January 10, 2010

Daily Developer: Day 9

I continued development on the 2D shooter. I found some information about BoundingBoxes and BoundingSpheres. Since I wanted a round hit area, I used the BoundingSpheres with the z coordinate set to 0, so it is essentially just a circle to me. Using this, it was pretty easy to assign one to the shooter and the enemies. Then, I just had to check if the spheres intersected, using BoundingSphere.Intersects(). For now, I just throw up a message when there is a collision, but it should be easy to replace that with whatever I decide later.

The most notable thing about today, however, was that I didn't have any interest in doing any work on this. The whole structure of the 365, however, helped with a little self-made peer pressure. And, since it only has to be a minimum of 15 minutes, it made it easier to convince myself I could do it. I've also been doing really good at creating a "chain" of days where I do this, and I really didn't want to break the chain. Once I started, though, I was interested enough to work longer than the 15 minutes necessary.

Duration: 00:32:59

Saturday, January 9, 2010

Daily Developer: Day 8

The things I accomplished today are more in line of what I think of when I say I "did work."

I worked on the shooter. I found some code that allowed me to easily create circles that I am going to use as my targets, at least temporarily. The way I am defining things, it should be easy to use a sprite or a 3d object later without much effort. I setup objects to spawn at regular intervals, and created a way for them to be maintained and drawn easily.

I made a simplistic bitmap that I could use as the player avatar (the shooter) and stuck that into the game. I hooked it up to the left thumbstick and played around with moving my little guy around. It was surprising just how intuitive it was to get it working.

I'm not sure exactly what my next step will be. I'll probably work on getting bounding boxes set up, since currently the shooter can walk over the other objects. I also need to implement the actual shooting part, and I will need to do some investigation for this. Also, I need to work on how the objects are destroyed when shot, but I can just make them disappear to start with. The objects that are shot at are have some growth properties to them that I need to implement. And, I need to get the random spawn portion working, since I am spawning predictably right now.

Duration: 01:18:14

Friday, January 8, 2010

Daily Developer: Day 7

Today, I was planning on working on some basic elements for my 2D shooter, which I am going to call "Toxic Growth". Before I started with that, however, I wanted to finish getting the tools necessary to develop properly.

The one thing I realized that I was missing was source control. I'm not too concerned about losing files to HDD failure (since I have RAID 1 configuration), however, I like having the luxury of willy-nilly changing files and trying things without having to worry about making a backup in case it ends up being a horrible idea. So, I grabbed TortoiseSVN.

I have used TortoiseSVN at work, but have never actually needed to create my own repository. It ended up being very easy to do so, but I still had to muck about figuring it out. In the end, I was able to get it all configured and a base project into it.

It ended up taking about an hour or so. The exact duration is unknown, since installing TortoiseSVN required a reboot and I neglected to note the time on my Time Tracker before it was shut down.

Tomorrow, I am going to work on getting the basic shapes into the game. I might also take a look at the 3D example, but I am thinking that I want to write this shooter as a simple 2D, so I might hold off on that.

Thursday, January 7, 2010

Daily Developer: Day 6

Started going to through the "Your First Game: Microsoft XNA Game Studio in 2D" tutorial provided in the XNA 3.1 help. It is amazingly simple to do stuff in this framework. After playing with the tutorial, I am tempted to write a simple 2D shooter game. I think I might do this as part of my journey.

I might fool around with the 2D example a bit more, but following that, I am going to walk through the "Going Beyond: XNA Game Studio in 3D" that appears to be a bit more complicated. It might be worth doing the shooter in 3D.

Tomorrow, more 2D fun and then I'll start the next tutorial.

Duration: 01:06:33

Wednesday, January 6, 2010

Daily Developer: Day 5

I updated some details in the Google Wave, but also started a mind-map at MindMeister. Worked on the mind-map a couple of times away from computer, so exact time duration is unknown. Many of the details are more spelled out, but there are some things that remain foggy.

I think I might have enough of an idea now that I can return to developing. My goal for the next couple nights is going to be to research and create a 3D environment that I can move another object around in.

Duration: 32:50 + about 30 minutes

Tuesday, January 5, 2010

Daily Developer: Day 4

A friend (shunoshi) gave me a link to a menu displaying example as well as a book he recommends. While I cannot immediately make use of the book (as I do not currently have a copy) I was able to download the example code.

I ran the menu example and read through the code, and then browsed through some of the other examples there. While I don't think I have all the info necessary to make the graphics, I am confident that I can weed through the examples and piece it together when the need arises.

However, I think I need to return to brainstorming that actual game itself. Once I have a better idea of exactly how I want it to play, it should be easier to determine exactly what I need to learn. I tend to be better at learning via doing rather than reading, so knowing what I am trying to accomplish will direct my studies.

I've also shared some of my preliminary notes with yeti as well as another friend who expressed interest in assisting. I intend to try to coordinate most of this project via Google Wave, so I've posted all of my notes there.

Goals for tomorrow: I am going to focus on brainstorming the various game elements and the actual way the game will be played. I may also work on the story, since that might have a direct impact on how it would make sense for the game to be played.

Duration: 44:32

Monday, January 4, 2010

Daily Developer: Day 3

Technically, this took place during the same day as Day 2, but I worked on this a couple of times today, looking at different things for different durations, so I think it counts.

I started by creating a new XNA 3.1 Windows project in VS 2008. Ran it and saw it popped open a window with a blue rendered background. It now occurred to me that I don't really know anything about XNA, other than I installed it on my computer.

So, I joined the XNA Creator's club. From the site there, it suggested looking at the help available via VS 2008. I started reading the "Getting Started with XNA Game Studio" in the help. Decided that the "Programming Guide" and then the "XNA Framework Class Library" and "Content Pipeline Class Library" sections would be worthwhile reads. Will probably spend several days reading this. Additional steps include looking at tutorials and examples at the XNA Creator's club.

Duration: 33:04

Daily Developer: Day 2

Though I didn't work on it yesterday, I am counting my little lunch time update as my daily work for yesterday. I will work on this further after work today.

I spent 18:55 working on writing a brief explanation of what the game concept is and shared it with Yeti, who is going to be working on the art. I also sent him an invite to Google Wave to coordinate our stuff together better. I even got to use my quick little time tracker.

Tonight, I think I will focus on expanding the game concept, writing my back story and thinking of the puzzles / game elements I'd like to include.

Saturday, January 2, 2010

Daily Developer: Day 1

Today is the start and began with my decision to pursue this. To get things started, I began by starting up my copy of Visual Studio 2008 that I had sitting around. I hadn't installed any of my helper apps, so I downloaded and installed Sonic File Finder 2.1 and Code Rush Express. I use both of these at work and know I would feel lost trying to navigate my projects without them.

After getting those installed, I decided that the best way to start would just be a quick time tracking app. Ideally, it would be useful for tracking this type of project, but could be useful in a number of different tasks I do. As part of the app, I am going to include an option to notify the user that a specified amount of time has been spent on the project.

The basic app now has a start and stop button, a combo box to allow multi-project support and an output window to display the time taken. It is quick and crude and I think I will spend some time refining it tomorrow.

Accomplishments:
  • Decided to participate
  • Mucked with blog to get it "just right"
  • Installed my utility add-ons to VS 2008
  • Started a new project and put in some basic functionality.
Overall time spent: about an hour.

Daily Developer: Intro

This is my attempt at the "365 Day" project as described and discussed in this thread.

Something I have been meaning to get to forever is to make that video game. Which one? No specific one, but the whole reason I became a software developer in the first place was because of my love of video games. I have always meant to make one "in my spare time" but found I was always so busy playing them that I never took the time to actually use that "spare time" to create one.

So, my 365 is going to be software development. I am going to brainstorm ideas, write plot / dialog / scripts, write code, test code and research things I don't know how to do for the 15 minutes to 1 hour suggested per day. I think I am going to start with just writing utility programs at home until I can get into the habit of daily development. I'll record my progress via my blog here.