Submitted by johnno56 on

I am converting some of my simpler sdlbasic programs to SB. This program, goldwave, you have probably seen before. Once you run it you will probably wish you didn't... lol

Anyway. It runs as slow as a politician's thought process... I have placed 'showpage' in various locations with limited success. The speed of this program is SO slow. I would appreciate it if someone can give it a 'once over' and tell me if I have done something wrong?

Much appreciated.

J

dark1 = rgb(0,0,32)

dark2 = rgb(0,32,0)

dark3 = rgb(32,0,0)

```
```

`for t=1 to 60 step .3`

rect 0,0,600,600 color dark3 filled

For y1 = 0 to 24

For x1 = 0 to 24

x=(12*(24-x1))+(12*y1)

y=(-6*(24-x1))+(6*y1)+300

d= ((10-x1)^2+(10-y1)^2)^.5

h=60*sin(x1/4+t)+65

if t>10 and t<20 then h=60*sin(y1/4+t)+65

if t>20 and t<30 then h=60*sin((x1-y1)/4+t)+65

if t>30 and t<40 then h=30*sin(x1/2+t)+30*sin(y1/2+t)+65

if t>40 and t<50 then h=60*sin((x1+y1)/4+t)+65

if t>50 and t<60 then h=60*sin(d*.3+t)+65

' TOP

p1 = [x,y-h,x+10,y+5-h,x+20,y-h,x+10,y-5-h]

drawpoly p1 color rgb(100+h,100+h,h) filled

' FRONT-LEFT

p2 = [x,y-h,x+10,y+5-h,x+10,y,x,y-5]

drawpoly p2 color rgb(60,60,0) filled

' FRONT-RIGHT

p3 = [x+10,y+5-h,x+10,y,x+20,y-5,x+20,y-h]

drawpoly p3 color rgb(150,150,0) filled

if inkey$ = chr$(27) then end

next

next

next

- Log in to post comments

MGA replied on Permalink

## Oh so cool!

Tried to make colors more gold also.

To exit any running SmallBASIC program, just right click your mouse and click "back" on the pop-up menu.

Right clicking the mouse are your keys to the IDE Kingdom in SB!

johnno56 replied on Permalink

## Brilliant!!! Looks like I've

Brilliant!!! Looks like I've learned something new. Let's hope I can remember it... lol

Many thanks!!

J

chrisws replied on Permalink

## wow

Looks fantastic!

Btw, something I'd like to add to SB is a profiler:

https://en.wikipedia.org/wiki/Profiling_(computer_programming)

This would show which lines are taking the most time to run.

MGA replied on Permalink

## Use INKEY like this

MGA replied on Permalink

## Another way to catch esc