Project X Forums



It is currently Fri May 10, 2024 7:41 pm

All times are UTC




Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Fri Jan 11, 2013 3:00 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
StepS wrote:
are the frames synchronized? for example, GS->Tick is for actual logical frames, not the game frames (all the lags and pauses are counted)


hmmm
well my script checks if sticked snow is still attaached with the land every:
if (GS->Tick % 15){}

if not attached - sticked snow sprite kill itself.

And this line is the only difference between other weather scripts. So yes, probably that`s the answer.
I`ve replaced it with your gframe and playing now. So.. "let` see", as people say :)

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Fri Jan 11, 2013 3:20 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
hm...
no desycnh after few games. Apparently it`s fixed.
Thanks a lot, StepS, with help and with your gframe variable. Now i can post it. and re-pack all archives again, lol.

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Fri Jan 11, 2013 3:39 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
PyroMan wrote:
GS->Tick

lol man, GS->Tick is NOT game frames, it is your life frames, it counts ALL lags and pauses on YOUR side (Even Esc in replay and offline!!!), so GS->Tick becoms unsynchronized for all players after some time. It's only useful to create non-sync-needed actions, for example some graphic non-object stuff that can move during players' lags (saw the loading pie and trails glitch?), however for that you'd need to use your own replacement instead of M_FRAME (maybe just putting it plain with a check)
thats why i created gframe

and i assume there's no relation to active worm. i think it can occur anytime safely as long as it is synchronized.

as for GS->Tick, here it could only be useful for snow which goes during players lags :mrgreen: but obviously it would be a non-sticky snow

I think the reason for GS->Tick being unsynchronized is simple: it's the only independent timer in the game :) it can NOT be made with any scripts, it can be only built-in in PX.
ever noticed why the turn-begin-arrows on top of the worm, oil drums, crates and donor cards are always moving, even when he's lagging? try to experiment with changing GS->Tick values and look at these arrows, and you'll understand :D

PS: dont forget to put stepsutils.pxl into archive in case someone doesn't have it


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Fri Jan 11, 2013 4:07 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
StepS wrote:
PyroMan wrote:
GS->Tick

lol man, GS->Tick is NOT game frames, it is your life frames, it counts ALL lags and pauses on YOUR side (Even Esc in replay!!!), so GS->Tick becoms unsynchronized for all players after some time. It's only useful to create non-sync-needed actions, for example some graphic non-object stuff that can move during players' lags (saw the loading pie and trails glitch?), however for that you'd need to use your own replacement instead of M_FRAME (maybe just putting it plain with a check)
thats why i created gframe

and i assume there's no relation to active worm. i think it can occur anytime safely as long as it is synchronized.

as for GS->Tick, here it could only be useful for snow which goes during players lags :mrgreen: but obviously it would be a non-sticky snow

I think the reason for GS->Tick being unsynchronized is simple: it's the only independent timer in the game :) it can NOT be made with any scripts, it can be only built-in in PX.
ever noticed why the turn-begin-arrows on top of the worm are always moving, even when he's lagging? try to experiment with changing GS->Tick values and look at these arrows, and you'll understand :D


yeah i inderstand. also background debrises, they no need to be synchronised. its just some graphics that no matter what players see. those water waves etc. So basically using GS->Trick here was a problem, becouse my particular situation requires synchronisation at that point.

I always was noticing, why weapon trail sprites continue animate (untill disappear) oflline when escape presssed, but pxparticle-based sprites freezes at some moment (moment of pause). Apparently those in-game sprites that produses WA using those independent variables like GS->Tick so they are still running no matter game paused or not.

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Fri Jan 11, 2013 4:11 pm 
Offline
User avatar

Joined: Sat Nov 27, 2010 12:59 pm
Posts: 346
yes, and not only variables. such aren't even CGObjects, they are raw CObjects. In short words, non-material items which cannot affect game sync. OC_SeaBubble is an example cltype of such an object. it moves independently too.
a grave is OC_Cross and it's CGObject which can pass through other objects except terrain and water


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Sat Jan 12, 2013 1:00 pm 
Offline

Joined: Fri Feb 26, 2010 4:44 pm
Posts: 92
any way to choise weather type priority?
es: snow 20%, rain30%, nothing 50%


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Sat Jan 12, 2013 3:54 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
Atr0x wrote:
any way to choise weather type priority?
es: snow 20%, rain30%, nothing 50%


sure, pretty easy.
now weather choosing type using RandomInt(1, 3);
we can say this: choose random number between 1 and 10.
if 1-2: snow;
if 3-5: rain;
if 5-10: nothing.

u want me to do that? :)

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Sat Jan 12, 2013 4:27 pm 
Offline

Joined: Fri Feb 26, 2010 4:44 pm
Posts: 92
PyroMan wrote:
Atr0x wrote:
any way to choise weather type priority?
es: snow 20%, rain30%, nothing 50%


sure, pretty easy.
now weather choosing type using RandomInt(1, 3);
we can say this: choice random number between 1 and 10.
if 1-2: snow;
if 3-5: rain;
if 5-10: nothing.

u want me to do that? :)



LOL

pretty easy...maybe for you :D

so?

Code:
 sType = RandomInt(1, 10);
   
        if (sType == 1 || sType == 2  )
        {         
        sType =  1;
          }
             if (sType == 3 || sType == 4 || sType == 5   )
        {         
        sType =  2;
          }
   
             if (sType == 6 || sType == 7 || sType == 8 || sType == 9 || sType == 10   )
        {         
        sType =  3;
          }

:lol:


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Sat Jan 12, 2013 5:14 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
lol :D
but if u have 100 variables? will u check each of them: 1 || 2 || 3 || 4 || 5 || 6..... || 99 ?

i recommend use this code:

Code:
        local temp_chooser = RandomInt(1, 10);
   
        if (temp_chooser > 5)  sType =  3;
        else if (temp_chooser > 2) sType =  2;   
        else sType =  1;


and put it all inside "chooseType()" function

_________________
Things to impress.


Top
 Profile  
Reply with quote  
 Post subject: Re: p_WEATHER (variable Snow/Rain/Nothing effects, w/lightni
PostPosted: Sat Jan 12, 2013 5:17 pm 
Offline
User avatar

Joined: Sun Apr 08, 2012 1:09 pm
Posts: 425
Location: Ukraine, Kyiv
with your code you changing variable itself) don`t do that. change some third-party or local variable and set your stuff based on its values.

_________________
Things to impress.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane