240: Video Game Update: Introducing The TUCUT Library.

Take Up Code - A podcast by Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes

Categories:

You can join an actual game development session almost every Saturday. This schedule might change in the future. But until then, you can find me working on a video game almost every Saturday. I’ve brought together a lot of code that I’ve written over the past five years into a single library that I use in the game development sessions. There’s a lot in it with eight major components so far. Testing library. This lets you think about how you intend to use your code before you write it and then make sure it does what you expect. Logging library that lets you easily write information to a file as your application runs. Google’s Protocol Buffers lets you send and receive messages between different parts of your application. File library to manage reading and writing files. Configuration library that lets you store structured information in a text file. Event publishing and subscribing library that lets you define exactly what information you’ll send whenever something important happens in your application. Extension library is where new things can be added to your app or maybe existing things can be changed. Curses library lets you write text-based applications and helps hide some of the more difficult aspect of curses. You can read the full transcript of this episode below. Transcript This schedule might change in the future. But until then, you can find me working on a video game almost every Saturday. I actually write code a lot more than just Saturdays. The problem is that I never know in advance when that will be. For me, programming is relaxing. It’s what I do. I enjoy it and have been programming ever since about 1991. Before then, I was mainly into electronics. It wasn’t until 1991 when I needed to find a job quickly that I switched careers and started programming. At that time, I knew a little programming already but was still completely unprepared for what it was like to work on a large project. Or at least it seemed large to me then. It really wasn’t a very big project. There’s so many features that software is expected to have these days that even a small utility application to help you keep track of phone numbers would probably be bigger. Imagine for a moment that if I was unprepared over twenty five years ago, what it must be like today. I’ve yet to find any book or online tutorial that can prepare you. I’ve found that a lot of people even after reading some books and watching online videos for a week or more still have no idea where to begin. Are you in this situation? Do you have an idea for an application and no idea how to start? Or maybe you feel frustrated because there’s so much to do? What should you focus on first? One good thing about all the progress we’ve made over the last few decades is that our tools and libraries have also gotten better. Sure, they can seem complicated too. But we don’t have to write as much software as we used to. We can reuse code in libraries. I’ve brought together a lot of code that I’ve written over the past five years into a single library that I use in the game development sessions. There’s a lot in it with eight major components so far. • First is a testing library. This lets you think about how you intend to use your code before you write it and then make sure it does what you expect. It’s a single header file that you include and then you write what appear to be methods that use your code and then verify the results. It runs all your tests and prints out an organized summary of everything that passed and failed. You can group tests together and choose to run some or all of your tests each time. All of this fits in about 750 lines of code. • Next is a logging library that lets you easily write information to a file as your application runs. You can use this to keep track of what’s happening so that you know where to look for bugs. Many times, a log file will le