I was thinking and wondering how one might skew 2D Space Invaders to look 3D, like
and also have photoreal stars scrolling in the background, like
simularly skewed, playing in a loop.
With the scene sometimes flying through space dust clouds, like
Just something I imagined.
The actual game play would similar to the classic game except the aliens might move in more interesting ways, like have the entire formation move around at times or have rows or columns of them move on & off screen, and let the player fire 2 or more shots.
But mainly I'm curious how you would skew the 2D to look 3D and do the 3D scrolling and moving through clouds (which could at times obscure the view)... The game itself would be programmed and behave like a 2D game though.
03-30-2024, 10:51 PM (This post was last modified: 03-30-2024, 10:53 PM by TerryRitchie.)
Well, I thought I was being smart in thinking three tirangles were needed. Use the same image in my post above. It's closer, but still wonky. (image attached below is the result)
it's just that it gets a little more complicated, the movement of the game will run in the virtual software screen and it will be copied as a hardware screen. Yeah, it's a little complicated. I tried with MapTriangle (2D) to figure out why it distorts, I couldn't figure it out.
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)
it's just that it gets a little more complicated, the movement of the game will run in the virtual software screen and it will be copied as a hardware screen. Yeah, it's a little complicated. I tried with MapTriangle (2D) to figure out why it distorts, I couldn't figure it out.
Ah ha! A 3D component is needed. Thank you for figuring this out.
New to QB64pe? Visit the QB64 tutorial to get started. QB64 Tutorial
03-31-2024, 05:08 AM (This post was last modified: 03-31-2024, 05:10 AM by madscijr.)
I can't wait to get to a PC and try these code samples!
I'm wondering how to get the 3d scrolling of the background stars toward the player (kind of like that old Atari game Sky Raider but without the curved effect). Here's a mockup of the background:
And a mockup of flying thru dust clouds:
Thanks for playing with this, and Happy Easter
(N/)
(..)
C(")(")
(03-30-2024, 11:02 PM)Petr Wrote: Really, output is not good. So then you can use hardware images, output is better.
...
it's just that it gets a little more complicated, the movement of the game will run in the virtual software screen and it will be copied as a hardware screen. Yeah, it's a little complicated. I tried with MapTriangle (2D) to figure out why it distorts, I couldn't figure it out.
That's pretty good. Thanks for sharing this solution.
(03-30-2024, 11:16 PM)Petr Wrote: 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.
Interesting. So I just need to change the scrolling direction to down, then have it use the map triangle to skew it into pseudo 3d.
I'll give it a try. . . Thanks again