26

Re: curve : All you ever wanted to know about curve.c!

Perfect! Thanks so much, shino. You are very helpful.

27

Re: curve : All you ever wanted to know about curve.c!

I just corrected the "number of lumps" section of wiki. The caption "This ends up much smoother in-game,with less lumps" was actually under the curve with *more* lumps. This was incorrect - one might assume that having more lumps would automatically make for a smoother sloped curve, but it is not so!

Just try it and see - too many lumps leads to a very bumpy and hard to traverse slope. Less lumps is smoother in-game. (when it comes to slopes!) Of course, don't use too few lumps, either... tongue

28

Re: curve : All you ever wanted to know about curve.c!

hmm, i noticed this a while ago. i was gonna mention it, but .... er i guess i forgot..... silly me tongue

Mac OS X Xcode project & package maintainer.

If you have some Neverball related files you need hosted somewhere, please send a me forum PM/email.

29 (edited by Dave 2007-02-11 06:46:51)

Re: curve : All you ever wanted to know about curve.c!

Okay, folks, my latest version of the curve program is up. The latest addition: random curves.

You can have them either alone, or in a group of 16 in one map. just type:
"curve -random >mycurve.map" for one random curve, or:
"curve -random -lots >mycurves.map" for 16... (obviously, you don't have to use my clever xxx.map filenames)

Most of them won't be worth keeping, but vidski wanted some inspiration, and needed it in large doses.

Please let me know if I've broken ANSI compatibilty or any other weird errors that crop up. Thanks!

Edit: Oh yes, and I haven't updated the documentation yet, but since Cox deleted my webspace that was holding it, it's a moot point. Aren't I glad shino did the wiki version!

I gotta update my website.

Can you tell it's really late when I'm writing this?

30

Re: curve : All you ever wanted to know about curve.c!

I've updated the curves document at the wiki to include the new commands.

I've also downloaded your NeverCurves application, Dave. So far, so good. Already on the way to get some simple curves for the CSY Campaign.

Welcome... to the Nevergalaxy!
(and also Neverputt Calendar)

31

Re: curve : All you ever wanted to know about curve.c!

Sweet. They are very easy to add in, and like I said, add a lot of polish to a level, even when used sparingly.

Thanks for updating the wiki.

32

Re: curve : All you ever wanted to know about curve.c!

shino, I have finally gotten around to updating my .pdf document, and uploaded to my webspace (the part that was deleted when I moved!!! sad ) Could you please update whatever is pointed to by the pdf link on the wiki? I'm not really sure if it's something that I can do, or not, so sorry if it is something that I should be able to do! I'm just a big newbie at heart... tongue Anyway, thanks for doing it!

Also, I have taken the liberty of cleaning up a little bit of the wiki on the curve page, and adding some more useful information on the issue of Ghost Brushes, and reorganizing the main level creation page, to add a couple of important links (to Entities, and Metadata). Once we get 1.5 finalized, we'll need to do some serious updating on the wiki!

33

Re: curve : All you ever wanted to know about curve.c!

I'm not sure you can replace a file with media management feature while editing  a page. So I've uploaded your file and we're sure that's right now wink

34

Re: curve : All you ever wanted to know about curve.c!

Hey folks,
A while ago, paxed sent me a revised version of the curve.c program that cleans up some of my redundant and slightly buggy user-interface code. He reduced the size from 40KB to 25KB! Very nice, paxed! I have replaced the curve.c file with this new version, as well as the curve.exe pre-compiled windows executable. If you are the kind of guy who likes to use just the command line, there is no need to upgrade. But if you like the step by step process, you'll find it has been improved slightly, again thanks to paxed : you can now input a "d" for the default value to be used.

Thanks paxed!

35

Re: curve : All you ever wanted to know about curve.c!

I committed the latest curve.c to the repo, in a directory called "contrib".  I figure if I call it "contrib" then I won't have to wake up at nights thinking that I let something as ugly as the curve code be made part of Neverball.  tongue  I'm not sure what to do with the documentation and examples;  tracking a "binary blob" PDF in the repository doesn't seem like a good idea.

36

Re: curve : All you ever wanted to know about curve.c!

parasti wrote:

I'm not sure what to do with the documentation and examples;  tracking a "binary blob" PDF in the repository doesn't seem like a good idea.

IMO, It should be html (+ images)...  Like the curve article on neverwiki

37

Re: curve : All you ever wanted to know about curve.c!

Is anyone with HTML knowledge willing to convert the wiki article's XHTML dump to a usable stand-alone HTML (preferably 4.01) document?  If no one volunteers, I can do it, but 1) I'm not very familiar with the curve tool and 2) it could take a while before I can do it.

