graphic tests

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
xperience2003
Enthusiast
Enthusiast
Posts: 113
Joined: Tue Oct 05, 2004 9:05 pm
Location: germany
Contact:

graphic tests

Post by xperience2003 »

hi,

last days i was playing with some programming techniques

here a small demo with 4 parts, maybe someone know
which part uses which technique?! ^^

Image

download 666kb

have fun =)
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: graphic tests

Post by IdeasVacuum »

Looks like 3D with shaders but the movement is so nauseating I can't study it :|
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
xorc1zt
Enthusiast
Enthusiast
Posts: 276
Joined: Sat Jul 09, 2011 7:57 am

Re: graphic tests

Post by xorc1zt »

3d, raytrace, 2d, shader ?
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: graphic tests

Post by luis »

Hard to say since every thing can be done in multiple ways and you end up with the same pixels, anyway let's try :) :

1) 2d textures + a shader
2) no idea (almost all white, is it supposed to look that way ?)
3) could be done in too many ways
4) parallax mapping through a shader
"Have you tried turning it off and on again ?"
xperience2003
Enthusiast
Enthusiast
Posts: 113
Joined: Tue Oct 05, 2004 9:05 pm
Location: germany
Contact:

Re: graphic tests

Post by xperience2003 »

good

now the unbelievable truth, all parts are 2d:

-No floats
-No using of any 3d commands, also No shaders
-No higher maths, like tan, sqr and so on, just sin/cos in a table of longs ( Sin(i*(2*#PI/360))*1000 )
..also no raytracing , no voxels
-No real 3d matrix calculation

it's just simple drawing with plots
z = (y*15)+zoomvalue ;simple depth
u = (dx * cosw - dy * sinw) /z ;pos= texturecoordinates
v = (dx * sinw + dy * cosw) /z ;simple 2d rot div depth
dx and dy = drawx/2 drawy/2..center of screen

the last part adds highmap-values to simulate parallax,and draw lines
line(x, y-highmapvalue ,x, y+highmapvalue) but it's no voxel engine
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: graphic tests

Post by Thorium »

Great demo.
The Super Nintendo actualy had hardware support for such drawing called mode7.
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: graphic tests

Post by electrochrisso »

Nice demo :)
Is this a secret code project, or can you release source code to see how its done. :?:
PureBasic! Purely the best 8)
User avatar
kenmo
Addict
Addict
Posts: 2043
Joined: Tue Dec 23, 2003 3:54 am

Re: graphic tests

Post by kenmo »

Nice demo, I really like #3 and #4.
electrochrisso wrote:Nice demo :)
Is this a secret code project, or can you release source code to see how its done. :?:
I wonder this too.
xperience2003
Enthusiast
Enthusiast
Posts: 113
Joined: Tue Oct 05, 2004 9:05 pm
Location: germany
Contact:

Re: graphic tests

Post by xperience2003 »

for this demo i use opengl
but here a pb-drawing code of the ball-part:

give me 182kb fun
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: graphic tests

Post by electrochrisso »

xperience2003 wrote:for this demo i use opengl
but here a pb-drawing code of the ball-part:

give me 182kb fun
Quite amazing for the small amount of code, I am going to study this in more detail, thanks for sharing. :)

I am wondering why I can't run it under opengl, do I need to install it on my win7 machine, or is it my graphics chip, works fine with DirectX.
PureBasic! Purely the best 8)
Post Reply