ID:64803
 
I just put together a visual interface count down timer demo/library which I plan to use for Cathedral. I'd appreciate constructive feedback before I start to implement it in the game.

Thanks,
ts

p.s. - My stylistic coding preferences are well known and understood. No need to provide feedback on '{}', abundant white-space, 'excessive //' or ';'. :)

http://www.byond.com/developer/Tsfreaks/CountDownTimer
It'd be even more convenient if you could datum-ise the whole thing so all you have to do is define a new variable with that said datum-type and run procedures of it?

If you don't mind that is, I'm just a flexibility freak, I love ease of use, especially when it comes to libraries.
Implementation is messy, and your stylistic preferences *do* matter - Because its a demo, demo's are meant to teach. And if its a library, libraries are meant to be easy to use and have a clear API.

Yours is neither. Yours will also be troublesome with many players. Say you have 20 players - Thats 20 winsets per second, more than the game can keep up with at 1 per tick.
Haywire wrote:
It'd be even more convenient if you could datum-ise the whole thing so all you have to do is define a new variable with that said datum-type and run procedures of it?

If you don't mind that is, I'm just a flexibility freak, I love ease of use, especially when it comes to libraries.

Good suggestion. Being my first library attempt, I overlooked that aspect of it.

I know I got closer to "right" this time around. Although, the library still assumes the output is 4 interface controls and that could be changed.

Please take a look and see if this variation is more inline with your request.

Thanks,
ts
Tsfreaks wrote:
Haywire wrote:
It'd be even more convenient if you could datum-ise the whole thing so all you have to do is define a new variable with that said datum-type and run procedures of it?

If you don't mind that is, I'm just a flexibility freak, I love ease of use, especially when it comes to libraries.

Good suggestion. Being my first library attempt, I overlooked that aspect of it.

I know I got closer to "right" this time around. Although, the library still assumes the output is 4 interface controls and that could be changed.

Please take a look and see if this variation is more inline with your request.

Thanks,
ts

Definitely what I had in mind, I didn't actually look for any bugs, errors or anything out of bad practise but you're on the right line, for libraries it's obvious that you should use some sort of convenient method which the library user may encompass.

Anyway, as Alathon said, Timing is all fine and all, but handling it with interface controls is just :S. Interface controls are slow if you update them every second, and as the players increase...

You're doomed...
Haywire wrote:
Tsfreaks wrote:
Haywire wrote:
It'd be even more convenient if you could datum-ise the whole thing so all you have to do is define a new variable with that said datum-type and run procedures of it?

If you don't mind that is, I'm just a flexibility freak, I love ease of use, especially when it comes to libraries.

Good suggestion. Being my first library attempt, I overlooked that aspect of it.

I know I got closer to "right" this time around. Although, the library still assumes the output is 4 interface controls and that could be changed.

Please take a look and see if this variation is more inline with your request.

Thanks,
ts

Definitely what I had in mind, I didn't actually look for any bugs, errors or anything out of bad practise but you're on the right line, for libraries it's obvious that you should use some sort of convenient method which the library user may encompass.

Anyway, as Alathon said, Timing is all fine and all, but handling it with interface controls is just :S. Interface controls are slow if you update them every second, and as the players increase...

You're doomed...

OK, I'm rewriting it as we speak to be a little more robust. I'm also removing all the controls except for one.

Thanks,
ts



Thanks,
ts