Author Topic: AppOnIdle 2  (Read 1264 times)

0 Members and 1 Guest are viewing this topic.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
AppOnIdle 2
« on: June 28, 2010, 03:40:43 pm »
It would be nice to have a second AppOnIdle that would be called every 100ms (or perhaps even have dynamic frequency).  There might be situations in which it could overload the server from being called so much, but it would definitely improve on many scripts.
What do you think?  Worth implementing?
Can't think of anything original to put here...

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: AppOnIdle 2
« Reply #1 on: June 28, 2010, 04:18:31 pm »
You can just just place a dummy bot on the map somewhere, then spawn bullets right above him and then you will get a quicker apponidle with onplayerdamage

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: AppOnIdle 2
« Reply #2 on: June 28, 2010, 04:24:02 pm »
yeah i had thought of that too, but that has a few problems. firstly, it's not reliable. secondly it's map-dependent and would really only work well with custom maps. thirdly, game-play (and hackers too i suppose) could interfere. and lastly, it's not elegant at all from a programmer's pov.
Can't think of anything original to put here...

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: AppOnIdle 2
« Reply #3 on: June 28, 2010, 04:47:48 pm »
Well, its not like enesce is going to implement a quicker apponidle any time soon, so your only hope is the dummy im afraid ;\

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: AppOnIdle 2
« Reply #4 on: June 28, 2010, 04:51:38 pm »
Current AppOnIdle is 60 ticks, aka 1 second.
But yeh, it would be possible to make wondrous scripts.

When i asked eC bout that he said that the main problem is not implementing it, but making it possible to noob scripters to make scripts which can break the server down, including other servers too.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: AppOnIdle 2
« Reply #5 on: June 28, 2010, 05:51:29 pm »
Current AppOnIdle is 60 ticks, aka 1 second.
But yeh, it would be possible to make wondrous scripts.

When i asked eC bout that he said that the main problem is not implementing it, but making it possible to noob scripters to make scripts which can break the server down, including other servers too.

yeah i figured that was the main concern... i can't really see a way around this problem. is there?
Can't think of anything original to put here...

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: AppOnIdle 2
« Reply #6 on: June 28, 2010, 06:47:05 pm »
Well, i was suggesting for 2 server versions:
1) Normal one, which would read the script, without crashing, but wouldnt use it.
2) Extended one, which would use it.

So, the normal one would be the one used for paid servers and such, while the extended one would be the one which scripters would use for the scripts, so like home hosted servers or even paid servers (which would have e.g. higher price, due to the possibility of breaking the server)
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: AppOnIdle 2
« Reply #7 on: June 29, 2010, 07:20:49 am »
threadfunc()....
well, it's well known it's unstable, but it may change in 2.7.0
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: AppOnIdle 2
« Reply #8 on: June 29, 2010, 08:48:28 am »
Make it a locked feature only available awesome scripters xD
But yeah, eC told us many, many times that he won't be implementing something like that.
Or just a stable Sleep()? I don't know how it works, but I think it should be possible, or not?

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: AppOnIdle 2
« Reply #9 on: June 29, 2010, 09:28:39 am »
sleep() is stable. Threads aren't(currently).

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: AppOnIdle 2
« Reply #10 on: June 29, 2010, 09:50:21 am »
Since when? Didn't it cause isues!?

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: AppOnIdle 2
« Reply #11 on: June 29, 2010, 10:40:04 am »
Sleep() causes massive lag to the server. I never use it. :)

Although, if it were stable, it would be soooooooooooo much easier and less-boring to make little coutdowns :)
www.soldatx.com.br - The brazilian Soldat community.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: AppOnIdle 2
« Reply #12 on: June 29, 2010, 10:43:27 am »
Sleep() causes massive lag to the server. I never use it. :)

Although, if it were stable, it would be soooooooooooo much easier and less-boring to make little coutdowns :)
It IS stable. Lag is because of running it in the main server's thread.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: AppOnIdle 2
« Reply #13 on: June 29, 2010, 10:45:27 am »
Sleep does exactly what it is supposed to do, which is have the current thread sleep for a specified amount of time. When this is in the main thread, then of course your server will hold up for that amount of time. It is not that sleep is unstable, its that threads aren't. (Exactly what Gizd said)

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: AppOnIdle 2
« Reply #14 on: June 29, 2010, 10:59:41 am »
Sleep does exactly what it is supposed to do, which is have the current thread sleep for a specified amount of time. When this is in the main thread, then of course your server will hold up for that amount of time. It is not that sleep is unstable, its that threads aren't. (Exactly what Gizd said)
That's what I wanted to hear.