Commander Keen in Keen Dreams

Commander Keen in Keen Dreams is a side-scrolling platform video game developed by id Software and published by Softdisk in 1991 for DOS. It is the fourth episode of the Commander Keen series. The game follows the titular Commander Keen, an eight-year-old child genius, in an adventure in his dreams as he journeys through a vegetable kingdom to defeat the evil potato king Boobus Tuber and free enslaved children from the Dream machine. The game features Keen running and jumping through various levels while opposed by various vegetable enemies; unlike the prior three episodes, Keen does not use a pogo stick to jump higher, and throws flower power pellets to temporarily turn enemies into flowers rather than shooting a raygun to kill them.

After the success of Commander Keen in Invasion of the Vorticons, the developers of the game, including programmers John Carmack and John Romero, designer Tom Hall, and artist Adrian Carmack, left their jobs at Softdisk to found id Software. As part of a settlement for using company resources to make their own game, the group agreed to make several games for Softdisk's Gamer's Edge subscription service. As a part of fulfilling this obligation, id made Keen Dreams as a prototype to develop ideas for their next major Keen game, Commander Keen in Goodbye, Galaxy. These ideas included gameplay changes, graphical enhancements, and artistic improvements. Keen Dreams was not as widely played or noted as the other Keen games, and as it was owned by Softdisk was included in only one of the several compilation releases of the series by id or regular publisher Apogee Software; as a result, it became known as the "lost episode" of the series. In 2013 a port was developed by Super Fighter Team for Android devices.

A 2014 Indiegogo crowdfunding campaign led to the original source code being published and a release by Hard Disk Publishing through Steam for Microsoft Windows and Linux in 2015, and OS X in 2016. A Nintendo Switch version by Lone Wolf Technology was released in 2019. An expanded version was released in 2020 for the Nintendo Switch and Wii U by Diplodocus Games and in 2021 for Windows by the Keen Company under the title "Commander Keen in Keen Dreams: Definitive Edition", featuring additional levels and new music.

Gameplay
Commander Keen in Keen Dreams is a side-scrolling platform video game: the majority of the game features the player-controlled Commander Keen viewed from the side while moving on a two-dimensional plane. The player character can move left and right and can jump; unlike the prior trilogy of episodes in the series, known collectively as Commander Keen in Invasion of the Vorticons, Keen cannot jump higher using a pogo stick. The levels are composed of platforms on which Keen can stand, viewed from slightly above so as to give a pseudo-3D effect, and some platforms allow Keen to jump up through them from below, while others feature fireman's poles that Keen can climb up or down. Once entered, the only way to exit a level is to reach the end, though unlike in Vorticons the player can save their game at any point. In between levels the player travels on a two-dimensional map, viewed from above; from the map the player can enter levels by approaching the entrance or save their progress in the game. Some levels are optional to enter and may be bypassed.

Levels include a variety of anthropomorphic vegetable enemies, such as potatoes and squash, each with different movement patterns and attacks. Levels can also include hazards, such as water or spikes; touching a hazard or most enemies causes Keen to lose a life, and the game is ended if all of Keen's lives are lost. Unlike the previous game, Keen can not shoot enemies with a raygun; instead he collects small pellets throughout the levels called flower power to throw at enemies. If an enemy is hit, they transform into a passive, intangible flower for a limited time, while pellets that do not hit an enemy can be retrieved by the player. The player can also find food items in the form of sweets throughout the levels which grant points, with an extra life awarded if the player earns enough points, as well as figures of Keen that grant an extra life. Placed throughout the levels are collectible bombs, which the player must use at least twelve of in order to defeat the final boss of the game.

Plot
Having defeated the Grand Intellect in Invasion of the Vorticons and saved the Earth, eight-year-old child genius Billy Blaze is still forced by his parents to eat his vegetables at dinner. After being sent to bed, he falls asleep and wakes up in his pajamas in bed on top of a hill. Giant helmet-wearing potato men tell him that their king Boobus Tuber has brought him to their land with his Dream Machine, and Keen is now his slave. Keen puts on his Commander Keen helmet and defeats the vegetables, but finds that his raygun is now out of charge. Another child in chains runs up to him and asks Keen to defeat Boobus Tuber and save them all from the Dream Machine, and Commander Keen agrees to do so. After journeying through several outposts and cities of Tuberia, defeating various types of vegetable creatures, and collecting Boobus Bombs along the way to attack Boobus Tuber with, he reaches the castle on top of Mount Tuberest. Upon defeating Boobus Tuber and turning off the Dream Machine, Keen wakes up in bed at home, where his mother informs him it is national "I Hate Broccoli" day.

