No Time To Play

Tag: browser games

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...

Weekly Links #127

by on Jul.03, 2016, under Gamedev, News

Hello, everyone. This week felt like very slow progress, but after a long coding session yesterday, the game ended up nearly complete:

glittering-20160702-2

Not depicted: the horrible screen flickering every time you make a move on higher zoom levels; hopefully it will go away on more powerful computers, because clearly double buffering in sdlBasic isn’t working the way I thought. But hey, it runs, and looks just fine too. Water is surprisingly nice for such a simple trick, and knowing the exact screen aspect ration enabled me to come up with a nice non-verbal HUD — the minimap is displayed on-demand like in the new online version. Speaking of which, I found a bug in the latter that made speed boosts basically useless by the time you found any. Going to upload a fix soon, along with the desktop port.

In other news, this week I found yet another HTML5 library to ease roguelike development. Unlike the competition, rl.js is a single 600-line file, and doesn’t try to include the kitchen sink. It handles input, output, tilesets — including procedural art features — and manages the map, including collisions. In other words, a focused (and very well documented) product. Only its use of the General Public License is a potential obstacle.

Still on the same topic, there’s a new roguelike review blog in town, and it might just be worth following for a fresh perspective. And speaking of perspectives, just yesterday I was pointed at an academic, yet quite readable, article on diversity in games with procedural generation. Tl;dr version: the data structures and algorithms we use, even the programming languages, encode biases and assumptions, of which we have to be aware, lest we end up conveying unintended messages.

Last but not least, the news surfaced a few days ago of the brand-new Interactive Fiction Technology Foundation, which aims to future-proof certain tools and services the IF community has come to depend on. A most welcome initiative.

But I’m over my quota again. Until next week, code mindfully.

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

Weekly Links #121

by on May.22, 2016, under Gamedev, News

codl-screenshotWhy does it always have to be a feast-or-famine sort of thing? After a year of working on anything but games, now I’m announcing two releases on the same week. First, my text adventure City of Dead Leaves, that I started last year, abandoned, then decided to finish anyway. It’s hardly epic — a slightly surreal mood piece with a bit of romance After The End — but I hope you’ll like it. Taught me a thing or two as well; stay tuned for a postmortem soon, if everything goes well.

Anyway, while the beta-testing process was taking place, I took the opportunity to bring one of my older games back to life. First released a year and a half ago for the first Procedural Generation Jam, RogueBot essentially lay forgotten while I dealt with various other projects. But many people don’t like playing games in the browser, and performance can be much better on the desktop as well. Besides, I’d been meaning to learn FreeBasic for a while now, and needed a reason. So in a ten-day coding marathon the original tech demo got a new life. See the official announcement on itch.io, and if you like the game please consider buying it.

roguebot-desktop

Last but not least, this week Sam Kabo Ashwell posted an article about narrow parsers, that connects surprisingly well with my recent write-up on verb-oriented game design. Which, considering the long list of examples he gives, is an idea that has troubled many developers along the years.

And on that note, I bid you a good week. Cheers!

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

Weekly Links #102

by on Jan.10, 2016, under Gamedev, News

Sometimes experiments just don’t pan out the way we expect them to. But you know, that’s kind of the point. And sometimes the actual results are more interesting than those we were expecting.

I was going to write the article promised in the previous newsletter, but instead I found myself adapting the new mobile UI from the Deep Down prototype to an older game of mine: Glittering Light. Here’s the result after a few days:

So much for doing everything on a dumb drawing surface. Why should I reinvent the GUI wheel when the browser gives it to me for free? Just so it would be more like in other environments? Well, it’s not. It’s a browser game, might as well embrace that. It allows me to inline the credits and proper instructions, have a high score table, and as a bonus the buttons actually work in mobile browsers as well (unlike touch events, which should but don’t). Getting mouse events relative to the viewport was a bit of a problem, but now I can use a secret weapon: jQuery. As for that infamous delay when touchscreens simulate a click event, there’s a reason this game is entirely turn-based…

Experiment “write games using a standard GUI toolkit” is a success. Next, to embrace the paradigm more fully.

In completely unrelated news, my friend Sera alerts me to the fact that the Oculus Rift will cost nearly double the promised amount, and that’s on top of the already expensive gaming rig it needs to be at all useful. Dear Silicon Valley hipsters: some players make sacrifices to indulge in their hobby (and make you rich). Show a little respect. Oh, and you might want to look at a little competitor called Google Cardboard, which only costs a few dollars (by virtue of being make of literal cardboard), works with common smartphone models, and — check this out — is an open design, so buyers aren’t tied to a single manufacturer that might discontinue the product line or even go out of business at any time.

Sure, Cardboard is probably a toy in comparison. But it also has room to improve in leaps and bounds, with minimal investments that will be distributed across countless enthusiasts the world over. Good luck keeping pace.

Until next time, beware of overengineering.

1 Comment :, , more...

Weekly Links #101

