electricgryphon [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=10844 Metablobs <p> <table><tr><td> <a href="/bbs/?pid=94379#p"> <img src="/bbs/thumbs/pico8_jaburazaga-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=94379#p"> jaburazaga</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=94379#p"> [Click to Play]</a> </td></tr></table> </p> <p>The world needs more metablobs. 'Nuff said. </p> https://www.lexaloffle.com/bbs/?tid=43648 https://www.lexaloffle.com/bbs/?tid=43648 Fri, 02 Jul 2021 23:01:08 UTC Space Station Demo <p> <table><tr><td> <a href="/bbs/?pid=94322#p"> <img src="/bbs/thumbs/pico8_space_station_demo-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=94322#p"> space_station_demo</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=94322#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's a quick demo of a 6 degree of freedom 3D engine that I have been working on.<br /> You can just explore a small space station in a Descent-like style. </p> <p><strong>Controls</strong><br /> Z: Thrust<br /> Arrow Keys: Turn<br /> X+Arrows: Roll</p> <p><strong>Notes</strong><br /> The map is stored in a <strong>long</strong> string and is generated from a Blender OBJ file. The station is as complex as I can make it before running out of compressed code space. To make something larger, I think I would have to switch to more of a 3D tile system with room building blocks that snap together.</p> <p>The engine uses a simplified portal system paired with convex sectors to determine room visibility and draw order.</p> <p><strong>Thanks</strong><br /> Thanks to Fred72 for the polyfill code. (<a href="https://www.lexaloffle.com/bbs/?tid=3393">https://www.lexaloffle.com/bbs/?tid=3393</a>)</p> https://www.lexaloffle.com/bbs/?tid=43642 https://www.lexaloffle.com/bbs/?tid=43642 Fri, 02 Jul 2021 05:53:02 UTC Stat(1) Reporting Wrong Value <p>I've found an issue in a recent cart where if I exceed CPU of 2, the reported CPU in stat(1) goes back to being less than 1. (Basically looks like stat(1) is reporting CPU%2.)</p> <img style="" border=0 src="/media/10844/space_station-11 p8_0.gif" alt="" /> <p>And here I was being excited about being able to handle 100 objects without breaking a sweat. :-D</p> <p> <table><tr><td> <a href="/bbs/?pid=92758#p"> <img src="/bbs/thumbs/pico8_diginbus-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=92758#p"> diginbus</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=92758#p"> [Click to Play]</a> </td></tr></table> </p> <p>-ElectricGryphon</p> https://www.lexaloffle.com/bbs/?tid=43108 https://www.lexaloffle.com/bbs/?tid=43108 Sat, 29 May 2021 05:00:01 UTC Sphero <p> <table><tr><td> <a href="/bbs/?pid=92323#p"> <img src="/bbs/thumbs/pico8_sphero_a1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=92323#p"> sphero_a1</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=92323#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Sphero</h1> <p>Version a1</p> <p><strong>Rescue Blocklandia from the evil clutches of Duke Cube. Find the nine golden keys to unlock the gate to the magic portal and recover the crown.</strong></p> <h3>Instructions</h3> <p>--Move the Sphero with the arrow keys<br /> --Interact with special blocks by rolling over them<br /> --Collect keys to open locked doors<br /> --Collect floating coins<br /> --Grab the crown to win the game!</p> <p>If you beat the game, please post a picture!</p> <h3>Implementation Notes</h3> <p>There are some tidbits in this cart that might be interesting/useful to other pico8 programmers. </p> <p><strong>Level Storage</strong></p> <p>8X8 rooms are stored in a compressed format within a long string contained at the end of the P8 file. Blocks are stored in a manner that is closer to a drawing format-- e.g. change current tile, place tile at location x or fill a given region with tile. These instructions are tightly bit packed and then saved a single line of hex for each room.<br /> This allowed for 117 unique rooms in the game with a reasonable level of detail before hitting the code compression limit. (15438/15616 in the end!)</p> <p>I have tool to allow for rooms to also be stored in the cart data as well, but it didn't end up being necessary. (I got tired of designing rooms before I got ran out of space.)</p> <p>I have a level editor (also made in pico8), which outputs levels to a text file, that I can share.</p> <p><strong>Sprite Packing</strong></p> <p>This game uses two sprite sheets worth of a sprites by mashing them together-- e.g. the first 2 bits code for sprite sheet one and the second 2 bits code for sprite sheet 2. I posted a demo cart of this earlier, and there are a couple of other carts on the bbs that explain this in more detail.</p> <p><strong>Physics</strong></p> <p>Collisions are handled using signed distance fields for the blocks in the local area of the ball, which make it really easy to check for where and when the sphere of the ball hits something--or multiple somethings. As a bonus, they also make it easy to find the normal at the intersection point, so bouncing type collisions are pretty straight forward.</p> <p>I can do more of a write-up for these things if folks want.</p> <p>-ElectricGryphon</p> https://www.lexaloffle.com/bbs/?tid=42987 https://www.lexaloffle.com/bbs/?tid=42987 Sat, 22 May 2021 00:57:30 UTC Image Merge Demo <p> <table><tr><td> <a href="/bbs/?pid=91562#p"> <img src="/bbs/thumbs/pico8_gasefabufe-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=91562#p"> gasefabufe</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=91562#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's a quick and dirty cart that will merge 2 PNGs into 1.<br /> Assumptions: Use black, white, with Pink for transparent.<br /> Drag first image onto cart.<br /> Drag second image onto cart.<br /> Output is saved in the sprite sheet.</p> <p>This will only work on desktop pico8.</p> <p>-ElectricGryphon</p> <img style="" border=0 src="/media/10844/17_first_col.png" alt="" /> <p>+</p> <img style="" border=0 src="/media/10844/18_second_col.png" alt="" /> <p>=</p> <img style="" border=0 src="/media/10844/merged_sprites.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=42787 https://www.lexaloffle.com/bbs/?tid=42787 Thu, 06 May 2021 06:16:29 UTC PicoVox <p> <table><tr><td> <a href="/bbs/?pid=90020#p"> <img src="/bbs/thumbs/pico8_gesadupito-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=90020#p"> gesadupito</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=90020#p"> [Click to Play]</a> </td></tr></table> </p> <h1>PicoVox</h1> <p><img style="" border=0 src="/media/10844/pico_vox-a1 p8_000.png" alt="" /> <img style="" border=0 src="/media/10844/pico_vox-59 p8_027.png" alt="" /></p> <h2>version a2</h2> <p>Old versions<div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"> <table><tr><td> <a href="/bbs/?pid=90020#p"> <img src="/bbs/thumbs/pico8_gesadupito-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=90020#p"> gesadupito</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=90020#p"> [Click to Play]</a> </td></tr></table> </div></div></div></p> <p>PicoVox is a voxel art creation program for Pico8.<br /> --Use your mouse to add, remove, and recolor blocks on an isometric grid.<br /> --Render ray-traced images and rotation animations of your pieces<br /> --Save and share your creations in the form of data PNGs<br /> --Import data PNGs from others by dragging them onto PicoVox</p> <h3>saving and import</h3> <p>Click the disk icon to save your work. A PNG will be generated that contains the voxel data for your scene. This file can be posted on the BBS or social media.</p> <p>To open a file, simply drag the image on top of the running PicoVox application window.<br /> (Saving and opening may require standalone Pico8 and not work on the BBS web-player. TBD)<br /> See example save image below:</p> <img style="" border=0 src="/media/10844/pico_vox-52 p8_008.png" alt="" /> <h3>mouse support</h3> <p>PicoVox requires a mouse to function properly, though it may work &quot;ok&quot; with a touch screen. With a mouse and the block tool selected, left mouse places blocks and the right mouse deletes them. The scroll wheel can be used to zoom in and out and clicking and holding the scroll wheel will cause the model to rotate.<br /> If you do not have a right mouse button, you can delete blocks by selecting the black color with the red slash in the color palette.</p> <h3>rendering</h3> <p>PicoVox can render images in a dithered Pico8 palette using ray-tracing. Special rendering features include transparency, reflection, glowing, as well as shadows and ambient occlusion.<br /> Click the camera tool to start a render, which will save to the desktop by default when complete. (Generally rendering takes around 10 seconds and will be interactively displayed while it progresses.)</p> <p>The loop icon will render a rotation animation as a gif to your desktop by default. Please note that this will take a long time to render all of the frames. Currently, the animation render cannot be canceled so please remember to save your work before starting.</p> <h3>new scene</h3> <p>To change the width, depth and height of the scene, click the &quot;clear scene&quot; tool. Note that this will erase your current file.</p> <h3>tools</h3> <p>block: add blocks<br /> brush: paint color<br /> cam: render<br /> floor: toggle floor<br /> disk: save<br /> bucket: fill color<br /> hand: pan<br /> loop: render animation<br /> doc: clear scene<br /> ?: info text</p> <h3>blocks</h3> <p>solid block<br /> transparent block<br /> mirror block<br /> bright block</p> <h3>colors</h3> <p>select color<br /> black is erase</p> <h3>keys</h3> <p>arrow keys rotate view<br /> z+arrow: pan<br /> shift+up/down: zoom<br /> x: quick render</p> <h3>wmouse</h3> <p>left: add block<br /> right: del block<br /> middle: rotate<br /> scroll wheel: zoom<br /> shift+middle: look at</p> https://www.lexaloffle.com/bbs/?tid=42321 https://www.lexaloffle.com/bbs/?tid=42321 Mon, 05 Apr 2021 16:46:14 UTC Slower Execution Between V0.2.2 and Prev Versions <p>I've seen a significant performance difference between the latest v0.2.2 and v0.2.1b.</p> <p>For this particular cart, it runs significantly slower on the latest version when measured with a stop watch, but when using the stat(1), the system claims the opposite--i.e. that it's faster. (These are both being run from the .exe on Windows.)</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> Version stat(1) Stopwatch Timed v0.2.1b 285 30 seconds v0.2.2 219 8 minutes, 14 seconds </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I've included the cart for reference.</p> <p>-ElectricGryphon</p> <img style="" border=0 src="/media/10844/10_render_dif_pioc8_v022_02.png" alt="" /> <p> <table><tr><td> <a href="/bbs/?pid=87830#p"> <img src="/bbs/thumbs/pico8_render_speed_dif-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=87830#p"> render_speed_dif</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=87830#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=41633 https://www.lexaloffle.com/bbs/?tid=41633 Thu, 18 Feb 2021 06:27:28 UTC PICO-RAY V1.0 <h1>PICO-RAY</h1> <p>Brought to you by the same productivity-focused team as <a href="https://www.lexaloffle.com/bbs/?tid=34765">Hypercolor Paint</a>, PICO-RAY offers state of the art 3D modeling and rendering capabilities for the Pico-8 computer system.</p> <p> <table><tr><td> <a href="/bbs/?pid=81360#p"> <img src="/bbs/thumbs/pico8_pico_ray_v1_0-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=81360#p"> pico_ray_v1_0</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=81360#p"> [Click to Play]</a> </td></tr></table> </p> <p><img style="" border=0 src="/media/10844/pico_ray-v1-0 p8_007.png" alt="" /><img style="" border=0 src="/media/10844/pico_ray-v1-0 p8_009.png" alt="" /></p> <h2>Features:</h2> <p>--Ray marched, photo-realistic 3D graphics<br /> --Soft shadows, ambient occlusion, reflection, refraction<br /> --Materials properties, including: color, gloss, reflection, refraction, patterns<br /> --Primitives including: box, sphere, torus, cone, plane, sponge, and landscape<br /> --Realtime wireframe box previews<br /> --Quick render modes for preview<br /> --2x2 anti-aliased high-quality mode</p> <h2>Instructions:</h2> <p>PICO-RAY requires the pico-mouse to operate. Click on menus and increment widgets to create and edit geometric primitives.</p> <h3>Menus:</h3> <p>-REND- Control rendering options<br /> 1x1:No skipped pixels<br /> 2x2:Render 2x2 blocks<br /> 4x4:Render 4x4 blocks (faster)<br /> QUICK: Render in fast grayscale with no shadows/materials (only 2X2 and 4X4)<br /> NORMAL: Render with shadows, materials<br /> HIGH: Render with anti-aliasing on (slowest)<br /> OUTLINE: Show bounding boxes for all objects (selected object highlighted in blue)<br /> HIDE MENUS: Hide menus for saving screenshots (click to turn menus on</p> <p>-PARAM- Create new objects and change the dimensional properties and shape of objects.<br /> [OBJECT TYPE] Type of the selected object primitive. Click left/right to change type.<br /> [Properties] Depends on the object type (e.g. height, width, depth of box)<br /> MAT: Material number (can also change form MAT menu)<br /> NEW: Click to create a new object--defaults to location 0,0,0<br /> DELETE: Delete selected object. Scene must contain one object, so last object cannot be deleted. (However it's object type can be changed.)</p> <p>-LOC- Adjust object position and orientation<br /> X:<br /> Y:<br /> Z:Click on arrow buttons to move selected object along axis. Hold down to repeat.<br /> AX:<br /> AY:<br /> AZ: Click on arrow buttons to rotate selected object about axis.</p> <p>-CAM- Control the camera location and orientation<br /> CAM X:<br /> CAM Y:<br /> CAM Z: Control the camera location<br /> CAM AX:<br /> CAM AY:<br /> CAM AZ: Control the camera angle</p> <p>-SCENE- Adjust the scene properties<br /> L AX:<br /> L AY: Direction of light source. (Infinite, directional light)<br /> SKY1 R,G,B: First sky gradiant color. RGB goes from 0 to 1 for colors<br /> SKY2 R,G,B: Second sky gradiant color.<br /> SUN RGB: Color of sun glow (seen when looking into the light source)</p> <p>-MAT- Material properties<br /> MAT: Material number of selected object. (Also, number of material currently being edited.)<br /> COL R,G,B: Base color of material.<br /> SPEC: Specularity of material.<br /> GLOSS: Glossiness of material.<br /> SHINY: Shine of material. (SPEC, GLOSS, and SHINY work together to create matte or glossy surfaces)<br /> REFL: Reflectivity (0 to 1)<br /> TRANS: Transparency of mateiral from 0 to 1 (completely transparent). This is affected by color of material. A value other than 0 will also enable refraction, which slows rendering.<br /> IOR: Index of Refractin. A value of 1.5 is approximately equal to glass. A value of 1.0 is equal to air. Refraction slows rendering.</p> <h3>Material defaults:</h3> <p>1--White<br /> 2--Red<br /> 3--Green<br /> 4--Dark Blue<br /> 5--Yellow<br /> 6--Light Blue<br /> 7--Purple<br /> 8--Orange<br /> 9--Black<br /> 10--Light Mirror<br /> 11--Dark Mirror<br /> 12--Wood Pattern<br /> 13--Black and White Tile (works best on planes)<br /> 14--Clear Glass</p> <h3>Primitives:</h3> <p>BOX: Box with Width, Height, Depth<br /> SPHERE: Sphere with Radius<br /> TORUS: Donut with R1 Major Radius and R2 Minor Radius<br /> CYLINDER: Cylinder with Radius and Height<br /> PLANE: Plane -- no properties. Note that the plane defaults to to 0,0,0 which may block the camera.<br /> SPONGE: Menger Sponge fractal<br /> TERRAIN: Mountain range</p> <img style="" border=0 src="/media/10844/7_3d_ray_edit-15 p8_003.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=39433 https://www.lexaloffle.com/bbs/?tid=39433 Sun, 30 Aug 2020 06:17:57 UTC More Postcards from the Fringe <p> <table><tr><td> <a href="/bbs/?pid=68270#p"> <img src="/bbs/thumbs/pico8_landscape_16-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=68270#p"> landscape_16</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=68270#p"> [Click to Play]</a> </td></tr></table> <br /> Old Version<br /> <div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> <table><tr><td> <a href="/bbs/?pid=68270#p"> <img src="/bbs/thumbs/pico8_landscape_07-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=68270#p"> landscape_07</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=68270#p"> [Click to Play]</a> </td></tr></table> <br /> </div></div></div></p> <p>Explore alien lands with a high-color world generator.</p> <p><a href="https://www.lexaloffle.com/bbs/files/10844/landscape-16_011.png" target=_view_image><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/landscape-16_011.png" width=160 height=160 alt="" /></a><a href="https://www.lexaloffle.com/bbs/files/10844/landscape-16_008.png" target=_view_image><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/landscape-16_008.png" width=160 height=160 alt="" /></a></p> <p>This is a new take on Postcards From the Fringe, which I made a few years ago. <a href="https://www.lexaloffle.com/bbs/?tid=28026">https://www.lexaloffle.com/bbs/?tid=28026</a></p> <p>Press &quot;z&quot; to visit a new, random planet.</p> <p>Features:<br /> --High-color flicker dither technology with 4,096 indexed colors/patterns [Warning flashing lights]<br /> --Endless bicubic noise mountains<br /> --Mountain shape variations: islands, hills, spires, etc.<br /> --Alien sunset sky with clouds<br /> --Water with ripples and sky reflection<br /> --Preview render in standard (non flicker) mode<br /> --Anti-aliased image composing with alpha channel</p> <p>To do:<br /> --Ability to save / share worlds<br /> --Controls to tweak variables</p> <p>Technical:<br /> This is a voxel landscape engine, actually adapted from Pico Kart but with height added. The system is not very optimized for speed right now... definitely room to make it a lot faster even if not real-time.<br /> Color handling is taken from my Hypercolor Paint cart. The palettes of colors and patterns are loaded from cart memory and generated by another cart that takes ages to run.</p> <p>-Electric Gryphon</p> https://www.lexaloffle.com/bbs/?tid=35481 https://www.lexaloffle.com/bbs/?tid=35481 Mon, 30 Sep 2019 05:26:39 UTC hypercolor_paint <p> <table><tr><td> <a href="/bbs/?pid=65915#p"> <img src="/bbs/thumbs/pico8_hypercolor_paint-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=65915#p"> hypercolor_paint</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=65915#p"> [Click to Play]</a> </td></tr></table> </p> <p>Introducing Hypercolor Paint, a high-color painting application for the PICO-8.</p> <p>Features:<br /> Paint in either high color mode (flicker) or standard (dithered) mode.<br /> While editing, pixels are treated as 56,535 level 3-channel color.<br /> Use a variety of brushes, with control of color, size and pressure to achieve desired effects.<br /> Save images (requires download)<br /> Export images (requires download)</p> <p>Example Images: (High color mode is simulated)<br /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/tiger_blended-01.png" alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/hypercolor_paint-14_bunny_blend.png" alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/hypercolor_paint-14_face_blend.png" alt="" /><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/palette_blended-01.png" alt="" /></p> <p>&lt;b&gt;Keyboard:&lt;/b&gt;<br /> Z: Switch between paint mode and palette mode<br /> Tab: Switch between high color and standard color mode<br /> Mouse: Paint with left mouse button</p> <p>&lt;b&gt;Palette Screen:&lt;/b&gt;<br /> ?: Show splash screen<br /> Color: Switch between paint mode and palette mode<br /> Save: Save image locally to hyper_color_save.p8 (image will be cropped)<br /> Load: Load image locally from hyper_color_save.p8<br /> Export: Export image to hyper_color_export.p8<br /> For standard color images, the sprite sheet will capture the full image.<br /> For high color images, data is stored in sprite sheet as well as map and sound effect locations.</p> <p>In order to view images, paste the following code into hyper_color_export.p8:<br /> &lt;code&gt;<br /> k_display_adr=0x6000<br /> k_screen_1_adr=0x0000<br /> k_screen_2_adr=0x2000<br /> k_screen_len=0x2000<br /> cur_frame=0</p> <p>function _update60()<br /> end<br /> function _draw()<br /> cur_frame+=1<br /> if(cur_frame%2==0)then<br /> memcpy(k_display_adr,k_screen_1_adr,k_screen_len)<br /> else<br /> memcpy(k_display_adr,k_screen_2_adr,k_screen_len)<br /> end<br /> end<br /> &lt;/code&gt;</p> <p>Technical notes:<br /> Two different 16X16X16 color look up tables are used to achieve responsive paint effects with dithering at 60 fps. In order to avoid a massive slow down (it takes a number of minutes to build the color cube) the look up table is generated by a different cart and loaded into sprite, map and sound memory.</p> <p>Example exported cart:<br /> <table><tr><td> <a href="/bbs/?pid=65915#p"> <img src="/bbs/thumbs/pico8_bunny-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=65915#p"> bunny</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=65915#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=34765 https://www.lexaloffle.com/bbs/?tid=34765 Thu, 18 Jul 2019 06:08:27 UTC flyover_toy <p> <table><tr><td> <a href="/bbs/?pid=64881#p"> <img src="/bbs/thumbs/pico8_flyover_toy-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=64881#p"> flyover_toy</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=64881#p"> [Click to Play]</a> </td></tr></table> </p> <p>Been playing with cubic smoothing of simple noise for endless landscape generation.<br /> It's definitely slower than lerping, but I think it creates more realistic looking shapes. In order to get a nice interactive frame rate, I had to rely on scrolling the screen and just updating the top portion. It kinda works although the textures smear vertically.</p> <p>Press &quot;z&quot; to randomize parameters.</p> <p>-Electric Gryphon</p> https://www.lexaloffle.com/bbs/?tid=34382 https://www.lexaloffle.com/bbs/?tid=34382 Fri, 31 May 2019 04:43:44 UTC Pico Image Morph 2000 <p> <table><tr><td> <a href="/bbs/?pid=62193#p"> <img src="/bbs/thumbs/pico8_image_morph_a-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=62193#p"> image_morph_a</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=62193#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Pico Image Morph 2000</h2> <p>Use your personal Pico-8 computer to create professional-quality image morphing effects as seen in blockbusters such as &quot;Willow&quot; and &quot;Terminator 2&quot;. Use the power of Pico Image Moprh 2000 to seamlessly transform one person into another or even change a cat into a dog!</p> <p>Pico Image Morph 2000 can even be used to create wacky deformations! The possibilities are endless!</p> <h3>Instructions:</h3> <p>Pico Image Morph 2000 requires the use of the Pico Mouse Accessory.<br /> While in &quot;Position Mode&quot;, locate deform points along critical portions of the image, such as centers of eyes or the edges of lips.<br /> Switch to &quot;Deform Mode&quot; to drag deform points to new locations.<br /> Use the &quot;Onion Skin&quot; button to switch between viewing the Start Image, Target Image, or a blended overlay of both.<br /> Click the &quot;Animate&quot; button to loop the animation<br /> The system include 5 different image to morph between.</p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/image_morph-09_005.png" alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/image_morph-09_003.png" alt="" /></p> <p><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/image_morph-09_2.gif" alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/monro_anim2.gif" alt="" /></p> <h3>Technical notes:</h3> <p>Morphing is done by using affine triangle transformations, and blending control point and texture coordinate positions for a source and a destination image and then compositing them together. This is a naive way to morph images, but at this resolution it actually works pretty well.<br /> Images are store in strings within the code--they are simply 64X64 16 level grayscale images. I can share the python script if anyone wants it.</p> <p><a href="https://en.wikipedia.org/wiki/Morphing">https://en.wikipedia.org/wiki/Morphing</a></p> <p>Totally worth watching is the demo real for Elastic Reality from the early 90's. <a href="https://www.youtube.com/watch?v=AD5R7dJM4eU">https://www.youtube.com/watch?v=AD5R7dJM4eU</a></p> <p>--Electric Gryphon</p> https://www.lexaloffle.com/bbs/?tid=33366 https://www.lexaloffle.com/bbs/?tid=33366 Sun, 24 Feb 2019 02:23:28 UTC Vox Mine 3D <p> <table><tr><td> <a href="/bbs/?pid=60809#p"> <img src="/bbs/thumbs/pico8_vox_mine_28-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=60809#p"> vox_mine_28</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=60809#p"> [Click to Play]</a> </td></tr></table> </p> <p>Mine your way to fame and fortune in a continuously generated 3D voxel world. But keep an eye on your energy level and make sure you can find your way back through the deep and twisted caves.</p> <p><a href="https://www.lexaloffle.com/bbs/files/10844/voxel-22_007.png" target=_view_image><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/voxel-22_007.png" width=160 height=160 alt="" /></a><a href="https://www.lexaloffle.com/bbs/files/10844/voxel-22_005.png" target=_view_image><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/voxel-22_005.png" width=160 height=160 alt="" /></a></p> <p>Build block fortresses with a variety of materials.<br /> <a href="https://www.lexaloffle.com/bbs/files/10844/voxel-22_004.png" target=_view_image><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/voxel-22_004.png" width=160 height=160 alt="" /></a></p> <p>Use the Far-View 3D Map and GPS to stay safe.<br /> <a href="https://www.lexaloffle.com/bbs/files/10844/voxel-22_002.png" target=_view_image><img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/voxel-22_002.png" width=160 height=160 alt="" /></a></p> <p><strong>Instructions:</strong><br /> s,f: turn left and right<br /> e,d: move forward and backwards<br /> lshift or z: jump (hold to jump higher if upgraded)</p> <p>The mouse is required for mining and building.<br /> Click on shop computer to enter store menu. Ore and gems will auto-sell.</p> <p>With laser selected, click and hold on a block to mine it. Circular progress bar will indicate how long is left. Precious ores will take longer to mine.</p> <p>With a placeable block selected, click on the side of an existing block to place a new block.</p> <p>Energy will deplete when moving, jumping or mining. The battery can be recharged by standing on the glowing yellow charge squares near the shop. When your energy goes to zero, you will lose most of your money and be teleported back to the starting point. </p> <p><strong>Recommendations:</strong></p> <ul> <li>The GPS or Far View are good investments early on because it's easy to get lost.</li> <li>Be very careful about falling into caves. They may go very deep and getting back home before energy runs out could prove a challenge.</li> </ul> <p><strong>Notes:</strong><br /> This game uses a modified ray-casting engine based on tutorials from (<a href="https://lodev.org/cgtutor/raycasting.html">https://lodev.org/cgtutor/raycasting.html</a>). This was extended to work with voxels, reading in a local 3-dimensional map array.</p> <p>The map is generated dynamically as the player moves around. However, it is set up such that the same block will always exist at the same x,y,z coordinates. In addition, there is a user map that is used to store the locations of blocks that the user added or removed. These are essentially stored in a sparse matrix.</p> <p>There is currently no way to save your constructions. It might be possible to save some aspects of the world with the persistent cart data, but I don't know that 256 bytes will be sufficient. Clipboard import and export might be a better way to allow folks to share creations.</p> <p>The code is a dog's breakfast. Token count wasn't really a problem for me on this one, but it was a struggle to keep frame rate acceptable with the world rendering code. I'd love to be able to increase the view depth without dropping to 15 FPS.</p> <p>-electricgryphon</p> https://www.lexaloffle.com/bbs/?tid=32894 https://www.lexaloffle.com/bbs/?tid=32894 Mon, 14 Jan 2019 06:52:53 UTC Wandering Through the Star Mush <p> <table><tr><td> <a href="/bbs/?pid=60037#p"> <img src="/bbs/thumbs/pico8_bw_scroll1-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=60037#p"> bw_scroll1</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=60037#p"> [Click to Play]</a> </td></tr></table> <br /> Take a stroll through the swirly bits of my imagination.</p> <p>Technical details:<br /> --Image size: 1536X128, 2 bit<br /> --Scanned from a drawing and imported into Pico8.<br /> --Utilizes RLE encoding as well as storage in both strings and sprite page</p> <p>-electricgryphon</p> https://www.lexaloffle.com/bbs/?tid=32583 https://www.lexaloffle.com/bbs/?tid=32583 Sun, 16 Dec 2018 23:49:25 UTC Pico Ray Trace <p> <table><tr><td> <a href="/bbs/?pid=59480#p"> <img src="/bbs/thumbs/pico8_hituditeku-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=59480#p"> hituditeku</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=59480#p"> [Click to Play]</a> </td></tr></table> </p> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> <table><tr><td> <a href="/bbs/?pid=59480#p"> <img src="/bbs/thumbs/pico8_yonipakifi-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=59480#p"> yonipakifi</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=59480#p"> [Click to Play]</a> </td></tr></table> <br /> </div></div></div></p> <p>Here's a Pico-8 ray tracer with the amazing ability to render both spheres AND planes.</p> <p>Let it run all the way through even though the colors will be funky at first. After it renders the image, it will switch to high-color mode.</p> <p>Features:<br /> -NEW High Color Mode<br /> -Spheres<br /> -Planes<br /> -Textures (2d)<br /> -Diffuse and Specular Shading<br /> -Shadows<br /> -Reflections</p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/sphere_trace-05_005.png" alt="" /> <p>-ElectricGryphon</p> https://www.lexaloffle.com/bbs/?tid=32380 https://www.lexaloffle.com/bbs/?tid=32380 Fri, 30 Nov 2018 05:24:14 UTC twist-star <p> <table><tr><td> <a href="/bbs/?pid=57732#p"> <img src="/bbs/thumbs/pico57730.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=57732#p"> twist-star</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=57732#p"> [Click to Play]</a> </td></tr></table> <br /> These things always get stuck in my socks when I go hiking.</p> <p>I've been playing with a z-buffer 3D rendering implementation, which lends itself to recursive additive fractal structures.</p> <p>My ultimate plan was a static landscape renderer, but this was an interesting (if sluggish) detour.</p> <p>-Electric Gryphon</p> https://www.lexaloffle.com/bbs/?tid=32041 https://www.lexaloffle.com/bbs/?tid=32041 Tue, 09 Oct 2018 02:09:37 UTC Comanche 1/2 <p> <table><tr><td> <a href="/bbs/?pid=52441#p"> <img src="/bbs/thumbs/pico52504.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=52441#p"> Comanche 1/2 02</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=52441#p"> [Click to Play]</a> </td></tr></table> </p> <p>Old Version<br /> <div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"> <table><tr><td> <a href="/bbs/?pid=52441#p"> <img src="/bbs/thumbs/pico52440.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=52441#p"> Comanche 1/2 01</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=52441#p"> [Click to Play]</a> </td></tr></table> </div></div></div></p> <p>Pilot your state-of-the-art RAH-66 Comanche helicopter over once-peaceful tropical shores. Take on an endless barrage of enemies and leave their wreckage littering the voxel landscape.</p> <p>The engine and overall game is inspired by the Comanche series from NovaLogic.<br /> <a href="https://en.wikipedia.org/wiki/Comanche_(video_game_series">https://en.wikipedia.org/wiki/Comanche_(video_game_series</a>)</p> <p>Features:<br /> --Voxel landscape engine (as seen in Tera Firma tech demo)<br /> --Shaded 3D polygon enemies<br /> --Seamless map<br /> --Awful self-made music and sound effects</p> <p>Controls:<br /> z: Fire Missiles<br /> x: Fire Mini Gun<br /> tab: Enable Mouse Control (left button fires gun)</p> <p>-ElectricGryphon</p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/10844/comanche_1-2_02_008.png" width=384 height=384 alt="" /> https://www.lexaloffle.com/bbs/?tid=31244 https://www.lexaloffle.com/bbs/?tid=31244 Sun, 06 May 2018 02:51:30 UTC Terra Firma Flight Sim <p> <table><tr><td> <a href="/bbs/?pid=51645#p"> <img src="/bbs/thumbs/pico51644.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=51645#p"> Terra Firma Flight Sim</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=51645#p"> [Click to Play]</a> </td></tr></table> </p> <p>Here's a landscape / flight simulation engine that I have been playing with. I'm still figuring out how to turn this into a game, but at least it's functional now and runs at 30 fps. </p> <p>It takes a few seconds to generate the map using simplex noise mapped onto a sphere. </p> <p>Controls:<br /> Arrow keys to turn and pitch up and down.<br /> Z-key to accelerate</p> <p>Notes:<br /> There's a 3D shaded polygon engine built into this as well, but I'm not using it yet.</p> <p>Thanks Anthony DiGirolamo for the simplex noise:<br /> --<a href="https://www.lexaloffle.com/bbs/?pid=32443">https://www.lexaloffle.com/bbs/?pid=32443</a></p> <p>--ElectricGryphon</p> https://www.lexaloffle.com/bbs/?tid=31131 https://www.lexaloffle.com/bbs/?tid=31131 Sun, 15 Apr 2018 17:32:59 UTC Text Torus <p> <table><tr><td> <a href="/bbs/?pid=46524#p"> <img src="/bbs/thumbs/pico46523.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=46524#p"> Text Torus</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=46524#p"> [Click to Play]</a> </td></tr></table> </p> <p>Playing around for the text jam using Signed Distance Functions. It's not really fast enough for anything other than a proof of concept for textifying grayscale images.</p> <p>-Electric Gryphon</p> https://www.lexaloffle.com/bbs/?tid=30292 https://www.lexaloffle.com/bbs/?tid=30292 Mon, 20 Nov 2017 16:28:11 UTC JPEG Trial <p> <table><tr><td> <a href="/bbs/?pid=44776#p"> <img src="/bbs/thumbs/pico44775.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=44776#p"> JPEG Trial</a><br><br> by <a href="/bbs/?uid=10844"> electricgryphon</a> <br><br><br> <a href="/bbs/?pid=44776#p"> [Click to Play]</a> </td></tr></table> </p> <p>I've become unhealthily interested in image compression on Pico8.</p> <p>Hit the &quot;z&quot; key to see the next image.</p> <p>What we have here is something that might resemble the JPEG compression scheme if you squint.<br /> Compression goes like this:<br /> --Discrete Cosine Transform + Quantatization<br /> --Zigzag encoding of blocks<br /> --Huffman encoding<br /> --Run Length Encoding<br /> --Conversion to a base 64 character set<br /> --Overall compresses to around 1/5 of original 8-bit grayscale size.</p> <p>What didn't work well:<br /> Image quality is kinda low. There are only about 16 levels of gray that are discernible on pico8 with dithering. Not sure that it makes a lot of sense to encode 256 shades of gray in that case. Not to mention that the image quality at 64x64 is pretty lame to begin with.</p> <p>This path may be a dead-end because I can only get about 12 64X64 images in here before hitting compressed code limit. If I drop the base 64 coding, I could fit maybe 10 images into the sprite area... Because Pico8 compresses data as well (definitely with better algorithms), my compression may be working at cross purposes to Zep's compression. I still need to do an experiment to see whether the base 64 encoding is any better than the base 16 coding.</p> <p>I've got some glitching in the bottom right blocks.</p> <p>Here's the compression script: <a href="https://github.com/electricgryphon/pico_8_jpg">https://github.com/electricgryphon/pico_8_jpg</a></p> <p>Perhaps this will inspire someone to greater image compression heights :-D.</p> <p>-Electric Gryphon</p> https://www.lexaloffle.com/bbs/?tid=30013 https://www.lexaloffle.com/bbs/?tid=30013 Sat, 30 Sep 2017 14:36:26 UTC