Saturday, June 30, 2012

Progress update for 6/23/2012 - 6/29/2012

This week:

  1. My roommate continued working on AI and got stuck on a weird .NET reference error bug. After he gave up, I took a look at it and came up with a work around. Still no idea on what was up with that bug though. For a more detailed explaination, please look here.
  2. Found a link to an article about marketing indie games that might be useful down the line.
  3. I finished room transitions to a polished shine.
  4. I rewrote the entire control system. Controls are now based on Actions (strings) and I can easily check for button presses, new presses, continuous presses, releases, etc of any button or key associated with a string quickly. The game actually controls a bit better now, though I still want to tweak how bullets are fired and how the shooting animation is played.
  5. With level transitions working properly, I went ahead and created the rest of the Cutman level's rooms in the level editor. There were some bugs to work out, but now everything works fine with transitions and running around and such. There's no enemies placed after the first room yet, but that's a minor point and will be adjusted later. Running through the level repeatedly though has shown me that there's still work to be done on the player class. There are situations where, when close to a platform corner, the player will switch to a running frame for just a moment or where the jumping variables aren't quite right and the player can't reach certain areas. These bugs will be worked out later and are just noted for now.
  6. My roommate added Beak enemies (Blasters in Japanese), though they aren't quite perfect yet, they're close.
  7. I changed Mega Man's injured logic to first push you back and then give you back control after a bit with a short period of invincibility. Before this you wouldn't get control back until invincibility wore off, which let Bladers really tear you up.
  8. Spikes kill you now. Sorry.
  9. Fixed a bug where the game would think you were on the ground when you were actually jumping past a corner.
  10. Fixed a slew of ladder related bugs. Ladders suck.
  11. Roommate added more behaviors to the enemy AI after I added an extra generic parameter for all enemies in the engine and the level editor.
  12. Added in all spawns of Beaks (Blasters), Octopus Batteries (Suzys), and Bladers (Bunby Helis).
  13. Tidied up some sprites and added death particle spritesheets
  14. Roommate added Flea enemies. Their AI does little more than jump constantly right now.
Here's a video!
Here's some screenshots:

A room further in the level

This is a bad situation to be in!

Made it to the end!

Saturday, June 23, 2012

Progress update for 6/16/2012 - 6/22/2012

