Coding without a keyboard: creating a hands-free game
Dig Dog is a fun little video game. You can call it " Spelunky for children", and you should not consider this a dubious compliment. Dig Dog , recently released for iOS , Xbox , Windows and Mac , has abandoned some of the complex elements of the genre, has a smooth control and has depth. It is similar to one of the games of the modern wave with randomly created levels, which seemed to come from the arcade machines of the early 80s.
I liked Dig Dog when I found it at last year’s Fantastic Arcade event in Austin, Texas. But this game became even more interesting to me when its author contacted me before its release and told me that he had succeeded in what no other game developer had done before him: he wrote the whole game himself ... without hands .
The goal of each Dig Dog stage is simple: search through the level in search of the bone and avoid enemies. ')
Game screenshots
As in Spelunky , levels are created randomly each time.This game is slightly easier than Spelunky , but its complexity increases in an amazing and cunning way.
A jerk attack makes the dog temporarily invulnerable And allows you to dig sideways.
Collected gold coins can be spent on life replacement, movement bonuses and other amenities.You need this gold.
White badges in the ground may indicate bombs and other hazards.
The deeper you dig, the stranger the enemies become.
About five years ago, Rusty Moyer, an experienced developer Rusty Moyer, living in Austin, was diagnosed with Repetitive Strain Injury (RSI ) (an injury caused by the same muscle group tension). At that moment, Rusty was just in a very limited time. the game development process. He found that physical relief only arises when he takes full, one hundred percent breaks without typing on the keyboard and using the mouse. It did not suit him. “I still wanted to make games,” says Moyer. “It’s hard to imagine a job or position that is not related to computers.”
Moyer wanted to prove that his dream - the creation of full-fledged video games without the use of hands - can be fulfilled. The only true answer to him was the release of a good, working game. So he would show the world that it is possible for others to go his way.
Fighting the RSI with the dragon
The RSI diagnosis is never pleasant, but the pain in Moyer’s wrists and hands peaked at the most inconvenient moment. With two of his long-time colleagues, they just raised 60 thousand dollars for Kickstarter for the implementation of the project “six games in six months” . Today, even reading the description of the Retro Game Crunch project makes Moyer’s wrists hurt: developers had to receive offers from backers and then turn them into a prototype in 72 hours. This should be followed by a well-honed process that allowed the release of a ready-made game by the end of the month, after which the cycle of creating and developing the next game immediately began.
Because of Moyer’s RSI, a team of three failed to meet those deadlines. Nevertheless, he continued to work on these games for Kickstarter, at the same time experimenting with changes in the workplace: ergonomic keyboards, replacing the table for the sake of improved posture, changing mice. Nothing helped, except for the good old inaction away from the keyboard and mouse (along with subcutaneous injections of drugs).
"Silver Bullet" was found when Moyer came across a video presentation of the developer and coder Travis Rudd , which appeared online in 2013. Shortly before, Rudd was diagnosed with RSI, and he began step by step acquainting viewers with his experience of living with this disease. In the 28-minute video, Rudd explains in detail how Dragon NaturallySpeaking has configured the speech recognition package to write Python code with his voice. This was contrary to what Moyer read in the topics on the RSI and Coding forums, which claimed that Dragon's benefits in coding were severely limited. “Don't try, it's impossible,” was the voice of common sense, according to Moyer.
But Rudd, using the hacks applied to the Dragon ecosystem, proved the opposite. He gave this knowledge to Moyer, who contacted him by mail. Two sets of tools, Natlink and Dragonfly, seemed attractive to him, because they could customize support for certain key phrases that could run any commands - from simple text entry to variable names and macros. “The commands actually pronounced in a made-up language must be such that the Dragon can easily and quickly recognize them,” says Moyer. He recommends "short, concise words or phrases that can be quickly completed."
The word "slap" means one click on Enter; "Two slap" - double tap. If you say "camel" before a phrase like "this is variable", then it matches the string "thisIsVariable". You can type triangular brackets by saying “lack” (from <) and “rack” (from>). Moyer has graciously agreed to record a video of his usual coding process:
Grow Moyer demonstrates writing code with a voice.
Some of these commands are already built into the tools Moyer downloaded and connected to when installed by Dragon NaturallySpeaking. But he admits that for the most part he had to invent and train the system so that she understood the new commands.
Good old texas two slap
“I needed to create a dictionary that would fit me and to what I was used to,” says Moyer. “The process of voice coding is that I need to perform normal programming tasks, come up with commands and modify the system. In addition, I have to memorize all these commands. This can be a very long process. I had to slowly build up a library of familiar to me commands that are recognized when I pronounce my voice and which I can remember. ”
Part of the need for a new vocabulary was due to the fact that Rusty uses Visual Studio and Xcode to code, better suited for game development, rather than voice commands created for and used by Eud Rudd and his peers. In addition, in Moyer’s development environment, as it turned out, much more cursor movement was required. That is, he needed to realize something that Rudd and the others did not think about: a real replacement for a mouse, working without hands.
Instead of collecting some infrared head or glance tracker on his knee, Moyer chose the most optimal solution at that time: a $ 500 SmartNav 4 device supplied by Natural Point, which creates computer equipment for people with special needs. There is one sensor in front of the user's line of sight, and a small reflector is put on the headgear. By constructing the sensitivity of the device, Moyer achieved satisfactory work with fairly small head movements — approximately 5–10 degrees in the horizontal plane and even less in the vertical plane. The last piece of equipment is a foot pedal, which performs mouse clicks.
Grow was the only coder, designer and artist of Dig Dog , so the equipment for tracking head position was necessary for drawing game elements and animation frames. The graphics of the game with huge pixels has a resolution of about 220p and a palette of six colors. "The device is not as fast and accurate as a mouse," Moyer admits. "I chose a graphic style of the game that was easier to implement on this system."
The initial goal of Moyer was a project that can not only be developed without hands, but also tested without hands, but he could not cope with this task entirely. Dig Dog began its life as an unattainable project - Rusty wanted to create a good platform for iOS. Its first prototypes were more atmospheric and low-key; in them, a pixelated dog just wandered around the vast desert. "Then I got the idea of ​​digging, and since then the main gameplay has been digging in the ground." (In fact, digging by tapping the screen and moving by clicking on the edges of the screen under the constraints of the smartphone works quite well, but the gameplay is also interesting with a standard game controller.)
But Moyer was the only designer and coder, so he still had to endure the pain in his wrists for only one purpose: testing the prototype. “I wanted to playite play with the tools I created, but I had to test it with my hands,” says Moyer. "In no other way would I be able to understand the sensations of the game and carefully adjust its mechanics."
Throw a bone to the community
Part of Moyer’s mission to create a complete game was necessary for him to create his own text-to-speech vocabulary for practicing coding. In order not to repeat the story with the project for Kickstarter, he did not want anyone to work on a large project dependent on his speed or skills. Today, he believes that he has laid the foundation for becoming the first coder to use primarily speech, either working alone or on a large project. (“I’ve almost reached the one-to-one ratio,” he says, comparing voice dialing speeds and regular printing.) And he is already considering using more advanced tools, namely eye-tracking technologies, to see if he can increase speed and accuracy of movement of the cursor head movements.
Faced with RSI for the first time, Moyer was looking for inspiration in the community; Now he hopes that other creators of games with similar diagnoses and limitations, looking at his achievements, will be able to start moving in the direction of the game of their dreams.
“From the very beginning, I thought that if I managed to create an interesting and exciting game, it would be an attractive way to promote the idea of ​​voice coding,” says Moyer. “Modern tools are rather unstable. They are easy to spoil: you need to install the software, configure it to work in Windows, purchase various add-ons and equipment. Perhaps it is worth promoting the very idea that there are other ways of working and other tools? Maybe this will improve the overall situation with voice coding! ”
Moyer sent us a few after the interview, because many of his improvements are based on publicly available information.Start with this DragonFly tutorial , an add-on for NaturallySpeaking specifically for coding, as well as installation guides for the appropriate add-ons.You can learn more about the topic at handsfreecoding.org .