# PureBasic Forum

 It is currently Sun May 19, 2013 6:48 pm

 All times are UTC + 1 hour

 Page 1 of 1 [ 10 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: graphic testsPosted: Sun Jul 08, 2012 8:33 pm
 Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 100
Location: Egypt
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?! ^^

have fun =)

_________________
Kultstudio

Top

 Post subject: Re: graphic testsPosted: Mon Jul 09, 2012 6:54 am

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2852
Location: Wales, UK
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.

Top

 Post subject: Re: graphic testsPosted: Mon Jul 09, 2012 1:49 pm
 Enthusiast

Joined: Sat Jul 09, 2011 7:57 am
Posts: 276

_________________
http://www.mediafire.com/pbstuff

Top

 Post subject: Re: graphic testsPosted: Mon Jul 09, 2012 3:47 pm

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 2238
Location: Italy
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

_________________
[ Home ] [ My PC ] [ New to PB ? ]

Top

 Post subject: Re: graphic testsPosted: Mon Jul 09, 2012 4:32 pm
 Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 100
Location: Egypt
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

_________________
Kultstudio

Top

 Post subject: Re: graphic testsPosted: Wed Jul 11, 2012 2:55 pm

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1024
Great demo.
The Super Nintendo actualy had hardware support for such drawing called mode7.

Top

 Post subject: Re: graphic testsPosted: Thu Jul 12, 2012 3:36 am
 Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 731
Location: Darling River
Nice demo
Is this a secret code project, or can you release source code to see how its done.

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!

Top

 Post subject: Re: graphic testsPosted: Fri Jul 13, 2012 1:35 am

Joined: Tue Dec 23, 2003 3:54 am
Posts: 932
Location: New York
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.

Top

 Post subject: Re: graphic testsPosted: Sat Jul 14, 2012 2:30 am
 Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 100
Location: Egypt
for this demo i use opengl
but here a pb-drawing code of the ball-part:

give me 182kb fun

_________________
Kultstudio

Top

 Post subject: Re: graphic testsPosted: Sat Jul 14, 2012 12:19 pm
 Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 731
Location: Darling River
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 Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 10 posts ]

 All times are UTC + 1 hour

#### Who is online

Users browsing this forum: mrv2k and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forum

Search for:
 Jump to:  Select a forum ------------------ PureBasic    Coding Questions    Game Programming    3D Programming    Assembly Programming    The PureBasic Editor    The PureBasic Form Designer    General Discussion    Feature Requests and Wishlists    Tricks 'n' Tips Bug Reports    Bugs - Windows    Bugs - Linux    Bugs - Mac OSX    Bugs - Documentation OS Specific    AmigaOS    Linux    Windows    Mac OSX Miscellaneous    Announcement    Off Topic Showcase    Applications - Feedback and Discussion    PureFORM & JaPBe    TailBite