No Time To Play

Miscellaneous

Game loops, input and sound in HTML5

by on May.25, 2017, under Miscellaneous

When I first started making games in what wasn’t yet known as HTML5 — not widely, anyway — about the easiest way to make a realtime game was to call a function every, say, 50 milliseconds with setInterval() and hope that would be enough time to process a frame: Javascript engines weren’t all that fast yet either. Worse, native support for video and audio was just being added to browsers, as for input, I didn’t trust myself to handle keyboard events so they would work consistently across browsers, so the mouse it was.

Needless to say, we’ve come a long way. Rhyme not intended.

In the first part of this guide, you’ve seen how to do graphics using the 2D canvas, which provides benefits of expressive power, speed, low memory and simplicity compared to the DOM. But graphics are just one aspect of games, and while other programming interfaces deal with everything in one place, HTML5 is broken up into multiple APIs you can use independently. This time, let me show you what I use to set up a game loop, accept input from the player and play sound. We’re going to focus on realtime games, because they’re conceptually simpler, but also more interesting.

(continue reading…)

2 Comments :, , more...

The outline of a game

by on Mar.09, 2017, under Miscellaneous

Do you know what an outliner is? It’s a kind of text editor that emphasizes working with the structure of a document — like parts, chapters and sections in a book. You can still edit the content normally, but you can also move stuff around more easily, collapse some chunks so you can focus on others and so on. There’s a lot of them out there, likely because it’s not so hard to code a simple one. But few are well-known (or at all), for reasons that I’ll try to explore later.

And that’s too bad, because multi-level information of this kind abounds in games. We just call it dialog trees, tech trees, or skill trees, and we tend to handle it with improvised tools, if not give up and just write some XML by hand. Likely with ad-hoc tags, too, because formats such as OPML are just as obscure as the general-purpose apps that can read and write them.

I played with one of two such tools long ago, but didn’t see the point at the time. That they were mere toys using proprietary formats didn’t help either. But recently a friend (hi, Kantuck!) started using Org Mode, the most powerful and well-known tool of its kind, and sending me files in its native format. While they read just fine as plain text, not being able to see it in tree form felt like I was missing essential nuance. Luckily there’s a much smaller Android app called Orgzly that can import them. Not so many desktop apps, even though parsing the basic structure should be within reach of any programmer (think lists in wiki markup; no seriously, that’s it).

The whole thing got me thinking. Couldn’t game development benefit from a popular outline format and tools to work with it? As it turns out, two such tools exist: with either Ink or ChoiceScript you can write an entire text adventure in a form that eerily resembles Org Mode, once you get past the little details. Both, however, seem designed to be written by hand; maybe Inkle Studios has a visual editor for internal use, but one is not needed.

(continue reading…)

3 Comments : more...

Weekly Links #157

by on Feb.12, 2017, under Miscellaneous, News

Hello, everyone. With the launch of my latest project things have calmed down a bit, and as it happens we have a week with plenty of links as well.

Let’s start with some cool tools you can find on itch.io as of no more than a few days ago. For one thing, my own Stereo Imagination: a tool for generating 3D models with many repetitive elements by writing tiny scripts (15-20 lines can go a long way) in a clean, friendly language. Then we have a couple of legendary products, namely Adventure Game Studio and BlitzMax, that can also be acquired from the same place now.

But game developers also need to know their history. Via Konstantinos Dimopoulos comes the news of a Ms. Pac-Man retrospective occasioned by the game’s 35th anniversary, and an in-depth [review of Richard Gariott’s autobiography], that we also covered last time. What can I say, a living legend is going to generate interest.

Last but not least, while we’re on the subject of gaming history, Raphaël Lucas reminds people that the Internet Archive hosts, among other treasures, an extensive gamebook collection, that can be browsed online or downloaded in a variety of formats.

And that’s it for this week, largely because there’s not much to comment on any of this cool stuff. Enjoy!

Leave a Comment :, more...

Weekly Links #135

by on Aug.28, 2016, under Miscellaneous, News

Hello, everyone. You might like to know that my new book Make Your Own Programming Language is now also on itch.io. This version isn’t as pretty, but it’s more printable, with fewer pages and no syntax highlighting. The content is otherwise identical, and you get the same file formats.

In actual news, Emily Short’s RPS column for this week is a presentation of Texture, the hot new authoring system for interactive fiction. And you know… it bothers me to no end that people sing the praise of Texture’s input system after bashing two-word parsers for decades. Because that’s what Texture did: it reinvented the two-word parser. Which of course is perfectly fine, but can we please acknowledge and address the issue?

