Showing posts with label pygame. Show all posts
Showing posts with label pygame. Show all posts

Wednesday, September 9, 2020

The Importance of Pre-Production

I am doing a podcast with my friends about games (check out The Adventure Mechanics here) and I decided that I need to try for accountability on actually releasing a game this year. To that end, I'm going to go through the development process to release a game. Here is the transcript from my first episode on accountability:

Welcome to the Adventure Mechanics Side Quest and it's only going to be me, Chandler, today. This is going to be a mini-series where I look at some of the grittier parts of game design. It's also going to be a form of accountability for me as I take a game from prototype to a more fleshed out game. I have been a hobbyist game developer for a while now, and need a kick in the ass to get a project past the prototype phase and actually publish something. For this mini-series, I'll be taking one of my prototypes I made for a game jam and fleshing it out to a complete game.

So, where do we start? Well, if you haven't done something like this, the first step is planning. It's not the sexiest part of game design, but if you approach it with creativity, you can end up with something great. This first step is going be coming up with a workable idea. How do you come up with a concept? Well you can peruse through old game jam themes for inspiration or looking at an existing game design for your game. The most important part to keep in mind, however, is how much you can realistically make. If you're a solo developer and want to make your Magnum Opus, be prepared for the years of work that will take, despite it, "just being a copy of that sweet MMO/Battle Royale/whatever." The games you're using as a rubric had many developers each with more experience than you. As a side note, if you have made and published a game and are for some reason listening to this, I would love to hear your experiences.

The prototype I'll be using for this is an entry I made for OMGJam6 about mapping the world around you. I called it "The Mapper". It was my first solo entry for any game jam, despite participating in about a dozen game jams before OMGJam. I didn't get nearly far enough to really test out the concept of this game, so I am going back to this and working on getting the prototype more fleshed out. I feel like there's a good game in this idea and I want to spend some more time working on it to see if I can suss it out. For the purposes of this pre-production, I'm giving myself a month to get the prototype out. Here's what I have planned for this game so far:

The pitch:

You are a cartographer that has arrived at a small frontier town in need of your services. Problem is, you haven't mapped the area yet. You need to set out on expeditions to map areas of interest, making sure that you bring enough supplies to survive in the wilderness. With the hard-earned information you gathered, you can then help the town thrive. Be careful to not put yourself out of business, however. A townsperson with a whole map won't need to come back to you for your services again. You have bills to pay, after all.

[The Mapper] is a top down exploration game where the player must manually create a world map and sell portions of it to to make ends meet. The cartographer's office needs to be maintained and the player needs to be fed, creating the tension of the town getting the supplies it needs while not giving too much away where the townspeople no longer need the player.

To further flesh out The Mapper, I'm going to be formalizing the gameplay loops that I am envisioning for it. What's a gameplay loop? A gameplay loop describes what the player will be doing during a typical game session, or series of game sessions. The primary gameplay loop describes the lowest level repetitive task the player will be doing. For Diablo and it's clones, the primary gameplay loop is: kill a monster, pick up loot, sell loot that isn't of value to player. There is more to Diablo, of course, but the primary gameplay loop can be condensed down to that. Any gameplay loop that builds on top of the primary is a secondary (or higher) gameplay loop. In our Diablo example, a secondary gameplay loop is to navigate to a given location, collect an item, and return it to a townsperson. There can be many secondary gameplay loops, but it's important to define all the gameplay loops that you want to implement beforehand.

For my The Mapper prototype, I'm aiming to get the primary and secondary gameplay loops ready. The primary gameplay loop is:

- buying supplies for an expedition

- exploring the world outside town

- noting where things of interest are on a map that the player manually fills out

- returning to town before the expedition supplies run out

A secondary gameplay loop I am planning is going to be something like this:

- player selects townsperson quest from queue

- player selects the tiles (or path) from their map that they are going to sell to the townsperson

- townsperson paths to the goal tile

