Skip to content

Archive for December, 2013

2013 Year in Review

A Year of Challenges

I would definitely label this year as a year of challenges for my family and myself. The biggest event would definitely be selling our condo of six years and purchasing a house where we hope we stay at least until the kids move out. The condo where we were living (and is starting to feel like a distant memory now) is only a two bedroom. With our two kids sharing one bedroom and only getting bigger, I wanted to give them their own rooms. My son was also going into kindergarten in the fall, and I wanted to be able to move before he started, so that he wouldn’t have to go through changing schools. Mortgage interest rates were low and housing as a market was starting to recover, so it was a good time to buy. Unfortunately, condos, while on the rise, were by and large still depressed compared with homes and their recovery, so it was a bad time to sell a condo. That led my wife and I to make a difficult decision, as we would have to accept taking a loss on our condo and thus not being able to afford as much of a house as we would like, or deal with staying in our condo for several more years, where we might end up facing a similar situation years down the road anyway if housing rose faster than condos. So we decided to embark on the crazy ride of simultaneously selling and buying real estate.

 

Condo2On Selling

We decided to use Angie’s List in order to find a listing agent to sell our place. We definitely wanted to select someone from the area, who could easily represent Oak Park to anyone new to the area (and who would be familiar with the local market). After narrowing down the list and interviewing those remaining, we decided on Gary Mancuso. We chose him because we also weren’t entirely sure if we were going to sell or rent our condo, and he was willing to do either. Though after finding out from the bank what they would loan us if we kept our existing mortgage, combined with FHA and conventional loans rules when it comes to condo buildings that have a non-owner-occupied units, we figured that renting wasn’t a very viable option. Plus, I admit, I wouldn’t really look forward to becoming a landlord on top of everything else. Gary also beat out the rest because he strongly emphasized a good web presence, offered virtual tours with a floorplan, used a professional photographer, and charged the same rate as everyone else. I think he was definitely instrumental in us getting an offer less than a week after finally listing the place.

Before we could get to that point, however, we had to get the place ready. We had been in there for nearly six years and had two small children, so the place wasn’t in the greatest of shape (but fortunately nothing some Spackle and fresh paint couldn’t fix). There was also the benefit of the basement where we had a good amount of storage space, so we boxed up a lot of the stuff we didn’t need on a day to day basis and put it down there. A good rule of selling is to get rid of excess stuff, since the people buying the place aren’t going to get it, so they don’t need to see it. After spending about two months or so on nights and weekends repairing the little odds and ends and deep cleaning the place, we were ready.

Our first offer naturally came in less than what we listed for, so after a little bit of haggling, we eventually compromised in the middle. It was less than I wanted, but the first offer is generally the highest, and the buyers were solid in terms of the loan department, so I figured it was the best we were going to get. We were worried about how long it would take for us to find a house that we wanted and could afford, so we decided on a closing date that was several months out. The hope is that it would give us plenty of time to find a new home, since we couldn’t go looking officially until we got that offer on our place.

 

08344400_3_1On Buying

We decided to go with a buyer’s agent on purchasing our home, since I was hoping that it would alleviate any potential conflicts of interest that a normal real estate agent would have. After checking out a few, we settled on Jeff Kropp. He was very helpful for us, though I am not quite sure how much of a benefit we got from him being a buyer’s agent. But he definitely worked with us and helped us through the stressful process.

The problem with buying while you are selling is that you are on a time-limit. Considering that we want to spend twenty years or so in the house we are looking to buy, only having a month to look for it is a bit nerve-wracking. We were able to get a little more time, however, by pushing the closing date for our condo out to a later date. But still, even with that extra breathing room it is a tense experience as the good homes get snatched up quickly so you don’t have a lot of time to think about your decisions. So that leaves a lot of sub-par houses sitting on the market that you can check out, which also isn’t encouraging.

One case where this hit us was with our first pick. After checking out the market for a week or so, the houses in our initial price range weren’t anything to be excited about. So we decided to stretch our budget a little more and this popped up a few that we would be happy with. After checking those out, and eliminating the ones that were okay in the photos, but horrible in person, we were able to narrow it down to two. Of these two, one was a very large house with a roof that was being sold “as-is”, and a smaller house with all the modern conveniences plus a lower listing price. Being a bit worried about what we could reasonably afford, I was leaning towards the smaller house. My wife, thinking of daily life and kids that were only going to get bigger with time, wanted the bigger house. After a few days of discussing it and visiting the homes again, I started to agree with her. So we went to put an offer on the house and found out that someone had beaten us to the punch. It was extremely frustrating since there was no indication that this had happened until after our agent spoke to theirs. For a brief moment we considered trying to engage in a bidding war, but came to our senses before it came to that.

