Developed or developing a new product in PureBasic? Tell the world about it.
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Tue Jan 20, 2004 12:00 am
http://files.connection-refused.org/metaballs.zip
It's far from perfect and still needs LOTS of optimizing (can't get above 50FPS on my system) but I thought
I'll post it here because I don't know if I'll ever find the time to finish...
...and I know of people saying that PB can't do this
The demonstration is based on this article:
http://astronomy.swin.edu.au/~pbourke/m ... olygonise/
Maybe some of you can find a faster way than I did.
Now I will stop posting something new everyday. Promised!
Last edited by
traumatic on Tue Jan 20, 2004 12:17 am, edited 1 time in total.
Good programmers don't comment their code. It was hard to write, should be hard to read.
Saboteur
Enthusiast
Posts: 272 Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:
Post
by Saboteur » Tue Jan 20, 2004 12:10 am
[:: PB Registered ::]
Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
Blade
Enthusiast
Posts: 362 Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:
Post
by Blade » Tue Jan 20, 2004 12:11 am
Great!
Nice to see such stuff with PB!
Anyway you should check the normals calculations: the reflection is broken clearly in each quad, while if properly made should me more smooth...
sorry, too late to write a correct english...
NoahPhense
Addict
Posts: 1999 Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida
Post
by NoahPhense » Tue Jan 20, 2004 1:04 am
omg.. that kicks as$..
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Tue Jan 20, 2004 1:39 am
That's good.
Don't know if this info is useful, but the metaballs render pretty much as per your posted images except for 800x600x32 resolution, when rectangles (mostly red) can be seen - display starts to get the "dirty" look I am used to with this sort of stuff, but does not get as dirty as most.
FPS is around 20 in 640x480 modes, around 15 in 800x600 and 1024x768 modes.
(NVIDIA RIVA TNT2 Model64)
J. Baker
Addict
Posts: 2181 Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:
Post
by J. Baker » Tue Jan 20, 2004 7:31 am
Very nice, is this reflecting an image or lights?
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Tue Jan 20, 2004 9:10 am
J. Baker wrote: Very nice, is this reflecting an image or lights?
that's environment mapping, so basically an image
Good programmers don't comment their code. It was hard to write, should be hard to read.
hteamspy
User
Posts: 12 Joined: Mon May 05, 2003 4:54 pm
Location: Aix en provence
Contact:
Post
by hteamspy » Tue Jan 20, 2004 9:18 am
I get bettwen 60 and 70 FPS on 800x600 : 32bit
and constant 60 Fps on 1024x768 : 32 Bit
Nice work
..:: Win Xp Pro : XP 2600 + Barton, Gforce 4 Ti 4200, 1,5 Go ram, SB Live 5.1 :: Linux Debian : Athlon Xp 1600 +, 512 Mo ram + Kyro II ::..
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Tue Jan 20, 2004 2:44 pm
again, on my machine, fps 60..65 :-/
hey, doesn't matter is a scene is easy or difficult, all i get is the same rate... huh... duh...
opengl or directx?
800x600x32: no (reddish) rectangles as noted above, but it's not always smooth on the blending areas
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Tue Jan 20, 2004 2:47 pm
just noticed something... are you sure you calculate the framerate properly? if i move the mouse a lot, the reported fps varies from 25 .. 270, although it makes no difference on screen
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Tue Jan 20, 2004 3:29 pm
blueznl wrote: are you sure you calculate the framerate properly?
yes quite, because it always reflects my refreshrate.
i'll check that tonight, thank you
Good programmers don't comment their code. It was hard to write, should be hard to read.
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Tue Jan 20, 2004 3:33 pm
well, it appears to be totally unrelated to my refresh rate (100hz) which makes it kinda' funny...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
GPI
PureBasic Expert
Posts: 1394 Joined: Fri Apr 25, 2003 6:41 pm
Post
by GPI » Tue Jan 20, 2004 8:02 pm
Could it be, that you use SetRefreshRate(RefreshRate) ?
Because my monitor flickers now in 60hz (and normaly i set VGA-Driver so, that direct-x use 100hz) and the desktop-resolution is changed! Other PB-Programms doesn't have this problem.
When yes: Can you create a little test-version without this command?
Num3
PureBasic Expert
Posts: 2812 Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:
Post
by Num3 » Tue Jan 20, 2004 9:27 pm
I found this nice Library on purearea that comes with some extra commands for Sprites...
Including SwapBuffers()...
This little baby turned my 60 FPS game (using flipbuffer()) into a 350!!! FPS game...
I was quite impressed! And give it 6 thumbs up !!!!
It's called SpriteX...
tinman
PureBasic Expert
Posts: 1102 Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:
Post
by tinman » Tue Jan 20, 2004 9:35 pm
It crashed on my machine. As did the one previous program I tried (I forget which one now, but I have it here somewhere).
WinXP, Athlon XP2800+, 512MB ram, nForce2 chipset/audio, Ati radeon 9600. All the latest drivers and OS patches.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)