Quote: "What exactly did u do to even see anything at all?"
Not sure since I didn't keep the code.
But this version should give you some clues
irad = 100
orad = 200
`a = screen width() / 2 ` removed these
`b = screen height() / 2
sync on
sync rate 60 ` changed this
create_memblockobject(1 , 32)
for i = 0 to 15
t = i * (360 / 16)
x = a + irad * cos(t)
y = b + irad * sin(t)
create_vertex( 1 , i , x , y , z , rgb(255,0,0) , 0 , 0 )
set_normal( 1 , i , 0.2 , 0.2 , 0.2 )
` dot x , y ` removed these since they aren't seen anyway
` text x,y,str$(i)
next i
for i = 0 to 15
t = i * (360 / 16)
x = a + orad * cos(t)
y = b + orad * sin(t)
create_vertex( 1 , i + 15 , x , y , z , rgb(255,0,0) , 0 , 0 ) ` added comment: z=0 by default (so it was behind the camera clipping plane originally)
` set_normal( 1 , i + 15 , 0.2 , 0.2 , 0.2 )
dot x , y
text x,y,str$(i+16)
next i
make mesh from memblock 1 , 1
make object 1 , 1 , 1
set object normals 1 ` added this
set object cull 1, 0 ` added this so you see both sides of the object
y# = 0
make camera 1
set current camera 1
autocam off
position camera 1, 0, 200, -500 ` moved camera back so you can see the object!
point camera 1, 0, 0, 0
do
if leftkey()=1
end
endif
if upkey()=1
inc y# , 0.005
position camera 1,0,y#,-500 ` changed this
endif
if downkey()=1
dec y# , 0.005
position camera 1,0,y#,-500 ` and this
endif
text 0, 0, str$(y#)
text 0,15, str$(camera angle y(1))
xrotate object 1, object angle x(1)+1 ` added this so you can see something happening without pressing anything
sync
loop
function create_memblockobject(memnum,v)
make memblock memnum,12+(36*v)
write memblock dword memnum,0,338
write memblock dword memnum,4,36
write memblock dword memnum,8,v
endfunction
function create_vertex(memnum,v,vposx#,vposy#,vposz#,color as dword,u#,v#)
write memblock float memnum,v*36+12,vposx#
write memblock float memnum,v*36+16,vposy#
write memblock float memnum,v*36+20,vposz#
write memblock dword memnum,v*36+36,color
write memblock float memnum,v*36+40,u#
write memblock float memnum,v*36+44,v#
endfunction
function set_normal(memnum,v,normalx#,normaly#,normalz#)
write memblock float memnum,v*36+24,normalx#
write memblock float memnum,v*36+28,normaly#
write memblock float memnum,v*36+32,normalz#
endfunction
` removed the last few lines since they weren't used