Buenas, les traigo un pequeño aporte para los que se quieran iniciar en la programación de juegos en VBScript... :P (joda)
bueno, hablando en serio un efecto muy bueno para mover objetos y que se vea un poco mas "real" la ""camara"".
Movimiento sin efecto blur:
2oPHSuGpbDU
Movimiento con efecto blur:
CSF4Bfsom-A
Esto se puede abrir desde iexplorer online online pero descubri que rinde mucho pero mucho mas un HTA por eso el codigo es todo uno y es .hta:
<html>
<head>
<title>Motion Blur VBScript Canvas HTML5</title>
<meta http-equiv="X-UA-Compatible" content="IE=10">
<script language="vbscript">
Option Explicit
Dim img,i,PosY
Dim Tiempo
Dim DirectY
DirectY = 10
PosY = cint(50)
window.resizeTo 800 , 600
Sub Main()
Dim canvas
Set canvas = document.getElementById("Canvas")
Dim ctx
Set ctx = canvas.getContext("2d")
set img = document.getElementById("arbol")
ctx.clearRect 0, 0,800,600
ctx.drawImage img,50,PosY
ctx.globalAlpha = 5
for i=0 to 10
if DirectY < 0 then
ctx.drawImage img,50,PosY + i
else
ctx.drawImage img,50,PosY - i
end if
ctx.globalAlpha = 0.1
next
PosY = PosY + DirectY
ctx.fillStyle = "#FFFFFF"
ctx.font = "bold 30px sans-serif"
ctx.fillText "PosY = " & PosY,500,400
if PosY > 520 Then DirectY = cint(-10) end if
if PosY < 0 Then DirectY = cint(10) end if
Tiempo = SetTimeOut("Main()",25)
ctx.stroke
End Sub
</script>
</head>
<body onload="Main()" bgcolor="black">
<img id="arbol" width="0" height="0" src="0.png">
<canvas id="Canvas" width="800" height="600"></canvas>
</body>
</html>
eso es todo. saludos
Nuevo video donde se aprecia mejor el efecto:
CKegeNyR8sU