Game Development Reference
In-Depth Information
Web-based games also benefit from a strong tradition of APIs and integrations.
Of course console games can also use APIs, but by definition, web-based games
can typically rely on players having an Internet connection, so you can imagine
gameplay elements such as imagery from Google Earth, location names and tips
based on Foursquare data, and AI characters who actively use social networks. In
particular, you can easily integrate payment processing into your games, perhaps
even superimposed over a cash register or ATM, and reasonably expect that many
users will have access to a keyboard that will let them type in their credit card
information more easily than they could with a joystick. This opens the door to
non-traditional payment methods that don't require charging up-front for games,
more akin to the way mobile games often make money from in-app sales.
Additionally, webcam and microphone access is growing rapidly among laptop
users, and Chrome and Firefox now support these peripherals with the WebRTC
API. Potential uses of this technology go beyond simple chatting. Ambient sound
could be detected and used to adjust the tempo of game music. With some machine
vision or perhaps a Leap Motion device, users could interact directly with the game
by waving their hands instead of manipulating a mouse. Imagine a game of Roller
Coaster Tycoon where you could literally pick up visitors and fling them to the other
side of your park! There are lots of other cool uses for machine vision as well. John
Carmack (lead programmer of Doom and Quake among other iconic games) recently
suggested running garbage collection when the user blinks. Research at MIT has
shown that webcam video can be used to accurately identify visitors' heart rates,
which could allow games to adjust their pace to match (or compensate for) users'
excitement ( http://people.csail.mit.edu/mrub/vidmag/ ). And hand-tracking
technology is already being used for 3D modeling, game development, and even
rocket design.
Other external devices such as the Oculus Rift augmented reality headset can be
supported for deeper integration into your environment. (Three.js actually includes
a controller for the Oculus Rift in the examples/js/controls folder). For example,
mobile phones can be used as controllers for web games as described at http://
cykod.com/blog/post/2011-08-using-nodejs-and-your-phone-to-control-
a-browser-game and http://blog.artlogic.com/2013/06/21/phone-to-
browser-html5-gaming-using-node-js-and-socket-io/ . Experimental support
for traditional USB game controllers exists in some browsers as well; one library
to help with that is available at http://www.gamepadjs.com/ . Phones and tablets
could even be used as an additional screen—perhaps for a minimap, inventory list,
or rearview mirror.
 
Search WWH ::




Custom Search