@phaelax, i miss MouseMoveX/Y() which we have in DBPro, too
@syndu, i've fixed the typo in the thread title ("shacking" to "shaking") so search will include this discussion while offering this cheap zoom effect:
// Project: Hey You!
// Created: 2022-02-27
// By: Virtual Nomad
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Hey You!" )
SetWindowSize( 1280,720, 0 )
SetWindowAllowResize( 1 )
// set display properties
SetVirtualResolution( 640,360)
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
GLOBAL MyTiles as Integer []
for x = 1 to 5
for y = 1 to 5
ThisTile = CreateSprite(0) : SetSpriteSize(ThisTile,60,60)
SetSpriteColor(ThisTile, Random(128,255),Random(128,255),Random(128,255),255)
SetSpritePositionByOffset(ThisTile,100 + x*64,y*64)
SetSpriteDepth(ThisTile,100)
MyTiles.Insert(ThisTile)
next y
next x
Type Zoom
SpriteID, Toggle
EndType
GLOBAL MyZooms as Zoom []
do
If GetRawKeyState(27) then End
If LastZoom# + 0.5 <= Timer()
Repeat
ThisSprite = MyTiles[ Random(0, MyTiles.Length) ]
Until MyZooms.Find(ThisSprite) = -1
AddZoom( ThisSprite )
LastZoom# = Timer()
EndIf
If MyZooms.Length > -1 then Zoom()
Sync()
loop
Function AddZoom(ThisSprite)
ThisZoom as Zoom
ThisZoom.SpriteID = ThisSprite
ThisZoom.Toggle = 1
MyZooms.InsertSorted(ThisZoom)
SetSpriteDepth(ThisSprite,50)
EndFunction
Function Zoom()
For x = MyZooms.Length to 0 Step -1
ThisSprite = MyZooms[x].SpriteID
ThisToggle = MyZooms[x].Toggle
ThisScale# = GetSpriteScaleX(ThisSprite) + (ThisToggle/75.0) //change denominator to affect zoom rate
If ThisToggle > 0 and ThisScale# => 1.2 then MyZooms[x].Toggle = -1
If ThisToggle = -1 and ThisScale# <= 1.0
MyZooms.Remove(x)
ThisScale# = 1.0
SetSpriteDepth(ThisSprite,100)
EndIf
SetSpriteScaleByOffset(ThisSprite, ThisScale#, ThisScale#)
Next x
EndFunction
i'm doing something similar in
this ear-buster.