SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Lua

Reply
 
Thread Tools
Race HUD Details »»
Race HUD
Version: 1.0b, by Tamkis (Lua Grasshopper) Tamkis is offline
Developer Last Online: Mar 2016

Category: Version: SRB2 Rating: (1 votes - 3.40 average)
Released: 07-25-2015 Last Update: Never Installs: 0
Scripts Re-Useable Content Sprites/Graphics Is in Beta Stage

After playing Duon the Adventurer's SRB2 Riders v2.1 WIP beta port and some generic circuit courses during April 2015, I realized something was missing from Race/Circuit and Competition gametypes. Something very important... a live, on-screen Race HUD with ranking! Because having to press the button for showing the player's scores while racing is obnoxious and not very informative for Race modes. Also, Race modes are lacking some features.

The following wad package contains a Lua script and other assets to add a Race HUD and other improvements and functionality to Race/Circuit and Competition gametypes (just referred to as "Race" modes onwards). It shows the usernames and player icons of the top 5 racers in Race modes on the left side of the screen, your rank in the bottom left corner, and a Win/Lose logo upon finishing the race (depending on if you finished in first place or not). The script also supports properly ranking a Metal Sonic racer! Race ranking is waypoint-based, like with circuit tracks in Trackmania. Hitting starposts and completing laps will increase your rank.

Features:
  • Starpost and lap-based ranking
  • Race HUD
    • Displays top 5 racers with usernames & player icons on left side of screen
    • Numeric rank shown in bottom-left hand corner of screen
    • Debug output of ranking data instead of numeric rank (for both player & Metal Sonic)
    • Finished racers' Hud usernames & icons greyed out upon finishing race, and rank locked
    • Long HUD usernames truncated
    • Your HUD username shown in Yellow
    • Other racers' HUD usernames shown in white
    • Metal Sonic racer HUD support
    • Win/Lose logo shown upon finishing the race if finished in 1st place or not, with speeding up of music upon 1st place person finishing race ("pinch")
    • Customizable countdown sound lump for race start
    • Script intelligently and appropriately adjusts ranks as players join/leave mid-race in netgames
  • Metal Sonic racer support
    • Customizable icon lump in WAD for the HUD
    • Customizable Metal Sonic name for the HUD
    • Metal Sonic's name shown in Red on HUD
    • Metal Sonic racer toggle-able
    • Maps with Metal Sonic racers MUST have starposts with starpost activator sector specials near them for Metal Sonic to "hit" checkpoints via the activators and be ranked appropriately
  • Custom console commands
    • MSRace (bool)
      • Toggles Metal Sonic racer as appropriately in applicable levels
    • MSName (string)
      • Changes HUD display name of Metal Sonic
    • DBUG (bool)
      • Shows internal stat variables used for the ranking instead of the rank in bottom-left corner
    • Pinch (bool)
      • Toggles speeding up of music upon first place person finishing race
Known/potential bugs:
  • Ranking may be broken before first lap is completed in a Circuit netgame. It tends to stabilize after everybody completes 1 lap
  • An error spam occurs when players join mid-race in a netgame. You will have to restart the race upon people joining mid-race to be able to communicate with each other. (Need help fixing this)
  • Metal Sonic ranking may be slightly off in netgames.
Todo (future updates):
  • Bug fixes
  • Better ranking based upon both starposts hits, laps, and distance between players and next starpost?
  • Add support for additional Metal Sonic racers via XKower's NPCs?
Credits:
  • Duon the Adventurer & Deadpool the Hedge...
    • Beta testing and Lua support
  • X68000
    • Betatesting in IRC/in a netgame

C&CC welcomed! Also attached with DL is a separate Circuit test level to show off a proper Metal Sonic race level (with ranking). It replaces GFZ2.

Have fun, and race on!!

Download Now

File Type: 7z Race_HUD_Spam_Fix.7z (131.2 KB, 649 views)

Screenshots

Click image for larger version

Name:	srb20001.png
Views:	1048
Size:	64.1 KB
ID:	6724   Click image for larger version

Name:	srb20002.png
Views:	856
Size:	72.9 KB
ID:	6725   Click image for larger version

Name:	srb20003.png
Views:	734
Size:	70.9 KB
ID:	6726   Click image for larger version

Name:	srb20004.png
Views:	658
Size:	74.6 KB
ID:	6727   Click image for larger version

Name:	srb20005.png
Views:	586
Size:	70.5 KB
ID:	6728  

Click image for larger version

Name:	srb20006.png
Views:	560
Size:	63.8 KB
ID:	6729  

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 08-10-2015   #2
HellHawkX
Judge
 
HellHawkX's Avatar
Default

Welcome to releases.
As a suggestion, perhaps you should make it so that the player face color actually changes?

You could replace this
Code:
if (player.done)
v.drawScaled(x, y, (FRACUNIT/2), face, V_HUDTRANSHALF)
else
v.drawScaled(x, y, (FRACUNIT/2), face)
end
With this
Code:
if (player.done)
v.drawScaled(x, y, (FRACUNIT/2), face, V_HUDTRANSHALF, v.getColormap(player.mo.skin,player.mo.color))
else
v.drawScaled(x, y, (FRACUNIT/2), face, 0, v.getColormap(player.mo.skin,player.mo.color))
end
__________________
Quote:
<RedEnchilada> splatoon cut off my dick
Quote:
<RoyKirbs> I'm currently causing child abuse.
HellHawkX is offline   Reply With Quote
Old 08-11-2015   #3
Sapheros
Permanently Banned
Default

Such unneeded honor brought to life an awesome idea of a mod. Anyways, I'm SO GLAD that the lua spam didn't occur anymore, I'd rather have a broken HUD than not being able to chat.
Sapheros is offline   Reply With Quote
Old 08-11-2015   #4
Xkower8181
btw do not touch the sonic
 
Xkower8181's Avatar
Default

Quote:
Originally Posted by Tamkis
Add support for additional Metal Sonic racers via XKower's NPCs?
Smells like new concept for making but first I need to finish Match-mode NPC but we can co-op in making our respective concepts and make them faster.
But concepts of realising concepts aside, good job with making this hud idea I wonder what further you can do?
__________________
Spoiler:
hi you just wasted some second of your live on this
enjoy
Xkower8181 is offline   Reply With Quote
Old 08-23-2015   #5
Tamkis
Lua Grasshopper
 
Tamkis's Avatar
Default

Quote:
Originally Posted by Xkower8181 View Post
Smells like new concept for making but first I need to finish Match-mode NPC but we can co-op in making our respective concepts and make them faster.
But concepts of realising concepts aside, good job with making this hud idea I wonder what further you can do?
In order for NPCs to work compatibly with this, you would have to find a way to force them to travel a certain path waypoint-style. Perhaps tweak the NPC lua code to allow each NPC Thing to have their own unique ID via the "parameter" Thing field, and create a new, invisible object. This object will serve as waypoints, with the order determined by its angle. Also perhaps use each waypoint's paremeter field for an action (ie, 0 for just walk/run through, 1 for jump.)
Tamkis is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.