<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tyler Robertson - Ludogogy</title>
	<atom:link href="https://ludogogy.professorgame.com/author/trobertson/feed/" rel="self" type="application/rss+xml" />
	<link>https://ludogogy.professorgame.com</link>
	<description>Games-based learning. Gamification. Playful Design</description>
	<lastBuildDate>Wed, 09 Mar 2022 10:00:57 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://ludogogy.professorgame.com/wp-content/uploads/2022/02/cropped-Ludo_512x512white-32x32.png</url>
	<title>Tyler Robertson - Ludogogy</title>
	<link>https://ludogogy.professorgame.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>That’s no spreadsheet… that’s a game engine!</title>
		<link>https://ludogogy.professorgame.com/article/thats-no-spreadsheet-thats-a-game-engine/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=thats-no-spreadsheet-thats-a-game-engine</link>
					<comments>https://ludogogy.professorgame.com/article/thats-no-spreadsheet-thats-a-game-engine/#respond</comments>
		
		<dc:creator><![CDATA[Tyler Robertson]]></dc:creator>
		<pubDate>Mon, 15 Nov 2021 11:49:49 +0000</pubDate>
				<category><![CDATA[design process]]></category>
		<category><![CDATA[Economics]]></category>
		<category><![CDATA[Game Mechanisms]]></category>
		<category><![CDATA[Play]]></category>
		<category><![CDATA[Games]]></category>
		<guid isPermaLink="false">https://www.ludogogy.co.uk/?post_type=article&#038;p=3323</guid>

					<description><![CDATA[<p>I know I’m not supposed to enjoy spreadsheets the way I do. They’re tools, used for managing your finances. It’s not supposed to be fun. <a class="mh-excerpt-more" href="https://ludogogy.professorgame.com/article/thats-no-spreadsheet-thats-a-game-engine/" title="That’s no spreadsheet… that’s a game engine!">[...]</a></p>
<p>The post <a href="https://ludogogy.professorgame.com/article/thats-no-spreadsheet-thats-a-game-engine/">That’s no spreadsheet… that’s a game engine!</a> first appeared on <a href="https://ludogogy.professorgame.com">Ludogogy</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>When I give a talk or meet someone new, I usually find myself using a line that makes it sound like I’m in some kind of support group:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>“Hi, I’m Tyler. I make spreadsheets for fun.”</p></blockquote>



<p><script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4622494880724445" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4622494880724445" data-ad-slot="3534286871"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</p>



<p>I always say it with a twinge of guilt, because I know I’m not <em>supposed</em> to enjoy spreadsheets the way I do. They’re tools, used for managing your finances, or sorting customer data, or cataloging large swathes of information in one go. It’s not <em>supposed</em> to be fun.</p>



<p>And, perhaps, that’s why I’m drawn to it. As a person with very few instincts that would be called “rebellious”, turning a spreadsheet into something fun is my own small act of revolution, in an otherwise milquetoast life of office computing.</p>



<p>I should start with an example: towards the start of this year, I was (as many of us were) working from home, bored, looking for a way to pass the time between Zoom meetings. I started poking around for those mindless office games we all used to play, like Solitaire or Minesweeper. Not finding any versions I liked, and figuring that installing games on my work laptop would look “unproductive”, I opted to make my own.</p>



<p>I’m a decent enough programmer, and could have opened up something like <a href="https://www.lexaloffle.com/pico-8.php" target="_blank" rel="noopener">PICO-8</a> to whip up something that would sate my office ennui in a few hours (after, most likely, a lot of StackOverflow searches). But what was right in front of me, a part of that same job that I was supposed to be paying attention to, was Google Sheets. I was using it to track some Very Boring Metrics (VBMs) at the time, but the tools were all there: it could make squares, it had checkboxes to click, and I could get it to track where I’d clicked to see if a “mine” was there. With a little bit of conditional formatting, a game suddenly emerged, where once there was only business.</p>



<div class="wp-block-image wp-image-3325 size-full"><figure class="aligncenter"><img fetchpriority="high" decoding="async" width="468" height="229" src="https://www.ludogogy.co.uk/wp-content/uploads/2021/11/Picture10.png" alt="Minesweeper in a spreadsheet" class="wp-image-3325" srcset="https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture10.png 468w, https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture10-300x147.png 300w" sizes="(max-width: 468px) 100vw, 468px" /><figcaption>My own version of Minesweeper running in Google Sheets</figcaption></figure></div>



<p><em>(If you’d like to learn more about that specific project, you can check out my</em> <a href="https://tyler.robertson.click/read/How-to-make-Minesweeper-in-Google-Sheets" target="_blank" rel="noopener"><em>step-by-step instructions</em></a><em>.)</em></p>



<h3 class="wp-block-heading">Why would you do this?</h3>



<p>Getting one over on “the man” is only one of the benefits of making a game in a spreadsheet. It’s also a great, low-cost way to prototype a game idea, or find a new way to think about a particular mechanic.</p>



<p><script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4622494880724445" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4622494880724445" data-ad-slot="2668184925"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</p>



<p>For example, a while back I wanted to learn more about how chess games process valid moves, and the constrictions of a spreadsheet forced me to think about the <em>order</em> in which operations took place, in addition to the operations themselves. <a href="https://docs.google.com/spreadsheets/d/1yZ1PL-24keRTKFQdeIKPULiLR-poIGfCTMRWcOw1uqA/edit?usp=sharing" target="_blank" rel="noopener">You can play the result and read my full write-up all in Google Sheets</a>. Thanks to starting that process with a spreadsheet, I have a better understanding of what pitfalls to avoid, what functions I can simplify, and what benefits a more robust programming language might afford me. Whereas if I had started with something like Lua or Python, my penchant for feature creep might have taken me down unnecessary rabbit holes, and prevented the project from getting finished.</p>



<div class="wp-block-image size-full wp-image-3326"><figure class="aligncenter"><img decoding="async" width="468" height="227" src="https://www.ludogogy.co.uk/wp-content/uploads/2021/11/Picture11.png" alt="Chess in a spreadsheet" class="wp-image-3326" srcset="https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture11.png 468w, https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture11-300x146.png 300w" sizes="(max-width: 468px) 100vw, 468px" /><figcaption>Chess in a spreadsheet</figcaption></figure></div>



<p>It’s also a great way to learn about how fundamental video game mechanics can boil down to simple math, such as plotting a player’s position as they move, or adjusting a character’s attributes (health, stamina, etc.) when something else happens. One of my favorite party tricks is whipping out a game of Snake in under 10 minutes (you can tell I’m great at parties), to show the basics of transposing a game concept onto a spreadsheet. (You can <a href="https://docs.google.com/spreadsheets/d/1p6MKqqJcelUsk16vakjJMq_I7mnRopfvc0LyxEQh1aw/edit?usp=sharing" target="_blank" rel="noopener">check out a copy of that spreadsheet here</a>.)</p>



<p>Lastly, and this is the big one for me, <em>it’s fun</em>. Deciding to make a spreadsheet do something it <em>wasn’t designed to do</em> is like creating—then solving—a 50,000-piece jigsaw puzzle. Working within the constraints of a spreadsheet scratches the same itch as hands-on crafts (I’m an on-again-off-again crochet and chainmail hobbyist), while stretching the same muscles as programming or playing an intense puzzle game. Then even if the end result is <em>totally useless</em>, I can feel satisfied knowing that I solved something complex and weird. And, (so far) I’ve never felt like that time was wasted.</p>



<h3 class="wp-block-heading">How do I get started?</h3>



<p>I’m so glad you asked! The first step would be to pick which spreadsheet app you’d like to use—my weapon of choice is Google Sheets, but I’ve seen similar approaches taken in Microsoft Excel, Apple Numbers, or web apps like Smartsheet or Rows. To make a game in a spreadsheet, you’re going to need three things:</p>



<ol class="wp-block-list"><li><strong> Something to click on</strong></li></ol>



<p>Games rely on interaction, and spreadsheets usually give us at least one option for that besides manually entering text and numbers. Google Sheets, for example, has checkboxes that can be turned off and on (and turned into buttons <a href="https://tyler.robertson.click/read/how-i-turn-google-sheets-checkboxes-into-buttons" target="_blank" rel="noopener">with a little trickery</a>), or apps like Excel let you create buttons that trigger formulas and macros.</p>



<p>Adding something clickable to your spreadsheet helps bring it a little closer to what most players will recognize as a video game, and create a more intuitive experience for them. So even though they won’t have seen <a href="https://docs.google.com/spreadsheets/d/1q1UQnz8Rv6xq856_iipkKVdX_708cnLPU8jIqz5xIkE/edit#gid=0" target="_blank" rel="noopener">Frogger in a spreadsheet</a> before, they’ll probably have a good idea of how to start playing.</p>



<div class="wp-block-image size-full wp-image-3327"><figure class="aligncenter"><img decoding="async" width="468" height="525" src="https://www.ludogogy.co.uk/wp-content/uploads/2021/11/Picture12.png" alt="Frogger in a spreadsheet" class="wp-image-3327" srcset="https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture12.png 468w, https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture12-267x300.png 267w, https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture12-428x480.png 428w" sizes="(max-width: 468px) 100vw, 468px" /><figcaption>Frogger in a spreadsheet</figcaption></figure></div>



<ol class="wp-block-list" start="2"><li><strong> Circular referencing</strong></li></ol>



<p>When moving a character left or right on a screen, what you’re typically doing is adjusting their position along the X axis by a certain amount. In most cases, if you dig into the code of a game, you’ll see that each object has its own “X” and “Y” values, which get adjusted any time that object needs to move. If I wanted a character to walk to the right, for example, I might write a function like this, which tells them to add 1 to their current X position while I press the right arrow on my keyboard:</p>



<p><code>actor.onKeyPress("right", {<br>
this.x = this.x + 1;<br>
});</code></p>



<p>In spreadsheets, it’s sometimes difficult to achieve the same result, because cells will actively resist adjusting their own values. That process is called “circular referencing”, and a spreadsheet will usually disable it by default, because things can get really messy if it happens by accident (adding your quarterly budget to itself by mistake, for instance).</p>



<div class="wp-block-image size-full wp-image-3328"><figure class="aligncenter"><img loading="lazy" decoding="async" width="301" height="150" src="https://www.ludogogy.co.uk/wp-content/uploads/2021/11/Picture13.png" alt="Example “Circular Dependency” error in Google Sheets" class="wp-image-3328"/><figcaption>Example “Circular Dependency” error in Google Sheets</figcaption></figure></div>



<p>To check to see if your spreadsheet supports circular referencing, start a new spreadsheet and head to cell A1. There, type in =A1+1 and see what happens! If you’re in Google Sheets, you’ll get some instructions to turn it on, otherwise you might get a recommendation for what to try instead. <a href="https://rows.com/" target="_blank" rel="noopener">Rows</a>, for instance, doesn’t support circular references, but does have an interesting “EXECUTE” command to help make up for it.</p>



<p><script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4622494880724445" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4622494880724445" data-ad-slot="7022105741"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</p>



<p>With circular referencing turned on, you can now have cells that keep track of your character’s X and Y coordinates (and a myriad of other things), which update themselves when needed. Example: If you have a checkbox in cell C3 which a player can click to move their character to the right, the cell that stores the X value (let’s say it’s cell A1) can look like this:</p>



<p><code>=IF(C3=TRUE,A1+1,A1)</code></p>



<p>That’s saying that if the conditions are met (clicking the button), increase this cell’s current value by one. Otherwise, leave it as-is. Now you’ve got the start of a game!</p>



<ol class="wp-block-list" start="3"><li><strong> Conditional formatting</strong></li></ol>



<p>This last thing is, if I’m being honest, completely optional. But it is <em>nice</em>.</p>



<p>When you change the background or font color in a cell, that’s formatting. Conditional formatting allows you to change the look and feel of a cell <em>dynamically</em> based on its content, or the content of other cells. That lets you gesture at information without having to show all of the behind-the-scenes numbers, making your game much more approachable.</p>



<p>One last example, then I’m done: when I experimented with making a <a href="https://docs.google.com/spreadsheets/d/18llr1p10M1ldWhQNVXM19rQSeJdRRi0sRzQ4q0aoKrc/copy" target="_blank" rel="noopener">turn-based strategy game</a> a-la <em>Into the Breach</em>, I used conditional formatting to show where each character was on an 8-by-8 grid.</p>



<div class="wp-block-image size-full wp-image-3329"><figure class="aligncenter"><img loading="lazy" decoding="async" width="468" height="217" src="https://www.ludogogy.co.uk/wp-content/uploads/2021/11/Picture14.png" alt="“Spreadsheet Tactics” running in Google Sheets" class="wp-image-3329" srcset="https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture14.png 468w, https://ludogogy.professorgame.com/wp-content/uploads/2021/11/Picture14-300x139.png 300w" sizes="auto, (max-width: 468px) 100vw, 468px" /><figcaption>“Spreadsheet Tactics” running in Google Sheets</figcaption></figure></div>



<p>There, I’m using checkboxes to let the player select which piece they want to move, and which space to move them to. Because a cell with a checkbox can only have a value of “TRUE” or “FALSE”, I use conditional formatting to display other information to the player, such as where the friendly (blue) and enemy (red) characters are, where the enemies are targeting (light red), and where the selected character can move to (light blue). All of that information is actually calculated in other cells that I’ve hidden from the player, but conditional formatting lets me gesture to it in a way that players who have seen a turn-based strategy game before will understand.</p>



<p>Conditional formatting can also do things like hide text until it needs to be displayed, or help create the illusion of movement. While games like <a href="https://en.wikipedia.org/wiki/Rogue_(video_game)" target="_blank" rel="noopener">Rogue</a> prove that graphics aren’t <em>strictly</em> necessary, I highly recommend taking advantage of the feature if you have it.</p>



<p><script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4622494880724445" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4622494880724445" data-ad-slot="3534286871"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</p>



<h3 class="wp-block-heading"><strong>What else can spreadsheets do?</strong></h3>



<p>Turns out, the answer is “quite a bit!” While spreadsheets come with some constraints that you wouldn’t see in game engines like Unity or Unreal Engine, the capabilities go far beyond tracking your expenses.</p>



<p>If you’re interested in seeing other games and weird uses for spreadsheets, you can check out <a href="https://docs.google.com/spreadsheets/d/1DKVJ1iYU9Cj4UnXGEwI9rvuvpgXoOI5cTQjwUjM_PtU/edit#gid=1876424169" target="_blank" rel="noopener">my portfolio</a>, which is, yes, a spreadsheet.</p>



<p>Happy spreadsheeting. ?</p>



<div style="background-color: #d1d1d1;">
<figure><img loading="lazy" decoding="async" class="aligncenter wp-image-3330" style="float: right; margin: 10px;" src="https://www.ludogogy.co.uk/wp-content/uploads/2021/11/Picture21.jpg" alt="Tyler Robertson" width="187" height="150"></figure><p></p>
<p>Tyler Robertson is a writer and maker based in London, England. When he’s not writing about automation or pushing spreadsheets to their limits, he can be found roaming the English countryside with this partner and their miniature dachshund. You can follow him on Twitter for more of both: <a href="https://twitter.com/aTylerRobertson" target="_blank" rel="noopener">@aTylerRobertson</a></p>
</div><p>The post <a href="https://ludogogy.professorgame.com/article/thats-no-spreadsheet-thats-a-game-engine/">That’s no spreadsheet… that’s a game engine!</a> first appeared on <a href="https://ludogogy.professorgame.com">Ludogogy</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://ludogogy.professorgame.com/article/thats-no-spreadsheet-thats-a-game-engine/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
