I decided to spend the evening learning another game making framework. I’m still quite happy with Game Maker though getting to see how Lua works in a fun and interesting way sounded pretty neat. Initially I was going to try making some kind of Scorched Earth clone but got all hung up on procedurally building height maps, so I took it down to something super simple; Pong.
I saw that Love2D is integrated with Box2D so I figured I could probably leverage that to make a pong game. It would take care of all the deflections for me, so I’d really just need to switch things around based on some collision information. So really, all thats happening when you hit a paddle is the gravity reverses. While it’s nothing super exciting, it does add something kinda cool to the game. Depending on how you angle your shot you can either make a really hard to hit bouncy one or might even slow it down.
I also noticed that theres a bug which *may* cause the ball to even keep it’s gravity and just come back towards you. Feel free to give it a shot, though make sure you download Love2D and with that installed you can even start making your own love games too!
Normally when working with heroku you just execute the following and bam, you’re up and serving your code on a dyno.
git push heroku master
But with the way things have been setup now, our git repository now looks like this:
And we have a problem. Doing the deployment as before would push all these directories and our apps won’t show up the way we want. They might not even deploy nicely, which would be terrible!
Git is a pretty powerful tool and the things you can do with it are pretty much limitless. In the newer versions of git (at least git 1.8.x) has this feature called the git subtrees. They kind of evolved as an alternative way to git submodules, so they can be used for stuff like including project dependencies.
But git is just a tool, and while the regular use case for a subtree might be managing other dependencies, we can “trick” (if you want to call it that) heroku into thinking it’s a git repo. By specifying where the subtree is we can treat that as a repository and push that repository up to heroku.
One advantage of this single repo for the team I’m on is it gives us a single location to look at all our projects in progress, open pull requests and get feedback and using the subtree strategy allows each collaborator to deploy their respective project to heroku as easily as deploying a normal rails app, albeit with a few changes to the deployment incantation.
So, how do I deploy? essentially what you are going to do is deploy that prefixed subtree to heroku as master. This is achieved by composing a few discrete git commands:
git push heroku `git subtree split --prefix fabulous-project master`:master
Aside from the code inside the backticks, deployments look almost the same. All we’ve done is changed where our master branch is coming from, sending that off to our remote (heroku) in this case.
If you’re looking to learn more and perhaps get a stronger understanding of what’s going on when using git subtree you can check out some of the following links, that I semi-butchered:
I’m going to preface this with the following: This is an extremely difficult article to write and I’m also pretty sure it’s going to be a bit of a rant. I’m afraid of what people will think of me, the implications it will have on my career and by simply exposing a vulnerability.
I’ve been living with depression for at least the last five years and I am constantly in fear of being proven a fraud. I normally don’t talk to people about how I’m really feeling and I believe I’ve been sort of described as having two emotions – ‘angry’ and not ‘angry’.
I don’t come from what I’d call the traditional programming background or ever did anything I’d consider amazing. When I was a teenager I was really into Chemistry, I loved it! I was going to get a degree in Chemical Engineering and do whatever… chemical engineers do. During college things changed a bit, while I still really enjoyed Chemistry I wasn’t as thrilled for it. During my last semester a friend and I were building an educational tool that would help people learn chemistry. It was really just a glorified multiple choice test that was written in Visual Basic. I wrote up the questions, my friend wrote the code. While he was working on it, I was watching and thought that was pretty neat. Building stuff with a computer is kinda cool, and with a tiny bit of convincing I had enrolled to join the Computer Science program at a local university.
I had never programmed before in my life and I never really thought too much of it at the time, but to this day this haunts me. The first year was hard. Recursion was confusing, I wasn’t ever really good at the theoretical mathematics such as proofs and formalized logic, the list goes on. I made it through my first year with decent grades and lost my scholarship, but who doesn’t? Those were really just tools to lure in suckers to the University cash machine, right?
Midway through the beginning of my second year I realized that I needed to get more into the industry and actually building software. Until that point I was doing summer contracts/training as a cook in the military. I was afraid that if I stuck with this path I’d get out of school with no skills and be someone with a degree and useful to show for it. I’m pretty sure that when I started my first work term or perhaps my second that my depression started.
I looked at the work of other interns who were both younger and newer to school than myself and were performing drastically better than I was and this really started to bother me. I sort of started trying to learn new things like reading technical books only to put them down. They weren’t the most interesting things to read and made it really difficult to stay interested. After having been working for a few years, some of the harder books to read I can consume, though at a fairly slow rate. I often question whether I’m applying anything I’ve “learned” from them correctly, and still often doubt myself.
Often I find myself with the following logic looping through my mind:
My coworkers are working on cooler things than I am and they are definitely more interested in the things they are working on than I am. The things I’m interested in have no inherent value, so what’s the point of working on this stuff? Am I even interested in the kind of problems the company I’m at is trying to solve? I’m not a top performer and a fraud… why am I still even on the payroll? I can’t consistently find a project I want to work on, I have no commitment.
Those thoughts really get to me and extremely bother me and got to a point where I had to see a doctor about it. I was prescribed anti-depressants and I’m pretty sure they worked. There was a “noticeable change in my performance” and I’m confident it was just because of the medication. With the move to a new city and my laziness when it comes to seeing health care professionals, I simply stopped taking the medication. The withdrawal was interesting, but after it was over things seemed pretty good. I was confident I didn’t need them, or would be able to cope without them. Besides, they felt like a crutch and I’d need to face these problems for real and can’t hide behind induced chemical reactions. Considering how it feels like I’m thinking of how I’m shitty at my job and should probably just leave almost monthly, I’m starting to think otherwise.
A couple months ago I had a bad break down. It was after a tightly crunched project and things were pretty rough I knew that something had to be done. That week I started seeing a therapist and things have been going alright. We don’t meet frequently enough, but I’ve been getting something out of them. It was nice to find out suicidal thoughts are a pretty normal thing. While we’ve only covered a few things, it’s been nice to have an unbiased third part to talk to about what’s been going on and even still I find this difficult.
I’ve been spending a lot of time asking myself what I want out of my life and career. I’ve also been trying to figure out what I truly enjoy and love doing. It’s been difficult because I’ve always had a hard time on self-reflection and personal goal setting. Goals feel so far away and the path there feels like it’s a smooth vertical rock face. I’ve tried breaking them down and figuring out how I’d get there. If things are going good, it’s not too bad but a trigger will happen and I’m back to dwelling and depression.
From my reflections I’ve been able to figure out the following things:
As such I chose a few and tried to do more of them.
I’ve been lurking in IRC channels and trying to help out wherever I can. I can usually only answer the simple questions though I look at is as taking the burden off common questions of the smarter peoples shoulders. I do know that in the past I’ve always like when some random guy even tried to help me.
I’ve done some volunteering for a local exposition and have started learning how to make games. I’ve been looking into virtual and physical game jams to participate in to test myself and see what kind of game I can get done in 48 hours.
Finally, to I’ve been trying to get involved in pairing more and sort of teaching. I’ve been inviting people to do remote pairing with me, though I’d love it more if I could pair with someone far smarter than I am on something that’s actually cool. I’ve also been paring with some co-workers on things to fix bugs in various systems.
All that being said, I’m hoping that things get better in the future and that I’m able to either not have depression anymore or have it under control such that I’m actually able to enjoy my work, my life and everything else that encompasses those.
If you’re curious what depression is like, check out Zoe Quinn’s game Depression Quest which gives a pretty good example of what it’s like. I didn’t play all of it, but after a few minutes in the game it really resonated with me.
I’ve always thought about making games, and technically my first job out of school was making games; though they weren’t necessarily the craziest. Maybe a year or two ago I built a Tapper clone using libGDX which is a Java library for making games. It was pretty cool, though I found myself always getting hung up on the code part of it and that always frustrated me. Other tools such as Unity had this professional feel that made it really overwhelming when I tried using it. I wanted to find a tool that was easy enough to use and didn’t require much or writing code.
I wanted to focus on the other parts of making games: making assets, finding music (maybe making it eventually), putting the game together and playing with the mechanics. If I could do all of this without having to write code, that would be pretty awesome! A tool I’ve heard about in the past, but didn’t really look into perhaps because of pricing reasons was Game Maker. This is a pretty popular tool in the game community and some pretty neat games have been built using it as well.
The one problem I’ve had with making games is what feels like a lack of ideas. I’d say the closest thing I came to this was back when I was a teen and ran as Dungeon Master for a bunch of friends, and that’s been practically forever since I’ve done that. Thankfully there’s some pretty good resources online to come up with ideas that I was introduced to years ago by my friend Robert Ziehl. There’s this site called the Experimental Gameplay Project that used to run monthly challenges which would revolve around a theme. Sometimes the theme is a restriction, such as a game that only uses one button to be played. I’m thinking I’ll be diving through their archives to come up with some challenges for myself to build games. Another big thing with EGP is that they informally restrict you to building the game in 7 days which is a restriction I kind of appreciate since it helps keep the scope quite small.
After talking to a bunch of the volunteers at Gamercamp, they said another great way is to just get involved in game jams. I’ve enjoyed participating in Rails Rumble and figure I’ll definitely get involved in the Toronto game jam next year. And of course there’s the global game jam Ludum Dare which seems to happen pretty frequently. While looking around I noticed that there’s one coming up in December that I’ll probably participate in. I don’t know how good of a game I’ll make, but it should fun anyway.
For now, I’ll just be making clones so I can learn the tools and get practice on things like creating assets. And without further ado, here’s the game I built today that I’ve boringly named “splosion”. It’s a simple asteroids clone where your goal is to shoot the asteroids and score as many points as you can before you lose all your lives. It’s not very hard, so don’t expect too much from it :)
Rails rumble finished a little over two weeks ago, though one aspect of the competition I still wanted to cover was how I was able to stay present with the team in more than just a “being there on screen kind of way”.
One thing I really wanted to be sure we could do was pair when needed. I looked into a few tools which would cover what we needed and was pretty happy with the results. A major aspect of the pairing tools is they needed to have a low barrier to get setup. We were on a tight schedule and wouldn’t have time to futz around with server configurations and such. Another thing I wanted to ensure is we weren’t forcing another’s system configuration on the other.
We were able to achieve this by using a tool that ties into the editor itself. That tool is called Floobits and did an excellent job at helping us pair on code. I looked into the tool a few months ago but had no real project to work on it with, so being 500km away from my team for Rails Rumble was a perfect opportunity to try it out. After a tiny bit of configuration, which mainly consisted of installing the plugin and getting an account we were up and programming. It was great because we were working on some unfamiliar tools and also wanted to talk about a few parts of the systems design. There was little to no lag, which I’ve found to be a problem with some of the tools in the past.
One disadvantage of Floobits is that it only works for showing off the code and not the tests or interface. We got around this by combining another pairing tool called Screenhero. This takes an approach somewhat similar to Screen Sharing, except you can lock it to a single app if you want. Aside from just sharing your screen, the pair is also able to interact with it as if it was on their own computer. A really cool part about Screenhero is that instead of suffering that mouse-hijacking you sometimes experience while pairing, they actually get a dedicated pointer. I believe the tool can also be used with several people in a session, and the tool pops a kind of tooltip underneath their cursor to inform you who is moving around.
I found Screenhero to be a little less than preferable when doing remote pairing due to the amount of latency, but when it came to pairing on Ember side of our Rails Rumble app, it was perfect for sharing the Chrome window that we were using to see the results!
Screenhero does come with a voice chat component, though we opted to stick with Google Hangouts because it allowed the other members of our team to quickly get in touch with us while my pair and I were working. So while each tool does have a number of neat features, I found the experience to be the best while using all of them to solve slightly different problems. Bringing together Floobits for the actual coding, Screenhero for watching our tests or interacting with the brower, and hangouts for audio/video worked out quite well!
I’ve been trying to find more people who are interested in remote pairing, and this will be the setup I’ll be using for all my remote pairing sessions. Of course you can always get in contact with me on twitter if you are interested or check out one of my projects on Floobits to see the remote programming in action. When I get a chance, I’m normally working on some refactoring/modularization of the Shopify Theme gem.
Last weekend marked my second year participating in the Rails Rumble programming competition. After my experiences last year I decided that we were going to be done a little bit differently. Last year was a bit of a rush and we also partially changed our system half-way through. Another big part of the system was a lack of any real monitoring of what we were building whatsoever. No CI, no error reporting, no system health monitoring so when we deployed and were waiting for judging to happen we had no way of knowing what the health of our system was. This is going to be a part of a multi-part series where I breakdown the system and discuss various tools we used to make our application shippable and also give us the confidence in it’s stability.
To start us off I’ll be discussing our Continuous Integration and Deployment setup that we had. One thing I didn’t want to have us worry about was remembering to deploy the system after a merge into our master branch. We also wanted to know as quickly as possible when a part of our system broke so we could quickly react to the failure and get the system back to a healthy state. For this I looked around for some deployment and continuous integration software. I initially looked into Deploy for deploying our systems and Travis CI for running keeping track of the health of our project but wasn’t really interested in them. I personally found that for our project Travis would be far too expensive because we are planning on continuing the project once the judging is over. Deploy was tempting but it still required the press of a button in order to cause a deployment; also it didn’t provide CI services. Having fewer services to keep track of during 48 hours is always a nice plus. That being said, Deploy does look like a good tool if you are more in the camp of wanting explicit control over when code is deployed.
While googling for CI platforms I came across one called Codeship.io that really caught my eye. It provides CI services that are very similar to Travis or Circle CI as well as a continuous deployment system. That was a very attractive aspect of the product especially considering how we’d be pushing out a lot of code over the next 48 hours. I also found the pricing palatable after the trial period, which helped with the decision as well.
Getting the system integrated with our deploy scripts was pretty simple as well. Our production system was effectively turn key because I didn’t want to spend a lot of time configuring a server the way I wanted it. I currently don’t have a deployment system tool belt such as chef or ansible yet so I needed a system up and running fast. I decided that the easiest would be to just go with the stack scripts that were provided by the Rails Rumble team. Because of this everything was good to go in about half an hour and all that was left was finalizing the codeship integration. I want to say that their pitch of “integrates in 3 minutes” is true, because that’s how it felt.
Getting a project up and deployable on codeship mainly just requires picking a repository from your code hosting platform such as bitbucket or github, followed by giving it some instructions on how tests are run (which you can choose from a bunch of pre-baked configurations such as rails or python) and how to deploy. Once that is all set you just needed to drop an SSH key into your known hosts for your deploy user and you’re off to the races. On the next push to master Codeship will run the tests and if they are green will proceed to go through the deployment process. After having the first build deployed I was pretty happy.
The pricing of the product is a little bit weird though. For the smallest paid plan you are limited to 50 builds a month, which if you have any velocity whatsoever will result in burning through those in no time. The main reason is because Codeship runs against commits to every branch you have up on your code hosting platform. There is a way to get around it, which includes adding –no-ci to your commits though I’m pretty forgetful and wouldn’t be surprised if I constantly forgot to include that in my git commits. An alternative I haven’t really tried yet would be to have 2 repos, one for your production version or code that’s ready for pull requests so that builds are only triggered when you actually want them. Also having another repo that isn’t your default would prevent you from triggering builds by mistake.
Aside from that one personal problem (which when you are in bigger teams on unlimited plans wouldn’t be an issue at all) I was extremely pleased with the platform. It was also my first experience in setting up integration services to help give myself and the team confidence in the code we were pushing. So if you’re looking for some Continuous Integration and Deployment services, I’d definitely suggest you check out Codeship!