<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>thinBasic: Basic Programming Language Community Forum - BazzBasic</title>
		<link>https://www.thinbasic.com/community/</link>
		<description>BazzBasic by E.K.Virtanen
https://ekbass.github.io/BazzBasic/index.html</description>
		<language>en</language>
		<lastBuildDate>Sun, 08 Mar 2026 00:24:34 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>5</ttl>
		<image>
			<url>https://www.thinbasic.com/community/images/misc/rss.png</url>
			<title>thinBasic: Basic Programming Language Community Forum - BazzBasic</title>
			<link>https://www.thinbasic.com/community/</link>
		</image>
		<item>
			<title>BazzBasic 1.0</title>
			<link>https://www.thinbasic.com/community/showthread.php?13416-BazzBasic-1-0&amp;goto=newpost</link>
			<pubDate>Sun, 22 Feb 2026 13:56:40 GMT</pubDate>
			<description>*BazzBasic 1.0 released* 
Download Github release or source of BazzBasic: https://github.com/EkBass/BazzBasic/releases/tag/BazzBasic 
 
 
*Feb 2026*...</description>
			<content:encoded><![CDATA[<div><b>BazzBasic 1.0 released</b><br />
Download Github release or source of BazzBasic: <a href="https://github.com/EkBass/BazzBasic/releases/tag/BazzBasic" target="_blank">https://github.com/EkBass/BazzBasic/.../tag/BazzBasic</a><br />
<br />
<br />
<b>Feb 2026</b><br />
<br />
<br />
<b>22nd Feb. 2026</b><br />
<br />
<ul><li style="">Released as version 1.0, source and binary</li></ul><br />
<br />
<br />
<br />
<b>21st Feb. 2026</b><br />
<br />
<ul><li style="">FILEREAD and FILEWRITE now supports arrays too.</li></ul><br />
<br />
Example with array:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">LET FILENAME# = &quot;array.txt&quot;<br />
DIM a$<br />
a$(&quot;first&quot;) = 1<br />
a$(&quot;second&quot;) = 2<br />
a$(&quot;third&quot;) = 3<br />
a$(&quot;fourth&quot;) = &quot;Four&quot;<br />
a$(&quot;fourth&quot;, &quot;temp&quot;) = &quot;Temp&quot;<br />
FileWrite FILENAME#, a$<br />
DIM b$ = FileRead(FILENAME#)<br />
PRINT b$(&quot;fourth&quot;, &quot;temp&quot;) ' Output: Temp</code><hr />
</div>array.txt content:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">first=1<br />
second=2<br />
third=3<br />
fourth=Four<br />
fourth,temp=Temp</code><hr />
</div><br />
<b>21st Feb. 2026</b><br />
<br />
<ul><li style="">Added HTTPGET and HTTPPOST. These allow you to send HTTP GET and POST requests to a specified URL and retrieve the response as a string.</li></ul><br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">DIM response$<br />
LET response$ = HTTPGET(&quot;https://httpbin.org/get&quot;)<br />
PRINT response$<br />
DIM postResult$<br />
LET postResult$ = HTTPPOST(&quot;https://httpbin.org/post&quot;, &quot;{&quot;&quot;key&quot;&quot;:&quot;&quot;value&quot;&quot;}&quot;)<br />
PRINT postResult$</code><hr />
</div><ul><li style="">Added LOADSHEET sprites$, &lt;width&gt;, &lt;height&gt;, &lt;path&gt; — splits a sprite sheet image into individual sprites stored in an array.</li></ul><br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">SCREEN 640, 480, &quot;Countdown!&quot;<br />
DIM sprites$<br />
LOADSHEET sprites$, 128, 128, &quot;examples/sheet_numbers.png&quot;<br />
LET x# = 256<br />
LET y# = 176<br />
FOR i$ = 9 TO 0 STEP -1<br />
&nbsp; &nbsp; CLS<br />
&nbsp; &nbsp; LET spriteIndex$<br />
&nbsp; &nbsp; LET spriteIndex$ = i$ + 1<br />
&nbsp; &nbsp; MOVESHAPE sprites$(spriteIndex$), x#, y#<br />
&nbsp; &nbsp; DRAWSHAPE sprites$(spriteIndex$)<br />
&nbsp; &nbsp; SLEEP 500<br />
NEXT<br />
END</code><hr />
</div><ul><li style="">Added FULLSCREEN TRUE/FALSE — enables or disables borderless fullscreen mode.</li></ul><br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">SCREEN 640, 480, &quot;My title&quot;<br />
FULLSCREEN TRUE&nbsp;  ' borderless fullscreen on<br />
FULLSCREEN FALSE&nbsp; ' Windowed mode</code><hr />
</div><br />
<b>14th Feb. 2026</b><br />
<br />
<ul><li style="">Fixed INPUT and LINE INPUT when using GFX. Binary release also updated.</li><li style="">Added KEYDOWN(&lt;key constant#&gt;) function to check the state of keyboard keys.</li><li style="">Added key constants for all keys I could imagine — will add more if any are found missing.</li></ul></div>

]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13416-BazzBasic-1-0</guid>
		</item>
		<item>
			<title>Voxel, proof-of-concept code</title>
			<link>https://www.thinbasic.com/community/showthread.php?13415-Voxel-proof-of-concept-code&amp;goto=newpost</link>
			<pubDate>Sun, 22 Feb 2026 11:35:19 GMT</pubDate>
			<description>Attachment 10418 (https://www.thinbasic.com/community/attachment.php?attachmentid=10418) 
 
3D voxel terrain with BazzBasic. 
 
This was written with...</description>
			<content:encoded><![CDATA[<div><a href="https://www.thinbasic.com/community/attachment.php?attachmentid=10418&amp;d=1771759950"  title="Name:  553179292-164a6aed-68f8-467c-911b-089831933812.png
Views: 4
Size:  40.3 KB">553179292-164a6aed-68f8-467c-911b-089831933812.png</a><br />
<br />
3D voxel terrain with BazzBasic.<br />
<br />
This was written with version 1.0, which I have not yet released due few things missing from manual. But Im positive I get 1.0 out in matter of hours.<br />
<br />
<br />
<a href="https://github.com/EkBass/BazzBasic/discussions/24" target="_blank">https://github.com/EkBass/BazzBasic/discussions/24</a></div>


	<div style="padding:10px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<ul>
			<li>
	<img class="inlineimg" src="https://www.thinbasic.com/community/images/attach/png.gif" alt="File Type: png" />
	<a href="https://www.thinbasic.com/community/attachment.php?attachmentid=10418&amp;d=1771759950">553179292-164a6aed-68f8-467c-911b-089831933812.png</a> 
(40.3 KB)
</li>
			</ul>
			</fieldset>
	

	

	</div>
]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13415-Voxel-proof-of-concept-code</guid>
		</item>
		<item>
			<title>Platformer/jumping thing</title>
			<link>https://www.thinbasic.com/community/showthread.php?13414-Platformer-jumping-thing&amp;goto=newpost</link>
			<pubDate>Mon, 16 Feb 2026 16:52:50 GMT</pubDate>
			<description>Hi everyone. 
 
 
Here is a simple platformer/jumping thing I made to see how it works with my BazzBasic interpreter. 
 
...</description>
			<content:encoded><![CDATA[<div>Hi everyone.<br />
<br />
<br />
Here is a simple platformer/jumping thing I made to see how it works with my BazzBasic interpreter.<br />
<br />
<br />
<a href="https://github.com/EkBass/BazzBasic/discussions/23" target="_blank">https://github.com/EkBass/BazzBasic/discussions/23</a><br />
<br />
<a href="https://www.thinbasic.com/community/attachment.php?attachmentid=10417&amp;d=1771260746"  title="Name:  550519086-2df7f518-6335-4ee0-8e0b-186505fb7253.png
Views: 4
Size:  14.9 KB">550519086-2df7f518-6335-4ee0-8e0b-186505fb7253.png</a></div>


	<div style="padding:10px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<ul>
			<li>
	<img class="inlineimg" src="https://www.thinbasic.com/community/images/attach/png.gif" alt="File Type: png" />
	<a href="https://www.thinbasic.com/community/attachment.php?attachmentid=10417&amp;d=1771260746">550519086-2df7f518-6335-4ee0-8e0b-186505fb7253.png</a> 
(14.9 KB)
</li>
			</ul>
			</fieldset>
	

	

	</div>
]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13414-Platformer-jumping-thing</guid>
		</item>
		<item>
			<title>Version 0.9 out</title>
			<link>https://www.thinbasic.com/community/showthread.php?13413-Version-0-9-out&amp;goto=newpost</link>
			<pubDate>Fri, 13 Feb 2026 17:07:03 GMT</pubDate>
			<description><![CDATA[# BazzBasic 0.9 Released! &#127881; 
 
 
**BazzBasic 0.9** is now available as binary and source. 
 
 
## What's New in 0.9 
 
 
The latest update brings...]]></description>
			<content:encoded><![CDATA[<div># BazzBasic 0.9 Released! &#127881;<br />
<br />
<br />
**BazzBasic 0.9** is now available as binary and source.<br />
<br />
<br />
## What's New in 0.9<br />
<br />
<br />
The latest update brings some additions aimed for game developers.<br />
<br />
<br />
**New Math &amp; Utility Functions:**<br />
- `LERP(start, end, t)` — Linear interpolation between two values<br />
- `DISTANCE()` — Calculate 2D or 3D distances with a single call<br />
- `CLAMP(n, min, max)` — Keep values within bounds without verbose IF chains<br />
- `BETWEEN(value, min, max)` — Quick range checking that returns TRUE/FALSE<br />
- `EULER` — The mathematical constant *e* &#8776; 2.718281828459045<br />
- `TAU` and `QPI` — Convenient constants for 2&#960; and &#960;/4<br />
<br />
<br />
**Graphics Enhancement:**<br />
- `VSYNC(TRUE/FALSE)` — Control vertical sync for smooth rendering or uncapped frame rates<br />
<br />
<br />
## Roadmap to 1.0<br />
<br />
<br />
The next milestone will introduce some interesting things:<br />
<br />
<br />
**HTTP Support** — Make GET and POST requests directly from BazzBasic. Fetch data from APIs, download files, or send data to web services.<br />
<br />
<br />
**Sprite Sheets** — `LOADSHEET(filename, width, height)` will slice sprite sheet images into individual frames stored in an array, making 2D game animation easier.<br />
<br />
<br />
**Under Consideration:**<br />
- Joystick/gamepad support for game input<br />
- Native JSON and XML parsing to and from arrays<br />
<br />
<br />
## Get BazzBasic<br />
<br />
<br />
- **Homepage:** <a href="https://ekbass.github.io/BazzBasic/" target="_blank">https://ekbass.github.io/BazzBasic/</a><br />
- **Source:** <a href="https://github.com/EkBass/BazzBasic/tree/main" target="_blank">https://github.com/EkBass/BazzBasic/tree/main</a><br />
- **Documentation:** <a href="https://ekbass.github.io/BazzBasic/manual/#/" target="_blank">https://ekbass.github.io/BazzBasic/manual/#/</a><br />
- **Discussions:** <a href="https://ekbass.github.io/BazzBasic/communities.html" target="_blank">https://ekbass.github.io/BazzBasic/communities.html</a></div>

]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13413-Version-0-9-out</guid>
		</item>
		<item>
			<title>Ver. 0.8 out</title>
			<link>https://www.thinbasic.com/community/showthread.php?13409-Ver-0-8-out&amp;goto=newpost</link>
			<pubDate>Sun, 08 Feb 2026 10:52:25 GMT</pubDate>
			<description><![CDATA[Read at BazzBasic GitHub https://github.com/EkBass/BazzBasic/discussions/10 
 
 
&#8203; 
 
 
# BazzBasic version 0.8 
 
 
Key issues, news and changes...]]></description>
			<content:encoded><![CDATA[<div>Read at BazzBasic GitHub <a href="https://github.com/EkBass/BazzBasic/discussions/10" target="_blank">https://github.com/EkBass/BazzBasic/discussions/10</a><br />
<br />
<br />
&#8203;<br />
<br />
<br />
# BazzBasic version 0.8<br />
<br />
<br />
Key issues, news and changes from 0.7<br />
<br />
<br />
## NAudio to SDL2<br />
<br />
<br />
This change has been done. It was actually easier to do what I expected.  <br />
<br />
<br />
Audio features works just as with version 0.7<br />
<br />
<br />
## RAD &amp; DEG<br />
<br />
<br />
Added keywords **RAD** &amp; **DEG**<br />
<br />
<br />
## PI &amp; HPI<br />
<br />
<br />
**PI** returns a hard coded value of *3.141592653589793*  <br />
<br />
<br />
**HPI** returns a hard coded value of *1.5707963267948966*<br />
<br />
<br />
These both are commonly and often used when playing with graphics. Hard coding them makes things much faster.<br />
<br />
<br />
## Fast Trigonometry (Lookup Tables)<br />
<br />
<br />
For graphics-intensive applications (games, raycasting, animations), BazzBasic provides fast trigonometric functions using pre-calculated lookup tables. These are significantly faster than standard `SIN`/`COS` functions but have 1-degree precision.<br />
<br />
<br />
**Performance:** ~20x faster than `SIN(RAD(x))` for integer degree values.  <br />
<br />
<br />
**Memory:** Uses ~5.6 KB when enabled<br />
<br />
<br />
### FastTrig(&lt;param&gt;)<br />
<br />
<br />
Enables or disables fast trigonometry lookup tables.<br />
<br />
<br />
**Parameters:**<br />
<br />
<br />
- `TRUE` (or any non-zero value) - Creates lookup tables<br />
<br />
<br />
- `FALSE` (or 0) - Destroys lookup tables and frees memory<br />
<br />
<br />
### FastSin(angle)<br />
<br />
<br />
Returns the sine of an angle (in degrees) using a lookup table.<br />
<br />
<br />
**Parameters:**<br />
<br />
<br />
- `angle` - Angle in degrees (automatically normalized to 0-359)<br />
<br />
<br />
**Returns:** Sine value (-1.0 to 1.0)<br />
<br />
<br />
**Precision:** 1 degree (sufficient for most games and graphics)<br />
<br />
<br />
```vb<br />
<br />
<br />
FastTrig(TRUE)<br />
<br />
<br />
PRINT FastSin(0)    ' Output: 0<br />
<br />
<br />
PRINT FastSin(90)   ' Output: 1<br />
<br />
<br />
PRINT FastSin(180)  ' Output: 0<br />
<br />
<br />
PRINT FastSin(270)  ' Output: -1<br />
<br />
<br />
' Angles are automatically wrapped<br />
<br />
<br />
PRINT FastSin(450)  ' Same as FastSin(90) = 1<br />
<br />
<br />
PRINT FastSin(-90)  ' Same as FastSin(270) = -1<br />
<br />
<br />
FastTrig(FALSE)<br />
<br />
<br />
```<br />
<br />
<br />
### FastCos(angle)<br />
<br />
<br />
Returns the cosine of an angle (in degrees) using a lookup table.<br />
<br />
<br />
**Parameters:**<br />
<br />
<br />
- `angle` - Angle in degrees (automatically normalized to 0-359)<br />
<br />
<br />
**Returns:** Cosine value (-1.0 to 1.0)<br />
<br />
<br />
**Precision:** 1 degree (sufficient for most games and graphics)<br />
<br />
<br />
```vb<br />
<br />
<br />
FastTrig(TRUE)<br />
<br />
<br />
PRINT FastCos(0)    ' Output: 1<br />
<br />
<br />
PRINT FastCos(90)   ' Output: 0<br />
<br />
<br />
PRINT FastCos(180)  ' Output: -1<br />
<br />
<br />
PRINT FastCos(270)  ' Output: 0<br />
<br />
<br />
' Use in raycasting<br />
<br />
<br />
FOR angle$ = 0 TO 359<br />
<br />
<br />
    LET dx$ = FastCos(angle$)<br />
<br />
<br />
    LET dy$ = FastSin(angle$)<br />
<br />
<br />
    ' Cast ray in direction (dx, dy)<br />
<br />
<br />
NEXT<br />
<br />
<br />
FastTrig(FALSE)<br />
<br />
<br />
```<br />
<br />
<br />
### FastRad(angle)<br />
<br />
<br />
Converts degrees to radians using an optimized formula.<br />
<br />
<br />
**Parameters:**<br />
<br />
<br />
- `angle` - Angle in degrees (automatically normalized to 0-359)<br />
<br />
<br />
**Returns:** Angle in radians<br />
<br />
<br />
**Note:** This function doesn't require `FastTrig(TRUE)` but is included for consistency.<br />
<br />
<br />
```vb<br />
<br />
<br />
PRINT FastRad(90)   ' Output: 1.5707963267948966 (HPI)<br />
<br />
<br />
PRINT FastRad(180)  ' Output: 3.141592653589793 (PI)<br />
<br />
<br />
PRINT FastRad(360)  ' Output: 6.283185307179586 (2*PI)<br />
<br />
<br />
```<br />
<br />
<br />
## Download<br />
<br />
<br />
Source and Windows binaries <a href="https://ekbass.github.io/BazzBasic/" target="_blank">https://ekbass.github.io/BazzBasic/</a><br />
<br />
<br />
## Version 0.9<br />
<br />
<br />
For version 0.9, I'm focusing on making sure that the metafiles etc. are in accordance with Windows and Avast reducing warnings when BazzBasic is run for the first time.<br />
<br />
<br />
The easiest way would probably be to get an account in the Microsoft Store, but it costs money and I don't want to do that since it's a free open source project.<br />
<br />
<br />
Most of the metafiles are already in order, but GitHub's own &quot;release&quot; method would help even more. However, I haven't had time to learn it yet.<br />
<br />
<br />
Of course, bug hunting and fine-tuning are definitely expected with version 0.9.<br />
<br />
<br />
*Kristian Virtanen*  <br />
<br />
<br />
*krisu.virtanen@gmail.com*  <br />
<br />
<br />
*<a href="https://ekbass.github.io/BazzBasic/*" target="_blank">https://ekbass.github.io/BazzBasic/*</a></div>

]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13409-Ver-0-8-out</guid>
		</item>
		<item>
			<title>3D maze example</title>
			<link>https://www.thinbasic.com/community/showthread.php?13408-3D-maze-example&amp;goto=newpost</link>
			<pubDate>Sat, 07 Feb 2026 13:24:04 GMT</pubDate>
			<description><![CDATA[https://github.com/EkBass/BazzBasic/discussions/9 
 
 
Code: 
--------- 
' ============================================ 
' 3D RAYCASTER - Optimized...]]></description>
			<content:encoded><![CDATA[<div><a href="https://github.com/EkBass/BazzBasic/discussions/9" target="_blank">https://github.com/EkBass/BazzBasic/discussions/9</a><br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">' ============================================<br />
' 3D RAYCASTER - Optimized Version<br />
' BazzBasic version: https://ekbass.github.io/BazzBasic/<br />
' ============================================<br />
<br />
<br />
LET PI# = 3.14159265<br />
LET PI2# = 6.28318530<br />
LET FOV# = 1.0472<br />
LET NUM_RAYS# = 180<br />
LET STEP_SIZE# = 0.05<br />
LET MAX_STEPS# = 512<br />
<br />
<br />
LET SCREEN_W# = 640<br />
LET SCREEN_H# = 480<br />
LET HALF_H# = 240<br />
<br />
<br />
' Map definition<br />
DIM m$<br />
DIM map$&nbsp; ' Optimized map with integers<br />
GOSUB [sub:readMap]<br />
<br />
<br />
LET MAP_H# = 21<br />
LET MAP_W# = 31<br />
LET px$ = 3.5<br />
LET py$ = 3.5<br />
LET pAngle$ = 0<br />
<br />
<br />
' pre-proces: change string map as integers<br />
GOSUB [sub:convertMapToArray]<br />
<br />
<br />
SCREEN 12<br />
CLS<br />
<br />
<br />
' === Main Loop ===<br />
LET running$ = TRUE<br />
WHILE running$<br />
&nbsp; &nbsp; LET key$ = INKEY<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; LET moveSpeed$ = 0.1<br />
&nbsp; &nbsp; LET rotSpeed$ = 0.08<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; IF key$ = KEY_UP# THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET nx$ = px$ + COS(pAngle$) * moveSpeed$<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET ny$ = py$ + SIN(pAngle$) * moveSpeed$<br />
&nbsp; &nbsp; &nbsp; &nbsp; IF map$(INT(ny$), INT(nx$)) = 0 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; px$ = nx$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; py$ = ny$<br />
&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; IF key$ = KEY_DOWN# THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET nx$ = px$ - COS(pAngle$) * moveSpeed$<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET ny$ = py$ - SIN(pAngle$) * moveSpeed$<br />
&nbsp; &nbsp; &nbsp; &nbsp; IF map$(INT(ny$), INT(nx$)) = 0 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; px$ = nx$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; py$ = ny$<br />
&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; IF key$ = KEY_LEFT# THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; pAngle$ = pAngle$ - rotSpeed$<br />
&nbsp; &nbsp; &nbsp; &nbsp; IF pAngle$ &lt; 0 THEN pAngle$ = pAngle$ + PI2#<br />
&nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; IF key$ = KEY_RIGHT# THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; pAngle$ = pAngle$ + rotSpeed$<br />
&nbsp; &nbsp; &nbsp; &nbsp; IF pAngle$ &gt;= PI2# THEN pAngle$ = pAngle$ - PI2#<br />
&nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; IF key$ = KEY_ESC# THEN running$ = FALSE<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; SCREENLOCK ON<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; LINE (0,0)-(SCREEN_W#, HALF_H#), RGB(50, 50, 100), BF<br />
&nbsp; &nbsp; LINE (0,HALF_H#)-(SCREEN_W#, SCREEN_H#), RGB(40, 40, 40), BF<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; GOSUB [sub:RenderView]<br />
&nbsp; &nbsp; GOSUB [sub:DrawMinimap]<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; SCREENLOCK OFF<br />
&nbsp; &nbsp; SLEEP 16<br />
WEND<br />
<br />
<br />
COLOR 7, 0<br />
CLS<br />
END<br />
<br />
<br />
' -----------------------------------------------<br />
' 0 = empty floor, 1 = wall<br />
' -----------------------------------------------<br />
[sub:convertMapToArray]<br />
&nbsp; &nbsp; FOR y$ = 0 TO MAP_H# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; FOR x$ = 0 TO MAP_W# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF MID(m$(y$), x$ + 1, 1) = &quot;#&quot; THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map$(y$, x$) = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map$(y$, x$) = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; NEXT<br />
RETURN<br />
<br />
<br />
' -----------------------------------------------<br />
' Render 3D view - collision check<br />
' -----------------------------------------------<br />
[sub:RenderView]<br />
&nbsp; &nbsp; LET sliceWidth$ = SCREEN_W# / NUM_RAYS#<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; FOR ray$ = 0 TO NUM_RAYS# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET rayRatio$ = ray$ / NUM_RAYS#<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET rayAngle$ = pAngle$ - (FOV# / 2) + (rayRatio$ * FOV#)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; LET dx$ = COS(rayAngle$) * STEP_SIZE#<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET dy$ = SIN(rayAngle$) * STEP_SIZE#<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET rx$ = px$<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET ry$ = py$<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET hit$ = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET distance$ = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET steps$ = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; WHILE hit$ = 0 AND steps$ &lt; MAX_STEPS#<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rx$ = rx$ + dx$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ry$ = ry$ + dy$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; steps$ = steps$ + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; distance$ = distance$ + STEP_SIZE#<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET cx$ = INT(rx$)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET cy$ = INT(ry$)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF cx$ &gt;= 0 AND cx$ &lt; MAP_W# AND cy$ &gt;= 0 AND cy$ &lt; MAP_H# THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF map$(cy$, cx$) = 1 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hit$ = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hit$ = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; WEND<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; IF hit$ = 1 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET angleDiff$ = rayAngle$ - pAngle$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET correctedDist$ = distance$ * COS(angleDiff$)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET wallHeight$ = (HALF_H# / correctedDist$) * 0.6<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF wallHeight$ &gt; SCREEN_H# THEN wallHeight$ = SCREEN_H#<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET wallTop$ = HALF_H# - wallHeight$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET wallBottom$ = HALF_H# + wallHeight$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET brightness$ = 255 - (correctedDist$ * 25)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF brightness$ &lt; 20 THEN brightness$ = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF brightness$ &gt; 255 THEN brightness$ = 255<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET screenX$ = INT(rayRatio$ * SCREEN_W#)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET screenX2$ = INT((ray$ + 1) / NUM_RAYS# * SCREEN_W#)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET wallColor$ = RGB(brightness$, brightness$ * 0.8, brightness$ * 0.6)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LINE (screenX$, wallTop$)-(screenX2$, wallBottom$), wallColor$, BF<br />
&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; NEXT<br />
RETURN<br />
<br />
<br />
' -----------------------------------------------<br />
' Draw mini-map <br />
' -----------------------------------------------<br />
[sub:DrawMinimap]<br />
&nbsp; &nbsp; LET mapScale$ = 6<br />
&nbsp; &nbsp; LET mapOffsetX$ = 10<br />
&nbsp; &nbsp; LET mapOffsetY$ = 10<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; LINE (mapOffsetX$-2, mapOffsetY$-2)-(mapOffsetX$ + MAP_W# * mapScale$ + 2, mapOffsetY$ + MAP_H# * mapScale$ + 2), RGB(0,0,0), BF<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; FOR my$ = 0 TO MAP_H# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; FOR mx$ = 0 TO MAP_W# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF map$(my$, mx$) = 1 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET sx$ = mapOffsetX$ + mx$ * mapScale$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET sy$ = mapOffsetY$ + my$ * mapScale$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LINE (sx$, sy$)-(sx$ + mapScale$ - 1, sy$ + mapScale$ - 1), RGB(150, 150, 150), BF<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; LET plrX$ = mapOffsetX$ + INT(px$ * mapScale$)<br />
&nbsp; &nbsp; LET plrY$ = mapOffsetY$ + INT(py$ * mapScale$)<br />
&nbsp; &nbsp; CIRCLE (plrX$, plrY$), 3, RGB(255, 255, 0), 1<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; LET dirX$ = plrX$ + INT(COS(pAngle$) * 8)<br />
&nbsp; &nbsp; LET dirY$ = plrY$ + INT(SIN(pAngle$) * 8)<br />
&nbsp; &nbsp; LINE (plrX$, plrY$)-(dirX$, dirY$), RGB(255, 255, 0)<br />
RETURN<br />
<br />
<br />
' -----------------------------------------------<br />
' Read map into string array<br />
' -----------------------------------------------<br />
[sub:readMap]<br />
&nbsp; &nbsp; m$(0)&nbsp;  = &quot;###############################&quot;<br />
&nbsp; &nbsp; m$(1)&nbsp;  = &quot;#...........#..#........#.....#&quot;<br />
&nbsp; &nbsp; m$(2)&nbsp;  = &quot;####..#..####..#######..#..#..#&quot;<br />
&nbsp; &nbsp; m$(3)&nbsp;  = &quot;#.....#........#...........#..#&quot;<br />
&nbsp; &nbsp; m$(4)&nbsp;  = &quot;#######..#..#..#..####..#######&quot;<br />
&nbsp; &nbsp; m$(5)&nbsp;  = &quot;#........#..#.....#..#........#&quot;<br />
&nbsp; &nbsp; m$(6)&nbsp;  = &quot;#######..#..####..#..####..####&quot;<br />
&nbsp; &nbsp; m$(7)&nbsp;  = &quot;#.....#..#..#.....#.....#.....#&quot;<br />
&nbsp; &nbsp; m$(8)&nbsp;  = &quot;####..##########..#..#######..#&quot;<br />
&nbsp; &nbsp; m$(9)&nbsp;  = &quot;#...........#.....#..#..#..#..#&quot;<br />
&nbsp; &nbsp; m$(10)&nbsp; = &quot;####..####..#..####..#..#..#..#&quot;<br />
&nbsp; &nbsp; m$(11)&nbsp; = &quot;#.....#.....#..............#..#&quot;<br />
&nbsp; &nbsp; m$(12)&nbsp; = &quot;#..#######..#..#..##########..#&quot;<br />
&nbsp; &nbsp; m$(13)&nbsp; = &quot;#.....#.....#..#........#..#..#&quot;<br />
&nbsp; &nbsp; m$(14)&nbsp; = &quot;#######..##########..####..#..#&quot;<br />
&nbsp; &nbsp; m$(15)&nbsp; = &quot;#...........#.....#..#..#.....#&quot;<br />
&nbsp; &nbsp; m$(16)&nbsp; = &quot;#..##########..#######..####..#&quot;<br />
&nbsp; &nbsp; m$(17)&nbsp; = &quot;#..............#..............#&quot;<br />
&nbsp; &nbsp; m$(18)&nbsp; = &quot;##########..#..####..####..#..#&quot;<br />
&nbsp; &nbsp; m$(19)&nbsp; = &quot;#...........#...........#..#..#&quot;<br />
&nbsp; &nbsp; m$(20)&nbsp; = &quot;###############################&quot;<br />
RETURN</code><hr />
</div></div>

]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13408-3D-maze-example</guid>
		</item>
		<item>
			<title>2D raycasting demo</title>
			<link>https://www.thinbasic.com/community/showthread.php?13407-2D-raycasting-demo&amp;goto=newpost</link>
			<pubDate>Fri, 06 Feb 2026 18:00:36 GMT</pubDate>
			<description><![CDATA[Code: 
--------- 
' ============================================ 
' 2D Field-of-View (FOV) — 90-Ray Casting 
' BazzBasic version:...]]></description>
			<content:encoded><![CDATA[<div><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">' ============================================<br />
' 2D Field-of-View (FOV) — 90-Ray Casting<br />
' BazzBasic version: https://ekbass.github.io/BazzBasic/<br />
' Reads walls from map array, SCREENLOCK for<br />
' flicker-free rendering<br />
' ============================================<br />
<br />
<br />
LET NUM_RAYS# = 90<br />
LET STEP_SIZE# = 0.2<br />
LET MAX_STEPS# = 40<br />
LET PI2# = 6.28318530<br />
<br />
<br />
' Map definition<br />
DIM m$<br />
GOSUB [sub:readMap]<br />
<br />
<br />
LET MAP_H# = 21<br />
LET MAP_W# = 31<br />
LET px$ = 3<br />
LET py$ = 3<br />
<br />
<br />
DIM vis$<br />
CLS<br />
<br />
<br />
' === Main Loop ===<br />
LET running$ = TRUE<br />
WHILE running$<br />
<br />
<br />
&nbsp; &nbsp; ' 1) Reset visibility<br />
&nbsp; &nbsp; FOR vy$ = 0 TO MAP_H# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; FOR vx$ = 0 TO MAP_W# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vis$(vy$, vx$) = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; vis$(py$, px$) = 1<br />
<br />
<br />
&nbsp; &nbsp; ' 2) Cast rays — read walls from array, no screen needed<br />
&nbsp; &nbsp; GOSUB [sub:CastAllRays]<br />
<br />
<br />
&nbsp; &nbsp; ' 3) Draw everything in one go<br />
&nbsp; &nbsp; SCREENLOCK ON<br />
&nbsp; &nbsp; GOSUB [sub:DrawFOV]<br />
<br />
<br />
&nbsp; &nbsp; ' 4) Player<br />
&nbsp; &nbsp; COLOR 10, 0<br />
&nbsp; &nbsp; LOCATE py$ + 1, px$ + 1<br />
&nbsp; &nbsp; PRINT &quot;@&quot;;<br />
<br />
<br />
&nbsp; &nbsp; ' 5) Status bar<br />
&nbsp; &nbsp; COLOR 8, 0<br />
&nbsp; &nbsp; LOCATE MAP_H# + 2, 1<br />
&nbsp; &nbsp; PRINT &quot;Arrows=Move&nbsp; ESC=Quit&nbsp; Pos:&quot;; px$; &quot;,&quot;; py$; &quot;&nbsp;  &quot;;<br />
&nbsp; &nbsp; SCREENLOCK OFF<br />
<br />
<br />
&nbsp; &nbsp; ' 6) Wait for a keypress<br />
&nbsp; &nbsp; LET key$ = 0<br />
&nbsp; &nbsp; WHILE key$ = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; key$ = INKEY<br />
&nbsp; &nbsp; &nbsp; &nbsp; SLEEP 16<br />
&nbsp; &nbsp; WEND<br />
<br />
<br />
&nbsp; &nbsp; ' 7) Movement + collision<br />
&nbsp; &nbsp; LET nx$ = px$<br />
&nbsp; &nbsp; LET ny$ = py$<br />
&nbsp; &nbsp; IF key$ = KEY_UP# THEN ny$ = py$ - 1<br />
&nbsp; &nbsp; IF key$ = KEY_DOWN# THEN ny$ = py$ + 1<br />
&nbsp; &nbsp; IF key$ = KEY_LEFT# THEN nx$ = px$ - 1<br />
&nbsp; &nbsp; IF key$ = KEY_RIGHT# THEN nx$ = px$ + 1<br />
&nbsp; &nbsp; IF key$ = KEY_ESC# THEN running$ = FALSE<br />
<br />
<br />
&nbsp; &nbsp; IF MID(m$(ny$), nx$ + 1, 1) = &quot;.&quot; THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; px$ = nx$<br />
&nbsp; &nbsp; &nbsp; &nbsp; py$ = ny$<br />
&nbsp; &nbsp; ENDIF<br />
<br />
<br />
WEND<br />
<br />
<br />
COLOR 7, 0<br />
CLS<br />
END<br />
<br />
<br />
' -----------------------------------------------<br />
' Cast rays — check walls from map array directly<br />
' -----------------------------------------------<br />
[sub:CastAllRays]<br />
&nbsp; &nbsp; FOR ray$ = 0 TO NUM_RAYS# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET angle$ = (ray$ / NUM_RAYS#) * PI2#<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET dx$ = COS(angle$) * STEP_SIZE#<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET dy$ = SIN(angle$) * STEP_SIZE#<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET rx$ = px$ + 0.5<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET ry$ = py$ + 0.5<br />
&nbsp; &nbsp; &nbsp; &nbsp; LET hit$ = 0<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; FOR s$ = 1 TO MAX_STEPS#<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF hit$ = 0 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rx$ = rx$ + dx$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ry$ = ry$ + dy$<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET cx$ = INT(rx$)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET cy$ = INT(ry$)<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF cx$ &gt;= 0 AND cx$ &lt; MAP_W# AND cy$ &gt;= 0 AND cy$ &lt; MAP_H# THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vis$(cy$, cx$) = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF MID(m$(cy$), cx$ + 1, 1) = &quot;#&quot; THEN hit$ = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hit$ = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; NEXT<br />
RETURN<br />
<br />
<br />
' -----------------------------------------------<br />
' Draw map: visible=lit, not visible=black<br />
' -----------------------------------------------<br />
[sub:DrawFOV]<br />
&nbsp; &nbsp; FOR dy$ = 0 TO MAP_H# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; FOR dx$ = 0 TO MAP_W# - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOCATE dy$ + 1, dx$ + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LET ch$ = MID(m$(dy$), dx$ + 1, 1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF vis$(dy$, dx$) = 1 THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ch$ = &quot;#&quot; THEN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLOR 7, 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLOR 14, 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLOR 0, 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PRINT ch$;<br />
&nbsp; &nbsp; &nbsp; &nbsp; NEXT<br />
&nbsp; &nbsp; NEXT<br />
RETURN<br />
<br />
<br />
' -----------------------------------------------<br />
' Read map into array<br />
' -----------------------------------------------<br />
[sub:readMap]<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(0)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;###############################&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(1)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#...........#..#........#.....#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(2)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;####..#..####..#######..#..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(3)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#.....#........#...........#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(4)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#######..#..#..#..####..#######&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(5)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#........#..#.....#..#........#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(6)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#######..#..####..#..####..####&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(7)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#.....#..#..#.....#.....#.....#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(8)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;####..##########..#..#######..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(9)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#...........#.....#..#..#..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(10)&nbsp; &nbsp; &nbsp; &nbsp; = &quot;####..####..#..####..#..#..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(11)&nbsp; &nbsp; &nbsp; &nbsp; = &quot;#.....#.....#..............#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(12)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#..#######..#..#..##########..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(13)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#.....#.....#..#........#..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(14)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#######..##########..####..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(15)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#...........#.....#..#..#.....#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(16)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#..##########..#######..####..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(17)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#..............#..............#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(18)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;##########..#..####..####..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(19)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;#...........#...........#..#..#&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; m$(20)&nbsp; &nbsp; &nbsp; &nbsp;  = &quot;###############################&quot;<br />
RETURN</code><hr />
</div></div>

]]></content:encoded>
			<category domain="https://www.thinbasic.com/community/forumdisplay.php?401-BazzBasic">BazzBasic</category>
			<dc:creator>E.K.Virtanen</dc:creator>
			<guid isPermaLink="true">https://www.thinbasic.com/community/showthread.php?13407-2D-raycasting-demo</guid>
		</item>
	</channel>
</rss>
