Design Document for King's Feast

Version # 0.4
November 06, 2002

<< Design History >>

	This I suppose, is a history of the design document.

Version 0.4
	Added Section
		- User Interface

Version 0.3
	Fixed typos
	Updated the following sections:
		- Feature Set
		- The World Layout
		- Object Rendering
		- Game Engine
	Changed copyright
	Changed 'Dural' to 'Levbolne'
	Changed 'Character Rendering' to 'Object Rendering' (section titles)
	Added Section - 'Incomplete Sections'
	Added Section - 'Credits'
	Added GFDL/GPL information to document
	Edited the Document for readability

Version 0.2

	Updated the following sections:
		- Game World
		- Game Engine
		- Musical Scores and Sound Effects

Version 0.1

	Version 0.1 is the initial document.
		- Everything is new :)

<< Incomplete Sections >>

Incomplete Sections
	mostly all of them could use additional information

Completely-Devoid-of-Info (need the most help with these)
	Rendering Systems
	Lighting Models
	The World Layout

<< Game Overview >>


Main Game Focus

	The main reason to do this game is to get a step by step documentation
	how to design a game. Also, if we have a good mechanism to make 
	decisions based on taste, we could get our code into Worldforge 
	development, thus helping to conquer the make it an 
	even better platform for games. Last but not least, we do it to 
	learn/improve our C++ skills and to have lots of fun.
			(Kai Blin)

Supported Platforms

	Currently the game code compiles and runs on Linux, most UNIX variants,
	and versions of Windows. (At least we think it should)

<< Common Questions >>

What is the game?

	You are Levbolne's best chef. Unfortunately you are stuck with 
	Levbolne's second best kitchen.  The best kitchen is, of course, in the
	king's palace. Alas, that's also where Levbolne's second best chef is.
	So in order to get where you belong, you have to prove you simply are
	the best. You have to prepare the best menus for guests and your local
	duke and become really famous. Eventually, the king will decide you're 
	the best and hire you. Or so you hope.

Why create this game?

	King's Feast is a WorldForge project that aims to teach, both C++ 
	programming and WorldForge game design techniques.

Where does the game take place?

	The game, as one might expect, takes place in a kitchen, where you are 
	the best cook in the land with the second best kitchen. You must prove 
	that you are the best and earn the job of King's cook.

What do I control?

	The player controls recipes, assistant cooks, and anything that is in 
	the kitchen. 

How many characters do I control?

	There are other assistants that one can control or order to prepare 
	items. However, it is just a simple order, not an in-depth guiding 
	process for these other characters.

What is the main focus?

	The main focus is to create innovative dishes that taste good, in order 
	to win the favor of the King and earn the job of cook in his court.

<< Feature Set >>

