Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wireframe animation
#1
Code: (Select All)
Screen _NewImage(1920, 1080, 256): centerX = 1920 / 2: horizonY = 520
Const roadWidth = 1920: Const maxZ = 50: Type LinePoint: z As Single: y As Single: End Type
Dim lines(maxZ) As LinePoint: For i = 0 To maxZ: lines(i).z = i + .1: Next
Do: Cls: For i = 0 To maxZ: z = lines(i).z: scale = 1024 / z: y = horizonY + scale
        Line (centerX - roadWidth * scale / 2, y + 1)-(centerX + roadWidth * scale / 2, y + 1), 11
        Line (centerX - roadWidth * scale / 2, y)-(centerX + roadWidth * scale / 2, y), 3
        Line (centerX - roadWidth * scale / 2, horizonY - (y - horizonY) + 40)-(centerX + roadWidth * scale / 2, horizonY - (y - horizonY) + 40), 5
        lines(i).z = lines(i).z - 0.1: If lines(i).z < 1 Then lines(i).z = maxZ
        Next: For x = -90 + r To 90 + r: px = x / 10! * roadWidth / 640
        x1 = centerX + px * (1080 / 1): y1 = horizonY + (1080 / 1): x2 = centerX + px * (1080 / maxZ): y2 = horizonY + (1080 / maxZ)
        Line (x1, y1 + 1)-(x2, y2 + 1), 15: Line (x1, y1)-(x2, y2), 11
Line (0, 1)-(1919, 1079), 11, B: Next: _Display: _Delay 0.016: Loop


[Image: Screenshot-2025-08-09-162919.png]
Reply
#2
I can see a TRON game in the works!

Nice

Unseen
Reply
#3
(08-10-2025, 04:55 PM)Unseen Machine Wrote: I can see a TRON game in the works!

Nice

Unseen
Thanks. I turned it into a car game, but it sucks, haha.
Reply
#4
Nothing good comes easy! Keep trying and I'm sure it'll be worthwhile.

My only notes are your code is not very readable, has ZERO comments and you seem to be using scale / 2 a lot, consider using a Half_Scale value or some instead to avoid the repeated math operations.

On a side note, never think your code sucks. it might not be as other would do it, as you wanted it or not as efficient as it could be but YOU made it! Be proud and keep attacking it!

Unseen
Reply
#5
@SquirrellMonkey
Cool
it is at the basis of Blaster Arcade!
take a look here blaster arcade expecially at 1.46 in Robot grid
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pringle-like Shape Animation SierraKen 0 467 05-24-2025, 12:38 AM
Last Post: SierraKen
  color wheel animation / screensaver madscijr 3 1,031 04-20-2025, 07:20 PM
Last Post: madscijr
  Planetary System Animation James D Jarvis 11 2,289 10-13-2022, 07:33 PM
Last Post: SierraKen
  DNA Animation SierraKen 26 4,610 08-02-2022, 09:53 PM
Last Post: OldMoses

Forum Jump:


Users browsing this thread: 1 Guest(s)