<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wowcube.com/index.php?action=history&amp;feed=atom&amp;title=Basics_of_developing_a_simple_map_with_tunnels</id>
	<title>Basics of developing a simple map with tunnels - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wowcube.com/index.php?action=history&amp;feed=atom&amp;title=Basics_of_developing_a_simple_map_with_tunnels"/>
	<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Basics_of_developing_a_simple_map_with_tunnels&amp;action=history"/>
	<updated>2026-05-20T07:25:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Basics_of_developing_a_simple_map_with_tunnels&amp;diff=16703&amp;oldid=prev</id>
		<title>Admin at 10:31, 22 August 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Basics_of_developing_a_simple_map_with_tunnels&amp;diff=16703&amp;oldid=prev"/>
		<updated>2023-08-22T10:31:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:31, 22 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Based on initial topology of the cube on application startup (to be explained), I determine for each screen face the map piece I want on it, and the needed rotation (based on adjacent map pieces and the known orientation of that screen) for the map piece.  The ON_Render routine is then able to just look at the two values for each screen to determine how to draw the tunnels (to be explained further)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Based on initial topology of the cube on application startup (to be explained), I determine for each screen face the map piece I want on it, and the needed rotation (based on adjacent map pieces and the known orientation of that screen) for the map piece.  The ON_Render routine is then able to just look at the two values for each screen to determine how to draw the tunnels (to be explained further)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Since I also need to be able to indicate where on the face the party can exist, I also set a &amp;quot;cell array&amp;quot; of size [9] (indexes 0..8) where the screen is divided into a 3x3 grid and the cell array for a given cell is 1 if the party can be there or 0 if it cannot:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Since I also need to be able to indicate where on the face the party can exist, I also set a &amp;quot;cell array&amp;quot; of size [9] (indexes 0&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;..8) where the screen is divided into a 3x3 grid and the cell array for a given cell is 1 if the party can be there or 0 if it cannot:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  0 1 2&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  0 1 2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-16678:rev-16703 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Basics_of_developing_a_simple_map_with_tunnels&amp;diff=16678&amp;oldid=prev</id>
		<title>Ratcliffe: Created page with &quot;In my RPG game, the cube faces comprise a maze of tunnels, that connect rooms where things happen (finding new party members!  buying potions!  Attacking monsters!).   There a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Basics_of_developing_a_simple_map_with_tunnels&amp;diff=16678&amp;oldid=prev"/>
		<updated>2023-05-12T04:07:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In my RPG game, the cube faces comprise a maze of tunnels, that connect rooms where things happen (finding new party members!  buying potions!  Attacking monsters!).   There a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In my RPG game, the cube faces comprise a maze of tunnels, that connect rooms where things happen (finding new party members!  buying potions!  Attacking monsters!).   There are no doubt a number of approaches on implementing this in Pawn code, but I am using the following method:&lt;br /&gt;
* A 2D matrix with the first index being a module # and the second index being a screen # yields the ID # of the &amp;quot;map piece&amp;quot; that is on that screen&lt;br /&gt;
* Another 2D matrix with the first index being a module # and the second index being a screen # yields the &amp;quot;rotation count&amp;quot; of that map piece on that screen&lt;br /&gt;
* There are a small number of map pieces and each is initially designed as if the top of the screen is at the top of the piece:&lt;br /&gt;
** A straight tunnel (that will go top to bottom or left to right on the screen)&lt;br /&gt;
** An L shaped tunnel (that will connect left to bottom, left to top, right to bottom, or right to top)&lt;br /&gt;
** A cross shaped tunnel (that connects all four sides together)&lt;br /&gt;
** A dead end tunnel (that opens at the top, left, bottom, or right, but closes off 2/3 of the way down)&lt;br /&gt;
** A stairs tunnel (that opens at the top, left, bottom, or right, but the final third of the tunnel is a green square indicating stairs up or down to another level)&lt;br /&gt;
&lt;br /&gt;
Based on initial topology of the cube on application startup (to be explained), I determine for each screen face the map piece I want on it, and the needed rotation (based on adjacent map pieces and the known orientation of that screen) for the map piece.  The ON_Render routine is then able to just look at the two values for each screen to determine how to draw the tunnels (to be explained further)&lt;br /&gt;
&lt;br /&gt;
Since I also need to be able to indicate where on the face the party can exist, I also set a &amp;quot;cell array&amp;quot; of size [9] (indexes 0..8) where the screen is divided into a 3x3 grid and the cell array for a given cell is 1 if the party can be there or 0 if it cannot:&lt;br /&gt;
&lt;br /&gt;
 0 1 2&lt;br /&gt;
 3 4 5&lt;br /&gt;
 6 7 8&lt;br /&gt;
&lt;br /&gt;
If the map piece is a cross, it would always be the case that indexes 1,3,4,5, and 7 would be 1.  For an L piece, it would be one of the following based on the rotation: (1,4,5), (4,5,7), (3,4,7), or (1,3,4).&lt;/div&gt;</summary>
		<author><name>Ratcliffe</name></author>
		
	</entry>
</feed>