Games & Virtual Worlds Series

Flowcharting, Algorithms & Pseudocode

An algorithm is a set of instructions or steps that are followed in a specific order to solve a problem or accomplish a task. Algorithms are used in many different fields, including computer science, mathematics, and engineering, to perform a wide range of tasks, such as sorting data, searching for information, and performing calculations.

There are many different ways to create algorithms, but one common method is to use pseudocode, a natural language process. Pseudocode is a type of informal, high-level programming language that is used to write algorithms in a way that is easy for humans to understand. It uses natural language, rather than a programming language, to describe the steps of the algorithm.

Pseudocode, a natural language description of the logical flows to be conducted by a computer, is commonly the jumping off point for algorithms (and their representations in flowcharts).

Pseudocode is an informal way of programming description that does not require any strict programming language syntax or underlying technology considerations. It is used for creating an outline or a rough draft of a program. Pseudocode summarizes a program’s flow, but excludes underlying details. System designers write pseudocode to ensure that programmers understand a software project’s requirements and align code accordingly. (“What is ‘Pseudocode’”, The Economic Times)

Pseudocode is not a formal programming language and cannot be run on a computer, but it can be used to describe an algorithm in a way that is easy for programmers to understand and implement. It is often used as a way to plan out and design algorithms before they are implemented in a specific programming language. Here is an example of pseudocode:

Start
Set sum to 0
Set count to 0
For each number in the list
Add the number to sum
Increment count by 1
Divide sum by count
Return the result
End

Flow charts are another way to represent algorithms. A flow chart is a diagram that shows the steps of an algorithm using boxes, diamonds, and other shapes connected by arrows. Each shape represents a different step in the algorithm, and the arrows show the flow of control from one step to the next. Flow charts are often used to visualize algorithms and make it easier to understand how they work.

Algorithms are not mechanics but rather a type of logic, and in the context of video games, they serve as a blueprint for the program code. They’re useful for describing mechanics, but they aren’t mechanics themselves, and they’re applied to a wide variety of game-related activities beyond that.

However, due to the computational nature of digital and video games, all mechanics can be thought of as algorithms as well.

Suppose, for example, that we have a country like China that has lots of soldiers but not many weapons. Suppose that the values for China are 100 soldiers and a total of 2 weapons. This would yield a total power of 3. Now comes the good part. Suppose that the Chinese added one more soldier; how would that increase their power?

Well, if you try the equation with 101 soldiers and 2 total weapons, you still get a total power of only 3. Now suppose that the Chinese added one more weapon instead of one more soldier; then their military power would jump up to 5. The moral of this equation is that you need a proper balance between soldiers and weapons. If you have too many of either, it doesn’t hurt you, but you just don’t get much benefit from the additional resource.
— (Crawford, Balance of Power)

From my free Udemy course, Understanding Games: How Video Games & Board Games Work

Related Articles

Ideation, Brainstorming & Innovation

Audiences, Game Titles & Player Types

Prototyping, Playtesting, Iteration & Fun

Affordances, Game Dynamics, Gameplay & Core Loops

Pillars, Goals, Features & Elements

Game Worlds, Dimensionality & Time

Environment, Culture & Emotion

Mapping & Wayfinding

Demographics by Age & Sex

Game Documentation

Bibliography & Further Reading

  • A Game Design Vocabulary: Exploring the Foundational Principles Behind Good Game Design by Anna Anthropy and Naomi Clark
  • A Theory of Fun for Game Design by Raph Koster
  • Advanced Game Design: A Systems Approach by Michael Sellers
  • An Introduction to Game Studies by Frans Mayra
  • Basics of Game Design by Michael Moore
  • Blood, Sweat, and Pixels: The Triumphant, Turbulent Stories Behind How Video Games Are Made Blood, Sweat, and Pixels: The Triumphant, Turbulent Stories Behind How Video Games Are Made by Jason Schreier
  • Board Game Design Advice: From the Best in the World vol 1 by Gabe Barrett
  • Building Blocks of Tabletop Game Design: an Encyclopedia Of Mechanisms by Geoffrey Engelstein and Isaac Shalev
  • Character Development and Storytelling for Games by Lee Sheldon
  • Chris Crawford on Game Design by Chris Crawford
  • Clockwork Game Design by Keith Burgun
  • Elements of Game Design by Robert Zubek
  • Fundamentals of Game Design by Ernest Adams
  • Fundamentals of Puzzle and Casual Game Design by Ernest Adams
  • Game Design Foundations by Brenda Romero
  • Game Design Workshop by Tracy Fullerton
  • Game Mechanics: Advanced Game Design by Ernest Adams and Joris Dormans
  • Game Writing: Narrative Skills for Videogames edited by Chris Bateman
  • Games, Design and Play: A detailed approach to iterative game design by Colleen Macklin and John Sharp
  • Introduction to Game Systems Design by Dax Gazaway
  • Kobold Guide to Board Game Design by Mike Selinker, David Howell, et al
  • Kobold’s Guide to Worldbuilding edited by Janna Silverstein
  • Level Up! The Guide to Great Video Game Design, 2nd Edition by Scott Rogers
  • Narrating Space / Spatializing Narrative: Where Narrative Theory and Geography Meet by Marie-Laure Ryan, Kenneth Foote, et al.
  • Narrative Theory: A Critical Introduction by Kent Puckett
  • Narrative Theory: Core Concepts and Critical Debates by David Herman, James Phelan, et al.
  • Narratology: Introduction to the Theory of Narrative, Fourth Edition by Mieke Bal
  • Practical Game Design by Adam Kramarzewski and Ennio De Nucci
  • Procedural Storytelling in Game Design by Tanya X. Short and Tarn Adams
  • Professional Techniques for Video Game Writing by Wendy Despain
  • Rules of Play by Salen and Zimmerman
  • Storyworlds Across Media: Toward a Media-Conscious Narratology (Frontiers of Narrative) by Marie-Laure Ryan, Jan-Noël Thon, et al
  • Tabletop Game Design for Video Game Designers by Ethan Ham
  • The Art of Game Design, 3rd Edition by Jesse Schell
  • The Board Game Designer’s Guide: The Easy 4 Step Process to Create Amazing Games That People Can’t Stop Playing by Joe Slack
  • The Cambridge Introduction to Narrative by H. Porter Abbott
  • The Grasshopper, by Bernard Suits
  • The Routledge Companion to Video Game Studies by Bernard Perron and Mark J.P. Wolf
  • The Routledge Encyclopedia of Narrative Theory by David Herman
  • The Ultimate Guide to Video Game Writing and Design by Flint Dille & John Zuur Platten
  • Unboxed: Board Game Experience and Design by Gordon Calleja
  • Video Game Storytelling: What Every Developer Needs to Know about Narrative Techniques by Evan Skolnick
  • Writing for Video Game Genres: From FPS to RPG edited by Wendy Despain
  • Writing for Video Games by Steve Ince
  • 100 Principles of Game Design by DESPAIN

--

--