CLIENTSIDE alternative?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Zeberpal
Forum Regular
Posts: 476
Joined: Mon Jun 04, 2012 6:55 am

CLIENTSIDE alternative?

#1

Post by Zeberpal » Sat Feb 07, 2015 12:38 pm

*Player goes from one location to another...
Image
Image

It works allright in Singleplayer, right. The trick is FSKY1ed floors and ceilings, as well as ChangeSky function and other secrets.

But how to make it work online?? Obviously if Player enters another "sky" location it will switch for everyone which is ew ow uh.

I tried to use CLIENTSIDE script, thinking it will do things only for player who triggered that script, but yet it changes for everyone, meh.
Still don't get the point of clientside script anyway. I also tried Skybox picker trick with teleporting people to another area, but it is way too messed up and glitchy.

Any ideas guys D: ?
Image ImageImage

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

RE: CLIENTSIDE alternative?

#2

Post by Konda » Sat Feb 07, 2015 1:13 pm

http://wiki.zandronum.com/Clientside_Scripting
Even that you should take with a grain of salt, though. I tried some of the things the wiki page says it works, and it just didn't work as expected (like making an actor execute a clientside ACS script which would supposedly make all clients executing its code do the dame thing - that just didn't work for me). My take is that clientside scripts are very buggy and should be avoided. Hope the wiki page will be helpful, though. It provides some insight on how the thing actually works (or how it is expected to work :lol: ).

Code: Select all

<Synert> fuck
<Synert> plugged in my memory stick and got a bsod

Arctangent
 
Posts: 82
Joined: Mon Nov 24, 2014 8:19 am

RE: CLIENTSIDE alternative?

#3

Post by Arctangent » Sat Feb 07, 2015 3:17 pm

I have seen evidence that stuff that affects the world can't be client-sided, even when it's purely visual. You might just have to drop multiplayer support entirely if you want to use those backgrounds.

User avatar
Zeberpal
Forum Regular
Posts: 476
Joined: Mon Jun 04, 2012 6:55 am

RE: CLIENTSIDE alternative?

#4

Post by Zeberpal » Sat Feb 07, 2015 4:08 pm

Arctangent wrote: You might just have to drop multiplayer support entirely if you want to use those backgrounds.
Unfortunatelly, it looks that way :hmm:
Tried every solution it gave, it was no effect. Thanks, though

Well, I guess...I'll... I'll go now..

/me sadly cries and goes away. :sad:
Image ImageImage

User avatar
Ænima
Addicted to Zandronum
Posts: 3578
Joined: Tue Jun 05, 2012 6:12 pm

RE: CLIENTSIDE alternative?

#5

Post by Ænima » Sat Feb 07, 2015 5:27 pm

Somebody ran into this before with trying to change map fog on just one player. I really don't think you can change parts of the map on purely the clientside. IMO you should be able to but it would have potential to cause massive desync.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Leonard
Developer
Posts: 166
Joined: Sat Mar 30, 2013 8:09 pm

RE: CLIENTSIDE alternative?

#6

Post by Leonard » Sat Feb 07, 2015 7:13 pm

Ænima wrote: Somebody ran into this before with trying to change map fog on just one player. I really don't think you can change parts of the map on purely the clientside. IMO you should be able to but it would have potential to cause massive desync.
Arctangent wrote: I have seen evidence that stuff that affects the world can't be client-sided, even when it's purely visual. You might just have to drop multiplayer support entirely if you want to use those backgrounds.
That isn't true.
The only problem I see here is how you want to trigger the clientside script.
A client won't predict any thing executed special or line triggered special.
I think you could try to make a clientside script that will run on entering the map and that keeps track of the player's position in a loop and make it do things once that player reaches a specific spot.
[spoiler]

Code: Select all

<@WaTaKiD> punish me
* Seanphone gets his belt out
<+Seanphone> all right WaTaKiD bend over

Code: Select all

<Kokiri> capo whos your fav pony?
<capo> i like them all

Code: Select all

cobalt changes topic to 'ZDoom 2.6.1 progress: at r3771, 23 revisions left (98% complete)'
<edward-san> omg
<edward-san> almost finished!!!
<Sean> !!!!!!!!!!!!!!
<Sean> Plot twist: This is the status of Half-Life 3.
<Dusk> plot twist: the percentage count suddenly begins to decline instead
<Sean> Torr makes a forum post "We're going back to 2.5.0"
<Dusk> and we do so incrementally
[/spoiler]

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: CLIENTSIDE alternative?

#7

Post by ZzZombo » Wed Mar 04, 2015 1:26 am

Can't help without the ACS code...
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: CLIENTSIDE alternative?

#8

Post by ibm5155 » Wed Mar 04, 2015 5:19 pm

