Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   PlayerWorlds Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=15)
-   -   Time system (https://forums.graalonline.com/forums/showthread.php?t=4198)

XilosTinsu 06-07-2001 12:57 AM

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?

KJS 06-07-2001 10:49 AM

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)

grim_squeaker_x 06-07-2001 04:10 PM

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.

Kaimetsu 06-08-2001 12:45 AM

Re: Time system
 
Quote:

Originally posted by XilosTinsu
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?
What on Earth do you mean by "lag"?

LiquidIce00 06-08-2001 03:06 AM

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

KJS 06-08-2001 03:52 AM

on
 
on free servers you cant use the function
seteffect
or
setcoloreffect

XilosTinsu 06-08-2001 04:13 AM

Re: Re: Time system
 
Quote:

Originally posted by Kaimetsu


What on Earth do you mean by "lag"?

Well I heard, that if you use timevar that after awhile when timevar gets higher or whatever that it lags alot, this is just what I heard. I have no knowledge on timevar, except it adds one every 5 minutes.

KJS 06-08-2001 04:37 AM

accually
 
Quote:

Well I heard, that if you use timevar that after awhile when timevar gets higher or whatever that it lags alot, this is just what I heard. I have no knowledge on timevar, except it adds one every 5 minutes.
accually it adds 1 every 5 seconds not minutes...
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)

Kaimetsu 06-08-2001 04:54 AM

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.

XilosTinsu 06-08-2001 06:04 AM

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?

KJS 06-08-2001 07:06 AM

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...

Kaimetsu 06-08-2001 05:49 PM

Re: well the thing is
 
Quote:

Originally posted by KJS
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...

No. I'll assume you're not a programmer, so I'll fill you in. It wouldn't use variable lengths for the information because...ack, it'd take too long to explain. Trust me on this one.

Quote:

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...
I wonder that too...

KJS 06-08-2001 09:02 PM

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?

XilosTinsu 06-08-2001 10:06 PM

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.

KJS 06-08-2001 10:16 PM

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.

XilosTinsu 06-10-2001 06:10 AM

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.

LiquidIce00 06-10-2001 08:27 AM

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;
......
}

Kaimetsu 06-11-2001 09:03 PM

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.

KJS 06-11-2001 09:12 PM

Quote:

Originally posted by LiquidIce00
KJS actually you can use setcoloreffect and seteffect... I mean they will work .. you're not allowed to though
I know they work but if stefan sees you using it he might take down your server if it is a free server.


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.