adge [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=11202 Pixeltail <p>Does anybody know what's the easiest way to add a tail to a moving pixel?<br /> A pixel is moving one px to the right but instead of just moving it there should stay a pixel in the pixels first location for a short time. Imagine a fade out.</p> <p>Is there an easy way to accomplish this? </p> https://www.lexaloffle.com/bbs/?tid=27873 https://www.lexaloffle.com/bbs/?tid=27873 Tue, 11 Oct 2016 13:06:03 UTC Simple Vortex <p>Another update, I should probably do less but I'm bad at scheduling.</p> <p> <table><tr><td> <a href="/bbs/?pid=30587#p"> <img src="/bbs/thumbs/pico31827.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=30587#p"> Vortex</a><br><br> by <a href="/bbs/?uid=11202"> adge</a> <br><br><br> <a href="/bbs/?pid=30587#p"> [Click to Play]</a> </td></tr></table> </p> <p>NEW CONTROLS:</p> <p>UP, DOWN --&gt; Rotate<br /> X,C --&gt; Zoom<br /> LEFT,RIGHT --&gt; Particle Size<br /> X&amp;Z --&gt; Effect ON/OFF</p> <p>The effect is a bit wanky because it makes Z sorting kinda useless --&gt; particles/region increases the deeper they get so they &quot;overdraw&quot; the trails of the ones that are above and more towards you.<br /> This is not my effect, I took it from<br /> <a href="https://www.lexaloffle.com/bbs/?tid=4048">NuSan's Trails example</a><br /> I hope thats ok.</p> <p>I would like to make a better effect but I'm kinda bad at stuff like that. tyroney already showed me another way which you can see here:<br /> <a href="https://www.lexaloffle.com/bbs/?tid=27873">Tyroney's pixel tail</a><br /> Sadly its a bit computation heavy, maybe I will find a way to use it.</p> <p>I made the velocity of the particles on the y axis increase the lower they get. z is coming out of the screen, x is to the right.</p> <p>I'm probably going to implement a function that lets you choose how many particles you want to use.</p> <p>Future:<br /> What I would like to do is to get away from geometry and make all this happen using physics. Gravitation wouldn't be the problem, Hydrodynamics will be :(<br /> Optimizations regarding particles/region. Draw less when there are more in one place. Maybe only draw the ones that you can actually see but this would get extremely complicated I guess.<br /> I should create a function that takes 4 different vortex states with an offset of 3 or 4 cycles between them, then draw a shape over these 4 coordinates. This way I could create a tail and could overcome some problems but it seems complicated too.</p> <p>ATTENTION!<br /> If you stare for too long, you will loose connection to the world.</p> <p>HISTORY OF VORTEX (Old stuff)<br /> Hey humans,</p> <p>this is an update for the &quot;water swirl&quot;</p> <p> <table><tr><td> <a href="/bbs/?pid=30587#p"> <img src="/bbs/thumbs/pico31769.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=30587#p"> Vortex</a><br><br> by <a href="/bbs/?uid=11202"> adge</a> <br><br><br> <a href="/bbs/?pid=30587#p"> [Click to Play]</a> </td></tr></table> </p> <p>I wanted to make it a water swirl/vortex but it ended up looking more like stars getting sucked into a black hole.<br /> It's just like a procedurally generated geometry based animation.<br /> Rotate with up, down, zoom with x,c.</p> <p>If anyone knows how I could make it look more like this or if someone got ideas/suggestions,<br /> <a href="https://vimeo.com/138751643">Water swirl simulation</a><br /> then feel free to tell me.</p> <p>I was thinking about maybe embedding the swirl into pixel art. I don't really have any use for it. </p> <p>I just like swirls. They're magic.</p> <p>Even older<br /> <table><tr><td> <a href="/bbs/?pid=30587#p"> <img src="/bbs/thumbs/pico30634.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=30587#p"> Simple Vortex 0.2</a><br><br> by <a href="/bbs/?uid=11202"> adge</a> <br><br><br> <a href="/bbs/?pid=30587#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hi there,<br /> this is the second version. Its now infinite, i guess.<br /> I added colors but I'm not to happy about how the colors are selected. It's still too strict there needs to be more fuzzyness about the color selection.<br /> Sadly the more I'm adding the more I have to drop down the number of nodes.<br /> Yellow ones are hit by sunlight...</p> <p>Controls:<br /> Up, Down: Rotate around X-Axis<br /> X, C (X, Z wtf I don't know which keyboard layout you have): Zoom</p> <p>if you zoom out a little bit you could imagine a happy tiny little vortex :]</p> <p>Still todo:<br /> Do some sorting<br /> Make it look better<br /> Maybe an tale like effect for every point. (Does anybody know how to do this?)</p> <p>Maybe fully switch to fluid dynamics, Pico8 would explode :D</p> <p>1840<br /> <table><tr><td> <a href="/bbs/?pid=30587#p"> <img src="/bbs/thumbs/pico30586.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=30587#p"> Simple Vortex 0.1</a><br><br> by <a href="/bbs/?uid=11202"> adge</a> <br><br><br> <a href="/bbs/?pid=30587#p"> [Click to Play]</a> </td></tr></table> <br /> Hey guys,</p> <p>this is just a simple project I started to make. In the end this should look like a vortex as you would expect it in water. White pixels at the top blue and darker blue ones deep down.</p> <p>It's fully 3D but you can't rotate it while it's animating. There is a variable called Vortex_Animation. Turn it to false and you can rotate this thing with the arrow keys. </p> <p>I have created a 3D surface that looks like the one you are seeing and put it in parameter form. This would let me create points with simply 2 parameters (U,V) that are random. I create around 1000 points in a for loop and save them.</p> <p>In update these points get accessed again and a new position for every point is calculated.</p> <p>Things i have to do:</p> <ol> <li>delete points when out of sight, create new ones to make it infinite</li> <li>slow down everything</li> <li>add some colors</li> <li>fix bad 3D implementation</li> </ol> <p>I could use some help with points 2 and 4. I don't now how to slow down. I would like it to get processed every second or third update call.<br /> Regarding 4, because of the surfaces geometric formula the shape is drawn laying with wrong rotation. As I'm not used to 3D stuff I don't know how this is done but as it is now I have to rotate every point in place after they were updated because the formulas for X,Y ans Z would again present the vortex at a weird angle using the parameters U and V. And because I am updating the points with the same formulas I again have to rotate them back in place, but maybe I should just stick with it.</p> <p>Best thing would be to &quot;rotate&quot; the formulas itself so you simply had to fill in U and V. No I have to rerotate everything after calculation of X,Y and Z.<br /> Or to implement a system that rotates everything once and then kinda stays there but..<br /> LITTLE DO I KNOW.</p> <p>I hope you have fun.</p> https://www.lexaloffle.com/bbs/?tid=27868 https://www.lexaloffle.com/bbs/?tid=27868 Mon, 10 Oct 2016 18:14:03 UTC Exponential function in Pico8 <p>Hey guys,</p> <p>I'm wondering if there is an exponential function? I've been trying to build my own but it doesn't quite work so I don't know what to do.</p> https://www.lexaloffle.com/bbs/?tid=27864 https://www.lexaloffle.com/bbs/?tid=27864 Mon, 10 Oct 2016 14:46:59 UTC Image Rotation <p>Hi there!</p> <p>I'm totally new here but got an idea for a small game. A guy has to stay on a wheel which would start to spin if he's not right above it's center point. So I would need to somehow implement lever rules and I would need to rotate the wheel but I really don't know how to do this.</p> <p>I already took a look at this but really don't understand the code. The first one seems a bit buggy, the second works fine but I can't find the point where the sprite is assigned to the car table.<br /> <a href="https://www.lexaloffle.com/bbs/?tid=2189">https://www.lexaloffle.com/bbs/?tid=2189</a></p> <p>so to start I would've thought of something simple like this</p> <p>function draw_wheel()<br /> spr(0,x,y,...)<br /> ------------- (get the rotated sprite and draw it)</p> <p>function _update()<br /> rotate_wheel(1) (add's one degree of rotation every frame (does not have to be 1�))</p> <p>function _draw()<br /> draw_wheel()</p> <p>So in a sentence I want a sprite that get's rotated with ever frame by a certain amount.<br /> Some tips?</p> https://www.lexaloffle.com/bbs/?tid=2592 https://www.lexaloffle.com/bbs/?tid=2592 Sat, 10 Oct 2015 11:02:29 UTC