I think you 'll need the same solution on zm09 abandoned mines script.
Clientside scripts when called is executed by everyone, to avoid that everyone execute that script called and just the activator do, you must do right before your code on the script a

Code: Select all

if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
----now I remember the right name :p
On my map, there's a room with a table, and sometimes when someone enters on it, that guy will see the walls with blood, the light flickering, a white face laughting about you and a "scary music", after some seconds, the map went back to normal, but only the activator will see all that crazy stuff...

Extra info, I think you'll need to update your acc compiler since consoleplayer was an exclusive zandronum function

EDIT: ConsolePlayer() => ConsolePlayerNumber()

EDIT2: Resuming what's clientside
It's a script that will not change some gameplay thing, like spawn a monster, change a floor height...
Also, they're good to avoid data traffic, like, instead of creating a serverside timer, make it clientside, so you'll free alot the internet (hudmessage is a internet fat packet D:).

But then, we have a problem, all global integers/strings are server side, so if you want to use them on a clientside script, you'll need to transfer they to the client...

Well, if you need some clientside question, try to ask me, I did like 2 years of research on it for many things on my map ;--;

Still, I want a getplayercameraposx/y/z to may me clientside rainfall perfect :(
Last edited by ibm5155 on Wed Mar 04, 2015 8:49 pm, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: CLIENTSIDE alternative?

#9

Post by Vincent(PDP) » Wed Mar 04, 2015 7:34 pm

@ibm5155, some notes for you:

First:
ActivatorTID() is not the same as PlayerNumber(), ActivatorTID() returns the tid of the activator. If the player has got tid 843, and 3 is the player's number, then ConsolePlayerNumber() will be 3 and ActivatorTID() will be 843. Which means the script will never work.

Secondly:
ConsolePlayer() is not defined by the way, but if you use "ConsolePlayerNumber() => PlayerNumber()" the script will work if PlayerNumber() is 3 and ConsolePlayerNumber() is everything from 3 and above. Which means that the script will apply to all players that has playernumber 3-63.

Third:
Break only works in switch statements or loops. :)

To avoid everyone from activating the CLIENTSIDE script
The correct statement to check the current player's number with the activator's playernumber is actually:

Code: Select all

If(ConsolePlayerNumber() != PlayerNumber()) { Terminate; }
Last edited by Vincent(PDP) on Wed Mar 04, 2015 7:42 pm, edited 1 time in total.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: CLIENTSIDE alternative?

#10

Post by ibm5155 » Wed Mar 04, 2015 8:44 pm

yeah, it was terminate; I was just lazzy to remember how to finish it on my job :p

EDIT: indeed, it was wrong, I checked now and it's
if(ConsolePlayerNumber() != PlayerNumber()) Terminate;
that I used, well, it's almost the same name, but I was lazzy to find the right name :p

AND finally, you dont need a { terminate; } on that case, only if you have two or more things inside of it
so

Code: Select all

if(wadda)  terminate;
equals

Code: Select all

if(wadda) {terminate;}
Last edited by ibm5155 on Wed Mar 04, 2015 8:48 pm, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: CLIENTSIDE alternative?

#11

Post by Vincent(PDP) » Wed Mar 04, 2015 9:07 pm

ibm5155 wrote: AND finally, you dont need a { terminate; } on that case, only if you have two or more things inside of it
I know. :p
But I think it looks better with the brackets. They're not necessary but it's the way statements normally are defined. I guess I'm a bit of a perfectionist, note how I use the correct casing on every method/variable too. (:

Code: Select all

ConsolePlayerNumber()
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: CLIENTSIDE alternative?

#12

Post by Watermelon » Fri Mar 06, 2015 12:00 am

Konda wrote: http://wiki.zandronum.com/Clientside_Scripting
Even that you should take with a grain of salt, though. I tried some of the things the wiki page says it works, and it just didn't work as expected (like making an actor execute a clientside ACS script which would supposedly make all clients executing its code do the dame thing - that just didn't work for me). My take is that clientside scripts are very buggy and should be avoided. Hope the wiki page will be helpful, though. It provides some insight on how the thing actually works (or how it is expected to work :lol: ).
To expand on this (since I'm the one who wrote that article but it's getting sadly out of date and growing hairs):
- Clientside stuff is incomplete
- Clientside stuff can be buggy
- Clientside stuff breaks between releases

My recommendation to the OP is to report any anomalous behaviour on the tracker. Its highly possible that some hacky workaround for stuff will break in other implementations. If you can magically get the thing to work in one version, it's possible in future versions it wont work.


EDIT: I do wish Clientside stuff was more standardized/implemented nicer without the gaping holes we have.
One interesting bug is Clientside input grabbing fails randomly for some people (small minority) with no known reason to date.
Last edited by Watermelon on Fri Mar 06, 2015 12:17 am, edited 1 time in total.

Post Reply