38

Re: curve : All you ever wanted to know about curve.c!

parasti wrote:

as the curve code be made part of Neverball.  tongue

Oh, that hurts... j/k. Actually, it would hurt a lot more if weren't 100% true. Sorry for the ugly code, guys.

I don't see that there's any need to include documentation or examples with the code. There never was anything like that with rlk's... You had to get your info from the web. I'd just leave it in there by itself. If people run it, they'll get the user interface, and that will give them some idea of what it's all about. To learn more, they just need to jump on the wiki. That's just my idea, and of course, my ideas are not always so great smile

btw, parasti, how old were you when you discovered neverball? For some reason, I keep thinking you were in your teens... it really has been a few years, hasn't it?

39

Re: curve : All you ever wanted to know about curve.c!

Dave wrote:
parasti wrote:

as the curve code be made part of Neverball.  tongue

Oh, that hurts... j/k. Actually, it would hurt a lot more if weren't 100% true. Sorry for the ugly code, guys.

Don't be too upset about it.  As ugly as it is, it is also extremely useful for anyone who's ever done any mapping that involves curves.  I recognise that and I give you a lot of credit for it.  Between nightmares of ugly code and of my own ignorance I'd choose the former any day...  any night, anyway.

I don't see that there's any need to include documentation or examples with the code. There never was anything like that with rlk's... You had to get your info from the web. I'd just leave it in there by itself. If people run it, they'll get the user interface, and that will give them some idea of what it's all about. To learn more, they just need to jump on the wiki.

I don't feel strongly about it either way.  Keeping the docs and the code in one place is generally a good practice, though.  Note that rlk's code was never part of the Neverball distribution and being the simple tool it was it didn't really have a need for documentation.

btw, parasti, how old were you when you discovered neverball? For some reason, I keep thinking you were in your teens... it really has been a few years, hasn't it?

Yeah, it's been a while.  smile  I discovered Neverball some time in 2005;  I think it was April or May (switched to GNU+Linux in April, started looking for games soon thereafter).  I was eighteen, with a birthday in a couple of months.

40

Re: curve : All you ever wanted to know about curve.c!

Updated again!

Now the output of the curve program will contain decimal values, for much more precise curves (especially when they are of small radii.) The curves generated will only be compatible with the svn version of Neverball, of revisions after Krabby submitted the "use decimal values for geometry" code.

If you are still mapping for 1.4, I've left the old version linked for now, but once 1.5 is released, it'll be gone.

You can see the very nice new smoothness of small radii curves in this post by mym.

41

Re: curve : All you ever wanted to know about curve.c!

The new recommendation seems to be using high side number curves, so what about improving examples (values and shots) of the curve documentation ?
By this way, new level designers will tend to use good values.
I know this is a big work though.

42

Re: curve : All you ever wanted to know about curve.c!

This is a good idea, mym. It does seems like a big job to do all new pics, but I don't think it actually would be too hard, since one could just plug in the values under the current pictures, and simply increase the <n> value for more lumps. The real time-taker is opening the files in radiant and taking screenshots, etc.

We also need to fix a couple of incorrect statements about aligning to the 1 unit grid, and how a sloped curve will be smoother with less lumps(was true before, but now it isn't).

43

Re: curve : All you ever wanted to know about curve.c!

I added some code to the curve generator which makes steps a bit smaller and also slices up each step.  This seems to result in much smoother curves (especially in steep banks).  The attached code, *mostly* works.  I post here to simply notify people and ask them to try it out and let me know if this is better or not.  If this is useful, I can fix the known bugs, and provide a more polished version.

http://forum.nevercorner.net/viewtopic.php?id=2339

44

Re: curve : All you ever wanted to know about curve.c!

I also noted a bug on line 649.

hill = rndnum(2,(thickness - 16)/8) * 8;

When thickness = 24 (or maybe anywhere between 24 and 32),
we call rndnum(2,1) which generates SIGFPE
(divide by 0 on the mod(%) operator) in rndnum (line 243):

return (rand() % ((high-low) +1)) + low;

Should I fix this, or leave it to Dave or someone else?

45

Re: curve : All you ever wanted to know about curve.c!

I finally realized that the thickness must be more than the hill value.  Otherwise, there is no output. 

This may be documented somewhere, but I think it would really help if the code just adjusted the thickness value if necessary (if the hill value was higher).  Just to make sure there is *some* output for us noobs learning how to use this tool.