So with our emotional wounds still fresh, we trekked back to look at new homes since we didn’t have time to wallow in self-pity. Fortunately, we came across a house that had only been on the market a week that was similar in layout as the smaller home we liked before (though fortunately a bit bigger).  Not wanting to be second place again, we put a bid on the house after only seeing it once. And once again, we found out that there was a previous bid already. Fortunately for us, the sellers weren’t entirely pleased with the first bid and hadn’t accepted yet. So we did find ourselves in a slight bidding war, but we put in an offer for the most we were willing to afford and stuck with that, which was thankfully accepted. We had a bit of back and forth after the inspection, as there were a few problems with the home, but after several weeks of negotiations, we were able to reach a compromise.

So with the condo ready to be sold and the house ready to be bought, we just had a wonderful task of packing up all our stuff and finding someone willing to move it. Fortunately, we had some friends to help us out with the packing, making that a bit easier in the final days (as we sealed the last box only hours before the movers were to arrive). And Under One Roof was willing to come by the day before we closed and pick up our stuff, then deliver it to our new place the day after we got the place. Overall, moving turned out to be one of less stressful parts of the experience, thanks to the help we got from everyone. Though you never quite realize just how much stuff you accumulate over the years (especially with two small children), until you try to move all of it.

 

IMAG0843On Owning

Now that we are proud homeowners of our own little place, we are solely responsible for maintaining it. It is nice no longer having other families that we have to worry about when our kids are being extremely loud, and I admit that I am glad no longer being the President of the Condo Board as well. However, there are always things that the house inspection doesn’t catch (and other things that just break anyway). Our first issue came with the garage door. After living in our place less than a week, after arriving home and parking the car in the garage, while we were getting out, we heard a loud snap and something hit my wife in the face. Our garage door was installed with extension springs, and one of these had just broken. Fortunately, the broken piece had lost all of its momentum by the time it hit my wife, so no damage was caused. I went the next day to the hardware store and bought some new extension springs to fix that up. Unfortunately just after doing so, the wire connecting to the garage door snapped, so I knew I needed to get some professional help. So after only a week at our new place, we had a new garage door, tracks, and torsion spring system installed.

One of the items that came up during the home inspection was that we had knob and tube wiring in our attic. While having original stuff on a 100-year old house can be desirable, wiring is not one of those cases. There were also a few other things that we wanted looked at while we had electricians out, such as fixing a few light fixtures, installing another light fixture in the utility room, and moving the light-switch from behind the refrigerator. The electricians thought that the knob and tube wiring would only be in a small area, but it turns out that most of the second floor was being powered by it. Upon replacing most of it and putting it on an actual grounded connection, the fuse box was being tripped repeatedly. So they had to come out two more times to finally fix that and get everything working again.

Winter this year also hit hard and suddenly, which stressed our heating system. I was aware ahead of time that the piping to our boiler wasn’t fixed properly when a new boiler was installed several years ago, but because of it there is excess water in the pipes which is causing several leaks on colder days from our radiators. Plus the radiator in our bedroom isn’t leveled properly so it is retaining water leading to loud banging. And finally, we discovered a crack in our backward radiator so that needs replacing. While we haven’t scheduled this work yet due to people who are without heat taking priority, it will be another chunk of change I wasn’t planning on spending. So add all the work to the house, the fact my car hit 60k miles and needed that checkup, plus the general holiday spending (which occurred before the heating issues), and it has been a rather expensive year. But I am confident we will get the remaining issues sorted and everything back to a better state.

 

Happy-New-Year-2014-1-1On Next Year

So with all that mostly in the rear-view mirror, I am hoping that next year will be a bit more uneventful. Work has been and I expect it to continue operating mostly smooth. The kids are enjoying school and I hope they will continue to do so. I am not sure how we are going to handle the summer now that my son is in kindergarten and no longer in preschool, but we will figure something out. We don’t have any big plans since just getting a house was daunting enough, and with all the work done and soon to be done, money is definitely a concern. But I think that things should be smoother from here on out and that we have many good years ahead of us here. And with some downtime over the holidays, I was able to hang up most of the pictures of our family on the wall so that we can keep turning our new house into our new home.

Super Mario Cuckoo: Initial Framework

For a quick recap, you can read the introduction to this series here: Making a Game for My Kids

initialframework

Initial Framework

In all the projects that I have started before, I typically begin with a blank slate. This is likely due to my love of engine code and understanding the low level of how everything works and fits together. However, this does mean that I have to implement everything myself, and since I start pretty much each project with nothing, that means I spend a lot of time rewriting the same things. In addition, since each time I am generally trying some new technology or methodology, this means that I am often not able to reuse code that I have written before. Though since I am typically doing the project to learn and not necessarily to produce something, this usually isn’t too much of an issue. However, this time I actually aim to complete a game (or at least a full level or two). So I am finally looking at a couple of third party libraries to help with some of the development for the parts of this that I really don’t want to bother with anymore. I will detail these in addition to the selection of technologies that I am using, though they are more to facilitate development than actual learning tools. However, it is good experience to work with what other people have produced (and that are being used by several others) to get a good idea of other ways to design systems and APIs.

