![]() |
Time system
I was going to make a time system and wondering if that can go on a free server??? Also wanted to know how much lag a time system makes after say months?
|
I beleve
I beleve you can...
I think I have asked stefan this befor but I am not sure lol... but stefan you should tell us for sure.... (for the servers that are non p2p) |
Well it is even possible to script it without timevar... The only problem is that you'll then need tohave smoene online at all times because otherwise the time stops since it depends on NPCW's for advancing the time.
|
Re: Time system
Quote:
|
It wont lag and it will work with Timevar even on a non-p2p server ^_^
and yes you can have it on a free server also (you can even have day/night in a free server, mine will and Stefan said it can be free) ;P And if it was me the way to do it without timevar would be to make some1 the 'timeperson' and they would set the strings and such, what I mean is for example players[].id if the person is 0 then he works the timer. every second or so it increases a string or does whatever. I think that works |
on
on free servers you cant use the function
seteffect or setcoloreffect |
Re: Re: Time system
Quote:
|
accually
Quote:
heh... and if the timevar gets really really really big then yes it might lag (but it probably can get reset).... I dunno if stefan does this but this would cause less lag from timevar... is if you download the timevar (from the graal server right when you sign on) and then it adds 1 to the timevar every 5 seconds client side (but also from the server you would have to download what second and milisecond if you want everyones to be close to exact) |
There's no lag from timevar. It downloads the same number of bytes regardless of how big the number is. I think you mean rounding errors and suchlike.
|
OK I think I'm getting the hang of it thanx, is it 5 seconds or 5 minutes, I've heard both, is there a way to reset timevar. so you could reset timevar every month or so.
Off subject how do you add 1 to a server string is it setstring #v(server.asdf)++ I know that's not it but how do I do it? |
well the thing is
well accually timevar does get bigger in bytes...
like lets say you have 0 mins (for timevar like if the server got resete) then if you go up to 10 mins then the bytes are bigger... yes the bytes go up but they go up slower every time it goes up.... I am just wondering if stefan has it download timevar every 5 seconds or does it download it once and do the rest client side... |
Re: well the thing is
Quote:
Quote:
|
well...
I do program it is just that if your sending something over the internet it has to send it with a size to tell it what it is (doesn't it?)...
well mabie it is just that I dont understand connections that well... I mean like I know how to make a chat or something like that... but I mean when it sends something over the internet doesn't have to send something and so many bytes so the otherside can read it right? |
Would it really make that much of a differance if it did send a differant size not like it's gonna be a whole lot anyways.
|
true
true if it did send its size then it would only be like
8 numbers... and like it goes up 1 number (meaning like from 1,000 to 10,000) as in if you take the len(numb) goes up 1 number then it goes up very slowly and takes longer and longer every time for it go up a number... the formula for this is like y=(.5)^x just as long as x <= 0 well something like that. |
I'm telling you it doesn't matter if it does or not I can't imagine it would make that much of a differance. I still want to make a time script and have no idea how to do the gif er... png part, where it shows what time it is on the screen all the time like it does on new main.
|
Timevar can be reallllly big it wont lag..
if u do it right that is .. and KJS actually you can use setcoloreffect and seteffect... I mean they will work .. you're not allowed to though Those free servers that have those lights2.png images without the actual light is because they cant script :) they put : if (created) { drawaslight; setcoloreffect 0,1,0,.90; ...... } and it should be : if (playerenters) { drawaslight; setcoloreffect 0,1,0,.90; ...... } |
Oookay. Look, information is sent in bytes, right? So, lets think about this.
1 byte=8 bits=256 possible values 2 bytes=65536 possible values 3 bytes=16777216 possible values 4 bytes=4294967296 possible values So, lets consider the last of those. One tick every five seconds means that 4 bytes could store enough values for 21474836480 seconds. For those of you who don't have calculators for brains, that's approximately 681 years. 4 bytes could keep Graal happy for almost seven centuries, and do you really think 4 bytes will produce lag? In any case, if four bytes were used then four bytes would be sent every time, regardless of the size of the number. Whatever lag there was would be there always. |
Quote:
|
| All times are GMT +2. The time now is 09:53 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.