Showing posts with label Magic Rooms. Show all posts
Showing posts with label Magic Rooms. Show all posts

Wednesday, August 17, 2022

Dissecting SEGA's Shenmue Patent: Magic Weather & Magic Rooms

In today's post we will examine a patent application submitted by Sega back in 1998 relating to the generation of graphics suitable for interactive role playing games (RPGs), with the inventors listed as Yu Suzuki, Takeshi Hirai, Kazuo Kondo and Kazunori Masuda.

While Shenmue itself is not mentioned by name within the document, of course, the concepts described within can be readily recognized as pertaining to the soon-to-be-published game series. This includes two algorithms in particular for the automated generation of in-game content that were designed to save having to store vast amount of data on the limited space afforded by physical discs: Yu Suzuki dubbed these Magic Weather and Magic Rooms. We will focus on these two systems in this post.

The patent document contains 24 pages in total, over half of them being diagrams and flowcharts. 

The US patent document contains 24 pages

As a whole, the patent brings together a number of concepts that describe what we know today simply as the "game engine". The motivation was to ensure that the Graphical Processing Unit (GPU) receives display data fast enough to ensure that the display is updated frequently enough to maintain smooth output. The game prepares and sends a single image, or "frame", to the GPU in a never-ending loop. This means that the game's logic processing must be handled efficiently in the time period between one frame being sent to the GPU to be displayed, and the next.

An English-language version is available in the form of the US patent application document, from which the diagrams in this post have been sourced. The language used in the English version is rather stilted and confusing, so relevant snippets of text have been translated from the Japanese original in preference. Additional color images have been included for illustrative purposes.

Before diving into the patent itself, let's have a brief recap on what these two systems are about.

Thanks to LemonHaze who provided technical explanations and information about the implementation in the first two Shenmue games.


Magic Weather


Revolutionary when featured in Shenmue, the "Magic Weather" system controls the ever-changing climate and weather conditions experienced during play.


In the "Making Of" video documentary about Shenmue produced by NHK in 1999, the narrator introduced it as follows:
"The game contains a system that realistically recreates the weather and other natural phenomena. That system is called Magic Weather. In the game, the weather changes as time passes: fine, cloudy, rainy. These changes are based on the long-term weather data for Yokosuka, the town in which the game is set.

"Let's consider a case in the actual game where it is, say, fine one day and rainy the next. The weather conditions encountered by the player will differ depending on how they go through the game. For a player that moves ahead rapidly, they may visit a certain house on a fine morning. On the other hand, a player who plays more slowly may end up visiting the house the following night in the rain."
Become a Patron!

Tuesday, July 5, 2022

Poll Result: Patrons' Choice Topic for July 2022

Every month Phantom River Stone holds a poll among our patrons to choose a topic for the blog in the coming month. After tallying the votes (including accumulated votes from previous months), the winning topic that has been voted this time is:

"Sega's Patent Application for Magic Weather & Magic Rooms"

Magic Weather


Revolutionary when featured in Shenmue, the "Magic Weather" system controls the ever-changing climate and weather conditions experienced during play.


In the "Making Of" documentary about Shenmue produced by NHK in 1999, the narrator introduced it as follows:
"The game contains a system that realistically recreates the weather and other natural phenomena. That system is called Magic Weather. In the game, the weather changes as time passes: fine, cloudy, rainy. These changes are based on the long-term weather data for Yokosuka, the town in which the game is set.

"Let's consider a case in the actual game where it is, say, fine one day and rainy the next. The weather conditions encountered by the player will differ depending on how they go through the game. For a player that moves ahead rapidly, they may visit a certain house on a fine morning. On the other hand, a player who plays more slowly may end up visiting the house the following night in the rain."

Famously, the first game even includes historical data for the actual 1986/87 weather in Yokosuka, which can only be enabled after clearing the game.

Yu Suzuki highlights the weather system at the Shenmue Premiere in Yokohama

Magic Rooms


The second system, "Magic Rooms", refers to the use of a set of rules to automatically decide the layout of furniture across a large number of rooms. Its use in Shenmue II can be famously seen in the rooms of the buildings in Kowloon.


Yu Suzuki once described Magic Rooms as follows:
"When we were making Kowloon Walled City, I wanted to put everything in the rooms we made. There were thousands of rooms, and I wanted all of them to be free to roam. The designer told me it was impossible, so I thought there was no use in entrusting that task to him (laughs), and that’s when I thought, we could just make the program create them itself."

 

Examining the Patent Application


In 1998, Sega Enterprises filed a patent application outlining a number of new algorithms, with Yu Suzuki listed as the inventor. Although the algorithms were not given a specific name, two of them - Magic Weather and Magic Rooms - can be recognized from the details given.

In this upcoming post, we'll examine relevant sections of the patent and see how they were described and perhaps learn some more about how the systems work behind the scenes.
A chart from the patent application, specifying changing weather conditions

Coming soon to the blog!

Become a Patron!