No Time To Play

Archive for May, 2017

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…)

Leave a Comment :, , more...

Weekly Links #171

by on May.21, 2017, under News

If I had a dollar from everyone who assured me that this time virtual reality will really take off, unlike the previous several occasions, because “now the technology is better”, I’d… probably have a few more games in my library, to be honest. Not the VR kind, though. According to Le Monde (article in French), all those tech companies that jumped enthusiastically on the bandwagon just a year or two ago are now quietly pulling out, despite decent hardware sales. Turns out, adoption isn’t use, as the stats from Steam seem to indicate. And while the article tries to shift the blame onto the nausea many people experience from those goggles, I still say the real reason is being a solution in search of a problem. Wish reality had proven me wrong; friends who play e.g. Elite: Dangerous in VR certainly seem to love it.

In other news, we have an article on RuneScape’s enduring appeal, another on how fighting games have evolved with the market (via Gamasutra), and also from Gamasutra a write-up on the Japanese approach to story in games. Note how much it talks about theme: it’s the same advice I give aspiring writers: figure out what your story is all about. This is so important it can’t be stressed enough. I disagree about building the world first, but then games have somewhat different requirements.

On a different note, it was enlightening to read about the challenges of running an abuse-free server for children with autism, and that it’s getting easier to make games for blind people. For a different kinds of accessibility, Mark Johnson writes about the basics of game literacy. And you know… while games can be obscure (Nightwrath just bought me a copy of Eador: Genesis and I can’t make heads or tails of it), I must give this one to the commenter who pointed out that gauges have been everywhere in the real world ever since the thermometer. The issue isn’t teaching new players to recognize a gauge for what it is, but to notice it in the first place. Situational awareness is a learned skill, and people who haven’t played games before, or at least driven a car, generally aren’t trained to direct their attention all around.

Last but not least, from a roguelike developer we have some thoughts on slow application development. I’ve written before about games that took over a decade to make, some hobbyist, others more professional, not to mention the still ongoing Ultima Ratio Regum (since I just mentioned Mark Johnson). My readers can probably think of more mainstream examples.

But for now, see you next week. Have fun in the mean time.

Leave a Comment :, , more...

Brief guide to the 2D canvas in HTML5

by on May.18, 2017, under Gamedev

I started making web games using the 2D canvas API in 2009, early enough that people still went “I can’t believe it’s not Flash”. A year or two later, everybody and their dog was making canvas-based games, so mine weren’t special for long, but oh well. On the plus side, my skills are still entirely relevant eight years down the road — a lucky break in this world where we all have to run as fast as we can just to stay in place.

The canvas API isn’t exactly huge or obscure, and the Mozilla Developer Network covers it well. It can still be daunting to learn from scratch, especially if you don’t yet know what you’re going to need in actual game development.

As it turns out, I only ever use about two dozen fields and methods of the canvas element’s 2D context; you may be able to make do with even fewer. Of course, that’s just for the graphics — setting up a game loop and accepting input is another story.

(continue reading…)

1 Comment :, , more...

Weekly Links #170

by on May.14, 2017, under Gamedev, News

Hello, everyone. I have good news and bad news. The good news is, I’ve been working on a game based on my recently revived 2.5D engine. The bad news is, I’m running out of steam and might switch tracks for a while. So for now, have some screenshots:

Yeah, yeah, I went right back to first-person after explaining how it doesn’t really work, but the visible pathways should help. As for the limited draw distance, I already had to redo the backgrounds once as it is, and anything further away looks bad in the first place. The theme just requires first person here, it can’t be helped. As for the map generator, you might recognize the one from RogueBot, somewhat refined. It feels kind of cramped in a game with tile-by-tile motion, but enemies and limited moves should fix that. Whenever I get to it, that is.

On the plus side, hey, I got to practice my Inkscape some more, and people seem to like the look. Also, refactoring code can be very fun, not to mention good practice. So yay.

In the way of news, we have an interview with Sid Meyer, then a history of hit points, that turns out to be quite complex and unexpected. And while Konstantinos Dimopoulos kicks offa series on medieval urbanism that’s equally useful to fantasy writers and game developers, Bruno Dias shares some thoughts about replacing the interactive fiction parser, that complement my own from a while ago. Clearly these ideas — which have been floating around for a while — are coalescing into something solid. It was about time, too.

Last but not least, via Vintage Is the New Old comes the news that next month there will be a Sinclair Basic game jam, which is especially tempting to someone like me. I even know what game I’d like to try and make. But whether I’ll actually take part is another story entirely.

