Log In  

This was just a small idea I had that I wanted to see in the wild. I currently have no intention of developing it into a game.

However my tweet seems to have got a bit of attention so I thought I may as well post it here in case anyone wanted anything from it.

Up or Z to thrust, left and right to rotate.

Cart #57848 | 2018-10-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

P#57849 2018-10-12 06:06 ( Edited 2018-10-12 10:24)

That loop to draw the trail should probably use a while instead of a for, to save it having to loop over 40 stars with no trails... e.g:

local i=1
while stars[i].depth>0.5 do
 line(
  stars[i].x,
  stars[i].y,
  stars[i].x+p.dx*abs(p.force)/3*stars[i].depth,
  stars[i].y+p.dy*abs(p.force)/3*stars[i].depth,
  stars[i].col2
 )
 i=i+1
end

(as long as you're not going to add in stars at random depths)

P#57850 2018-10-12 06:24 ( Edited 2018-10-14 10:21)

Nice! I may use this for a future multicart game I have planned....

P#62858 2019-03-17 18:08

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 08:16:14 | 0.009s | Q:16