Last several days Im trying to make on zscript side simple OOP-like 2D drawer (or something like that), to get rid of over-complication of code arising when drawing a lot of pictures/text using render overlay/status bar draw/another function that able to draw something on screen.
I have this for now
https://github.com/MekBoss/gzdoom-2d-OOP
Its a WIP so it a little rough. Just a LITTLE.
Download it and run with Gzdoom.
After you run it and load a map it should start to draw fire with velocity pointed in the direction somewhere to the upper left corner of a screen. Problem is, there is no way to stop drawing in overlay when you open console or hit "Pause" button. I found a way to stop it when main menu is open, but thats it.
All other functions/variables which can say is game paused or no located beyond the Great Zscript Complinig Mountains, in C++. So, it would be great if such function would be exported to zscript.
Way to find out is gamesim on pause or no
Moderator: GZDoom Developers
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
-
-
- Posts: 1651
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: Way to find out is gamesim on pause or no
Perhaps you'd want to take a look at the UI code in my own project, where I have attempted something similar. Though I haven't done much work with animations - the main goal was to support simple customizable HUDs.Apeirogon wrote:Last several days Im trying to make on zscript side simple OOP-like 2D drawer (or something like that), to get rid of over-complication of code arising when drawing a lot of pictures/text using render overlay/status bar draw/another function that able to draw something on screen.
I have this for now
https://github.com/MekBoss/gzdoom-2d-OOP
Its a WIP so it a little rough. Just a LITTLE
As for your suggestion, perhaps there could also be some way to override the logic that shows the M_PAUSE graphic when the game is paused? This way, not only it would be possible to detect whether the game is paused, but also do something about it (or not). This would of course only make sense for UI-only code.
-
-
- Posts: 1651
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: Way to find out is gamesim on pause or no
Could anyone please tell me why this was closed as a duplicate? I could not find any related suggestions, and it looks like I'm going to need this feature for some final optimizations in my mod in order to deal with this issue.
-
- Posts: 819
- 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: Way to find out is gamesim on pause or no
I think it was added?
-
-
- Posts: 1651
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: Way to find out is gamesim on pause or no
OK, then how do I check if the game is currently paused? I could not find anything relevant in the ZScript code in gzdoom.pk3, so I will appreciate if someone could point me in the right direction.
-
- Posts: 819
- 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: Way to find out is gamesim on pause or no
viewtopic.php?f=15&t=71467&p=1187800&hilit=paused#p1187800
I could have sworn this was added. Maybe a false memory, sorry x_x
I could have sworn this was added. Maybe a false memory, sorry x_x
-
-
- Posts: 1651
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: Way to find out is gamesim on pause or no
Thanks. I have no idea why it didn't turn up in my search results. Guess I will have to do a PR this weekend if I have the time for it.