- if townsperson returns, they go back into the available for gathering resources pool

There will be other gameplay loops that I will want to implement, such as updating the map to reflect improvements, evading predators, and collecting supplies in the wilderness, but this will be enough for the first prototype. I only have a month to finish this, after all.

Once you have your idea, come up with the absolute basics of your design. What are the controls of your game? Are you going to be using existing conventions, such as the traditional FPS health packs or regenerating health? How do you expect the player to interact in your world? Write down the basics of what you want the player to do or feel. This is the most important part of coming up with a design. Once you have that, any feature you consider adding will have to either be in service of your initial design, or the design itself must change to accomodate the added feature. This step ends up forcing you to consider the game holistically, so you check yourself before adding to the game impulsively and getting yourself stuck in a cursed problem where two features you want are fundamentally incompatible.

In The Mapper, I will be breaking up the game into two different parts: The meat-space, where the player controls an avatar through the world, and the map-space, where the player interacts with the map they generate. With the meat-space, I'm planning on it having controls similar to the Legend of Zelda, with one hand controlling the movement of the player and the other interacting with the world. I plan on having support for both a controller and a mouse and keyboard. I'm not envisioning the player needing more than four buttons for interacting with the world. As the player moves around the wilds, they will see interesting features. Features will be of four different types: Landscape, such as forests and rivers, Resources, such as berry-filled glades or fishing spots, Fauna, such as fowl or bears, and Improvements, such as abandoned towns or roads. It is up to the player to notice and note where they find these features on their map. There will also be hazards in the world that the player will have to deal with, but I do not intend to add any real way to permanently deal with flora or fauna hazards. To that end, the player will not have an attack to use on hostile fauna. I envision that the player will be able to carry equipment to placate or distract the fauna, allowing the player to get away. These may be placed into a context menu or basic inventory.

For the map-space, I plan on having the primary interface to be selecting map tiles and either adding or removing features from the tile. Whatever control scheme used for the meat-space will be mirrored in the map-space. That means if the player chose a controller, the map-space interface will accomodate a controller. That means the map-space navigation will have to be flexible enough to accomodate either input method. The controller setup will focus on moving, highlighting and selecting tiles. The keyboard/mouse setup will work similarly, but will not force to have a highlighted tile. While exploring, the player will be able to open up the map at any time and select a tile to add or remove features. The interface will not highlight the tile that the player is currently on, but rather keep the last tile modified highlighted. I do not want the player to use inappropriate clues from the map to verify it's accuracy. When "selling" information to the townspeople, there will be a goal tile and, if there is a specific path the player wants the townsperson to take, a path from town to goal. What the townsperson needs will be shown on screen somewhere during this pathfinding process.

Notice how I haven't mentioned anything about the technology to use when I described the basics of my interface, beyond the input device support. That step will come after you have come up with your design. Pre-existing game engines are great, but some are better at some things over others and your design should guide you towards an engine/language/whatever that is best suited for your idea. If your concept comes with an existing prototype, great! The choice of what to make it in is that much easier. Otherwise, you'll need to consider what you are most comfortable with or are willing to learn versus the capabilities of the engine that you are looking at.

In my case, The Mapper jam entry I created for OMGJam6 was created in PyGame. PyGame is a simple engine that gives me control of input devices and has basic capabilities of drawing to a screen. I chose to continue in PyGame because it was what I was most comfortable with and had enough capabilities for my purposes. I could have used a more feature-rich engine, such as Unity, Godot or Unreal, but I wanted to push myself to really know what was going on in my engine. I didn't want to have easy access to those extra features so I am forced to work them out. That is why I ended up settling on PyGame once again.

One last thing I wanted to talk about for pre-production is creating a timeline. On larger projects, this falls onto project managers who (hopefully) know what the capabilities and limitations of their team are. On a hobby project, such as this one, that falls onto you. Keep realistic goals in mind, breaking it down to accomplishments you can achieve in short time frames, such as a week or two. This is not the time for optimistic projections. This is what you will be using to hold yourself accountable, so build in some padding as you move forward. You don't want to set yourself up for failure and giving leeway for unexpected roadblocks only ensures that you won't fall behind.