This week:

  1. I worked on the level editor a bit more, adding in some features I wanted after using the program a bit more like "Load last opened level." I also added some support for adding enemy spawners of different types. There's a lot left to do with the editor, but it's incredibly unfun so I really need to get myself pumped up to do it.
  2. My roommate worked on AI some more. We've got some Octopus Batteries (or Suzys) placed now for fun.
  3. I started tweaking jumping since that hasn't been working quite right. It feels too float-y I guess.
  4. I watched Indie Game: The Movie this morning. I expected to come out of it motivated and ready to program. Instead I came away determined, if a bit haunted. In lieu of coding I walked to the local CVS and picked up some Microsoft Points to buy Fez with later tonight (I'd put that off long enough) and also some candy from my childhood. I'm thinking a lot right now about what I want to do with my life and why I like games. I don't have any answers for either of those questions. I can't even pick out which game I like the most from my collection or which had the biggest impact on my life. Watching the movie, I saw many qualities in Phil Fish, Jonathan Blow and Team Meat that I've been noticing in myself lately. I mean, I saw those qualities ahead of time. Not just thinking "Oh I'm like that too" when I was watching the movie. It was more like they echoed things that I had thought or said to myself before. Sometimes almost word for word. I think that making games is what I want to do with my life, but to hear someone echo what I feel inside of me and then to see what they've done in the field I's scary.
  5. Did a lot of tweaking to player movement and control. Still not perfect, but it feels much better now.
  6. I added support for designating room exits as well as a lot of general polishing in the level editor. It's not quite as nice as I wanted it to be, but the idea of polishing the level editor to perfection right now just isn't something I can stomach. I know that the tools I build to build the game are extremely important, but the drive to work on them right now comes entirely from wanting to implement new features into the game engine. Later on, the drive for fixing up the level editor will come from a combination of wanting to do things in the level editor (when making levels) and embarrassment that the level editor isn't better.
  7. Most of what I need for room transitions got implemented, but there are still some problems with it, so sadly I don't have much to show this week visually.
In summary, I didn't get as much done this week as I wanted to, but still made good progress. At least part of my time went to Civilization V and the new Gods & Kings expansion. Raptr tells me I played 10 hours of Civilization V this week and when I think about it, that's probably the most I've played videogames per week since I started working on this in my free time. What a strange thought.

Saturday, June 16, 2012

Progress update for 6/9/2012 - 6/15/2012

This week:

  1. Moved the project to some proper source control system called Assembla. It's free up to 1GB and has a nice visual studio plug in.
  2. Got my roommate working on this with me now. He added code for doing things like playing sounds when things die and also started on writing some basic AI for the enemies.
  3. I started working on ladders thinking that it would be a quick little thing that would take a few hours. I was wrong. So, so wrong.
  4. Ladders wasn't actually so bad in retrospect, but it feels like it took a long time just because I didn't devote so much time to programming each day this week.
  5. Jumping the gun a bit here, but I was idly listening to this episode of Extra Credits and it got me thinking about my engine and why I played and enjoyed the original Mega Man games. Even better, it got me thinking about what I want to get out of this engine and what I want players to get out of this engine. This is something I'll post more about and think about more later after I've finished Cutman's stage, but it's good to be putting it on the back burner now.
  6. Roommate implemented pausing and pausing when the game window is not in focus.
  7. Not directly related to development, but maybe Mega Man L should get made; it's more than Capcom is doing now.
After last week's additions, I decided I wanted to take it slower this week so I'm not going to push myself to have anything finished. This decision is also in part because the wife leaves for a week or so starting on Saturday so I'll have PLENTY of free time to be coding this game. I intend to make a lot of progress then because of the sheer amount of free time I'll have.

Late edit: Forgot to take screenshots for Screenshot Saturday! Here:
My roommate added some basic AI code.

I added ladders.

Wednesday, June 13, 2012

Goals for the Mega Man clone

I think I've mentioned this in replies to r/GameDev's Screenshot Saturday posts, but since this blog is my record of the development process, I may as well put down my intentions here. I mentioned in the first post of this blog that I wanted to write a game that I would enjoy playing and that's why I'm focusing on the NES Mega Man games. I really enjoy these games and I think that they're simple to program compared to other types of games I like playing (grand and sweeping RPGs, Civilization, Dynasty Warriors, etc).

That said, I don't want to just copy the Mega Man games straight up, but I feel that I don't have the experience to create my own original game right off the bat. Like how some artists start their careers with fan art of their favorite franchises or how some writers get their start in fan fiction, I need to start by imitating things I enjoy until I can feel confident in my abilities to make video games. Lots of forums and websites tell new comers to the craft to start really small. They recommend games like Pong or maybe Space Invaders or maybe 1942; but usually Pong. Making a game as simple as Pong can be great to practice your ability to make a game compelling, but I can't let myself go that small for reasons of maintaining my interest in the project as well as feeling like I could learn more by being more ambitious.

With that introduction out of the way, here's the major milestones I want to hit with this engine:

  1. Replicate Cutman's level from Mega Man 1, release it (for free of course) online and gather feedback.
    Cutman's level is pretty simple all things considered. There's a good number of things for me to have to account for (boss fight, multiple enemies, some vertical as well as horizontal sections, etc) but not enough to overwhelm me (one level means no real weapon switching/upgrades, no level select or title screen really needed, a ton of enemies won't appear, no need to come up with and polish my own original level design, etc). All the functions of the game are pretty straight forward and easily checked. I could make improvements at this stage, but I probably won't make many (one improvement I will make is not implementing the infamous "Pause Trick" that lets you murder bosses easily). Once I have released this and gotten some feedback on what I did wrong or poorly, I can move on to the next stage.
  2. Create a short game in the Mega Man tradition that doesn't copy weapon, enemy or level designs.
    This allows me to polish up things from the previous milestone and then improve on them and implement more functionality. I view this as a halfway point between starting from scratch and releasing my first "real" game. If I can get here, I'll have 4-5 levels with some sort of game mechanic that is hopefully fun and probably not very original. This step will be very much focusing on presentation and what it takes to release an actual game. Reaching this milestone will be a big deal for me because it will mean that I have what it takes to make a "real" game. I will have proved to myself that I have a shot at being successful at this. I'll release it for free online and more or less beg people to play it and give me feedback.
  3. Create an honest to goodness video game and release it commercially.
    This milestone is currently a long way off, but it's part of what will keep me going. This is my carrot at the end of the stick. It doesn't matter if it's a success or not, it just matters that I make it here. It'd be great if it was a success for me (I'm defining success here as I can afford to take my wife out to dinner with the profits), but that's not the primary reason I'd be happy. If I can release a game commercially, then I've proven to myself that I have the basic skills to live as a game developer. This is the point where I would feel confident enough to apply to developer jobs at game studios. That far off dream is what gives me the energy to come home after work each day and program for another three to five hours.
I plan on documenting the entire process of reaching for these goals here, on this blog. As I go along I expect that I'll be writing posts about me learning things pertaining to design of a game overall, level design, making sprites (I'm a very poor artist) and debugging. As I release each milestone, I'll be posting about feedback I get and how I intend to incorporate those suggestions/criticisms into the engine. I'll also be taking breaks from programming sometimes to post here about past games I've made (successfully finished ones and maybe a post about the ones that were not so successful), if only to document my past failings and maybe learn something from them. I'll probably start that sometime in the next few weeks depending on how busy I get.

Saturday, June 9, 2012

Progress update for 6/2/2012 - 6/8/2012

This week:

  1. Worked hard to get the level editor to a level where it can edit levels properly (Picture below)! I still need to add support for transitions in levels and enemies and any other scripted event stuff, but plopping down tiles, saving, loading, changing tilesets and a few other nice features are all implemented and working. There's still a lot to do before it's complete, but I'm at a point where I can create some levels in my map editor for use in my game. Now then, I just need to get my game loading these levels...
  2. I've given a lot of thought to the content pipeline in XNA and how or whether I should be using it. I've already got an XML schama that works with my level editor, but it seems like if I want to use the content pipeline I'll need to rewrite my schema to be XNA serializable. Here's a good tutorial about how to serialize XML for XNA. If I bypass the content pipeline, then I can make my life a bit easier even and just save levels as binary blobs, but I lose the ability to run my engine on the Xbox 360. In the end, I decided on using the content pipeline because I don't lose anything by conforming to it and I don't want to close doors I might want to use later (Xbox 360 compatibility).
  3. Powered through getting levels to load through the content pipeline in game. I also converted the current level assets I've created by hand from the editor format to the XNA format. It was tedious, but informative. The whole thing turned out to be slightly simpler than expected in some places, so that was a nice surprise. I conferred with my roommate and we isolated the render resolution and the window resolution so now everything looks much more properly to scale like the original Mega Man game. Below you'll find an image of the game running the first bit of Cutman's level in game.
  4. Found another good article about the component design pattern. It's pretty obvious that this pattern is better for larger games, but I guess I'm  not sure where the line between "small" and "large" lies. It seems like the sort of thing that requires experience to determine.
  5. Levels now properly export to a format that can be put directly into the Xna project, compiled and read into the engine. Before I had converted the files from the editor by hand and boy did I not want to do that more than the once. 
  6. I'm still fiddling with collision detection, but that should be fixed for a while in a little bit here. I eventually ended up defining hit boxes by hand for the player character since doing it automatically turned out to be quite a bit of trouble. Everything works a little better because of it though, so it was worth it.
  7. Enemy spawns now work properly in the game and can be set in the level editor. Currently the options are limited to exactly one specific case (BunbyHeli, spawn on sight, infinite spawn) and the enemies don't have any AI, but they deal damage just fine when you run into them and they're plenty killable. Overall, I'm happy with them. I included a youtube video I recorded of everything up to this point using fraps. I would've made a gif, but I don't have a good program to do so. If you know of one that's free, let me know in the comments. Thanks.
It's been a busy week, but I really wanted to push myself to get to this point. Looking back at last week's progress report, it feels like forever ago. I'm much happier with the state that the game is in now, but I really haven't spent much time unwinding from work, so I think I'm going to take it a bit easier next week.
Here is my level editor with a carefully reconstructed first bit of Cutman's level from Mega Man 1
So chic!

Saturday, June 2, 2012

Progress update for 5/26/2012 - 6/1/2012

This week:

  1. Fixed my timestep. This was the end result of debugging some physics problems. I also got to change all my constants afterwards to prevent my player from flying off the screen at every opportunity. Something else I learned about while talking to my roommate about this problem was sweep tests. This sounds like a good idea and as soon as I decide that I have need for it, I'll be implementing it in my own stuff.
  2. Read about Tiled and considered using it in place of my own map editor that I've been working on. Tiled has a lot of nice features for map editing that would help me create maps much much much faster than my own map editor will when I'm done with it (because there's no way I'm going to put in more work than I need to into it). I looked into what I would need to do in order to get Tiled to save in my map format that I've been developing. Here is a link I found about writing a plugin to get Tiled to save in your format. I decided ultimately that although Tiled is a great looking program, I would have to include it in my plans from the beginning next time to use it effectively. This time, I think I'll be better off working on this myself.
  3. Added a life bar for the player. It's position is a bit close to the screen edge, but that can be fixed later.
  4. Worked on the map editor more. Much more. Also thought about how best to integrate my level files from the map editor into the game program.

Didn't get to work as much as I wanted to this week on my project. This weekend I'm either going to work on making a visible change in the level architecture or implementing some enemy AI via finite state automata. Below is a picture of my only visible change this week, the health bar: