Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Parameter File

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th May 2003 01:48
Hi all,

this is my code for implementing a parameter file. Use it, abuse it, improve it and give me feedback! The Rem block at the top of the code should explain everything.

I use it for everything...sync rate, model paths, here's a snippet of my ini file, the code itself is behind the source button below....

frames=3000
syncrate=50
speedchangeframes=300
accelerationframes=150
speed=150
surgespeed=200
camerapan=150
camDelay=15

backdrop=bitmaps/backdrop.jpg

********************************************************
* RACERS
numracers=6
racerscale=750

Have Fun!
Thanks in advance.
All the Best,
StevieVee
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 5th May 2003 02:02 Edited at: 5th May 2003 02:03
Hate to point this out, but there is a plug-in for reading/writing integers and strings to .INI files - saves a lot of effort, you know.

Cant think who wrote it though...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th May 2003 02:23
Alright!

I'm still happy with it though. Being a newbie of around 4 weeks with DB Classic, and being a business systems programmer by day, it was my way of getting used to various bits of functionality.

I could have called the legacy windows DLLs for reading and writing ini files, or even the Registry functions. But then I think like you...build a library of functions to do all the repetitive stuff, it makes life easier in the long run.

I'll check your site out first in future!

For anyone not using parameter files as programming practise...what is wrong with you!!!! Using my own code as an example, I now have everything parameterised. If I need to change the sync rate, it's in the file. If I want to change a model or a texture, it's in the file. If I want to change the max speed or the distance of a race...guess what...it's in the file!

Download TAToad's plugin now! (Forget my code, it only reads at the moment!)

AngleOfTheDangle=...damn, which function was that?

Thanks in advance.
All the Best,
StevieVee

Login to post a reply

Server time is: 2024-04-18 10:51:22
Your offset time is: 2024-04-18 10:51:22