In my case, I have broken my progress down to milestones on a week by week basis. I am only doing this on a spare-time basis, so breaking it down further wasn't going to help me measure my progress. I also chose a week length, since I find that I will put off tasks that have longer timelines. So, for the next month, I have a series of milestones that I am pushing myself to achieve. By the time the next episode of this podcast releases, I will have a prototype ready, along with another topic to discuss as I push to get this game to release.

Thank you for listening this rather rambly podcast. As always, if you have any thoughts, questions or feedback, reach out to me @jcsirron on Twitter. This has been the The Adventure Mechanics Side Quest. I'll talk to you next time.

Bye!

 

Wednesday, June 22, 2016

Metris, Tetris and mutating known formulas

After sitting and waiting for the memories of the last Ludum Dare to fade a bit, especially the emotions, it's time to sit down and do some good, old-fashioned analysis on our game, Metris.  Metris is a mutation variant of Tetris, the classic block game.  Instead of the known formula of rotating shapes, we used morphing in place of it.  That was the core of our idea: morph the shapes in Tetris and use someone's existing codebase to kick off the jam a little faster than the last iterations.


We started the evening by brainstorming ideas until the two teams were decided: Our game, with two people working on it in Python, and the gobs of people working on the other game in Unity. It seems like my preferred language, Python, turns off quite a few developers.  Those not scared off by Python were not too enthusiastic about working on a Tetris clone.  Oh well, the game they came up with was good as well.


Once we had our game concept in mind, we found a code base to work from and started working on it.  At first, it seemed like the code we were using was good, but after a while, I found myself working on handling the edge cases that the original developer never bothered to handle.  I spent the entire first evening and most of the morning working on getting the edge cases under control.  Although it was a good lesson, I would have much rather have just spent some more time looking at code bases and not have dealt with the headache in the first place.  Lesson learned, I suppose.

I started feeling rather weathered as we entered the second evening.  Apparently I didn't avoid the cold that my significant other had brought home from work.  Despite that, I was still able to handle the rest of the edge cases in the code and get the game to run the way we wanted it to run.  I retired from working on the game early that night, knowing full well that the next day would be a mad rush yet again to get the game finished and polished.

We started doing the polishing phase once we started working on the final day of the jam.  We created a win condition, set up several levels for the game, and even got some music in as well!  Funnily enough, we started the day assuming that we would not be able to get music in for the game.  There just wasn't enough time to get both the polish in, along with working on the music.  In the final hours, Josh came in and wanted to do some audio for one of the groups.  Fortunately for us, the other group, which had seemingly absorbed any walk-ins, was at capacity when it came to audio people.  We sat him down for a quick playtest and some vague desires on what the game should sound like and we let him loose.  A mere hour later, he had music done and in the game for us.  Sweet!

Ok, now time for good, the bad and the ugly!

The Good:
  • I got practice on working with a poorly documented, buggy code base other than my own.
  • Metris has music!
  • We got time to spend on polishing the game more than a few hours.  Consequently, the game was much more complete and looked better than the playable demo we had at the beginning.
The Bad:
  • Not a lot of people joined us for creating this game.  This was not ideal, since there were over a dozen people working on the other one.  I think Unity has saturated the game development community.
  • Getting sick.  Not much else to say about that.  Colds suck.
The Ugly:
  •  My artwork.  Seriously, who let me do the artwork?  Oh, riiight.....
Ok, that's all for this segment.  At some point in the near future, I'll be taking a more formal look at the numbers and what the community had to say about the game.

Saturday, August 29, 2015

Royal Flesh Post Mortem

Well, another Ludum Dare down, and another game out.  It's been a week since we finished and published what I thought was a functioning game.  Before we delve into what went right, wrong and ugly, though, take a few minutes to try it out here.  I'll wait.  Tried it?  Good!  Leave a comment about it and I'll be sure to read it.