On a rather different note, via Vintage Is the New Old here’s a story about someone remastering a ZX Spectrum game after a quarter century — a very instructive, if overly technical, look at history. More approachable is an article about the masters of Commodore 64 games, but the moral is the same: we’re truly blessed nowadays. Why did the hardware makers from decades ago have to make their systems so damn quirky? In retrospect, the quirkiness appears to go way beyond what was needed to squeeze more features out of that limited hardware…

I’ll end with Hardware Gaming 101’s brief overview of Thomas Was Alone, the strange indie platformer from a few years ago that proved there was a huge market for games not driven by technology, and opened the way for more recent successes in the same vein — a most welcome trend if you ask me.

Until next time, consider the lessons of the past.

1 Comment :, , more...

Weekly Links #134

by on Aug.21, 2016, under Miscellaneous, News, Opinion

cover-thumbHello, everyone. For once, I only have my own bad mood to blame for the shortness of this newsletter. As promised three weeks ago, my latest book, Make Your Own Programming Language, is live on Leanpub. It’s only of interest to programmers, especially those with a taste for retrocomputing and retrogaming. But you know my opinion: piecing blocks together in GameMaker is still programming, whether you realize it or not. And game design works best when you have at least a trace of process, as opposed to banging things together until they stick. So give it a try.

In unrelated news, all everyone’s been talking about lately is No Man’s Sky. That’s also the case of Michael Cook, who brings it up as an example of the language we use to discuss procedural generation. And you know… I couldn’t help but notice the fatigue of many reviewers when they mention how many millions of billions of planets there are in that game, and how they’re never going to see the vast majority of them. Which fortunately doesn’t really matter…

I guess the creators of No Man’s Sky forgot that the original 8-bit Elite was originally planned to have 282 trillion galaxies, or 2 to the power of 48 (presumably another byte was going to be used for the planets in each galaxy). And never mind that it would have made the artificiality obvious, especially on a home computer from the 1980s. But visiting 2000 star systems is a plausible goal for the determined player — there are just enough of them to make for a huge playground, yet few enough that you can actually remember some of your visits afterwards… and care. While enough content to fill millions of galaxies (a sizable chunk of the observable universe) just sort of blends into an amorphous mass. A statistic, if you will.

As an aside, let me underscore again than an 8-bit computer from the early 1980s, with just 64 kilobytes of RAM, could easily have handled a procedural universe on a scale comparable with the one in No Man’s Sky (if a lot less detailed). What exactly are we doing with a million times more memory and computing speed?

Leave a Comment :, , more...

Weekly Links #133

by on Aug.14, 2016, under Miscellaneous, News

Hello, everyone. Not one week ago word got around the Web that old issues of their magazine were on the Internet Archive, and Nintendo promptly took them down. At least they have the decency to admit they’re just being control freaks, rather than pretending it’s somehow still about money. Oh well.

While on the topic of magazines, SPAG #64 is out is out — a very high-brow issue that’s about much more than just interactive fiction. So is Jason Dyer’s history of the original Adventure: an excellent illustration of why the public domain is as important in gaming as in any other artistic medium. Having recently reimplemented a public domain game myself (for my upcoming book), I can’t stress this enough.

Last but not least, over at Rock, Paper Shotgun Emily Short writes about the power of text as a medium. Knowing how little and poorly we make use of this power in most games (heck, most books), I welcome more discussion on this topic. Or preferably, more experimentation.

Thankfully, that’s happening aplenty. Stay tuned.

Leave a Comment :, more...

Weekly Links #131

by on Jul.31, 2016, under Miscellaneous, News

Is it a book? Is it a piece of software? It is a game? The second edition of Make Your Own Programming Language, that I finished writing today, has a little of all three. Most importantly, it tries to recapture the fun of making the computer follow your instructions, that forgotten quality of programming that used to lure so many people decades ago. It will soon be out to beta-readers, and then I’ll let you know.

In other news, Rock, Paper, Shotgun is running a series of articles on the future of procedural generation, specifically about spinning lore for computer role-playing games. Which would be pretty interesting, except for most roguelikes that would be overkill, while in more conventional CRPGs handcrafted characters, stories and settings are the whole point. Do games that aim to have emerging narratives even need that much detail, especially if it’s ultimately fluff?

Going forward, via Jay Barnson, here’s a Gamasutra article about Chrono Trigger’s Design Secrets, that manages to be useful even though I never played the game. And Jimmy Maher’s history of computer story games has reached the demise of Infocom; check out the quote from Marc Blank, who was stating who knows how long ago what myself and others have been blogging about all spring:

