UnitVector [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=53990 Vector Addition Visualizer v1 <p>I'm a physics teacher and my students always have a really hard time visualizing vector addition early on, so I decided to make a little tool so they can play around with 2-D vectors.</p> <ul> <li>Up to 6 vectors and their resultant vector.</li> <li>Can be arranged from the origin or tip-to-tail</li> <li>Can view Cartesian components or polar representation</li> <li>Grid can be zoomed and panned</li> </ul> <p>Things I may add:</p> <ul> <li>Short tutorial or at least a &quot;controls&quot; tab</li> <li>Viewing x/y vector components or angles on the grid</li> <li>Choose your vectors' colors</li> <li>...?</li> </ul> <p>Please let me know if you think it needs any adjustments.</p> <p> <table><tr><td> <a href="/bbs/?pid=149089#p"> <img src="/bbs/thumbs/pico64_vectoraddition01-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=149089#p"> vectoraddition01</a><br><br> by <a href="/bbs/?uid=53990"> UnitVector</a> <br><br><br> <a href="/bbs/?pid=149089#p"> [Click to Play]</a> </td></tr></table> </p> <p>How to use:</p> <ul> <li> <p>Click on &quot;Add Vector&quot; button, then click anywhere on the grid to set the tip of the vector.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/VA gif 1.gif" alt="" /> </li> <li> <p>To adjust vectors, click and hold on the tip and drag it around to where you want.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/VA gif 2.gif" alt="" /> </li> <li> <p>To delete vectors, right-click anywhere along their length.</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/VA gif 3.gif" alt="" /> </li> <li>To zoom, use the mouse-wheel.</li> <li>To pan the grid, click-and grab anywhere except on a vector tip and drag. <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/VA gif 4.gif" alt="" /></li> </ul> https://www.lexaloffle.com/bbs/?tid=142476 https://www.lexaloffle.com/bbs/?tid=142476 Tue, 28 May 2024 19:27:32 UTC Program runs differently in screensaver/wallpaper mode <p>I've run into an issue in a particular cart while running in screensaver/wallpaper mode. It seems to be some kind of issue with srand() but using seeds and clearing them works fine everywhere else in the program except in one place.</p> <p>Here's a gif of part of the screen with the program running normally:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/Running cart.gif" alt="" /> <p>and here's when running as a wallpaper or screensaver:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/wallpaper.gif" alt="" /> <p>You can see that the raindrops' locations and colors are not being randomized here. There are several other elements in the scene which are being randomized correctly, which is the strange part. Has anyone else run into a similar issue?</p> <p>Here's the cart, as-is. The code-snippet in question is in the rain.lua script, which is adapted from <a href="https://www.lexaloffle.com/bbs/?uid=38590"> @donswelt</a> 's <a href="https://www.lexaloffle.com/bbs/?tid=141705">Tiny Rain</a>:</p> <p> <table><tr><td> <a href="/bbs/?pid=148747#p"> <img src="/bbs/thumbs/pico64_landscape_flyby_01-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=148747#p"> landscape_flyby_01</a><br><br> by <a href="/bbs/?uid=53990"> UnitVector</a> <br><br><br> <a href="/bbs/?pid=148747#p"> [Click to Play]</a> </td></tr></table> </p> <p>You can see it also doesn't work when embedded here. But if you run the cart in Picotron, it does. &macr;_(ツ)_/&macr;</p> https://www.lexaloffle.com/bbs/?tid=142370 https://www.lexaloffle.com/bbs/?tid=142370 Mon, 20 May 2024 23:16:33 UTC Orbital v1.0 <p> <table><tr><td> <a href="/bbs/?pid=107009#p"> <img src="/bbs/thumbs/pico8_orbital_v1_0-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=107009#p"> orbital_v1_0</a><br><br> by <a href="/bbs/?uid=53990"> UnitVector</a> <br><br><br> <a href="/bbs/?pid=107009#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Orbital v1.0</h1> <h3>Story:</h3> <p>In the distant future, an AI-piloted ship arrives in a distant star cluster. Its mission: to search for signs of intelligent life. You are that AI.</p> <h3>Gameplay:</h3> <p>Navigate star systems and land on planets searching for clues to what happened to a long lost civilization. As you discover alien artifacts, you may gain abilities. Absorb special minerals on the planets to replenish your energy. No enemies or time limit, but watch your fuel levels and don't crash into a star or a planet surface (nose-to-ground collision).</p> <h3>Controls:</h3> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/Screen Shot 2022-02-15 at 11.43.09 PM.png" alt="" /> <h3>Saving:</h3> <p>This game supports saving/loading. It should work in the web version depending on your browser settings, but it definitely works if you grab the cart and run it locally. Will save automatically after the intro text is read, and after each artifact is found. You can also save through the in-game menu under &quot;options&quot; at any time. If you save in space, you will load exactly where you were, but if you save while on a planet, you will reload back in space where you were when you encountered the planet.</p> <h3>Notes:</h3> <p>Those familiar with KSP will adapt to the controls easily. Others may struggle with navigating gravity wells. For now, see the tips below. Please let me know how it feels to you, or if at any point you're unsure what to do next.</p> <h3>Size:</h3> <p>This game uses no map and almost no sprites. The entire star cluster is 65,536 x 65,536 pixels in size, so there are huge distances between stars. And the planet surfaces are about 32,768 pixels wide. Everything is generated procedurally, based on a seed chosen when you start a new game, so the star locations and planet surfaces are consistent and unique to your save game. 8192/8192 tokens used. 99.14% compressed size.</p> <h3>Tips on Orbital Mechanics (how to fly a spaceship):</h3> <ul> <li> <p>After you start, try accelerating just a little bit, then wait. Watch how your orbit is affected, and see how your speed corresponds to your orbital distance.</p> </li> <li> <p>Use the acceleration sparingly. Small bursts. Unless you are accelerating away from a star toward interstellar space.</p> </li> <li> <p>When in orbit of a star, accelerating in your direction of travel will increase your orbital distance <em>on the opposite side of your orbit</em>. Decelerating will reduce that distance.</p> </li> <li> <p>Also, increasing orbital distance slows you down, decreasing orbital distance speeds you up.</p> </li> <li> <p>Combining the above two ideas, if you are behind a planet and want to catch up, slow down a little bit. This will make you fall slightly closer to the star, making you speed up. And vice versa: if you are in front of a planet, speed up a little. It's counter-intuitive, but it works.</p> </li> <li> <p>Accelerate/decelerate at the lowest or highest points in your orbit. This is where you can achieve the greatest change in your orbits vs fuel cost.</p> </li> <li>BE PATIENT.</li> </ul> <p>Good luck!</p> <h3>Updates from last version (0.9)</h3> <ul> <li>Lore added. (Still subject to change)</li> <li>Z-menu now has &quot;Stellar Cartography&quot; at the top for faster access</li> <li>Mini-map appears as soon as you enter a gravitational well.</li> <li>Updated ending animation.</li> </ul> <h3>Bugfixes</h3> <ul> <li>4/11/22: fixed bug when crashing after running out of gas</li> </ul> https://www.lexaloffle.com/bbs/?tid=46602 https://www.lexaloffle.com/bbs/?tid=46602 Wed, 16 Feb 2022 05:43:37 UTC Orbital OST (in progress) <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/53990/orbital_1.gif" alt="" /> <p>I'm getting close to finishing up a game called Orbital. I've been working on the music lately and wanted to get some feedback on it. Tell me what you think.</p> <ol> <li> <p>Encounter<br /> <iframe src="sfxp2.php?id=53990_0" width="402" height="300" style="border:none; overflow:hidden" scrolling="no" allow="autoplay"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_53990_0"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/53990_0.txt", function (retdata){ var el = document.getElementById("sfxcode_53990_0"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_53990_0" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </p> </li> <li> <p>Artificial Intelligence<br /> <iframe src="sfxp2.php?id=53990_1" width="402" height="300" style="border:none; overflow:hidden" scrolling="no" allow="autoplay"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_53990_1"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/53990_1.txt", function (retdata){ var el = document.getElementById("sfxcode_53990_1"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_53990_1" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </p> </li> <li> <p>Occlusion<br /> <iframe src="sfxp2.php?id=53990_2" width="402" height="300" style="border:none; overflow:hidden" scrolling="no" allow="autoplay"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_53990_2"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/53990_2.txt", function (retdata){ var el = document.getElementById("sfxcode_53990_2"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_53990_2" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </p> </li> <li> <p>Collision Course<br /> <iframe src="sfxp2.php?id=53990_3" width="402" height="300" style="border:none; overflow:hidden" scrolling="no" allow="autoplay"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_53990_3"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/53990_3.txt", function (retdata){ var el = document.getElementById("sfxcode_53990_3"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_53990_3" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </p> </li> <li> <p>Extra Terrestrial<br /> <iframe src="sfxp2.php?id=53990_6" width="402" height="300" style="border:none; overflow:hidden" scrolling="no" allow="autoplay"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_53990_6"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/53990_6.txt", function (retdata){ var el = document.getElementById("sfxcode_53990_6"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_53990_6" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </p> </li> <li>Gravity Well<br /> <iframe src="sfxp2.php?id=53990_5" width="402" height="300" style="border:none; overflow:hidden" scrolling="no" allow="autoplay"></iframe><a style="cursor:pointer; font-size:8pt" onclick=' var el = document.getElementById("sfxcode_53990_5"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("/bbs/sfxc/53990_5.txt", function (retdata){ var el = document.getElementById("sfxcode_53990_5"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [sfx] </a> <textarea rows=3 class=lexinput id="sfxcode_53990_5" style="width:480px;background-color:#fed;display:none;overflow:hidden; font-size:4pt;"></textarea> </li> </ol> https://www.lexaloffle.com/bbs/?tid=46591 https://www.lexaloffle.com/bbs/?tid=46591 Tue, 15 Feb 2022 05:13:14 UTC