Now time to do the post-mortem!


This game went surprisingly smoothly, save for a few particularly bone-headed moments and a LOT of frustration getting cxfreeze to work properly (seriously, how can you forget to include something that is IN the include call?)  We started out with a long idea session that seemed to center around an idea called "Grammar Nazi."  Thankfully, that idea didn't hold enough interest to develop and we settled on the trope of abducting royalty as a dragon.  I even got ambitious and got the framework for the game ready the first evening.  I went home to bed happy, thinking that I had gotten so much done already.

The next day I got into a HUGE memory leak due to my framework not properly closing out when switching between screens.  I spent an hour working on getting that migrated over to objects instead and then implemented the item system.  At this point, we had an artist that we were supposed to be sharing with another group (thanks again, Tamara!) and things felt good.  We even had a few teenagers helping out with the audio portions.  I brought in my home-made sword and so did Brian, so we had props for making convincing sound effects for the game as well.  As the day dragged on into the evening, things started going sideways.

Our awesome artist couldn't work with us anymore, since she had prior plans.  That left us with about 3/4 of the assets we needed and no one to do the rest.  I was looking at doing artwork for some time, so I stepped up and started jamming on the art, leaving the code work to Brian.  The guys working on audio were not really into it and started messing around with two shiny swords outside.  They claimed they were making sound assets, and they did, but their methodology could have used some... work. After about an hour (maybe more, maybe less. I was lost in artwork), they came back in with dinged swords, cracked chain maille and apologies.  Apparently, they used the equipment improperly and caused quite a bit of damage.  I was so engrossed in the artwork, I forgot the first rule of teenagers: Never give them dangerous things without supervision.  I went home that night with a rather sour taste in my mouth.

The next morning, I got in and attempted to start working on art again.  I was immediately foiled by a broken tablet pen.  Just as I was getting comfortable with it, too.  I had to go grab a mouse to work with and got back to art.  Thankfully, the rest of the development process went smoothly.

When we went to package the game up, we had troubles with it packing up nicely for mac.  We spent an hour working on it, but to no avail.  I was getting tired, so I packaged up a Windows build, tested it and went to bed.  Apparently I should have tested it on another computer without python installed, since I looked at the progress of voting and found a long list of "Broken game!" comments on the site. I just figured out that cx_freeze was not including pygame._view in the build, rendering it useless.  D'oh!  At least now the game is playable.

Ok, time for the Good, the Bad, the Ugly:

The Good

  • We released a game!
  • I got to do some artwork
  • Scope Creep wasn't really an issue
  • Execution was very close to the original Idea

The Bad

  • Artist had to duck out
  • Bad build on layman PCs
  • Broken equipment (tablet pen, swords)
  • Animation had to get cut back for the Nobility

The Ugly

  •  Broken chain maille
  • A week's worth of "Broken Game!" comments on the Ludum Dare website

Wednesday, June 24, 2015

Obligitory Hello World

Hello all,

I am Chandler Norris, an admittedly amateur game developer and this is my development blog.  I am currently working on a game prototype using Python/PyGame as my rudimentary framework.  I have made a few Ludum Dare games (found here) and countless prototypes scattered across countless hard drives.  I am also leader of a Game Developer's Forum at the TinkerMill, a hackerspace in Longmont, Colorado.  If it is not obvious at this point, I am definitely into making and playing games.

Now before you say anything, yes, I know that I'm not using the "optimal" language, such as Lua or C#, nor am I using more feature-complete tools, like Unity or Construct2. Why? The answer is simple: I like what I'm using right now.  That is not to say that I am against exploring those options further, it is just I have not found PyGame's limitations to really hinder my ability to make the games I want to make.  Once I find it to hold back the types of games I want to make, I will start exploring these other options.

Join me in this adventure of game design!


- Chandler