Development
In October–December 1990, a team of employees from programming studio Softdisk, calling themselves Ideas from the Deep, developed the three-part video game Commander Keen in Invasion of the Vorticons. The group, who worked at Softdisk in Shreveport, Louisiana developing games for the Gamer's Edge video game subscription service and disk magazine, was composed of programmers John Romero and John Carmack, designer Tom Hall, artist Adrian Carmack, and manager Jay Wilbur. After the release of the game in December, and the arrival of the first US$10,500 royalty check from shareware publisher Apogee Software, the team planned to quit Softdisk and start their own company. When their boss and owner of Softdisk Al Vekovius confronted them on their plans, as well as their use of company resources to develop the game—the team had created the game on their work computers, both in the office after hours and by taking the computers to John Carmack's house on the weekends—the team made no secret of their intentions. Vekovius initially proposed a joint venture between the team and Softdisk, which fell apart when the other employees of the firm threatened to quit in response, and after a few weeks of negotiation the team agreed to produce a series of games for Gamer's Edge, one every two months. Ideas from the Deep, now founded as id Software, used some of these games to prototype ideas for their own releases, such as Catacomb 3-D. In late spring of 1991 they worked on a new Keen game in order to develop new systems for their next major release in the Commander Keen series. They did not initially want to do a Keen game for Softdisk, but eventually decided that doing so would let them fulfill their obligations while also helping improve the next full set of games for Apogee.

For Invasion of the Vorticons, John Carmack and Romero focused exclusively on the programming, while Adrian Carmack joined late in development and had a personal art style that did not match with the game. As a result, the game was largely shaped by designer Tom Hall's personal experiences and interests. Keen's red sneakers and Green Bay Packers football helmet were items Hall wore as a child, dead enemies left behind corpses due to his belief that child players should be taught that death had permanent consequences, and enemies were based loosely on his reading of Sigmund Freud's psychological theories, such as that of the id. For Keen Dreams, the team reprised their roles, and used the game as a prototype for what they wanted to change for the next Keen games for Apogee: an increase in graphical quality with parallax scrolling to make the background move at a different speed than the foreground, a pseudo-3D view rather than a side-on view, ramps rather than solely flat surfaces, support for sound cards, and changes to the design based on player feedback. The game's plot, as a result, was designed to be a standalone game outside of the continuity of the main series, and not a true sequel.

For Vorticons, Carmack had created adaptive tile refresh to produce a scrolling effect on computers not powerful enough to redraw the entire screen when the player moved. For Keen Dreams, he wanted to scroll the background at a different rate than the foreground, but again computers of the time were not powerful enough to do so smoothly. Instead, he had them scroll at the same rate, and came up with a plan to save combinations of overlapping foreground and background elements in memory and display the appropriate combination for where Keen was on the screen, so that the game only needed to pick the correct image rather than keep track of both the foreground and background.

Hall, meanwhile, had received feedback from parents who did not like that the enemies in Vorticons left behind corpses instead of disappearing like in other games; he did not want the violence to have no effects, and so in Dreams replaced the raygun with pellets that temporarily stunned enemies. He was not satisfied with this change, and for the next games added in a stun gun instead. He also removed the pogo stick from the game, both to symbolize that Keen was in a nightmare and therefore felt less empowered, and also to make designing the levels easier as vertical motion did not need to be as accounted for. Once the game engine and design changes were completed, Keen Dreams was completed in less than a month even as the team simultaneously worked on another game. The level maps were designed by Tom Hall and John Romero, using a custom-made program called Tile Editor v5.0 (TED5), which they used for the entire Keen series as well as several other games. Bobby Prince had planned out an introductory cinematic with an accompanying song titled "Eat Your Vegetables", but it was rejected as it would have made the game too large to fit on a single floppy disk. The story introduction was instead done in plain text, and "Eat Your Vegetables" was repurposed as stage music for Commander Keen in Goodbye, Galaxy.

Legacy
As one of a series of minor PC releases from the small publisher Softdisk, Keen Dreams did not receive much attention from contemporary reviewers or players, despite its connection to the Commander Keen series. Accordingly, it has since been marketed as the "lost episode" of the series. As it fell between the 1990 episodes 1–3 of the Vorticon trilogy, and the 1991 episodes 4–5 of Commander Keen in Goodbye, Galaxy, Keen Dreams has also been informally referred to as "Episode 3.5" of the series. Keen Dreams was also marketed by Softdisk as part of "The Lost Game Collection of ID Software". Keen Dreams was included with the other series games in the 1996 id Anthology compilation release, but as the game had not been published through Apogee, Keen Dreams was not included in the 1998 Apogee Commander Keen compilation release or the 2014 3D Realms Anthology release.

In June 2013, developer Super Fighter Team licensed the game from Flat Rock Software, the then-owners of Softdisk, and released a version for Android devices. The following September, an Indiegogo crowdfunding campaign was started to attempt to buy the rights from Flat Rock for US$1500 in order to release the source code to the game and start publishing it on multiple platforms. The campaign did not reach the goal, but its creator Javier Chavez made up the difference, and the source code was released under GNU GPL-2.0-or-later soon after. The game was then published on Steam through the Steam Greenlight program by Hard Disk Publishing for Microsoft Windows, OS X, and Linux, with Steam achievements and multiple graphical options. According to Steam Spy, approximately 80,000 copies have been sold through Steam as of June 2016. In February 2019, Lone Wolf Technology released a version on the Nintendo Switch console.

Commander Keen in Keen Dreams: Definitive Edition is another version released by Diplodocus Games for the Nintendo Switch and Wii U in 2020. It is an enhanced version featuring additional levels, new music, and tweaked gameplay. In 2021, Javier Chavez and Keen Company released the "Definitive Edition" for Windows.