Recent Posts

Pages: [1] 2 3 4 5 6 7 8 ... 10
1
Projects / Mystify Your Mind Tribute
« Last post by Pixel_Outlaw on August 08, 2026 »
Just tinkering around a bit to see if I could remake the classic screensaver that ran in the library and distracted from whatever the teacher was talking about at the time. :)
Each texture is a series of 16 bits with 1 pixel "on". It clears the screen by successivly iterating through the "textures" and drawing in erase mode. Giving 16 frames of animation before each 4x4 texture is erased.
This means that althrough there are 16 fading shapes, only 1 is ever really stored and drawn.

Interlisp is old, it goes back to the 1960s (But Medley is a newer system) I could do it with less but it's fun to hack old stuff.

I'll provide my source here.
Files are managed by the system but you can open MYSTIFY to view some unformatted code.

See attachment for source and effect. :) (is there a way to cross link attachments into the main body? It seems non-registered folks can't see them)
I made a bezier version but it was kind of "meh".
2
Purebasic / Re: Vectronix GTA cracktro code
« Last post by ttemper on August 07, 2026 »
very nice... will check it out when i get the chance. it's always nice to see how other coders do things.
3
Purebasic / Vectronix GTA cracktro code
« Last post by KrazyK on August 05, 2026 »
Here's the Vectronix cracktro code including userlibraries for PB x86 5.73+
Feel free to use/abuse/improve.
I've also posted the updated vis demo exe in the projects section after getting back from Scotland this week.
https://www.dbfinteractive.com/forum/index.php?topic=7030.0
4
Yabasic / Re: Pendulum Rope
« Last post by bikemadness on August 05, 2026 »
Shockwave. I've played with your program to understand it.
Create initial start and mid swings using page-up or page-down.

Code: [Select]
joint=32

dim x(joint)
dim y(joint)
dim oldx(joint)
dim oldy(joint)

length=10

gravity=.1
drag=.9

' create rope hanging down
for a=1 to joint
x(a)=320
y(a)=80+(a-1)*length

oldx(a)=x(a)
oldy(a)=y(a)
next a

' give rope a big initial swing
'for a=1 to joint
'x(a)=320+(a*a*.35)
'oldx(a)=x(a)-20
'next a

dim go(16)
dim g(16)

open window 640,512

repeat

setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
c=peek("port1")

for a=1 to 16
if and(c,2^(a-1))<>0 go(a)=1
if go(a)=1 g(a)=g(a)+1
if g(a)>2 g(a)=2
if g(a)=2 go(a)=0
if and(c,2^(a-1))=0 g(a)=0
next a

g=ran(1)

if go(4)=1 x(32)=600
if go(4)=1 y(32)=80

if go(1)=1 then
for a=1 to joint
x(a)=320+(a*a*g)
oldx(a)=x(a)-20
next a
endif

' physics update

for a=2 to joint

vx=x(a)-oldx(a)
vy=y(a)-oldy(a)

oldx(a)=x(a)
oldy(a)=y(a)

x(a)=x(a)+vx*drag
y(a)=y(a)+vy*drag+gravity

next a


' solve rope lengths

for b=1 to 8

x(1)=320
y(1)=80

for a=2 to joint

dx=x(a)-x(a-1)
dy=y(a)-y(a-1)

dist=sqrt(dx*dx+dy*dy)

if dist>0 then

diff=(dist-length)/dist

if a<>2 then
x(a-1)=x(a-1)+dx*diff*.5
y(a-1)=y(a-1)+dy*diff*.5
endif

x(a)=x(a)-dx*diff*.5
y(a)=y(a)-dy*diff*.5

endif

next a

next b


' redraw rope

setrgb 1,255,255,255

for a=1 to joint-1
line x(a),y(a) to x(a+1),y(a+1)
next a


until (1=0)

5
Yabasic / Re: Another Wire Frame
« Last post by bikemadness on August 03, 2026 »
I've seen many variations coding 3D including the cube on the PS2 demo disc.
It was beyond my comprehension and still is since I barely managed one axis.
But I had easy access to coding which was beyond my budget before.
I developed a lot faster when the emulator came along and then joined this site. So helpful.
My best work is on this site, but I have hundreds of small operational programs.
And some not so small like the search program for my 4500 dvd collection.
What a journey thanks to everyone here.
And Jim when I got him to transfer my PS2 memory cards to PC.
6
Yabasic / Re: Another Wire Frame
« Last post by Shockwave on August 02, 2026 »
There are other optimisations you can do here - You'll see them in many of the PS2 Yabasic demos where there are 3D rotations that some of the calculations can be precalculated outside the loop which was more important when running stuff on the actual PS2 console... The emulator is much faster though so it's not such a big deal unless you want to run it natively at some point.
7
Yabasic / Re: Another Wire Frame
« Last post by Shockwave on August 02, 2026 »
Again, I like this, it's a neat illusion and this is useful a technique which is used on 8 bit machines to generate surprisingly convincing 3d rotating objects using some sin/cos instead of expensive rotation calculations.

If you;

1:store the 12  vertices as x,y,z co-ordinates
2:Rotate them around X,Y,Z using rotation matrices
3:Project the 3D points into 2D co-ordinates
4:Draw the edges

Then you can see you're not too far away.

Again, this may not have been your intention for this code but it's where my mind led me when I ran your effect;

Code: [Select]
restore edges
read edges
dim e1(edges)
dim e2(edges)

for a=1 to edges
read e1(a)
read e2(a)
next a


' 12 vertices of an icosahedron
phi=(1+sqrt(5))/2
scale=80

dim vx(12)
dim vy(12)
dim vz(12)

' two rings plus poles
vx(1)=0
vy(1)=scale
vz(1)=0

vx(12)=0
vy(12)=-scale
vz(12)=0

for a=0 to 4
ang=a*72*pi/180
vx(a+2)=cos(ang)*scale
vy(a+2)=scale*0.4
vz(a+2)=sin(ang)*scale
next a

for a=0 to 4
ang=(a*72+36)*pi/180
vx(a+7)=cos(ang)*scale
vy(a+7)=-scale*0.4
vz(a+7)=sin(ang)*scale
next a


dim sx(12)
dim sy(12)

ax=0
ay=0
az=0

open window 640,512

repeat

setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window


' rotate and project
for a=1 to 12

x=vx(a)
y=vy(a)
z=vz(a)


' rotate X
ty=y*cos(ax)-z*sin(ax)
tz=y*sin(ax)+z*cos(ax)
y=ty
z=tz


' rotate Y
tx=x*cos(ay)+z*sin(ay)
tz=-x*sin(ay)+z*cos(ay)
x=tx
z=tz


' rotate Z
tx=x*cos(az)-y*sin(az)
ty=x*sin(az)+y*cos(az)
x=tx
y=ty


' perspective projection
dist=300

sx(a)=320+x*dist/(z+dist)
sy(a)=256-y*dist/(z+dist)

next a


' draw edges
for a=1 to edges
line sx(e1(a)),sy(e1(a)) to sx(e2(a)),sy(e2(a))
next a


ax=ax+0.01
ay=ay+0.015
az=az+0.02

until (1=0)



label edges

data 30

data 1,2
data 1,3
data 1,4
data 1,5
data 1,6

data 12,7
data 12,8
data 12,9
data 12,10
data 12,11

data 2,3
data 3,4
data 4,5
data 5,6
data 6,2

data 7,8
data 8,9
data 9,10
data 10,11
data 11,7

data 2,7
data 2,11
data 3,7
data 3,8
data 4,8
data 4,9
data 5,9
data 5,10
data 6,10
data 6,11
8
Yabasic / Re: Pendulum Rope
« Last post by Shockwave on August 02, 2026 »
One of the things I have always loved about programming is the journey it takes you on sometimes.
9
Yabasic / Re: Pendulum Rope
« Last post by bikemadness on August 01, 2026 »
I don't mind in the least.
All I could do was put individual controls of line length and angle for each segment.
And what i showcased here.
Not in my wildest dreams before this.
And thankyou.
10
Yabasic / Re: Pendulum Rope
« Last post by Shockwave on July 30, 2026 »
I love this, it reminds me of Manic Miner, some of the rooms have swinging ropes you can grab onto.

I've always meant to see if I could make something like this so I hope you don't mind but I faffed around in the emulator and made each joint an actual point in space and takes gravity and velocity so that a wave can travel through the rope rather than have it follow a defined path;

Code: [Select]
joint=32

dim x(joint)
dim y(joint)
dim oldx(joint)
dim oldy(joint)

length=10

gravity=.15
drag=.995

' create rope hanging down
for a=1 to joint
    x(a)=320
    y(a)=80+(a-1)*length

    oldx(a)=x(a)
    oldy(a)=y(a)
next a

' give rope a big initial swing
for a=1 to joint
    x(a)=320+(a*a*.35)
    oldx(a)=x(a)-20
next a

open window 640,512

repeat

setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window


' physics update

for a=2 to joint

    vx=x(a)-oldx(a)
    vy=y(a)-oldy(a)

    oldx(a)=x(a)
    oldy(a)=y(a)

    x(a)=x(a)+vx*drag
    y(a)=y(a)+vy*drag+gravity

next a


' solve rope lengths

for b=1 to 8

    x(1)=320
    y(1)=80

    for a=2 to joint

        dx=x(a)-x(a-1)
        dy=y(a)-y(a-1)

        dist=sqrt(dx*dx+dy*dy)

        if dist>0 then

            diff=(dist-length)/dist

            if a<>2 then
                x(a-1)=x(a-1)+dx*diff*.5
                y(a-1)=y(a-1)+dy*diff*.5
            endif

            x(a)=x(a)-dx*diff*.5
            y(a)=y(a)-dy*diff*.5

        endif

    next a

next b


' redraw rope

setrgb 1,255,255,255

for a=1 to joint-1
    line x(a),y(a) to x(a+1),y(a+1)
next a


until 1=0
Pages: [1] 2 3 4 5 6 7 8 ... 10