PDA Starter Kit v1.2

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
ramon.dexter
Posts: 1546
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: PDA Starter Kit

Post by ramon.dexter »

Sweet, just sweet. Exactly what I was looking for for ages! Great as always, Nash! :wub:
User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit

Post by Nash »

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
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PDA Starter Kit v1.0

Post by Enjay »

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 all

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 all

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:
Jaska
Posts: 113
Joined: Tue Dec 17, 2019 5:12 am
Graphics Processor: nVidia with Vulkan support

Re: PDA Starter Kit v1.0

Post by Jaska »

Great work! Going to use this on "Lost civilization 2".
User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit v1.1

Post by Nash »

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
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit v1.1

Post by Nash »

Jaska: feel free to use it! Looking forward to playing LC2.
User avatar
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PDA Starter Kit v1.1

Post by Enjay »

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
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit v1.1

Post by Nash »

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
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PDA Starter Kit v1.1

Post by Enjay »

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.
CaptainNurbles
Posts: 275
Joined: Sat Jan 27, 2018 9:12 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: The Deepest Reaches of Space

Re: PDA Starter Kit v1.1

Post by CaptainNurbles »

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!

User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit v1.1

Post by Nash »

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
Enjay
 
 
Posts: 26536
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: PDA Starter Kit v1.1

Post by Enjay »

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
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit v1.1

Post by Nash »

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
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: PDA Starter Kit v1.2

Post by Nash »

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.
SanyaWaffles
Posts: 810
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields

Re: PDA Starter Kit v1.2

Post by SanyaWaffles »

This is good news! Thank you.

BTW, when was 4.7.1 released? I don't see it anywhere.

Return to “Script Library”