Subby's HUD experiment

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Subby's HUD experiment

Post by subby »

Hi Tank, Marrow and other.
I've been tearing part the source trying to get a grip on it.

I finaly have a bit of a grip. For my own benefit i decided to get a HUD up and running. I can now get the speed of anyone playing on a net game or local game.
Also possible to get are distance traveled (odometer), location etc etc

would make for a great stats and or a HUD speedo with odometer hehe

Anyway i just plopped it into display_fps() and that is definatley not the place to put it as it is shown before gcycle() is assigned to eNetPlayer... (i had to turn fps off until i was playing via the console... i know i could had bools to fix this but i dont want the code in that function)

Can you guys tell me where you guys put your hud.. So we can start amalgamating changes. I'm thinking of making a new source file to put my fancy stuff in. I'm thinking of doing things like distance to next palyer, speedos, radar screens .... mmm im gonna have to get to learn some opengl SDL!

I should also be able to write the data to disk for replay of games... whatever....
PS... this has been done using C++BuilderX on Linux using gnu
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

Ok , here is how it looks so far. I know it looks crap, its just functionality im worried about now.

This screen shot shows speed (as an int, normally a float) it could just as easily be rubber, pos, etc.

Next ill get it to report to me the highest speed achived in each game ;)
Attachments
speed.jpg
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

and now with top speed
Attachments
speed2.jpg
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Looks good so far. And guess what, I also put it in display_fps(); ;)! I worked out a test to see if the player is on the grid so that twhen they die you know... Definetely looks like you've got a good start. I'm gonna work like crazy to get my source cleaned up and put online this week, so we should be able to combine very soon :D.
Image
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

we had a good test of it on goshdarn.... everybody had fun... a few wanted the executable... but they need to be patient.

Top speed was 62 by 3 of us ... me, rev, and n54 or was it yaza ?

I've got it working so it checks if object() from netplayer is not null b4, accessing it. each time se_GameTime()<0 i reset max speed to 0, at this point i could write the max speed an nick to file for future stats. I would prefer to have the source elsewhere. perhaps just call a function from fps_display() but thats still not ideal... for the life of me i cant find where the real action happens in the source lol!
User avatar
locutus
Match Winner
Posts: 662
Joined: Mon Jan 19, 2004 10:28 pm
Location: MST [Quotation: "No Good Deed Ever Goes Unpunished.."]
Contact:

Post by locutus »

between this and the HUD, u guys are doing some really cool stuff...thx
Image
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

Latest incarnation:

I've creatred a speedometer with needle and all


really cool to look at when you accelerate or turn.. even braking looks cool (lol took a while for me to test brakeing out :)

PS. it doesnt look so good on the attachment, much better in real life

Next i'll add a red line that is pushed by the white needle, so you know what your personal maximum speed is/was
Attachments
speed3.jpg
User avatar
Prey4Me
Match Winner
Posts: 755
Joined: Fri Mar 05, 2004 6:12 am

Post by Prey4Me »

lol it almost looks like you are having too much fun doing work :D
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

keeps on getting better and better man!
Image
User avatar
Marrow
MVP - Project Contributor
Posts: 1655
Joined: Mon Jan 19, 2004 9:05 am
Location: New York

Post by Marrow »

No doubt! Great work, subby!
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

Prey4Me wrote:lol it almost looks like you are having too much fun doing work :D
To tell you the truth i had more fun doing this than playing lol

the more i get into the source the more i respect z-man and his forethought (except for the spageti-ness of it all) The suff i have added is at most 20 lines for HUD analogue speedometer and maximum speed for every game and speed of every singleplayer. The hard part, is the steep learning curve of someone elses code!
User avatar
Marrow
MVP - Project Contributor
Posts: 1655
Joined: Mon Jan 19, 2004 9:05 am
Location: New York

Post by Marrow »

subby wrote:The hard part, is the steep learning curve of someone elses code!
Indeed!
User avatar
subby
Shutout Match Winner
Posts: 1199
Joined: Sun Dec 21, 2003 1:18 am
Location: A cave, Melbourne, Australia.

Post by subby »

That problem with the missing needle marrow, i thonk has to do with to many people on a server. Puting all the names and speed of a ll the playerson one text line is too long and makes my beutifulll needle disapeer hehe

anyway should be easy to fix by wither
a) not showing everyones speed
b) having a seperate line for each person somewhere on the screen
c) having it server based revealing each persons top speed at the end of each match
d) ignoring all that and just write stats to a file, if ppl want to check it on a web page or something
e) none of the above
User avatar
Marrow
MVP - Project Contributor
Posts: 1655
Joined: Mon Jan 19, 2004 9:05 am
Location: New York

Post by Marrow »

I noticed the needle would disappear at times too. It may be the number of people. :| Unsure.
User avatar
Road Kill
Core Dumper
Posts: 101
Joined: Sun Jan 04, 2004 8:00 am
Location: Minneapolis, MN USA

Post by Road Kill »

Subby, could you add in a 2D graphic bar graph, such as in this pic, I mocked up? I would love to create a visual hud, If someone knew how to apply/program 2D images to the screen.
Attachments
Hud Bar-1.jpg
Post Reply