PDA Starter Kit v1.2

Post your example zscripts/ACS scripts/etc here.

Re: PDA Starter Kit

Postby ramon.dexter » Thu Oct 15, 2020 1:14 pm

Sweet, just sweet. Exactly what I was looking for for ages! Great as always, Nash! :wub:
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: PDA Starter Kit

Postby Nash » Mon Nov 02, 2020 8:58 am

v1.0 is released. Highlights include:

- Full keyboard/gamepad navigation
- Clickable scrollbars
- UI sounds
- All configuration has been moved to a separate file (zscript/PDAConfig.zc). This is to make customization much easier without exposing the user to the complicated classes.
- The license has been updated. Please read it carefully, but the short version is: you may not use v1.0 (and future versions) in monetized projects.

If there aren't any new problems found, this will be the last version I put out for a while. I will be busy working on other projects and won't be able to return to this for the time being. I've tried my best to make v1.0 as solid as possible.
Last edited by Nash on Mon Nov 02, 2020 5:56 pm, edited 1 time in total.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.0

Postby Enjay » Mon Nov 02, 2020 1:00 pm

Really cool stuff, as ever Nash.

As you know, I love this resource and I've had lots of fun messing around with it. I hope to get something out that uses it one day too. The clickable scroll bars are the final finishing touch as far as I'm concerned. (Oh, and I love the addition of sounds too.)

The new version does, however, have one of these:
Code: Select allExpand view
Script warning, "PDA.Starter.Kit.v1.0.pk3:zscript/pdamenuelements.zc" line 377:
Truncation of floating point value



I also don't know if it's really an issue but if you summon a PDA reader and then pick it up without having picked up any messages, then press enter to activate a non-existent message, the game dumps to the console with:

Code: Select allExpand view
MAP01 - PDA Test Map

]summon pdareader
VM execution aborted: array access out of bounds. Size = 0, current index = 0

Called from PDAMenu.MenuEvent at PDA.Starter.Kit.v1.0.pk3:zscript/pdamenu.zc, line 185


Doing most of the customisation from the config file does indeed make things easier. Congrats on the 1.0 release. :thumb:
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PDA Starter Kit v1.0

Postby Jaska » Mon Nov 02, 2020 1:33 pm

Great work! Going to use this on "Lost civilization 2".
Jaska
 
Joined: 17 Dec 2019
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: PDA Starter Kit v1.1

Postby Nash » Tue Nov 03, 2020 1:31 am

v1.1 is released. Hopefully this is it. :P

Changes:

