• Setting up Subversion on Amazon EC2 for free

    Remote backups are crazily important for Colin and I with our nomadic lifestyle. We consider ourselves very lucky that we haven’t had our laptops stolen or destroyed in 5 years of travel. We take precautions: we lock our doors, keep our laptops out of sight, and try to give off an air of “thrifty backpackers” while actually carrying around $6,000 worth of electronics. But if it should ever happen, we could be up and working again within 24 hours thanks to offsite backups.

    I use Dropbox for large files and Google Drive for documents (both free to a point), and for code I use offsite version control software. There are free hosting services for Git… but after working with it on several projects over many years I still don’t fully understand Git and consistently screw up commits. I am much more comfortable with older, simpler Subversion. But there are no free or even reasonably-priced hosting options for svn projects unless you make them open source.

    However, Amazon is offering free linux EC2 servers with 30gb ssd hard drive space. For a relatively small project like Rebuild with only a couple contributors and few branches, that’s more than enough, and the equivalent hosted option costs $50/month or more. The trick is configuring it. This took me a few hours, some false starts and useful tutorials. You do need to be familiar with Linux. I documented the process for my own uses, but here it is for you:

    Creating an EC2 instance and SSHing in

    Create a new EC2 instance
    They won’t charge you unless you go beyond their free tier
    I chose to put mine in Oregon (us-west-2)
    Check “only free” and pick a freebie amazon linux ami
    I used amzn-ami-hvm-2014.09.1.x86_64-ebs (ami-b5a7ea85)
    Next page, choose max free (30gb) ssd
    Next page, open HTTP port to all (0.0.0.0) – SSH is already open by default
    Complete and launch your instance

    Create a new key pair when prompted and download the .PPK file from amazon.
    Visit the EC2 dashboard, instance should be Running and status checks 2/2
    Record your instance IP (YOUR_INSTANCE_IP)
    Download Putty
    SSH into your instance using the PPK from amazon (guide)
    Default amazon AMI SSH username is ec2-user, no password
    ec2-user@YOUR_INSTANCE_IP

    You’re in! Putty hint: right-click to paste clipboard contents.

    Installing software

    Update pre-installed software:
    # sudo yum update -y

    Visit the public ip in your browser: http://YOUR_INSTANCE_IP
    should see Amazon Linux AMI Test Page if Apache is installed and running

    If Apache is not installed (guide):
    # sudo yum groupinstall -y "Web Server" "MySQL Database" "PHP Support"
    # sudo yum install -y php-mysql
    # sudo service httpd start

    Install subversion and mod_dav_svn (should see a long list of all changes):
    # sudo yum –y install mod_dav_svn
    # sudo yum –y install subversion

    Edit the Apache configuration file for subversion:
    # sudo vi /etc/httpd/conf.d/subversion.conf
    Replace any subversion.conf content with:

    LoadModule dav_svn_module     modules/mod_dav_svn.so
    LoadModule authz_svn_module   modules/mod_authz_svn.so
    <Location /repos>
       DAV svn
       SVNParentPath /var/www/svn
       # Limit write permission to list of valid users.
       AuthType Basic
       AuthName "Authorization Realm"
       AuthUserFile /var/www/svn-auth/passwd
       AuthzSVNAccessFile  /var/www/svn-auth/access
       Require valid-user
    </Location>
    

    Create the directory which will contain the subversion repository:
    # sudo mkdir /var/www/svn

    Create the directory which will contain the permissions files.
    # sudo mkdir /var/www/svn-auth

    Create the permission file:
    # sudo vi /var/www/svn-auth/access
    And fill it with (replace sarah, colin, guest with your usernames):

    [/]
    sarah = rw
    colin = rw
    guest = rw
    

    Create and add to the password file (use -c the first time to create)
    # sudo htpasswd -cb /var/www/svn-auth/passwd sarah SARAHSPASSWORD
    # sudo htpasswd -b /var/www/svn-auth/passwd colin COLINSPASSWORD
    # sudo htpasswd -b /var/www/svn-auth/passwd guest GUESTSPASSWORD

    Create a repository (REPONAME is the name of your repository eg rebuild):
    # cd /var/www/svn
    # sudo svnadmin create REPONAME

    Change files authorization (again after creating new repos too):
    # sudo chown -R apache.apache /var/www/svn /var/www/svn-auth
    # sudo chmod 600 /var/www/svn-auth/access /var/www/svn-auth/passwd

    Start apache web server:
    # sudo service httpd restart
    Will complain about determining domain and using 127.0.0.1, that’s ok

    To make sure apache always starts on boot:
    # sudo chkconfig httpd on
    # sudo chkconfig --list
    Should show 2:on 3:on 4:on 5:on for httpd

    Verify the subversion repo by opening in a browser:
    http://YOUR_INSTANCE_IP/repos/REPONAME

    You’re done! Connect via Tortoise or your fav svn client using the url above.

    Other operations

    To copy from an older repo including revisions:
    # sudo svnadmin dump /var/www/svn/REPONAME > /tmp/REPONAME.svn
    (copy the file to the new server then)
    # sudo svnadmin load /var/www/svn/REPONAME < /tmp/REPONAME.svn

    To connect a backup mirror on another (non-free) EC2 server with the same setup (guide)
    First make revisions editable in the mirror repo:
    # sudo echo '#!/bin/sh' > /var/www/svn/REPONAME/hooks/pre-revprop-change
    # sudo chmod 755 /var/www/svn/REPONAME/hooks/pre-revprop-change
    Then initialize the mirror from the old one:
    # sudo svnsync init file:///var/www/svn/REPONAME http://YOUR_INSTANCE_IP/repos/REPONAME
    Should see "Copied properties for revision 0."
    Then copy the data including all revisions:
    # sudo svnsync sync file:///var/www/svn/REPONAME
    Can use this to make nightly backups to another server

  • Becoming a Nomadic Game Dev: How to Travel

    Since 2010 Sarah and I have been traveling the world while making video games. We’ve written and shipped Rebuild 1, Rebuild 2, Incredipede and Deep Under the Sky entirely while traveling. We’re currently both working on Rebuild 3. There are a few questions we are often asked about our work/travel so I decided to write out a how-to. Or at least, talk about some lessons we’ve learned. Might as well start with the one true secret of making travel and work happen:

    The One True Secret to Working While Traveling Is…

    Spend at last a month in one place

    We do one to three months everywhere we go. This is important because if you spend less than a month somewhere you won’t get any work done. There will be so much to do and see the pressure to do do and see it all before you leave will overwhelm you. You need time to get into a groove, you need time to let the excitement of being in a new place fade into the joy of experiencing a new culture. It’s like visiting an art gallery for the second time. You see more nuances, you start to see how it all fits together.

    There are other advantages to slow travel, like that it’s cheaper.

    We spend between 1000$-2000$ a month on rent when we travel. We usually get an entire apartment or house to ourselves for less than a hotel would cost. I am currently sitting under dappled shade looking at Sarah’s reflection in the pool of our two-bedroom house in Cape Town which we pay 1300$ a month for. I can hear the waves breaking on the beach and can’t see any neighbours because the property is so well treed. This is better than any hotel anywhere. You also get a kitchen which means you don’t have to eat out all the time and you can spend less on restaurants.

    AirBnB is your friend here. It’s an easy way to find long-term rentals. Write people who don’t show a discount for long-term stays, they probably just haven’t considered it yet. Also dig around off of AirBnB, some places still have thriving local rental websites.

    Airfair is less when you travel slow. Say you fly to Japan for 1500$, that 1500$ goes a lot further if you spend three months in Japan and then three months in Thailand before flying home.

    Also, traveling slow is just better. You get to make local friends and get a feel for what a place is really like instead of bouncing between toursit attractions.

    The Only Piece of Planning Ahead You Need to Do

    Is to find an apartment/house for the time you’re staying. Everything will fall into place when you get to your new home. If you have a place to live you can figure out the rest. Remember that you are often competing with vacationers for these places and vacationers tend to plan ahead so you will have to as well. We like to plan six months in advance (this also goes for flights).

    That being said, chosing and booking a place encapsulates a lot of other decisions. The important things in choosing a place are…

    Internet, internet, internet

    This is the most important part of any housing decision you make. Tripple check that the house has a functioning internet connection. Depending on what you’re working on you might not need a very good one. Sarah and I have gotten by on pretty terrible 3g cell connections for months because we weren’t working on games that required assets to be passed back-and-forth or big binaries to be uploaded to Steam. If you’re collaborating with a remote team and putting emergency builds up online all the time you’ll need a beefy connection. If you’re just spending three months doing prototyping you might not even need the internet.

    Whatever your internet needs are confirm specifically over email that the house has the connection you need, then confirm it again. If you need a reasonably good connection then ask the house owner if you can stream YouTube and Skype reliably, these are questions non-technical home-owners can answer.

    Honestly, if you have a decent internet connection you could live in a box with no windows and still have a pretty high quality of life so this is the big one. It’s also the only thing you can’t really fix after you get to your new home so make sure it’s what you need beforehand. (in practice we often have to make alterations to the internet setup, we travel with a small router we sometimes use as a repeater).

    Location, location, location

    This is the most fun question to answer: Where you gonna go?

    The answer to this is obivously: That place you’ve always wanted to go!

    If there’s one place you really desperately want to go (say Istanbul) then get on the internet and track down a place to live. Use AirBnB but also do web searches, hunt around for a while, write a lot of emails to landlords. Some of the best places we’ve stayed were secret little gems or places with much higher prices that we negotiated steep discounts for (it’s a pain in the ass for renters have new people comming in and out all the time so a lot of people welcome long-term rentals with open arms).

    If you’re more open about where you want to go (say Costa Rica) then I like to find a nice house and then let that determine what city we live in. When we stayed in Greece I searched all of Europe on AirBnB for a cheap place with a view of the mountains and the sea. We found a nice little house in a mountain village on Thassos and had one of our best trips.

    Don’t forget to read the AirBnB reviews! Some countries (I’m looking at you Brazil) have a culture of exageration.

    The Other Stuff

    Some other things to consider when you pick a place are:

    • Safety, do a google search, are you going to feel comfortable in the neighbourhood?
    • View, you want to like being in your new home so you can stay home, work, and be happy. A nice view helps.
    • Transit, can you walk/bus everywhere you need to get? You won’t have a car.
    • On-site Landlords, nearness to friends or other indies. It’s nice to have locals who can help out

    The transit point might be less important in some places. We’ve stayed in a lot of very remote places and there’s always SOME way to get groceries. You might just have to walk eight kilometers along a beach or take kayaks through some mangrove tunnels.

     

    You Have Your House, Other Considerations

    There basically are none. If you have a house with the internet and money in the bank anywhere in the world then you’re pretty much good.

    There is some basic stuff like:

    • Check what entry/visa requirements the country has BEFORE you book a place or get plane tickets
    • Figure out how to get from the airport to your new place (landlords that pick you up are the BEST!)
    • Get the necessary vaccinations at a travel clinic if you’re heading somewhere tropical
    • What’s the banking situation like? If you’re really remote you might have limited access to ATMs (you’ll just have to take out lots of cash occasionally)
    • Travel Insurance, get some travel health insurance, you want to be in a strange country’s hospital AND worrying about the cost of healthcare?

    There are also things you shouldn’t worry about:

    • Language, you’ll muddle through
    • Where you’re going to get groceries, if people live there then there is food
    • Street Food, you’re there for a month, you can afford to mabey get sick for a couples days
    • Rainy Seasons, you’re there for a month, so what if it rains for half the days, you have work to do

     

    The Downsides

    If you are looking at the above “don’t worry about” list and getting scared then mabey you should think twice about this whole thing. Traveling is going to require patience, flexibility, and privation. You might have to completely change your diet. Buying the simplest things may be a challenge. The transit system will probably make no sense at all. Imagine you have been throwing up and haven’t slept well for three days, you walk for three hours to the pharmacy because you can’t figure out the bus sytem, when you get there you ask for a specific brand of medicine and instead of simply grabbing it and handing it to you the pharmacist asks you a question in a foreign language and just stares at you. This is the downside of the unfamiliar.

    If you’re shy, a picky eater, picky about matresses, don’t like public transit, scared of people not like you, tend to freak out when anything goes wrong, can’t adapt to new situations, or are not a generally calm and welcoming human being then prepare to be seriously challenged.

    Also, homesickness is real. Our first long-term trip was to Thailand in 2006 for six months, the first month was exciting, the second was uncomfortable and the third was I-want-to-go-home misaerable. The fourth through sixth were great! Homesickness goes away and varries from person to person but it can be emotionally brutal, be ready for it.

    Another serious issue is loneliness. Sarah and I are extremely lucky to be able to both work from anywhere.  Traveling long-term on your own is going to be much more challenging than travelling with a partner and way less fun. Sometimes you can make friends with locals, sometimes you can’t. Here is where going to GDC is going to help you. If you’ve already made friends with a bunch of people in one city or another then that might be where you want to head. I’m not talking about talked-to-them-once-at-a-bar aquantences here. I mean people who you know well and are eagre for you to come.

    I’m also going to put the disclaimer here: if you book a non-existant house in Somalia and get yourself kidnapped it’s not my fault! This all represents my experiences and doesn’t represent the full posibilities of what can go wrong while wandering the earth.

     

    The Upsides

    Downsides suck :(  But they are all worth it! With no challenge you wouldn’t grow as a person and travel wouldn’t mean as much. When you’re walking down a deserted tropical beach trying to solve game-design problems, talking angrily about bugs you can’t squash in a dark pub with new friends, or just sitting at your laptop staring out at some strange foreign place you will know it’s worth it.

    And the world-wide network of indie devs is amazing! Most major cities have someone you can meet up with for a beer and get some advice on how to see the city.

    You can work from anywhere, you have friends everywhere, explore!

  • Pumpkin Sales!

    pumpkins‘Tis the season of zombies, horror, and also pumpkins, which there are a surprising number of here in South Africa, I think it’s like the national vegetable or something. To celebrate, Rebuild is on sale!

    You can pick up Rebuild Mobile (aka Rebuild 2) in the Humble Mo(BOO!)ile Bundle with five other creepy as hell Android games and pay whatever price you want. Then hide under the covers and play Five Nights at Freddy’s until you’re too scared to sleep.

    This weekend, Rebuild 3: Gangs of Deadsville will also be 25% off on Steam Early Access, so now’s your chance to get into the beta if you haven’t yet.

  • Rebuild 3: Relationships

    Colin and I are now settled in Cape Town for the first half of winter (their summer). Colin’s going to spend it kiteboarding on the endless, beautiful beach and I’m going to put my head down and work. This is what I’ve said every month for the last year, and does it ever happen? Rarely. Life is just too full of distractions to spend it crunching, I guess. That or I’m paralyzed with fear that I’m going to screw up this wonderful, already successful game somehow because I don’t truly understand why people like it.

    Let’s hope it’s that first one.

    Version 0.69

    So October’s version 0.69 (hahah… yeah) was big on balancing and increasing the importance of happiness and faction rivalry towards the end of the game. It’s still not right; with so many random elements I’ve got to do a helluva lot of testing to know if I’ve made something too easy or hard, and I’m trusting a lot of that testing to the community. I’m not sure if I’ve told you this lately, beta testers, but I love you. You’re great.

    rebuild3leaders1_580

    I also included Adam’s final versions of the faction leaders, which are really fun and make me want to write them all some new events. I’ve decided every faction will have a special requirement before they’ll ally with you (in addition to needing 75 respect). Like, the Luddies want you to have a lot of farms, the Government wants you to make ammunition for them, the Pharmacists want you addicted to Bath Salts etc. I’m looking for more suggestions.

    Also making it in are the start of relationships, the Kickstarter stretch goal chosen by popular vote. Survivors assigned together will gradually become friends, which gives them a happiness boost if they spend enough time together. They can even fall in love and get married. And yes, there are same-sex relationships too.

    Sometimes people just don’t get along, and they hate to work together. Force them on missions together too often and it could end badly. Don’t miss the warning signs!

    rebuild3leaders2_580

    Next month we might see children finally make an appearance in the game. Colin’s helping me brainstorm how they’re going to work right now. It’s pretty swell having him on the team!

  • Rebuild 3: Main Leader Jobs

    Banner for our PAX Booth
    Banner for our PAX Booth
    August was a busy month for Northway Games. I helped Rich and Colin launch Deep Under the Sky, a psychedelic arcade puzzler about alien jellyfish. It’s so gorgeous… just go watch the trailer for it then nab it on your iPhone before I remember to end the launch sale.

    We showed it at CIGGRAPH in Vancouver, then Deep Under the Sky and Rebuild at PAX Prime in our first ever PAX booth. It was an unbelievable experience. I had no idea there were so many Rebuild fans out there! Every time I looked up, someone new wanted to know if I was the Sarah Northway, creator of Rebuild, and could they shake my hand. It was so – I want to say humbling, but it was the opposite of that. It was good, very very good.

    Now that Deep Under the Sky is out, Colin’s coming aboard the good ship Rebuild to work on the programming and balancing. We haven’t properly worked together since Incredipede so this is going to be fun. Colin’s first task was to track down the memory leak, which we hope is now fixed in the 0.666 update. He’s also working on the new relationships system (one of the Kickstarter stretch goals), and on balancing happiness and fort policies.

    In the new update I also added 60 new backstories (written by Stephen Gray), 11 survivor perks, and 5 new main leader jobs. I finally hooked up the Steam deluxe edition with 5 more main leader jobs for a total of 15 to choose from. Here’s an overview of how they work and what each one does.

    All about jobs in Rebuild: Gangs of Deadsville

    The first thing you do in Rebuild 3: Gangs of Deadsville is design your main character. She (or he) will lead your fort from humble defensive camp to glorious city-state. She’s your most important survivor: the only one (at least initially) who can learn any skill, and unlike the first two games, she can’t be killed.

    Brandy bear was born for this role
    Brandy bear was born for this role

    Now comes one of the most important choices in the game: pick your leader’s profession from her previous life, back before the infection started. This determines her starting skills, equipment, and a fort-wide bonus that affects the whole game. Choose well!

    Main leader starting professions in Rebuild 3:

    Job Skill Equipment Benefit
    Politician leadership top hat start the game with an extra survivor
    Shop Clerk scavenging crowbar 25% discount while trading
    Doctor engineering doctor’s bag all injuries recover 1 day faster
    Retiree building hammer all survivors are +10% happier
    Police Officer defense pistol all firearms grant +1 defense

    5 new jobs added in version 0.666:

    Job Skill Equipment Benefit
    Priest leadership megaphone start with a church and create more devout survivors
    Hobo scavenging backpack 5 extra housing spaces
    College Student engineering calculator schools and bars are 25% more effective
    Construction Worker building saw half materials costs when building
    Gang Member defense shotgun no happiness loss from death or injury

    5 bonus jobs for Kickstarter & Steam deluxe edition:

    Job Skill Equipment Benefit
    Rock Star leadership guitar earn faction respect twice as fast
    Pizza Delivery Driver scavenging car and sword start with the driver perk
    Programmer engineering science book start with a lab and 9 researched techs
    Real Estate Developer building safety hat all build missions take 1 day
    Pro Gamer defense chainsaw extra defense but all enemies are twice as powerful

    These are of course subject to change during the beta as I discover which ones are pleasingly overpowered, and which are just too exploitable. The bonus ones are supposed to be a little crazy… probably not recommended for new players.

    In a future update I plan to add extra perks for your leader that she’ll earn from major events in the campaign mode storyline. Once each city is suitably rebuilt (or escaped from), she’ll be travelling on to the next one with some select teammates, so the job you choose will be even more important. For now, these jobs add a bit of diversity to the skirmish mode and something new to try.

    I’ll leave you with another picture from our PAX booth:

    Rebuild backer Andy Moore with his zombie self on a banner at PAX Prime 2014
    Rebuild backer Andy Moore with his zombie self on a banner at PAX Prime 2014