Nelumbo


sol_hsa said:
Forgot to mention - apart from the bugs in the demo, I get about 35-40fps out of it.
It shows, it runs smooth as butter :) Good luck completing this!
 
Last edited by a moderator:
I noticed the horizont gliches if it upper that zero line.
Sometimes screen flickers with scaled image of itself
Do you use hardware SDL blitting?
 
As I mentioned, there's tons of bugs, so don't be picky. =)

nelumbo6.jpg

http://users.evtek.fi/~jarikom/racetest2.zip

Still no gameplay, track now uses splines, bunch of bug fixes etc.. I'm afraid it'll take a while before this is a game, so don't hold your breath (yet).
 
Have been working on track generation for the past few days..

nelumbo8.jpg
nelumbo9.jpg
nelumbo10.jpg


It's a surprisingly difficult mathematical puzzle, in several parts.

First bit is that the track is generated using splines. In practice I'm using b-splines for the base track as it gives me nice curves. However, if you start form a random bunch of control points, different spline segments get different lengths, and we want to have constant velocity for the whole spline.

So, I ended up re-building the original b-spline by sampling said spline at more-or-less constant velocity (spline segment iterators multiplied by a value based on their lengths), and new control points taken from that. The new spline has 20 times more control points, and is a catmull-rom spline (which goes through the control points, which is nice).

That wasn't quite enough, so that pass is done twice, ending up with 400 times more control points than the original. But while not perfect, it's pretty good.

The second problem is that we can't have too steep curves. This means two control points may not be too close to each other, and the curve angle may not be steeper than 90 degrees. I'm currently just finding these cases and randomizing the point locations again.. eventually it finds a track form that is legal, but it takes a few seconds even on my PC, so I'll probably just precalculate a few hundred tracks or something..

If I didn't mention this before, I'm taking my time with this project, so don't hold your breath. It aint no ludum dare =)
 
PokeParadox said:
Wow nice stuff! Looking cracking already. As usual when I see some original game dev that I like, I hope you will share the source. :)

Good luck with the project!
Considering that I'll be linking to SDL statically, it's pretty much a requirement.. =)
 
Last edited by a moderator:
sol_hsa said:
Since this project has officially stalled, I'm posting the source code (as is), so if someone wants to pick it up and poke at it, they got no objection from me. I might continue this project at some point, but no promises.
http://iki.fi/sol/zip/nelumbo_02.zip
:( Is there anyone that is up for the challenge? As my programming skills are pretty much crap, I won't be much good. But I will get back into it shortly as work is starting to dry up and this could pass the time. ;)
 
Last edited by a moderator:
Back
Top