PDA

View Full Version : Spline Demo!



chronozphere
02-02-2010, 09:25 PM
Hey guys

I'm allready thinking about how to make the second version of my Tuberunner game for IGF. I'd like to use splines to generate the racetrack. :)

So I tried to implement a few different spline types. Here's a screenshot of the demo:

http://img707.imageshack.us/img707/8249/splinedemo.jpg

From left to right:

Quadratic bezier spline
Cubic bezier spline
CatmullRom spline
Cubic Hermite spline


I combined 3 catmullRom splines to get a longer spline (check my TCompositeCurve class).
It doesn't work for other spline types now (don't know why). :-[

Download source + exe here (http://nashasoft.na.funpic.org/SplineDemo.rar)

Hope someone finds this usefull. If anyone can think of possible optimizations, please tell me. :)

paul_nicholls
02-02-2010, 10:04 PM
I just tried downloading it, but it was corrupted it seems :(

and now I can't download it all all - I get this error on the page:


No suitable nodes are available to serve your request.

cheers,
Paul

de_jean_7777
03-02-2010, 12:57 AM
I get the same thing as Paul. I am able to download each time, but it's always corrupt.

chronozphere
03-02-2010, 08:23 AM
Weird, I'll upload again. :)

I don't know what's wrong with the funpic servers. >:(
Just uploaded it to MegaUpload:

http://www.megaupload.com/?d=JZYBK9CA

(Would be nice if we had a fileserver for this community :) )

jdarling
03-02-2010, 01:01 PM
The problem was with the hosting company that FunPic uses (MOSSO). Its basically a cloud error stating that the servers got overloaded or a node went down LOL

How do I know, I use the same hosting company at work. Recently their service has SUCKED! If you try the funpic site again now it should work.

PS: I've given space for sites and downloads to several members here until they decided to start their own, and have no problem giving out more sub-domains and space.

- Jeremy

JernejL
03-02-2010, 07:32 PM
How about a curve thru points kind of curves? those work best..

chronozphere
03-02-2010, 07:44 PM
How about a curve thru points kind of curves? those work best..



Don't know what you mean? ??? The catmullRom spline goes through all the points.

paul_nicholls
03-02-2010, 09:54 PM
Nice work so far Chronozphere :)

I downloaded and tried the demo, and looked at the code...

Now I feel inspired to do my own LOL

cheers,
Paul