If all of a sudden you can ask any question, but there are really only three questions that are important to the story, you’re either going to spend all this time coming up with answers that don’t mean anything or you’re going to have a lot of “I don’t know that,” which is frustrating. I always suspected it was a dead end. The nice thing about the command-oriented game is that you can come up with a pretty complete vocabulary and a pretty complete set of responses. As soon as it becomes more open-ended — if I can say, “I’m hungry” or “I like blue rubber balls” — how do you respond to that?

To end on a nostalgic note, here’s a blog post about abandoned arcades, and the slow death game cabinets are sentenced to when left exposed to the elements. Thankfully, there is interest in rescuing these old machines as of late, so for the most part arcades are a bit of history we can expect to survive.

Until next time, don’t let the past be forgotten.

2 Comments :, , , , more...

Weekly Links #112

by on Mar.20, 2016, under Miscellaneous, News

Hello, everyone. I’ll start by highlighting a couple of rants. Over at The Guardian, Michael Cook comments on public reactions to AlphaGO’s recent victory, and why our view of artificial intelligence may be skewed. In related news, Newsweek reports on a talk at the recently concluded Game Developer’s Conference about Muslim stereotypes in videogames. I wrote about it just two months ago, so I won’t insist. And on his blog, Jay Barnson comments on the old contract, recently unearthed, that nearly killed the Ultima series. Last but not least, an article over at Gamasutra explains in detail what makes award-winning game Her Story work so well.

If I were to draw any conclusion from this week’s news, it would be that mentalities are everything. But that apparently remains too hard to grasp by people who make a fetish of high technology. And one day this willful blindness will get us all in really hot water. Have a nice week.

Comments Off on Weekly Links #112 :, , , more...

Weekly Links #107: the value of generality

by on Feb.14, 2016, under Miscellaneous, News

Another week, another close shave. It was only yesterday that I found a link worth sharing, but what a find! Over at Vice Magazine there’s a book excerpt arguing that the ZX Spectrum encouraged creativity more than any other 8-bit platform:

Other machines had more sophisticated sound and graphics, and provided built-in features to make writing games easier. A good example is the Commodore 64, which not only had an advanced sound chip but the ability to use sprites, graphical objects that made animations easier to create. “The trouble was, that guided everyone into making games that all looked incredibly similar,” recalled Spectrum games programmer Jon Ritman. The Spectrum had no such hardware support, and yet its simplicity and origins as a machine to be explored made it a flexible medium to create games that did not have to obey the rules. “The Spectrum was just ‘here’s a bit of screen’. It’s laid out in a funny way, which is a bit of a pain,” explains Ritman. “But you just draw things. And you could do whatever you want. It might not be as fast, but you can do whatever you want, and I think that as a result you got more interesting ideas on it.”

I wrote repeatedly about the value of working with a dumb drawing surface (always controversially, I might add). And then there’s the bit in Jimmy Maher’s Amiga book where he points out that all the technical cleverness of the platform’s legendary chipset was of no use when Doom came along and required raw processing power. Yet the creativity angle is fresh to me, however obvious in retrospect.

In unrelated news, the amazing Michael Cook recently posted the first in a series of articles about Danesh, his new tool for exploring procedural content generators, and it’s a very promising concept indeed. (Hooray for fuzzing becoming a mainstream programming tool. Whether you call it by that name or not.)

But that’s all for today. See you next week.

Comments Off on Weekly Links #107: the value of generality :, more...

Weekly Links #94

by on Nov.02, 2015, under Miscellaneous, News

Oh my. Late again and for once I have no excuse. So let’s get started.

I’m the kind of player who, when sitting down to try out a MMO, spends a lot of time choosing and customizing an avatar. Nightwrath always gets impatient, but come on. Isn’t the avatar supposed to represent me well? This is why this article about dress-up games caught my eye. Not so much the examples they give — Hero Forge is much more to my taste. But that would require going into details. Point is, dress-up isn’t just for kiddies.

Moving on. On the 30th anniversary of the NES launching in the US, we get an in-depth retrospective of the console’s development. And apropos of nothing, here’s a personal history of the text adventure, a thoughtful and informed write-up. Last but not least, it turns out White Wolf has been sold again, from one computer game publisher to another. It remains to be seen what sort of vampire games we can expect this time.

At last we get to a headline actually related to game development. Well, the concept of a complexity budget applies to all software. It just happens that games are often among the most ambitious software projects, and it tends to kill them very dead.

Don’t make that mistake. Keep it simple… son.

Comments Off on Weekly Links #94 :, , , , more...

Posts by date

July 2017
M T W T F S S
« Jun    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Posts by month