Ryan McVerry, Per-Andre Stromhaug, and I got together this weekend to do a mini-hackathon. We’d been inspired by a Chicago-based artist on Tumblr named Galactic Castle. Specifically, this image:
Our goal, was to write python to generate images that looked like Galactic Castle’s. We used the Pillow python library for the most part, messing around with 256×256 arrays of integers, limited to 10 or so colors.
We experimented with a few different rendering techniques, eventually settling on a layered technique. I’ll start with some examples of the finished product, and then a quick walk through some of the fun images we generated along the way. You can run it yourself at https://aesthetic-landscape.herokuapp.com/.
Here are a few shots from the process along the way.
This is one of the first renders we saved. You can see most of the elements coming together, and the dithering in the sky is already in place.
Experimenting with color palettes:
I messed up the color palette:
Getting reflections working. At this point I was doing two things that I eventually stopped doing: reflecting the actual colors (instead, we just use a single color to represent any reflection) and at this point we weren’t doing any sort of layering, so the reflections were crude and unaware of what they were reflecting. In the latest version we use a different algorithm for things above the horizon (mountains, moon) and things in the water (rocks/land).
Better reflections, added a moon.
Re-worked the rocks code. We were originally using polygons that were then filled by PIL. The new code instead generates an enormous int buffer and we manually fill in from the edge. The rocks at the base of the land spits are just handled by keeping track of a number that grows and shrinks, and switching colors when we reach that threshold.
We were originally working at 512×512 (scaling up x4 for the final image), but eventually realized that Galactic Castle works at about 150×150, so we scaled down. The resulting pixelation is much more pleasing. Added trees and improved the mountain cross-hatching.
Project Lead
ERTY SEIDOHL Software Engineers
RYAN MCVERRY
MAX FELDKAMP Hardware Engineer
BEN GOODING Music and Sound
EVAN CONWAY Cabinet Construction
ERIC VAN DER HEIDE
MATT GOLON Cabinet Art
HALEY WHITE-BALLOWE
Finished image first 🙂
We had the idea to build an arcade cabinet several months ago, and by the time Ludum Dare 38 rolled around, we had the time and space to make it happen! We met a few times beforehand to test out ideas and hardware, and parts started arriving in early April:
Ideas started flying on Friday at 7pm Mountain, though, when we all got together to create the game. Sadly, our game idea about slipper and flipper the penguins didn’t make it to the final round.
We quickly began to mock out the cabinet design, and started building the game!
Our first prototypes were… okay 🙂
But things began to come together…
The cabinet really began to come together! We thrifted the TV for about $30. The speakers were old computer speakers we had lying around, and the coin door we purchased on Amazon for about $40.
More construction pics:
Haley (our artist) couldn’t join us until day 3, but she did an amazing job!
The yellow paint was a little… weird. Ah well :\
Finally, we had the whole thing rigged up! Time to plug everything in and turn it on!
A few touchups on the title…
And, about 15 minutes before the deadline, we had a functioning, working arcade game!
Here’s a quick video of the gameplay:
YAY!
We ran into a major issue right at the end, where (to get technical for a moment), our audio would cut out from time to time and just stop working. It seemed like an issue with pulseaudio. The way we solved it was to kill pulseaudio on startup. And for some reason that worked? So, I have no idea what’s playing the sound, but whatever it is crashes less.
We also had a wonderful “blur” effect that pulsed in time with the music, but it turned out to be too intensive for the raspberry pi, so we had to turn it off in the end. We tried doing it with shaders (way too intensive) and we tried doing it with just drawing translucent, larger versions of everything (just a little too intensive) and finally turned it off. Ludum Dare definitely requires you to just cut things if they’re not going to work, no matter how much time you put into them!
I’m going to attempt to get a copy of the game working so you can play it online by Friday, but no promises!
I love to play with words, and I especially love to play with words programatically. I’ve written three small apps (so far) which use some form of a dictionary to create readable, humorous text:
I’ve had some people ask, so here are some great resources that I’ve found while building these apps.
Dictionaries
/usr/share/dict/words (~235k words) Available on any *nix system, this word list is a local way to check for words using a simple grep. You can also read the file in as long as you have permission to do so. Won’t work well if you’re trying to write something for the internet or windows.
Most of these dictionaries are licensed very freely, but you should check on your own system. Versions of this are available online, e.g. the FreeBSD version at https://svnweb.freebsd.org/csrg/share/dict/ (click “words”)
GCIDE (~185k words) http://www.ibiblio.org/webster/ or http://gcide.gnu.org.ua/download This dictionary contains words and definitions. Very useful if you actually want to look up the words you are using. Sources for the definitions are available as well. There are two versions – GCIDE which comes in a strange format and needs its own reader software, and GCIDE-XML. Licensed under GNU.
SCOWL and friends (variable word count) http://wordlist.aspell.net/ A very complete set of wordlists, used for the aspell spell checker. My favorite part is the customizable interface where you can create your own custom dictionary. Many links and different dictionaries are available on this page, including some with part-of-speech and/or inflection data. Be aware: many versions of SCOWL contain swears and racial slurs.
Variable licensure, but all are released for private or commercial use as long as you maintain a version of the license.
CMU Pronouncing Dictionary (~134k words) http://www.speech.cs.cmu.edu/cgi-bin/cmudict
Contains not only words but their phonemes, meaning this is a great dictionary for text-to-speech, rhyming, and syllable counting. There are CMUDict libraries for node/browser, just node, python, and many other languages (send links please).
The file is copyright Carnegie Mellon, but is unrestricted for personal or commercial use.
Corpora (Lists of ~1k words) https://github.com/dariusk/corpora
A really neat set of lists, broken down by category (e.g. /data/foods/beer_styles.json). A great starting resource for small projects that don’t need an extensive dictionary of the English language. Licensed under CC0 (no copyright).
Wordnik Developer (Web API) http://developer.wordnik.com/ A powerful web API. From the site: “request definitions, example sentences, spelling suggestions, related words like synonyms and antonyms, phrases containing a given word, word autocompletion, random words, words of the day, and much more.”
Free 15k calls per hour, licensed for anything that isn’t a direct clone of Wordnik itself.
(Please, send any more dictionaries you know of my way and I’ll add them to the list!)
(Please, send more libraries my way if you know of them!)
People / Blogs
Peter Norvig Probably my greatest source of inspiration on this front is Peter Norvig’s How to Write a Spelling Corrector (python). He shows that you don’t need any sort of fancy tooling or arcane knowledge to write something that at first seems complex – just don’t be afraid of making the computer do a lot of work for you. That’s what they do – they do work really, really fast. (see, for example, this scrabble solver)
Allison Parrish Allison plays with words in amazing ways. She is the brains behind @everyword. Her website and research are full of great inspiration for playing with words and experimenting with language.
(please, send anyone doing interesting things with words my way and I’ll add them to the list!)
I keep not writing weekend web apps because I know that my projects generally follow this trajectory:
1. Build a database
2. Build some thin PHP middleware to expose an API to that database
3. Build a slick react/angular/whatever frontend
4. Realize a bunch of things I’m missing in my API and add them, lamenting the entire time that my “thin” PHP middleware is starting to bulge at the seams.
I keep realizing that that PHP layer is not really necessary. R0ml gave a great Recurse Center talk (if someone has notes I’ll link it) on a postgres extension which renders the middleware unnecessary.
I’m not quite ready to make that leap and throw out the middleware entirely (even though I think it’s a great idea…). So I’d like to build a languageto really easily describe a PHP API. My goal is to have the PHP routing be as thin as possible and mostly handled by one fast function. In fact, I’d love to eventually have this language implemented in node, or even C/C++ for a pure-speed kind of thing. I’d also love to figure out a way to cache the parsed document so that I don’t have to parse the entire thing every time, but that’s a future optimization.
I may end up abandoning this at some point because of time restrictions but that’s why I figured I’d get my first ideas about it online – maybe if there’s something good in there someone can steal it, or even better, point me to a project which already does this but better.
I called it “Lanky” because that was the first synonym for “thin” that didn’t have outright negative connotations or an existing PHP framework (slim, gossamer, etc).
Toiya Finley (Schnoodle Media), Qais Fulton (Freelance), Anne Toole (The Write Toole), Bobby Stein (ArenaNet), Tom Abernathy (Massive Entertainment), Leah Miller (Carbine Studios)
Q: Even if you do understand storytelling, what should you know about game writing?
Average text length in games is decreasing
Avg length of text in Wildstar: tweet length (140 char)
Know the audience and technology. What works in the game?
These are interactive and nonlinear stories.
Sequence and Timing go out the window.
Don’t make your stories linear. Make them player-centric.
The player cares about “my story”, not “your story”.
They should have the choice of how to play the character
“The player’s story will trump whatever heartfelt thing you write [for NPCs]”
Designers and programmers will do their own thing with your story. You have to deal with their requests. It’s writing in a team setting.
Know how to communicate with the people who are actually building the game, to keep them in sync
Q: Game writing is competitive. How do I get a job?
“It’s like breaking out of prison. Once you figure out your path, it’s probably not going to work again.”
Try not to copy existing successes. Make your own.
Some companies you can start out at the bottom and work your way up to writer over years.
Many others, you can’t – you have to get hired in at the top
(Ed note, this is good job advice for any field!)
Work on your own projects. Have a portfolio that you can show people.
If you want to make your own games, you don’t want to be a writer. You want to be a Creative Director
Check out text-based game engines
Twine
Inform7
Episode Interactive
Pen & Paper RPGs
Play with level editors so that you know what the developers are working with
Q: Portfolio? What should I showcase?
BE ENTERTAINING
Genre diversity!
Have some horror, action, humor, etc.
No two employers want the same thing
Aim for around 2-3k word games for your portfolio pieces
That said, have lots of different length material. Every company wants something different
“Short, concentrated awesome”
Dialogue Samples
Lore Documents
Technical game design documents readable by non-writers
Know the types of games the company makes, and tailor your portfolio to them
Don’t assume the company knows anything about (good) writing
Copyright theft is real!
Use watermarked PDFs
Only post samples
Protect yourself against plagiarism
Join the IGDA
Int’l game devs assoc
Writers’ interest group
Facebook group
In meeting people, it’s more important to have an interesting conversation, than to “network”
Make friends, not contacts
Q: Freelancing v Employment
It’s good to have at least one staff job on your resume, esp. if you did “the trenches” (crunch, ship)
Freelancer, you also have to be a salesperson. Always be selling your writing
Read marketing books, sales books
You’ll also have to be a collections agent
Don’t work for free
You can get consistent work, but it won’t be consistent money
Don’t be afraid to fire bad clients
Make “work for hire” agreements
DON’T TURN OVER THE RIGHTS TO THE WORK UNTIL YOU’VE BEEN PAID
Full Time:
Benefits!
Work at an office (external motivation)
Structure!
But: They own you
Be aware of your self
Better mentorship opportunities
Get pushed into weird projects (which is great for experience!)
At a smaller place, you can make things happen!
Just talk to the CEO
When you work on staff through crunch, you become really good friends (which turn into really good contacts after you leave)
If you work at a large company, make sure you make friends with people outside your small team. You have an opportunity to get a large network. Use it!
Remember that personal work done at work (Even if not on the clock) belongs to them. They own it. Be careful about how/when you work on personal projects.
Or, just pitch your ideas to them and see them get made!
Know your rights
Q: How do I write?
Write!
Just write. Don’t be attached to your writing.
FEAR OF BEING YELLED AT > FEAR OF WRITING POORLY
Work back and forth with the developers and designers
Write shitty first drafts
You’ll have time to revise
You’ll have people to get feedback from
Be prepared for blunt feedback and people who don’t understand your intent
Be prepared to admit failure, but have some confidence, Know your strengths and weaknesses.
When you’re working on a game, everyone is on your side. (They all want the game to be good!)
Be prepared to throw everything out and start over
In games, don’t tell, don’t show, do.
Let the players learn organically through the environment, instead of trying to cram instructions into words.
My good friend Angela told me about the Service a week ago. Once you press the button on your phone, you no longer know what’s real. Every person you bump into on the street arouses suspicion. Are they part of the Service? Is that man across the street just taking a picture, or recording your location to call more of their actors in? Everything becomes paranoia. Everything becomes… exciting.
I downloaded it from the app store. Prps itself is free, but each week of the Service costs $100. Angela told me she bought the deluxe package, which included a month’s worth of the service and a mission involving a trip to a foreign country. She couldn’t tell me what country. According to her, she’d woken up in a jungle with a dart in her neck.
The Terms of Service were long. Very long. “There is a real possibility of permanent injury, disability, or death while using the Service”. “We accept no liability for any allergies to substances you may be injected with during the Service”. “There is a real possibility that when you return home, you will be unable to return to your job, have a criminal record, or find regular life incredibly boring”.
Real Total Recall shit is what it was, but without the dream. Without the ability to say, “I’m dreaming and I want this to stop.” Once you press go, you’re in it and there’s no safe word. The only way out is to get caught by them and “lose”. But losing might mean death.
I’d heard on the news about a guywho thought that he was interacting with the Service but ended up accidentally getting involved with some branch of the Mexican Mafia. There’s no way to tell. The Service don’t announce themselves. It’s illegal, of course, to purchase the service, or to work for them. But that doesn’t stop people from doing it. Hell, AirBnb is illegal in New York and look at the millions of dollars in business people do there.
I hear that nearly 70% of people who survive Prps end up working for the Service afterward. They get bored with anything else.
I agree to the terms of service. The app shows a single button. “Go”.
I take a deep breath, and tap.
Within moments I get an email from my bank. “Suspicious activity in your account.” Tap. Holy shit. There’s two million dollars in my bank account.
I hear breaking glass downstairs. That was fast. I probably should have gone somewhere with two exits bef…
A gunshot interrupts my thoughts. Splinters fly from the door. They’re using live ammo. I bolt for the window.
I’ve been told in the past by a programming mentor that ++x is faster than x++, and I found myself refactoring a few increments in javascript the other day.
But then I got thinking – is it really faster? Wouldn’t most modern compilers optimize out the difference? I decided to do some science.
var x = 0;
var obj = {
x: 0
}
// test one:
x++;
// test two:
++x;
//test three:
++obj.x;
//test four:
obj.x++
Results:
For the most part, ++x has the same microperformance as x++.
Modern versions of Android Browser, Chrome, Firefox, Internet Explorer, and Safari all have similar performance for each of the benchmarks. This overrides my existing belief that prefix notation is faster.
In some browsers, there is a small but noticeable difference.
In FF19, ++x is faster than x++. But ++obj.x and obj.x++ are the same speed.
In FF31, ++x is faster than x++, but obj.x++ is faster than ++obj.x.
One interesting thing is that some browsers prefer x++ and others prefer ++x. The largest difference, FF31, is around a 1% increase in performance. But, Chrome Mobile loses that same amount (~1%), preferring x++ over ++x, so ultimately it’s a wash unless you’re targeting a specific browser.
Prototypical inheritance is really powerful, but it’s quite a bit to wrap your mind around if you’re new to it. My first language was Java, and I’m comfortable with the “traditional” OOP paradigm. In this post, I’ll build a traditional Superclass/Subclass relationship in Javascript in an attempt to untangle the weirdness that is Javascript’s prototypical inheritance model.
Here, we’ve created a constructor for some tea. This tea can’t really do anything, but it holds some useful information on whatever tea object we create in the future. I can make a cup of herbal tea by calling this with the new keyword.
var myHerbalTea = new Tea({});
Part 2: Superclass Prototype
Now that we have an idea of how prototypes work, we can go ahead and construct a prototype that will be applied to instances of Tea.
Now we create an object with a single method, steep, and assign that to be the prototype of Tea. We usually want to put methods on the prototype, so that there’s only one copy of the function shared among all instances (this saves us a lot of memory).
After calling var myHerbalTea = new Tea({}), we’ll have the following inheritance structure:
Notice that the Tea function is not part of the prototype chain. It is simply a constructor function used to add the member variables (color, etc) to myHerbalTea. However, because Tea.prototype exists, it is chained to our instance of the Tea class.
Part 3: Subclass
Herbal tea is boring. Let’s make something to wake us up!
//Subclass constructor
var BlackTea = function(){
//Put instance properties from the superclass constructor on the subclass instance
Tea.call(this, {
color : "Black",
caffeine : 10,
tannins : 3
});
this.hasMilk = false;
}
Here’s where the Javascript magic begins. And by magic I mean less of the Harry Potter and more of the Goat Sacrifice.
Let’s make some black tea:
var firstCup = new BlackTea();
This is another constructor function, composed of two main parts. First, we call the Tea() function, binding to the current instance. The call to Tea will have firstCup bound to this, which will apply all of the instance variables (color, etc), to firstCup. This is kind of like calling super() in a constructor in Java.
Here’s the relevant code. Everything that refers to firstCup when we create it is highlighted red.
Ok, pop quiz. what is currently the prototype of firstCup?
Answer: undefined.
If you thought it was Tea, remember that Tea is just the constructor and is never really a “thing”.
If you thought it was Tea.prototype (I totally did), know that even though we do Tea.call(...), we haven’t bound BlackTea‘s prototype yet, so firstCup.__proto__ is nothing.
Let’s set up the prototype and make a second cup.
Part 4: Subclass Prototype
Remember that the prototype of a class is the object that will be assigned to the __proto__ property of any instances created of that class. So in order to create a second cup of tea, we need to first change BlackTea.prototype.
BlackTea.prototype = Object.create(Tea.prototype);
var secondCup = new BlackTea();
It wasn’t obvious to me at first why we don’t bind BlackTea.prototype directly to Tea.prototype. Instead, we create an object whose prototype is Tea.prototype, and then set BlackTea.prototype to that new, empty object. Our secondCup object can still see the steep(cup) function, but it checks an empty object on its way up the prototype chain. Hmm…
But say we want to be able to add milk to our black tea. (Adding milk to green or herbal tea is icky and we shouldn’t allow our users to do that). If I modify BlackTea.prototype to be able to add milk:
BlackTea.prototype.addMilk = function(cup) {
//adding milk makes the cup of tea less harsh!
cup.tannins = Math.floor(cup.tannins / 2);
this.hasMilk = true;
}
Remember that BlackTea.prototype is notTea.prototype! It’s an object whose prototype is Tea.prototype. This means that addMilk is only available to instances of BlackTea, not any kind of tea.
Our prototype chain now looks like
Yay!
Part 5: Actually Make Tea
//ok, let's make some tea
var myTea = new BlackTea();
var myCup = {
color : "clear",
caffeine : 0,
tannins : 0
};
//steep for three minutes
myTea.steep(myCup);
myTea.steep(myCup);
myTea.steep(myCup);
//add some milk
myTea.addMilk(myCup);
//drink up
console.log(myCup, myTea);
This produces:
myCup is { color: ‘Black’, caffeine: 3, tannins: 4 }
myTea is { color: ‘Black’, caffeine: 7, tannins: 3, minsSteeped: 3, hasMilk: true }
Part 6: Recap
Javascript prototypal inheritance is super weird
Use the new keyword to treat a function as a constructor
The prototype of that function will become the __proto__ of the object, which is where the object looks for methods that aren’t declared locally.
Then you can call that constructor (like Java’s super()) using Class.call(object)
Explicitly set prototypes to an object with the prototype you want to create
e.g. myObject.prototype = Object.create(Constructor.prototype)
I hope this blog post cleared up some of the mystery around prototypes and inheritance!
From Manhattan,
–Erty Seidohl
P.S. Thanks to Ryan McVerry and Julia Evans for proofreading! Also Michael Mulley for helping me understand the WTF-ness of .prototype not actually returning anything on an object.
Play a GM Minigame to create the campaign (Lonely Fun)
Use their system for “creating problems”
The Burning Wheel
Building Characters
Developing Relationships, both oppositional and supportive
Challenging Beliefs
Dungeon World
Make shit up
Wave hands like muppet
Talk in funny voices
Buy more copies of Dungeon World [note: the publisher of D.W. was on the panel]
90% of DMing is making shit up (improv)
Building a cool world:
If you are playing a game with characters, you need to build the map in personal terms instead of locational terms.
Your campaign doesn’t exist in a vacuum. Learn to build external media into your campaign. Steal from pop culture. Don’t worry about it as long as it’s fun.
Names are magical. They give things solidity. Going after a +3 broadsword is way less cool than going after Sunbrand, Sword of the Western Hills
Use language dictionaries. “What langauge is magic performed in?” (mongolian!)
Have a folder.
Name List
Map
Notes
DRAW MAPS, LEAVE BLANKS.
(JIT DM)
Collaborate in worldbuilding with the players
Character (NPC) prep:
Use the rules. Then fudge the rules.
Build opposition to the characters
The axiom of antagonists: “They have something appalling that they want, but use methods that the players approve of” or “They have something good that they want, but use appalling methods to achieve it“
Then take it a step further and make sure the antagonist wants something from the PCs.
For any character in the game, you should have 3 things that describe them.
Marginal Revenue (selling one more copy) > Marginal Cost (making one more copy)
Marginal Cost is 0 for video games (i.e. it is free to sell a copy. Thus selling at any price = profit). Except not.
Everyone can undercut, leading to a race to the bottom
99 cents is expensive when your competition is free
Adelman’s Law of the Games Industry: “Anyone in the games industry to make money is in the wrong place.”
Marketing: Helping people who would love your game, find out about your game (not spammy!)
Product
Quality of product
Differentiation from competitors
Audience Expectations
Internal Consistency (art, music, gameplay, marketing all aiming for the same audience).
PlACE/
PLatform
Know where your customers are
What platforms are excited about your game? (They will give you free publicity)
Where does your game belong?
PROMOTION
Where does your core audience get their information?
Establish a relationship with journalists. But! If you are at the point that you need to establish a relationship with a journalist to market your game, you’re too late.
Price
Low low low but don’t undersell yourself. This is tricky.
Announce in advance when your price will drop so customers don’t feel cheated
Examine the competition carefully
Check your audiences’ disposable income
The 4 P’s must fit together and be internally consistent; point to the same consumers.
Specifically, make sure you understand “BATNA”, “Logrolling” vs “Fixed Pie”
Never be afraid to ask for a better deal than they offer. Raising your money per game from $2 to $4 doubles your profits and takes a 5 minute discussion if they’re willing.
Practice negotiation. Roleplay, rehearse. Make it a conversation. Remove ego.
(You have to work with them afterward. If either side gets heated during negotiation, is this really a partnership you want?)
Get to know people before you need them (see: Promotion, above). But don’t be disingenuous!
Everyone will remember everything you say. Good and bad.
Breeze Grigas, Jeff Gracia, Sarah Como, Eli Kosminsky, Aerjen Tamminga, Luke Peterschmidt
Basically the answer to most of your questions is kickstarter but this isn’t a kickstarter panel so we’re going to assume you know that.
Why do you want to make games? Is it to quit your job? Make something with your friends? Check “make a board game” off your list?
^^ Answer that question before going further.
As a publisher, what is your product line.
You don’t need a finished product to approach a publisher. It just needs to play, and show the core idea. You must make it. Test It!
If you decide to self publish, you’re going to spend 80% of your time not making games. You’ll spend 80% of your time publishing, and then 100% of your time selling.
Remember that the publisher takes the risk.
Retail price should be 5x creation cost.
2/5 Retailer
1/5 Distributor
1/5 Publisher -> 1/5 of that to you
1/5 [??? didn’t write this down]
Example: $210k kickstarter, had to spend $80k in shipping (incl. international).
Find your local game developer cabal and ask them.
Playing bad games is a great way to make good games.
Play games that people love but you don’t like. (“Read 50 Shades, and figure out why it sells. You don’t have to love the actual product to learn something from it”)
Give your game to other people, then just sit back and watch! (Blind Playtesting).
Three Questions that you should be able to answer for your fictional character in the game / player character in the game:
Who are you?
What do you do?
How do you win?
Immersive Gameplay (top down design) > Canvasing (same rules, different art)
Playtest with new people. But also make sure to playtest with the same group for a few times so that they figure out the strategy of your game.
You want to hear: “This is fun, and I’d like to play it again.”
Play with other designers, and be able to answer their questions about why you didn’t make certain decisions.
You can go for an LLC or just a DBA (“Do Business As”). Actually, just get a deleware C Corp. (srsly).
YOU WILL PROBABLY SPEND ABOUT $10,000 BEFORE YOU GET TO MARKET. Have this money ready to go when you go to publish.
Have a “red button gamer” play your game. (rbg is someone who just wants to blow things up and see what happens – they’ll have different strategies and tactics and might find new ways your game is broken).
Go to your local game store with your game
Get the best local M:TG players to play your game. They will break it. Retool. Have them play it again. They will break it again. Repeat until it takes them “long enough” to break your game.
(Game design tip: Blind Bid events even out the game).