I plan on developing this for Windows, though my selection of technologies isn’t specific to this platform, so if things get far enough along I might port it elsewhere. After a recent computer upgrade, I have enough leftover parts to get another computer going, so creating something for Linux is a distinct possibility. Especially with the coming of SteamOS at some point, it might be a worthwhile exercise in the future. I will be using Microsoft Visual Studio 2013 Express since it is free and should be good enough for my needs (though they still don’t have a breakpoint window, which I find an odd omission). Since I am only planning on making simple 2D based games, I likely won’t need the tools for heavy threading work 🙂

For my general code architecture, I will be using a light object oriented approach. This is still early enough in development that I might switch it up and there is a good chance that I won’t really follow any one specific methodology other than KISS. Since I will be using a scripting language for heavy development for the first time, I am not quite sure the best way to approach things for gameplay, but that is part of the learning process.

I plan on keeping notes and details on my wiki here. Though I also plan on blogging about the development process along the way as well, so keep an eye on this space as well!

cpp11

C++11

I chose to go with C++ over C# (or another language) because of my familiarity with it and the relevance it has with my job. In addition, the recent C++11 spec adds a lot of new stuff to it that I want to try out in some capacity. While a lot of this deals with threading stuff that I would love to try out, unfortunately that falls outside the scope of my current project. So most of the C++11 stuff that I am using mainly consists of a few niceties like nullptr and static_assert, but I can use a few core changes like their new pointer types: shared_ptr and unique_ptr.

Overall these are a good addition to the language and should hopefully make programming in C++ a little easier for newcomers, though I admit that I am struggling a little bit to change my mindset over to using them. Determining the best way to use them took a little bit of experimentation, as I initially sought to replace all pointers in my code with them. This quickly devolved into madness for me however, as I just couldn’t bring myself to change everything over since I knew a lot of it was just wasted effort on the computer’s part keeping track of all the bookkeeping. While realistically this likely wouldn’t have any noticeable performance impact due to the simplicity of my game, as an optimization-centric programmer by trade, it just didn’t sit well with me. I wanted to be able to get the benefits of the tracking without unnecessary cost. Fortunately this was easily solved by just making owning pointers be a type of smart pointer, and anything that I was just passing in a function to be used could remain a normal, dumb pointer.

The C++11 spec is pretty extensive in the amount of changes, so I am still going through it and deciding what might be useful to learn about and use (such as the move semantics). I will add them and update code as I see fit throughout the process.

OpenGL4_610x344

OpenGL 4

I originally started with DirectX when I was learning graphics as a teenager (after failed attempts in DOS and while I got GDI working, it wasn’t exactly fast) and it is what I primarily use now. I used OpenGL primarily in college for my courses (universities love them some Unix), but haven’t really touched it much since. I messed around a little with WebGL when it was first coming on to the scene, but working with Javascript turned me off (that and the fact that IE wasn’t originally going to support it made me think it was unlikely to gain traction, though they have reversed their stance). So there is definitely a possibility that I might try to get the game on the web at some point, though it is just one of the many things I would love to do. First, though, I need to get something finished before I start considering what I would like to do next.

Back to the topic at hand, I decided to go with OpenGL since it has been making some strong strides as of late. With it having a strong grasp on mobile as well as a lot of smaller projects embracing it so they can more easily go multi-platform, OpenGL has been quickly becoming more relevant as a graphics platform. I must admit that I was actually a bit surprised given OpenGL’s sordid history. But with OpenGL 4 it seems they have gotten their stuff together on the PC front as well (and Valve saying that it is faster even on Windows never hurts). So I have decided to check out how things fair in their area nowadays.

Since OpenGL is only a graphics library, I need to get help in other areas to match some of the missing features in DirectX and XNA that I have gotten used to. This is part of where I really don’t want to reinvent the wheel and am opting for third party assistance. First I am starting with GLEW to handle the window initialization and all important extension loading to actually utilize the OpenGL 4 features. To actually load in my images for textures, I chose SOIL due to its simplicity and the fact that I was planning on using PNG files for the game. Finally, since I don’t want to have to write a math library, I selected glm to handle that part. As you may be able to tell, I am choosing simple libraries that only serve my specific need. I figure this will make them easier to use and integrate into my game. These also appear to be pretty stable and are recommended by the OpenGL wiki, so I assume they are good quality as well.

