Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D-ized 2D, a sort of challenge or a how to question...
#7
To the question above - motion of the stars - here is the solution in the form of a hardware image - it shows how to get the motion into the hardware image.

Code: (Select All)

Dim Image As Long
Image = _NewImage(640, 480, 32)
_Dest Image
Cls
For s = 1 To 100
    PSet (Rnd * 640, Rnd * 480)
Next

Virtual = _NewImage(640, 480, 32)

Screen _NewImage(640, 480, 32)

Do Until _KeyHit = 27
    xs = xs + 1
    If xs > 639 Then xs = 0
    _PutImage (xs, 0), Image, Virtual, (0, 0)-(639, 479)
    _PutImage (-639 + xs, 0), Image, Virtual, (0, 0)-(639, 479)

    ih& = _CopyImage(Virtual, 33)

    _MapTriangle (0, 0)-(0, 479)-(639, 479), ih& To(-2, 2, -3)-(-2, -2, -1)-(2, -2, -1), 0
    _MapTriangle (0, 0)-(639, 479)-(639, 0), ih& To(-2, 2, -3)-(2, -2, -1)-(2, 2, -3), 0
    _Display

    _FreeImage ih&

    _Limit 20
Loop


Reply


Messages In This Thread
RE: 3D-ized 2D, a sort of challenge or a how to question... - by Petr - 03-30-2024, 11:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  a question about OpenGL in QB64pe: TempodiBasic 11 1,862 11-22-2025, 05:47 PM
Last Post: TempodiBasic
  Question about load pictures Jim_001 4 555 10-22-2025, 06:19 AM
Last Post: Unseen Machine
  Test to post a new Thread + question 32 or 64 bit Rudy M 2 556 09-09-2025, 04:10 PM
Last Post: Rudy M
  personal coding challenge results James D Jarvis 4 641 06-20-2025, 03:20 PM
Last Post: James D Jarvis
  Quick Question (I hope) bplus 3 738 02-26-2025, 01:14 AM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)