Duke4.net Forums: UGHUD + KILCOUNT (my 2-in-1 mod) - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

UGHUD + KILCOUNT (my 2-in-1 mod)  "Going into 2025 with an Unreal-style HUD and fixed kill counter"

#1

Hi and merry Christmas to everyone. It's been a long while since I released something for Duke, but here's another quick project I began recently.

Attached Image: duke0017.png

This mod brings the iconic Unreal-style ingame head-up display to EDuke32 using only CON code. Despite its small size, the mod also provides neat and elegant solutions to some minor but longstanding issues found in the original game. It was mostly finished yesterday, but it took me a while to playtest it and fix some issues I found. Today I've tried my best to polish it to a "stable" release. Still I need some public testing, so please report any problems you get when using it.

Attached File  UGHUD10.ZIP (22.22K)
Number of downloads: 43

To install, just unpack this into your EDuke32 directory and select UGHUD as a game directory on the startup screen, or run the provided batch file. See the readme file for a detailed description. The mod replaces both the old and "modern" mini-HUDs, but keeps the old full blown status bar also quickly accessible. Use the 'shrink/enlarge screen' keys to switch between different modes.

You may find a similar HUD in Unreal and Return to Na Pali games (known together as Unreal Gold, hence the "UGHUD" designation). I like these games a lot and always wanted to have the same style of HUD available in Duke Nukem 3D. I think that this style of HUD best fits the atmosphere of some user maps such as Red series, but it also plays well with the original episodes.

Another thing bundled with UGHUD is my KILCOUNT mod that introduces a new counter for kills that actually kind of works. It's a small CON script that can be used on its own, but I wrote it together with UGHUD, so I just put it into the same release.

I'd also wish to release my new map that is almost done, but I can't keep up with releasing anything more substantial for Duke in 2024. I hope you enjoy this little mod and find it useful.

UGHUD mod features:

  • New HUD drawing code with two modes inspired by the game HUD in Unreal
  • Code-only implementation with no additional content required
  • Using bars to display the percentage of ammo and inventory in a compact way
  • Integral (pixel-perfect) scaling of the HUD with square pixel aspect ratio
  • The scale adjusts to any screen resolution and responds to HUD options
  • Two types of game messages, with pickups shown in the bottom like in Unreal
  • Using a similar style for displaying level titles upon load
  • The crosshair is green and is also drawn using pixel-perfect scaling
  • Will not select a weapon with no ammo (again, like in Unreal)
  • Some extra messages when Duke dies or kills himself (beta)
  • Fixed pipebombs shown as not selectable when only the detonator is available
  • A custom level stats display that uses the same scaling method
  • Also showing level stats in automap mode (alongside the level name)
  • Well-structured code that can be studied and reused in other places
  • No extra per-actor variables introduced
  • Contains custom code for printing numbers with precise coordinates
  • Also contains code for drawing solid rectangles and outlines
  • The old HUD is fully restored when switching to the legacy status bar
  • Viewport shrinking has been restored with a better tile for the border


KILCOUNT mod features:

  • Counting every potential enemy respawn right from the start of a level
  • The total number of enemies normally stays the same as you play
  • No double-counting of "compound" enemies (e.g. not counting hatched eggs)
  • Fixed double-counting squished enemy corpses
  • Fixed double-counting frozen pigs
  • Counting enemies eaten by slimers as kills
  • Will count any custom enemies added to the game


Original README file with other info:

Spoiler

7

User is offline   LUISDooM 

#2

Just tested this one on EDUKE32 on Zeta Touch and works wonders, I always wanted DN3D hud mod like this one! Thank you very much for making this! :D

Attached thumbnail(s)

  • Attached Image: Screenshot_20241228_144305_Zeta Touch (1).jpg


This post has been edited by LUISDooM: 28 December 2024 - 09:59 AM

1

User is offline   brullov 

  • Senior Artist at TGK

#3

Pure elegance. Thank you for this cute Christmas present! The KILLCOUNT fix is a really nice bonus. I'll take a look with interest to see how it was accomplished.

EDIT: Happy Christmas!

This post has been edited by brullov: 28 December 2024 - 12:09 PM

0

User is offline   zykov eddy 

#4

View PostJan Satcitananda, on 28 December 2024 - 09:06 AM, said:


* Counting every potential enemy respawn right from the start of a level



One thing to note, there are respawn sprites in some Duke 3D levels that have nothing to trigger them, therefore, no enemies spawn from them.
1

User is online   Danukem 

  • Duke Plus Developer

#5

This is a great type of mod and it's very satisfying for the coder and also the player to get all these features in a single code file without other overhead. Having struggled with it myself, I know that making new hud elements scale correctly to the player's hud scale choice can be tricky.

There's a lot of other bugs in the original CONs that could be fixed also, if you want to expand this mod that would be an obvious direction to take it. I have a mod like that and there's at least one other, but this one has other unique features that could make it the standard in that genre.

With kill counts, what I've come to realize over the years is that yes, there are some clear unambiguous bugs in the way it works in vanilla, but also there are aspects of it that come down to arbitrary choices where there is no clear right answer.
1

#6

