Over the weekend I started making a game for my son. He is 5 and loves everything Mickey Mouse or Disney. He also really likes adventure games. Over the holiday break he and I finished Thimbleweed Park the latest game from Ron Gilbert and Gary Winick.
So he is basically designing and telling me what to put into the game which is super fun because I get to spend some good quality time with him and I also get to stress test my little game engine project in some creative ways instead of my normal I just wrote this let me test it kind of way. Now I get to actually try and make it work in ways I have not thought about yet. Like just yesterday he put together some stuff that required me to finally put in hotspots into the rooms. I had been meaning to do it regardless but now I finally had a reason to, I had to use them to make his game.
He is designing the game by making drawings of rooms he wants me to make and I then take his sketch and do a quick and dirty vector art version in Inkscape. I have a simple python script that parses svg files and then runs Inkscape from the command line to export out what I need to png files and put together a room file that gets parsed into the main single data structure for the game. It's really handy and fast to have this automated and since I try and keep everything as simple as I can just use a small two letter prefix on the objects in Inkscape that get brought into the game. The red boxes are hotspots and are not visible in the game.
Once we have a new room to work with we jump into the logic editor I put together. Also since I wanted my games data format to have everything in it this also included the games logic. I did not want it existing as seperate script files. Instead I store the logic as input and out nodes that operate on preformated data. Its kind of hard to explain because the idea is so simple. But this lent itself naturally to a visual node based approach to designing the logic. The nodes are not like other visual scripting languages, the nodes are like tiny self contained logic states that flow together. In the game each room and actor have their own logic scripts and there is a global logic thread that allows for as many scripts to run globally as needed. The logic design could be a few posts on its own as it own. Anyway I use Blender 3D at home and at work and have been using it and scripting add-ons for years now so it is very easy for me to put tools together in. Blender just happens to have a really nice and extendable visual node viewport so I put a logic node editor together in there that is super handy.
So far I am very happy with and exited by this approach. I have found it very flexible and so quick to iterate. In someways its almost odd because I am so used to spending all my time writing code on my projects and now if something needs code it only takes about 30-40min to put in the data, add it to the tools and then get the engine side up. So I have all this other time spent actually working in this very free form way. When I first talked to my son about the game and started to put the first room together I thought things felt a little cumbersome (my tools workflow not the data side stuff) and I really thought about jumping ship and grabbing an existing engine. But I decided since this was meant to be a fun project with my kid that it would be more fun to build the tools and finish the engine on one of his awesome ideas. It has been so much fun watching him get into it and for me to nerd out with him.
So he is basically designing and telling me what to put into the game which is super fun because I get to spend some good quality time with him and I also get to stress test my little game engine project in some creative ways instead of my normal I just wrote this let me test it kind of way. Now I get to actually try and make it work in ways I have not thought about yet. Like just yesterday he put together some stuff that required me to finally put in hotspots into the rooms. I had been meaning to do it regardless but now I finally had a reason to, I had to use them to make his game.
So far I am very happy with and exited by this approach. I have found it very flexible and so quick to iterate. In someways its almost odd because I am so used to spending all my time writing code on my projects and now if something needs code it only takes about 30-40min to put in the data, add it to the tools and then get the engine side up. So I have all this other time spent actually working in this very free form way. When I first talked to my son about the game and started to put the first room together I thought things felt a little cumbersome (my tools workflow not the data side stuff) and I really thought about jumping ship and grabbing an existing engine. But I decided since this was meant to be a fun project with my kid that it would be more fun to build the tools and finish the engine on one of his awesome ideas. It has been so much fun watching him get into it and for me to nerd out with him.
Comments
Post a Comment