Until next week, stay motivated.

Leave a Comment :, , , , more...

Weekly Links #169

by on May.07, 2017, under News

Hello, everyone. Despite everything, this week also came with plenty of interesting events in gaming. So many in fact that I had to trim multiple links, and it’s still a lot. Shall we?

Let’s start with an interview with the director of Wolfenstein 3D, occasioned by the game’s 25th anniversary. And there’s a ton of good advice in there, some of which I follow (embrace limitations, and don’t burn out), some I unfortunately fail at (use the best tools available, and if there aren’t any, make your own). And still on the topic of classic games, we have the first article in a series about the history of Sierra, which in turn quotes from a recent interview with two of Sierra’s creators — both valuable bits of history.

Now for something completely different. Over at PC Gamer, there’s an article about the portrayal of mimics in videogames (the D&D monster). I had high hopes for the article, too, because one of my favorite webcomics, Rusty and Co., features a mimic turned adventurer — and a talkative, witty one at that. But there was no mention of it. There was, however, a mention of Luggage from Discworld… but not a single word about Luggage’s origins as a character in a novel written to parody fantasy cliches.

Dear people in gaming, do you ever read anything outside of reviews and strategy guides?

In the way of game design, Jason Dyer illustrates the biggest problem with random number generation, while the creator of Cogmind writes about clever uses of RNG seeds. And you know, I considered doing just that, but in my one game that could have used the trick, Spectral Dungeons, generating each level is so slow it would be especially annoying to do it all over every time. I am, however, careful to use a separate RNG for world generation versus enemy behavior when at all possible.

Also on the Grid Sage Games blog there was a discussion of various versioning schemes, which are as thorny as they are arbitrary, as we know from Windows, the Linux kernel, or the race between Firefox and Chrome. My advice? Don’t fuss too much over it unless you develop software according to a strict plan; just pick a scheme, and use release code names to make things more clear.

To end with a couple of items from the world of interactive fiction, Emily Short writes about the place of parser-based games in 2017, while over on the intfiction.org forum there’s a discussion about compass-based navigation, with some surprising conclusions.

I should probably write a come-back with my own extensive thoughts on mapping and virtual places, but for now this newsletter is way over quota, so see you!

Leave a Comment :, , , more...

Weekly Links #168: diversity edition

by on May.02, 2017, under News

Sometimes outages have the worst timing. As of this writing, I’ve had no Internet for over 24 hours, and it could be another day or more until it’s fixed, due to May Day falling on a Monday. But the show must go on.

I’ll start with an article that’s not about games at all — in fact it’s about diversity in superhero comics. But the following quote applies all too well to games, and in fact any other medium:

“Diversity” as a concept is a useful tool, but it can’t be the goal or the final product. It assumes whiteness (and/or maleness and/or heteronormitivity [sic]) as the default and everything else as a deviation from that. This is why diversity initiatives so often end up being quantitative—focused on the number of “diverse” individuals—rather than qualitative, committed to positive representation and active inclusion in all levels of creation and production. This kind of in-name-only diversity thinking is why Mayonnaise McWhitefeminism got cast as Major Motoko Kusanagi while actual Japanese person Rila Fukushima was used as nothing but a face mold for robot geishas.

On a related note, the analysis of visual novels I mentioned two weeks ago continues with a look at VN protagonists, and the conclusion is inescapable: (Note: EVN is short for English-language Visual Novel, as in original as opposed to a translation from Japanese.)

Despite VNs being portrayed as escapist literature with generic self-insert protagonists, our analysis seems to suggest the reverse. Fans far prefer protagonists with strong identities, and EVNs are leading the way in exploring stories with more diverse characters. The videogame industry could learn something from our little medium.

To top it all, Jimmy Maher writing about the history of Wing Commander points out the way a cheesy action game from 1990 did better than many modern titles at diversity and inclusion, despite its reliance on ethnic stereotypes, simply because it tried in earnest.

Moving on, straight from the horse’s mouth we get a look at Blizzard’s past with the making of Starcraft, and at their future with an interview about how World of Warcraft might evolve. In unrelated news, Warren Spector talks to Gamasutra about doing your own thing as a game designer (and asking bigger questions).

And speaking of game design, as the only piece of news this week that’s actually on topic we have Emily Short with a collection of links about spatial storytelling, that as usual apply to much more than just interactive fiction.

Enjoy, and see you next time.

Leave a Comment :, more...

Posts by date

May 2017
M T W T F S S
« Apr    
1234567
891011121314
15161718192021
22232425262728
293031  

Posts by month