View PostLUISDooM, on 28 December 2024 - 09:58 AM, said:

Just tested this one on EDUKE32 on Zeta Touch and works wonders, I always wanted DN3D hud mod like this one! Thank you very much for making this! :D

Cool! I wonder how playable the game is on handheld devices. I see that the pixel aspect ratio is not square there, is it due to the device doing some extra hardware correction?

View Postbrullov, on 28 December 2024 - 12:08 PM, said:

Pure elegance. Thank you for this cute Christmas present! The KILLCOUNT fix is a really nice bonus. I'll take a look with interest to see how it was accomplished.EDIT: Happy Christmas!

Thank you! I spell it "KILCOUNT" to fit into eight characters. Maybe it could be called "KikAsses" or something like that.

View Postzykov eddy, on 28 December 2024 - 03:49 PM, said:

One thing to note, there are respawn sprites in some Duke 3D levels that have nothing to trigger them, therefore, no enemies spawn from them.

Yes, I noticed that too during the tests. It would take another mod on top of that to detect and remove those respawns. I have an idea for a mod that would aid a mapper with playtesting their level and also automatically fix errors such as dangling respawns.

View PostDanukem, on 28 December 2024 - 08:08 PM, said:

This is a great type of mod and it's very satisfying for the coder and also the player to get all these features in a single code file without other overhead. Having struggled with it myself, I know that making new hud elements scale correctly to the player's hud scale choice can be tricky.There's a lot of other bugs in the original CONs that could be fixed also, if you want to expand this mod that would be an obvious direction to take it. I have a mod like that and there's at least one other, but this one has other unique features that could make it the standard in that genre.With kill counts, what I've come to realize over the years is that yes, there are some clear unambiguous bugs in the way it works in vanilla, but also there are aspects of it that come down to arbitrary choices where there is no clear right answer.

It took me some trial and error to override the default rotatesprite scaling due to the enforced "RS_AUTO" flag (I dunno if it can be turned off). It's easier to work in actual screen pixel domain when doing the integral scaling I needed.
Can you link me to the mod you did to fix the game (my guess is it isn't DukePlus)? I'd like to address other game issues, I just want to keep the mod simple and compatible with other stuff.

As for arbitrary choices, you're right. For example, how should you treat potentially infinite kills on "Damn I'm good" difficulty? I can see two viable ways, but didn't dig into that yet. Also, should you count offsprings of the queen? Is the Recon Car two enemies (the vehicle and the pig) or just one (the pig itself)? My approach is to "allocate" a single kill for every enemy placed on the map. However, I also count newly spawned baddies. The only such occasion in the game (beside the 'spawn' command) is that the queen can spawn new protector drones indefinitely.

The primary issue is that not all respawns that exist on a map can be triggered, and it can't be solved in the general case (imagine an inaccessible room with a touchplate that triggers an enemy respawn, but the engine will never calculate that the room actually can't be entered by the player). The best you can do is to clean up any unreferenced tags, but it should work for the vast majority of maps. Also some maps might contain enemies placed where they can't be killed (e.g. behind a one-way wall to make sounds or trigger other effects).

This post has been edited by Jan Satcitananda: 29 December 2024 - 01:25 AM

0

User is offline   LUISDooM 

#7

View PostJan Satcitananda, on 29 December 2024 - 01:01 AM, said:

Cool! I wonder how playable the game is on handheld devices. I see that the pixel aspect ratio is not square there, is it due to the device doing some extra hardware correction?

The game on an android phone is very playable (it's like playing it with a controller), the thing is to get used to the touchscreen controls. I finished Blast Radius on it, so that says something :P
The screenshot (and device) resolution is 2400x1080 stretched to 1920x1080 (the in game resolution, using software renderer with upscaling x2), so that's maybe why the hud looks slightly stretched on the pics I posted on my prevous post
0

#8

So the vanilla kill counting mechanism has proven to be unreliable, as it keeps producing occasional errors with other enemies as well, thus I ended up using a per-actor variable for storing counter states. This allowed to make a counter reliable enough yet fully bug-compatible with the original (buggy) game mechanics (i.e. doesn't require to redefine the existing actor code breaking compatibility with mods that also do that). The HUD itself got a few minor fixes as well.

I also wrote a map checker utility that automatically detects and removes "unreferenced" respawns (and some other sprites) from a map upon load. It's fast and could also help mappers analyze and debug their levels.

Then I realized that the outline automap mode is inferior to one in Doom, so recently I prototyped a Doom-like automap with some extended coloring:

Attached Image: duke0018.png

I suppose what may stop people from making small mods like this is the lack of some general infrastructure to help maintain compatibility with each other and with maps. Seeing that some effort was put into making CON more modular, I tried to organize the code into smaller modules with some hierarchy of dependencies. I think I got close to a working extensible mutator system that can switch mutators on and off during the game using a special menu (i.e. without recompiling the code), or as requested by the map author (using a special sprite). This could allow mappers to use any new effects without unwanted side effects on other levels, and other Duke modders could use it for their own mini-mods, as the system is pretty easy to work with. All of this is expected in the upcoming update!

This post has been edited by Jan Satcitananda: 07 January 2025 - 02:17 AM

4

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options