Page 1 of 1

[Scripts] Scripting advanced stuff and great effects

Posted: 12 Jun 2020, 0:37
by HugoMDM
Hi, It has been a long time since I have published here, the things that I have programmed with tea script have not been uploaded to this forum, so I will post and show here what I have done, many things are advanced and sometimes they try to exceed the limits of the engine , so I want to show them to you.
Some downloads on the Atachments.
Image
Raycasting
Spoiler
I'm still do not fix the fisheye effect (circular walls)
Edit: already fixed, thanks to Nested Ernest
Image
Image
Image

Draw a vector
Spoiler

Code: Select all

'PARAMETERS ( BITMAP ID, X1, Y1, X2, Y2 )
script vector(vecid as integer,xx1 as double, yy1 as double, xx2 as double, yy2 as double)
call BmpCreate(vecid , 18, 1, 1, 60, 60, 1, 1, 0, 0, 1, 1, 0, 0, 0, -1)
call FXCreate(12 ,sysval(player1scrx)+xx1 ,sysval(player1scry)+yy1 ,0 ,0 ,1 ,1 ,0 ,1 ,0 )
call FXCreate(12 ,sysval(player1scrx)+xx2 ,sysval(player1scry)+yy2 ,0 ,0 ,1 ,1 ,0 ,1 ,0 )
bitmap(vecid).destx = xx1 '+ bitmap(40).scalex
bitmap(vecid).desty = yy1
bitmap(vecid).scalex = abs(distance2(xx1,yy1,xx2,yy2))
bitmap(vecid).scaley = 2
bitmap(vecid).rotatang =(angle( (xx2-xx1) , (yy2-yy1) )*-1) + (1.5708*0)
end script
'angle and distance scripts by MrYosho
script angle(width as double, height as double, return double)
 return 2*pi*getangle(param(width), param(height))
end script
script distance2(Xone as double, Yone as double, Xtwo as double, Ytwo as double, return double)
  return sqr((param(Xone) - param(Xtwo))^2 + (param(Yone) - param(Ytwo))^2)
end script

Yoshi's Island lava waves
Spoiler
Image

Pendulum
Spoiler
Image
Image
Image

Pixel Drawing and manipulation (this should be better if we can draw pixels on screen)
Made by Nested Ernest
Spoiler
The file name is Deforma.rar
Image
Image
Image
Image

I made this version before the nested one (the idea was draw pixels on screen without lag)
Spoiler

Code: Select all

dim w as integer = 800
dim h as integer = 600
' i = y pixel and j = x pixel
dim i as integer
dim j as integer
dim id as integer
dim div as integer = 8
for i = 0 to (h/div)
for j = 0 to (w/div)
id+=1
call BmpCreate(id, 37, 1, 1, 5, 5, 2, 2, j*div, i*div, (1*(div/2)), (1*(div/2)), 0, 0, 0, -1)
bitmap(id).zpos = 0.9
next
next
do
id=0
for i = 0 to (h/div)
for j = 0 to (w/div)
id+=1
bitmap(id).color = rgba(-cos(i*rnd)*rnd,-sin(i*rnd)*rnd,-cos(i*rnd)*rnd,255)
next
next
call sleep(1)
loop

Mode 7 image deformation with horizontal bitmaps
Spoiler
Image

Easy Parallax Script
Spoiler
Image

3D Tower Effect
Spoiler
Image

3D Tunnel Effect
Spoiler
Image

All of this was a hard work, i hope you can learn good things with this.

Thanks to:
-Nested Ernest
-Seta Yoshi
-Monad