by on Jan.03, 2016, under Gamedev, News

Happy New Year, everybody! The week after Christmas wasn’t very active, for obvious reasons, but things did happen. First among them is that I’ve been working on a new game! Deep Down in Darkness was supposed to become a first-person dungeon crawler, not unlike classics in the vein of Dungeon Master, except with eight directions instead of the usual four — as suggested in this old article.

Turns out, it’s not working out the way I want it, for various reasons I’ll outline in a full article soon. What I learned from the attempt is invaluable however, and the new style of mobile-friendly UI you see in the screenshots works like a charm. So it’s a win anyway.

In other game development news, a friend of mine who develops in PuzzleScript used it to make a match-3 game — a genre I like, and a relatively unusual use for the platform. (Though not as much as a run-and-gun game.) And just because it’s so quiet these days, maybe it’s worth mentioning that next week Sophie Houlden will be running a Myst Jam — something I’d love to enter if puzzles were in any way my thing. Wonder if there will be any entries based in Seltani.net?

Last but not least, on the last day of 2015 we got retrospectives of the year in interactive fiction are related topics: one from Emily Short, the other from Juhana Leinonen.

But that’s enough for now; the year is just starting. Have fun, and see you next week.

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

Weekly Links #69

by on May.10, 2015, under Gamedev, News

It’s odd. You’d think making games as a hobby is fun and relaxing, but OCD and stress combined with some difficulties in porting conspired to leave me exhausted to the point of physical illness. But I guess it’s all worth it in the end, because you can at last play Glittering Light in your browser, either here on No Time To Play, or else over on itch.io.

glittering-light-html5-20150510

It’s unfinished, mind you — for such a simple game it caused a ton of technical issues. But it’s playable, and the rest is coming along. Thank you for your patience.

And now for the week’s news.

(continue reading…)

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

Weekly Links #38

by on Sep.28, 2014, under News

Hello, everyone! For the past week, I’ve been playing a little Risk variant called Compact Conflict. It’s made in HTML5 and clocks in at under 13K minified! You can easily lose because of a little bad luck at the start, but it’s so fast and compelling I can’t be angry with it. Most remarkable is the AI (with three difficulty levels!) crammed into that tight space. I have much to learn…

compact-conflict

In the way of game development talk, Gamasutra is running a postmortem titled Creating Epic Scale Games on an Indie Budget. It’s a topic we care about here at No Time To Play, and the article gives some interesting answers. I can’t help but notice that the game in question is a 2D work in the vein of Star Control, rather than the glorious 3D-fests chock-full of FX most people think of when they hear “epic”. Do you suppose that has anything to do with the subject matter? You know my opinion.

(continue reading…)

7 Comments :, , , , , more...

Weekly Links #16

by on Apr.29, 2014, under News, Review

As if to compensate for the slow week before Easter, the gaming world returned with a vengeance to give me the most links I had since this year started. Luckily I know how to prioritize, so here we go.

The big news, of course, is that I’ve been invited to a game in the Storium beta. It’s a new web-based platform for roleplaying games, currently running a Kickstarter to fund further development. I gave it a try at the insistence of an acquaintance who’s already in love with the idea. In all honesty, I was halfway intrigued by the Kickstarter video, which makes it look like StoryNexus and phpBB met and had a child before moving on.

(continue reading…)

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

Weekly Links #7

by on Feb.25, 2014, under News

I thought last week was going to be a dry spell, but then I had a whole bunch of interesting gaming news coming up on Friday, so it’s all good.

First a couple of musical news. On the one hand, we have Kotaku announcing an upcoming musical shooter from the creators of Rock Band. It sounds weird… but yay for innovation in big-budget gaming! And on a completely unrelated note (pun not intended), here’s how much fun one can have with a musical toy that was placed apropos of nothing in a random adventure game:

Do you still believe there’s a “right” way to play a game?
(continue reading…)

Comments Off on Weekly Links #7 : more...

Seltani and the future of text-based virtual worlds

by on Aug.23, 2013, under Review

Myst Online URU

I don’t care for puzzles, as for stories, suffice to say that I play text adventures (and many videogames) mainly for the joy of inhabiting a virtual world which I can explore and play around in. That’s also why I was attracted to MUDs, the text adventures’ multiplayer cousins. It’s an amazing feeling, being able to not only play with your friends in a fantasy world, but to build that world piece by piece from within even as you play.

But MUDs suffer from the same problem as text adventures, namely that nowadays most computer users have been educated to fear command lines, not to mention equate videogames with flashy graphics. Moreover, as the Web has pretty much subsumed the Internet, to the degree that many don’t realize e-mail exists outside the browser, explaining to potential players why they have to download a dedicated client can be hard. And putting a command line inside a webpage comes with its own set of issues.

And that’s where Andrew “Zarf” Plotkin comes in with his newest creation Seltani.

(continue reading…)

2 Comments :, , , , more...

Posts by date

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

Posts by month