Subby's HUD experiment
- subby
- Shutout Match Winner
- Posts: 1199
- Joined: Sun Dec 21, 2003 1:18 am
- Location: A cave, Melbourne, Australia.
Subby's HUD experiment
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
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
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
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
.



- subby
- Shutout Match Winner
- Posts: 1199
- Joined: Sun Dec 21, 2003 1:18 am
- Location: A cave, Melbourne, Australia.
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!
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!
- subby
- Shutout Match Winner
- Posts: 1199
- Joined: Sun Dec 21, 2003 1:18 am
- Location: A cave, Melbourne, Australia.
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
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
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6712
- Joined: Thu Dec 18, 2003 7:03 pm
- subby
- Shutout Match Winner
- Posts: 1199
- Joined: Sun Dec 21, 2003 1:18 am
- Location: A cave, Melbourne, Australia.
To tell you the truth i had more fun doing this than playing lolPrey4Me wrote:lol it almost looks like you are having too much fun doing work
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!
- subby
- Shutout Match Winner
- Posts: 1199
- Joined: Sun Dec 21, 2003 1:18 am
- Location: A cave, Melbourne, Australia.
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
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