General Features

	Large Castle for the Cooking Contest


	The basis of the game is to create dishes that will effectively pass the
	test of the neural network and please the King. Creativity and variation
	are required in order to have new and innovative dishes to please the 
	King and get the job as his chef.

	The game is organized into days. The flow of a day will be as follows:
		1.Get your orders ("100 peasants and 3 dukes for supper tonight,
		m'lord," says the messenger.)
		2.Review information about your diners.
		3.Prepare a menu.
			Use recipes from cookbooks
			create recipes
			divide into courses
		4.Finalize everything. Chose who gets what. (The dukes get the 
		roast, the peasants only get dry bread) (could possibly have to 
		go to #3 if you don't have enough money)
		6.Get Results (Dukes hated the food, peasants loved the bread)
		7.Get money for the next day.

	Following a prescribed amount of time, the game will end. That way you 
	don't get an unlimited number of chances to impress the recipient of the

<< The Game World >>


	King's Feast takes place in a Medieval Castle setting. There are various
	locations in the castle that the cook will utilize in order to 
	successfully craft a meal.

The Physical World


	The entire world is inside a castle. There are various rooms that a 
	player will need to utilize in order to be successful in crafting a 

Key Locations

	Kitchen  Cooking is done here.
	Feast Hall
	Lesser Hall - for guest interaction
	StoreHouse - order and obtain supplies
	Meeting Room - create menus/budgets


	The game will encompass multiple rooms. Therefore, the scale of the 
	world will not be very large. The entire world will be about the size of
	a large castle.


	Bowls  For mixing ingredients
	Utensils  for mixing and cutting
	Ingredients  Quantity of these will be limited (?). And they will be 
		used to create dishes.
	Sink - For washing ingredients
	Oven - cooking food
	Open Fire - boil water, cook


	The game will progress in Days. The player will cook for a day and then 
	after the results of the cook's efforts are in, the day will end and the
	cook will return the following day to cook again.

<< Rendering System >>


	Give an overview of how your game will be rendered and then go into 
	detail in the following paragraphs.

2D/3D Rendering

	Describe what sort of 2D/3D rendering engine will be used.



	Describe the way the camera will work and then go into details if the 
	camera is very complicated in sub sections.

Camera Detail #1

	The camera will move around like this and that.

Camera Detail #2

	The camera will sometimes move like this in this special circumstance.

<< Game Engine >>


	The game engine features a neural network to evaluate the dishes created
	by the player/cook.

Game Engine Detail #1

	The game engine will keep track of everything that the King has 
	previously eaten.  This will force the cook to continuously come up with
	new dishes. The neural network will also store information about how a 
	dish tastes.

Collision Detection

	I do not envision collision detection being a major component of the 
	game. It might be beneficial from the perspective that if the cook it 
	walking around and bumps into one of his hired hands, he might drop his 
	dish or something.  

Data Persistence

	Here are some solutions to the data storage problem:

	1. stdin/stdout: Many unix commandline tools don't store data at all, 
	but instead expect that it will all be provided through stdin. They 
	don't store anything, either, but just regurgitate it all to stdout. 
	For much software, this is a damn good approach because you can link 
	tools together via scripts or on the commandline. Of course, this is 
	completely inappropriate for games, so nevermind it. ;-)

	2. ASCII File I/O: This is a pretty straightforward way to go and since 
	most new programmers run into file input/output early on in their 
	studies is the preferred approach for pedagogical efforts like King's 
	Feast. It is also simple and portable, from the standpoint that all 
	operating systems have standard, built-in file handling approaches. 
	The downside is that you'd need to select (and implement) parsers to 
	read and write the files. The upside is that you will be able to edit 
	the files using regular text tools.

	3. Binary File I/O: With cleverness and care you can design a binary 
	format to store data in, which will be faster and more space efficient. 
	The downsides are that you can't easily read or edit the files, and it's
	a tad more complex. Some C++ frameworks include built-in means of 
	storing and loading objects from binary files, which is called 

	4. Berkeley DB: Pretty much all UNIX systems have the Berkeley database 
	system available, as it's used for a lot of system level stuff. It's 
	small enough to be distributed with your app if you want to use it on 
	Windows, too, I believe. As a database system, it's pretty lightweight; 
	it supports key-value records, but isn't really relational or object 

	5. Relational SQL Database: There are several relational databases 
	available, including mysql and postgresql, which provide very powerful 
	ways to store and manage large amounts of data. The downsides are that 
	it can be quite involved to add the db support, and it forces an added 
	dependency - anyone wishing to install the software would first need to 
	install and configure the database software.
	Hmm, I think that covers all the options, but there might be more.

	Personally, I think for King's Feast the optimal policy would be ASCII 
	files (#2), because of the simplicity and flexibility. I doubt space or 
	performance will be any sort of design driver, and most of the files can
	just be loaded right into memory.


<< Lighting Models >>


	Describe the lighting model you are going to use and then go into the 
	different aspects of it below.

Lighting Model Detail #1

	We are using the xyz technique to light our world.

Lighting Model Detail #2

	We won't be lighting the eggplants in the game because they are purple.

<< The World Layout >>


	Help is needed here! (for going through the castle paper)

World Layout Detail #1


World Layout Detail #2


<< Game Characters >>


	The main character in King's Feast is the cook. The cook can control 
	npc's to do menial tasks for him. 

Creating a Character

	There will be a standard character (standard appearance, qualities, 
	etc).  Customization could be done by replacing the media used in the 

<< User Interface  >>


	The User Interface will be written using SDL and OpenGL.

User Interface Detail #1

	The player/cook will manipulate the items in the kitchen with the help 
	of npc cooks who will do the simple things for him.

	Kitchen features will not need knowledge of the other kitchen gadgets. 
	However the gadgets (sinks, ovens, etc.) will need to know what they are
	being used on, so they can properly manipulate the ingredient(s). 

<< Musical Scores and Sound Effects >>


	King's Feast will use a combination of Ogg files, mp3 files as well as 
	MIDI files for music and sound effects. The sound will be played through
	the SDL libraries.

Sound Design

	There is currently very limited work occuring as far as sounds go. An 
	expedition will be organized to journey into CVSROOT/media and see if 
	any suitable sounds can be found.  

<< Single-Player Game >>


	You are Levbolne's best chef. Unfortunately you are stuck with 
	Levbolne's second best kitchen.  The best kitchen is, of course, in the 
	king's palace. Alas, that's also where Levbolne's second best chef is. 
	So in order to get where you belong, you have to prove you simply are 
	the best. You have to prepare the best menus for guests and your local 
	duke and become really famous. Eventually, the king will decide you're 
	the best and hire you. Or so you hope.

Single Player Game Detail #1


Single Player Game Detail #2



	The player is attempting to impress the King by cooking a grand meal for
	him. This will enable to cook to be hired by the King and therefore be 
	acknowledged as the best cook in the kingdom.

Hours of Gameplay

	The game will not last for an extended period of time. However, the 
	player will have to cook until the objective of satisfying the King is 

Victory Conditions

	The game is won when the King is happy.

<< User Interface >>


	The GUI in King's Feast should be very intuitive and easy to program.
	The following contains information about what information should be in
	the GUI. It also gives some ideas as to where everything should be 
	placed in the GUI.

	The following description uses the general layout of the UClient GUI as
	a starting point.
	Screenshots of UClient (in Acorn 0.4) are available here: 

Information Conveyed to User

	The following information will be conveyed to the user through the GUI.

	1. Status of Current Action (mixing, rinsing, etc)
		- These actions are ones for which the cook is required to be
		- Bottom Display Bar 
	2. Status of Actions in the Background (baking, oven stuff, rising
	bread, etc)
		- These actions are ones for which the cook need not be present
		- Side Display Bar
	3. Status of the Meal as a whole (Individual Courses)
		- Side Display Bar (towards the top)
	4. Scrolling Window for debugging messages
		- This will be there for debugging of the game.
		- Bottom Display Bar

<< Object Rendering >>


	Object rendering will be done using OpenGL polygons and texture mapping.
	The OpenGL will be done inside the game's SDL interface.

Character Rendering

	Characters will consist of x number of polygons. And I have no other 
	ideas as to how the rendering will be done specifically for characters.

Ingredient Rendering

	A pile of a specific intgredient will be assigned a certain polygon 
	number. That number of polygons will be drawn (in a way to imitate a 
	pile of stuff). Each polygon will be texture-mapped with the appropriate

	The purpose of giving a pile a large number of polygons is to make a 
	smooth transition if a cook picks up some of the ingredients. The 
	appropriate percentage of polygons could be moved, making the pick-up 
	seem very smooth.

	The major problem I see with the above idea, is that it could become 
	very CPU/video card intensive.

<< Credits >>

The following people's contributed to this document:
	Kai Blin (various descriptions and paragraphs)
	Bryce Harrington (Data Persistence, mentoring on copyright issues)
	Matt Raykowski (provided the template for the document)
The following websites were consulted as well:

If anyone else contributed to the document, please let me know, and I will add
you to the credits.

<< Copyright Info >>

This document Copyright 2002 George Privon

This document is distributed under the terms of the GNU Free Documentation 
License (GFDL) and the GNU General Public License (GPL).

Written by George Privon