Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiscreen effect
#1
Hi
this is a first raw example to get multiscreen effect on the screen.

Code: (Select All)

Const Tot = 4, One = 1, Two = 2, Three = 3
Dim screens(One To Tot) As Long, Movies(One To Three) As Long
If _FileExists("QB64bee.jpeg") Then Movies(One) = _LoadImage("QB64bee.jpeg", 32)
If _FileExists("QB64.jpeg") Then Movies(Two) = _LoadImage("QB64.jpeg", 32)
If _FileExists("QB64pe.jpg") Then Movies(Three) = _LoadImage("QB64pe.jpg", 32)

screens(Tot) = _NewImage(1000, 700, 32)
Screen screens(Tot)
_Title "Multiscreen"
_ScreenMove 1, 1
For c% = 1 To 3
    _PutImage , Movies(c%), screens(Tot)
    _Delay 1
Next c%
Randomize Timer
Dim k(One To Three) As Integer, h(One To Three) As Integer
While InKey$ = ""
    Cls
    _PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
    _PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(Two), screens(Tot)
    _PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(Three), screens(Tot)
    _Delay .1
    _Display
    For c% = One To Three
        k(c%) = Int(Rnd * 4)
        h(c%) = Int(Rnd * 5)
    Next c%
Wend
_Delay .5

While InKey$ = ""
    Cls
    _PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
    _PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(One), screens(Tot)
    _PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(One), screens(Tot)
    _Delay .1
    _Display
    For c% = One To Three
        k(c%) = Int(Rnd * 4)
        h(c%) = Int(Rnd * 5)
    Next c%
Wend


End

Multiscreen in this videomusic

you can download images from google search or use those posted here.
Happy Coding!


Attached Files Image(s)
           
Reply
#2
Too shakey for me, I made a mod Smile


Attached Files
.zip   MultiPic.zip (Size: 1.42 MB / Downloads: 31)
b = b + ...
Reply
#3
(07-08-2024, 11:57 AM)bplus Wrote: Too shakey for me, I made a mod Smile

Hi Bplus
do you think too much shaking for simulating a 8mm image? The half of range can be acceptable?

Ok I find fine your STATIC mod.
Reply
#4
Actually this and your term "Movies" gave me an idea for trying a menu/sampler of a bunch or my graphics proggies shown as animations though I did do that once with a few spaceship proggies in my VS GUI stuff.

Also note: storing a .bas fies (and running them through QB64pe) takes allot less room than same amount of still shots.

I think shaking images is a great effect for certain times like when you strike my Battleship!
b = b + ...
Reply
#5
I vote for Tempo! Of course my image is a 1980 jpeg of Dolly Parton, so there's that...

Pete
Reply
#6
(07-10-2024, 06:05 PM)bplus Wrote: Actually this and your term "Movies" gave me an idea for trying a menu/sampler of a bunch or my graphics proggies shown as animations though I did do that once with a few spaceship proggies in my VS GUI stuff.

Also note: storing a .bas fies (and running them through QB64pe) takes allot less room than same amount of still shots.

I think shaking images is a great effect for certain times like when you strike my Battleship!

I wait with interest the results of your creativity with QB64pe!

(07-11-2024, 02:13 AM)Pete Wrote: I vote for Tempo! Of course my image is a 1980 jpeg of Dolly Parton, so there's that...

Pete

Yeah! You're always great and wise Pete

Dolly Parton in '80s
Reply
#7
@TempodiBasic -- Inspired by your idea here, you might want to give my go at this challenge a try: https://qb64phoenix.com/forum/forumdisplay.php?fid=29
Reply
#8
Hi friends
I'm happy of your feedbacks!

Moreover I have found a conceptual mistake in my first code posted here....
it never gains one image splitted on the multiscreen!
Here the correction of that conceptual error

Code: (Select All)

Rem the goal is to have a screen divided into 3 different panels
Rem and use them both like separated screen both like one compound screen

Const Tot = 4, One = 1, Two = 2, Three = 3
Dim screens(One To Tot) As Long, Movies(One To Three) As Long
If _FileExists("QB64bee.jpeg") Then Movies(One) = _LoadImage("QB64bee.jpeg", 32)
If _FileExists("QB64.jpeg") Then Movies(Two) = _LoadImage("QB64.jpeg", 32)
If _FileExists("QB64pe.jpg") Then Movies(Three) = _LoadImage("QB64pe.jpg", 32)

screens(Tot) = _NewImage(1000, 700, 32)
Screen screens(Tot)
_Title "Multiscreen"
_ScreenMove 1, 1
For c% = 1 To 3
    _PutImage , Movies(c%), screens(Tot)
    _Delay 1
Next c%
Randomize Timer
Dim k(One To Three) As Integer, h(One To Three) As Integer
While InKey$ = ""
    Cls
    _PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
    _PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(Two), screens(Tot)
    _PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(Three), screens(Tot)
    _Delay .1
    _Display
    For c% = One To Three
        k(c%) = Int(Rnd * 4)
        h(c%) = Int(Rnd * 5)
    Next c%
Wend
_Delay .5

While InKey$ = ""
    Cls
    _PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot), (1, 1)-(_Width(Movies(One)) / 3, _Height(Movies(One)) / 2)
    _PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(One), screens(Tot), (1, _Height(Movies(One)) / 2)-(_Width(Movies(One)) / 3, _Height(Movies(One)))
    _PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(One), screens(Tot), (_Width(Movies(One)) / 3, 1)-((_Width(Movies(One)) / 3) * 2, _Height(Movies(One)))

    _Delay .1
    _Display
    For c% = One To Three
        k(c%) = Int(Rnd * 4)
        h(c%) = Int(Rnd * 5)
    Next c%
Wend


End
please use the images that you prefer or that posted at the beginning of the thread
Reply




Users browsing this thread: 1 Guest(s)