My try at an on-screen mouse cursor script

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Re: My try at an on-screen mouse cursor script

Post by GooberMan »

Meanwhile, this thread languishes...

Every time a mouse UI comes up, no one solves multiplayer/alternate input issues. So let's solve them.
HeXaGoN
Posts: 161
Joined: Sat Dec 04, 2010 3:07 pm
Location: Texas, United States

Re: My try at an on-screen mouse cursor script

Post by HeXaGoN »

Okay then, so here are a bunch of issues with this script:
  • There is no good way to account for the "invertmouse" CVar without multiplayer/demo issues.
  • There is no way to account for other forms of input besides mouse and keyboard (mouselook/keyboard look)
  • The script itself doesn't have anything specially coded to deal with multiple players using it at this moment.
  • The script runs every tic. That might put some strain on the host, but then again, how are we to have a smooth cursor without the script running every tic?
I think the first issue could be solved with the use of [wiki]GetUserCVar[/wiki].
I don't know if that's the best way, but to me, it seems like it could be one of the only ways.

The second issue would probably take some feature suggestions. Like edward said, how are we to know what the player is using to input yaw/pitch movement? There's no way to tell at this time.

The third issue could easily be resolved with some extra code in the script, but then that just compounds onto the 4th issue.

The 4th issue could be resolved if the script ran clientside and reported any events to the server when necessary (such as clicking on something, but this is just a mouse script, so that is beyond the scope of this script). IIRC, clientside scripts are only in Zandronum/Skulltag.

Yikes, this is more complex than I had previously thought! Do let me know what you guys think.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: My try at an on-screen mouse cursor script

Post by edward850 »

wtg62 wrote:The 4th issue could be resolved if the script ran clientside and reported any events to the server when necessary (such as clicking on something, but this is just a mouse script, so that is beyond the scope of this script). IIRC, clientside scripts are only in Zandronum/Skulltag.
This sounds like you think ZDoom can be affected by map complexity over the network. It isn't. Everything already is "clientside", and the only component that scales is the number of players, as the playsim itself is determined by player input. Hence it being deterministic in the first place. Zandro added clientside functions to attempt to get around the problem of its own network components not being able to scale like that at all.

That is how Doom always worked, in case you forgot. :P
HeXaGoN
Posts: 161
Joined: Sat Dec 04, 2010 3:07 pm
Location: Texas, United States

Re: My try at an on-screen mouse cursor script

Post by HeXaGoN »

Pffft how could I forget that? Silly me!
Probably because I haven't touched ZDoom multiplayer in ages. :wink:
And... was thinking of Zandronum, stranegly.

So how's about those other actual problems then? :P
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: My try at an on-screen mouse cursor script

Post by edward850 »

The actual problem is that ACS simply isn't designed for such a system, and while ideas have been discussed, nobody has had time to design or prototype any such implementation that would. Strife Dialogues are about as close as one gets, at the moment (sanity wise).
HeXaGoN
Posts: 161
Joined: Sat Dec 04, 2010 3:07 pm
Location: Texas, United States

Re: My try at an on-screen mouse cursor script

Post by HeXaGoN »

I agree with you there. How are we to have a good UI system, when it runs with a ticrate of 35 tics per second?
Even if 35 is a large number compared to most games, you aren't going to be able to simulate a mouse very well.
That's something that definitely bothered me making this script, because of the unwanted lagging effect it created.
Plus... well, multiplayer issues are there for sure.

Strife dialogues don't suffer a lot of the issues ACS UI scripts do, correct?
The problem with Strife dialogues for me, is how little flexibility it gives you.
I could sorta picture a system that works like the Strife dialogues, but lets you change the x & y positions of text, or even use images and what not.
I'd think transitions (i.e. menu options sliding in and other slightly more complex stuff) may be out of the question though, or would come later.
User avatar
Xeotroid
Posts: 448
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Re: My try at an on-screen mouse cursor script

Post by Xeotroid »

For more flexible dialogues you might check out ZKVN, but I didn't look into it. Otherwise... you'll have to wait for DoomScript
HeXaGoN
Posts: 161
Joined: Sat Dec 04, 2010 3:07 pm
Location: Texas, United States

Re: My try at an on-screen mouse cursor script

Post by HeXaGoN »

Xeotroid wrote:For more flexible dialogues you might check out ZKVN, but I didn't look into it. Otherwise... you'll have to wait for DoomScript
I was definitely picturing just this kind of flexibility. Really good link you just gave me there.
Locked

Return to “Editing (Archive)”