Lua-logo

Lua

I had always wanted to increase my repertoire my learning a scripting language. They are very useful and serve a good tool for quick iteration. My goal is to force it so that I need to code using script in order to complete the game. This should make learning easier as it will give me a project. I have a book on Lua that I have read before, but without actually programming anything to make use of that knowledge, it has been mostly forgotten.

The reason for choosing Lua is that it integrates easily with C/C++ and is a small, simple language. It is popular in game development for this purpose as well. It was being used in a project that I was working on at the time when I first wanted to learn it, but being in graphics I never really interacted with it much. It was used primarily for gameplay and those related systems. Designers would use this to be able to tweak behaviors and actions that were typically set up by programmers. This allowed them to change and update the game without always needing assistance. Of course, giving access to the game like this to designers also introduced bugs, and I did help fix a few of these later into development. But going into a script and fixing a few things is typically easier than learning a new language (especially since I had some guidance as to what to look for that might have been causing the issue).

However, this model where basic, and sometimes even advanced, gameplay logic is contained in scripts is a good idea overall (assuming you have designers that are somewhat competent when it comes to programming, though always expect bugs when programming is involved). I am planning on doing something similar so that I can hopefully introduce my children to programming. And since scripts are interpreted immediately, it gives the kids instantaneous feedback when they see the changes in the game right away. I hope that it will be much easier for their patience and attention level that way.

 

Next Steps

So that is the initial steps that I am planning on doing when I approach making this game. So far I have only rudimentary progress where I have a single 2D image up on the screen and can move the camera around to view it, but it is a start. I have the Lua library integrated, but do not quite have it doing anything yet. Hopefully with the upcoming holiday break, I can spend a little more time building out the next parts of the game. I need to get a basic game tile rendering system going, so that I can display the backgrounds. It would be good to get a character that can jump around in those levels too. And of course, I need to start writing some Lua scripts to control various things. All in all, I am excited about the project and hope that I have time and motivation to stick with it in the coming months.

Making a Game for My Kids

Parenting and Video Games

As a parent with children that are now of the age where video games are fun and something they enjoy doing, it is my responsibility to help guide them so that they play and experience appropriate stuff. As a lifelong fan of video games, I would like for my children to appreciate them as I do. If I let them play games that they didn’t find fun or weren’t suited to their age, I might turn them off from them. Naturally, I started with the basics with Super Mario Bros for the original Nintendo, but played on the Nintendo Wii (though I should have a working original copy with the system in a box in the basement). So naturally, they are big fans of Mario and Luigi now (and my son and I even went as Mario and Luigi for Halloween once). I even convinced my son to go see Wreck-It Ralph in theaters because Bowser was in it. Though during the movie he was constantly asking me where Bowser was when he wasn’t onscreen.

Kids are also very imaginative sorts. After playing games for a bit, when I make them turn it off they will often reenact what they were just doing when playing by themselves (same goes for movies and tv shows). While doing this they will often change stuff around a bit, though I am not sure whether this is due to poor memory, physical constraints, or they are just having fun with it (likely a combination). Anyway, for whatever reason, my son came up with an idea for a game. He calls it Super Mario Cuckoo and you play as Bowser instead of Mario.

 

Side Projects and New Technologies

As a game developer, there are always new technologies that are out there. I particularly enjoy working with graphics, but it is also good to brush up on other areas of game making as well. I have previously played around with C# and XNA, though with XNA being deprecated and no longer supported, I looked into alternatives like SharpDX. This was a good to work with, but I had wanted to mess around with the new C++11 standard stuff. I also have been paying attention to OpenGL coming back in a pretty big way with mobile (and soon to be the web), and while I wanted to stay with PC development, it would be good to familiarize myself with it a bit more. Finally, I know that I am sorely lacking in my knowledge and ability with scripting languages. While there are many to choose from, I went with Lua because it is heavily used in the game industry and one that I had previously tried to learn. By making it a required part of the game that I am developing, it forces me to use it and thus gain the knowledge that I have been trying unsuccessfully to do before. Also, I hope that eventually that I can introduce my son (and daughter eventually) to programming and I think the fact that scripts can be updating very quickly will allow him a fun and easy introduction.

 

Ongoing Development

I admit that I have started many projects along the way and that I haven’t fully completed any of them. This is for a variety of reasons, such as a lack of focus or other priorities getting in the way. I hope that by doing this for someone else instead of just myself, it will keep my likely to stick with it to the end. I’ll also bring my kids on board to help with the development in some capacity, so that hopefully it can turn into something that we build together. This will likely take some time to do, so it might even be something they grow up with. But I hope it keeps their interest (and mine) and is something we can have fun with (and learn!) together.

Next time I post about this I will get into some details about the actual development.