- PDAFONT is now libre (based on Red Hat's Liberation Mono)
- Fixed VM aborts and warnings
- The PDA reader now pops up a tutorial message when picked up. Can be disabled by setting the "PDAReader.ShowTutorial" property to "false" in "zscript/PDAReader.zc"
- Add sounds when selecting a PDA with the keyboard/gamepad
- PDA list now shows an "-EMPTY-" label when you have no PDAs
- Expose the scrollbar width to "PDAConfig.zc"
- Allow separate amounts of scrolling for the mousewheel and the keyboard/gamepad
- Replaced the PDA Reader pickup sprite
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.1

Postby Nash » Tue Nov 03, 2020 1:31 am

Jaska: feel free to use it! Looking forward to playing LC2.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.1

Postby Enjay » Tue Nov 03, 2020 12:44 pm

Fantastic stuff Nash. It all seems to be working perfectly, and some nice last-minute tweaks too. Thank you ever so much for putting this resource together. There is no way on Earth I could have come close to making anything with even a fraction of the functionality of this, but tailoring it to my own needs is a breeze.

[Edit]
Actually, I just found a minor glitch. The problem is, I don't really know what to do to repeat it. The glitch is that very occasionally moving the mouse over the PDA entries list will highlight one entry but the highlight will rapidly flicker to the one above. As you move the mouse around over one entry to the next, the effect persists with whichever entry is under the cursor being mostly highlighted but the one above flickering.

Like I said, I'm not sure how to cause the glitch to happen but you can emulate how it looks by trying the following:

Run the test map and pick up all of the entries.
Open the reader and mouse-hover over over any of the entries except the top one
While the mouse cursor is there, press and hold the upwards menu navigation key (probably up arrow)

Once the key-repeat effect starts, you will see the entry highlight flicker from the entry that the mouse is over to the one above and back again. That's how the effect looks but, sometimes, somehow, it's possible to get this effect (or something that looks like it) without pressing the keyboard at all.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PDA Starter Kit v1.1

Postby Nash » Tue Nov 03, 2020 9:17 pm

Enjay, glad you're enjoying it. About the flickering bug, well, unfortunately if I can't figure out how to accurately reproduce it, I won't be able to take a look. And with my upcoming busy schedule, I won't be able to spend too much time hunting for it... if you figure out a way to reliably make it happen, then I'd be glad to provide a quick fix. :D
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.1

Postby Enjay » Wed Nov 04, 2020 12:20 pm

Understood. I thought that would be the answer. For all I know it could even be hardware specific but if I do find a way to reliably make it happen, I'll post the details.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PDA Starter Kit v1.1

Postby CaptainNurbles » Sat Dec 26, 2020 10:14 pm

Fuckin' hell, this is sleek stuff, man! When I started working on a personal mod of mine back in November I was hoping I could find a way to code something like this myself (which wound up being a task WAY OUTSIDE of my skillset since I know nothing about ZScript) for the sake of having an ingame encyclopedia for tips on the mechanics of my mod. Its insane how easy this is to implement into other mods. Many thanks to ya, Nash!

CaptainNurbles
 
Joined: 27 Jan 2018
Location: The Deepest Reaches of Space
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: PDA Starter Kit v1.1

Postby Nash » Tue Oct 12, 2021 6:54 am

Can I get a simple Yes/No answer for this:

With the standard download from the front page, does the PDA menu still cause memory build up the longer it remains open?
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.1

Postby Enjay » Tue Oct 12, 2021 11:00 am

Simple answer: No. (At least not for me.)

Slightly more detailed answer.
With 4.6.1, if the PDA paused the game, the garbage collector could not keep up (though I never actually ran into a memory problem as a result). With 4.7.0, regardless of whether the PDAs paused the game or not, memory got stomped on pretty hard and the PDAs would cause a crash (with my own ones, usually within 30 seconds or so).

With the current git builds, neither of the above things happen, regardless of whether the PDAs pause the game or not. If I open task manager and keep an eye on it while playing, GZDoom's memory usage does go up when my PDAs are open, but it comes down again periodically as the gc kicks in. It never gets too high (for my system anyway). I have had them open and been clicking around them for several minutes on end to monitor the situation. Memory goes up for a while, then gc does its thing and it goes down. After closing the PDAs, a few moments later memory use drops to normal play levels.

So, as far as I can tell there is no longer a problem. I was able to get the 4.7.0 memory crash with the front page download - but it took longer than with my own PDAs. I have not had the crash with the front page download or my own version of it since the fixes were added to the GZDoom git builds.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: PDA Starter Kit v1.1

Postby Nash » Tue Oct 12, 2021 11:52 am

Alright, wonderful. After speaking with Gutawer, it seems that ZForms 2.0 won't be fully ready for some time, and that she plans to introduce more potentially API-breaking changes. I think it's safe to just leave this kit running on the v1.0 ZForms for as long as possible, in the short term.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.2

Postby Nash » Thu Oct 21, 2021 2:58 am

v1.2 has been released. Very minor, but major, changes:

- kit has been relicensed to MIT. Enjoy!
- force GZDoom 4.7.1 (which was just released 17 hours prior to writing this post) because that version of the engine is needed to fix the performance problems when the PDA menu is open.

Under the hood, there are no other changes. It is still the same code from v1.1.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: PDA Starter Kit v1.2

Postby SanyaWaffles » Thu Oct 21, 2021 3:17 am

This is good news! Thank you.

BTW, when was 4.7.1 released? I don't see it anywhere.
User avatar
SanyaWaffles
Certified Heretic and Grill Champion
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Previous

Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests