PDA

View Full Version : Broadcast overlay improvement improvement suggestions, part 3


hyntty
19th January 2011, 18:06
No, I did not fail with the title. It is literally improvement suggestions for my improvement plan. :|

Anyway, short story short, a few months ago I started to ponder about lfs broadcasts having a few areas I'd like to improve. Actual video streaming aside (as multibc does/did that, and I can't argue with Martin because he is German), I decided I can improve on the overlays tv director makes. Being a network programming major I figured how hard it could be so I wrote a small insim program. The first version I gave wilko shortly before round 2. It had a small technical bug that made it completely useless. So I gave it another go and had the second version ready shortly before round 3.

Then, as we all know Wilko was being himself and it was never used. So by round 4 I had added a bunch of stability and some cool new features too. Sadly (again) because deko has alzheimer's and wilko is... special, I failed to get any feedback that time either.

So before the season ends, I'd like you all to tell me what, if any, improvement suggestions you can come up with. I intended to see how people liked the features in a broadcast but at the current rate it'll actually be used early 2009.

Endu race overlay machine - The Masterbator (http://koti.phnet.fi/hynrau/timo/classification.html)

This picture should tell you all there is to know what it does:

http://koti.phnet.fi/hynrau/timo/masterbator.png

The Masterbator is a completely manually operated program that lets the user control the overlays. It has a computing power efficient text based user interface, and it features an innovative menu. The race classification is fetched from the tracker, making problematic time outs history.

So, besides naming issues, I'd appreciate input on what you would like to see. C&C&Q welcome!

hyntty
19th January 2011, 18:11
Incidentally, the other day I was bored and decided to try if I could open sockets. That resulted in the birth of sheepshagger - The IRC bot.

As some may have noticed during last round #ndr had the bot running. Currently it only greets you, and prints the tracker info when requested. If you have any ideas on what it could do I'd appreciate input. I'm all out of ideas myself :)

Timo1992
19th January 2011, 19:53
Oh is that me on the picture? :)

YEEA ME IS FAMOUS o/

GreyBull [CHA]
19th January 2011, 22:05
Looks nice:thumbsup:

I was wondering though, does it show gaps at some point?

IMO team tags should replace those full team names to save up some space. But that's quite a detail.

A bit OT, but I kinda regret the 2010 Round 2 team info overlays, but I guess they were just too much of a pain to create/manage.

J@tko
19th January 2011, 22:06
It should be marsturbator.

petric_10
19th January 2011, 23:18
Oh is that me on the picture? :)

YEEA ME IS FAMOUS o/


you failed the corner honey :smileypul

Swiss-Spirit
19th January 2011, 23:47
Looking at the picture, it looks quite cool, but a bit overloaded maybe.

Showing the line-up of a team is interesting though.

reason0809
19th January 2011, 23:54
Looking at the picture, it looks quite cool, but a bit overloaded maybe.

Showing the line-up of a team is interesting though.

true that. sometimes less is more

my suggestion:
- only show the current grid placement, track, weather condts. and commentator every now and then (like 5-10 minute intervall)
- position the "time left" on top of the screen
- when grid placement and other data was shown and hides again, only than show the current driver, team and lineup of a team as long as the grid placement and stuff will show up again

PMD9409
20th January 2011, 00:21
I don't think that all is shown at one time. It's more of a screenshot to see how much it does in general. So on stream it won't actually be that crowded. :thumb:

JayEyeBee
20th January 2011, 00:41
Edit, er, what Angus says

Is this intended as a replacement for the TVdirector overlays, or to supplement them?

amp88
20th January 2011, 00:58
Pit Stop Information

Num stops
Total pit stop time
Average stop time
Slowest / fastest stop

Pit Lane Information

Num times entered pit lane
Total pit lane time
Average pit lane time
Slowest / fastest pit lane time

Pit Strategy Information

Average time/laps between stops
Next predicted stop time/lap (none if after race finish)
Tyre strategy (same tyres through race or changed tyre compounds)
Num takeovers

Penalty Information

Num penalties / type of penalties
Time/lap penalties issued and served

Connection / Reliability Information

Timeouts / losses of connection

Driver Information

Average lap time (overall / this stint)
Standard deviation in lap time
% laps driven against limitation (where applicable, e.g. how close this driver is to 45% predicted laps)
Current time driver has been in car (e.g. driver is on 2nd stint, 1 hour 10 minutes in the car)

Standings throughout race

Periodic updates of team's race standing throughout the race (e.g. start position then position at every 30 minute or hour gap since then to now).

Historical Information

Results/points so far this season

Tur8o
20th January 2011, 03:36
Looks like some of the things from the post above want some content that aonio has maybe you should look into some self/personal insims like aonio and relax and find some useful info from them.

Just my thoughts of progress. :thumb:

MoMo92i
20th January 2011, 06:16
Nice one :)

But I think there is too many informations on screen :s

Think it gonna be clearer if you have track position like what you have in NASCAR showing periodicly several informations (pit stop, current driver, start position...), maybe using different color when the car is on the leading lap, another one if it's not,and one other if it is in pits our in outlap, and one other at the bottom of the screen showing current track, track condition, time remaining, current commentator,...

And when you change car, put the team info as we can see in that screen, with more infos like what car is that team using, line up, name ofc :p season historic (current position and points) and maybe some more information about the team like a kind of historic (for example for teams who have changed their name, previous XxX Team).

lol @amp :) could be a good more information about a team usefull when some teams are fighting for the win or for the championship to make a small resume before the final rush to the flag.

dekojester
20th January 2011, 06:32
For the record

The items show are all current things that can be shown. The program gives total control to the operator of when things are and aren't displayed.

Currently the following are separate items:

-Classification and Time Remaining
-Commentator
-Track &Weather Conditions
-Team Name & Drivers
-Race Control Message

hyntty
20th January 2011, 09:12
;1545841']Looks nice:thumbsup:

I was wondering though, does it show gaps at some point?

IMO team tags should replace those full team names to save up some space. But that's quite a detail.



I actually thought of that myself. Then I decided the original names will have to do, as they don't take too much space. Also, it's not that hard to make the order go on and off with a timer: The only reason for me not doing that (yet) is because the commentators would get confused and start the same functions many times over - resulting in chaos :D That was the reasoning behind it but it's not really an issue to cover that as well.





A bit OT, but I kinda regret the 2010 Round 2 team info overlays, but I guess they were just too much of a pain to create/manage.

I have actually done some research on 'a bit more advanced graphics'. The problem with last years overlays was that it was done with a 3rd party software. It also meant someone had to prepare the overlay pictures on advance and they are completely static. Also, someone has to keep running them. So this program is meant to just simplify things for the broadcast team.

As I said, I have done some research. In theory I know how to make a window appear on top of a lfs instance without lfs loosing focus. Problem is I've got no idea how to implement a function that calls a window and sets it's location and content. Also getting rid of the window is a bit tricky, after all we don't want the graphics to stay on forever. I also tried transparent windows for even more 1337 effect but I scrapped that because the library in question is apparently written by an ape and thus makes no sense.

It's WIP so to say .

hyntty
20th January 2011, 09:19
A long list


I might take that as a plan for the future :)

Some of them easier, some of them harder. I do not plan to write my own race tracker (even though I think I could improve on the one used now) so some data depends an awful lot about the tracker and how it stores data.

I'm trying to learn something new everyday on the way. WIP indeed.

Too crowded

I don't think that all is shown at one time. It's more of a screenshot to see how much it does in general. So on stream it won't actually be that crowded. :thumb:

I thought I said that...


The Masterbator is a completely manually operated program that lets the user control the overlays.

TFalke55
22nd January 2011, 16:30
Great progress you made Timo :) really improved a lot from the preview version you showed me

EDIT: Looking through amp's imrpovements suggestions, a championship calculation would be awsome, that you can show them the championship standigs as they would be if the race ends now^^

hyntty
22nd January 2011, 17:58
Thanks Thilo.

As a matter a fact I have now made some more progress, I've compiled a standalone version of the program (which is more difficult than it sounds :P), in case anyone else wants to give it a go.. it's downloadable at http://koti.phnet.fi/hynrau/timo/masterbator.7z

I've also been having a go with a qualifying result table (http://www.lfsforum.net/showthread.php?t=57344). I'm also going to try making a simple F1 (or more like motogp) style real-time timing to go along with it.

Also, since fetching the race standings from the tracker is quite a simple thing, I have thought of making another version aimed at the racers - something that takes less screen space. Perhaps also (when I manage to spare the time) a blue flag detection that tells you weather the blue flag your getting from lfs is legit or not.

As you might imagine I am doing other stuff as well, namely being confused with the C syntax that makes no sense, and logic ports that are a pain in the arse to design. That along with industrial management assignments that consist of creative writing and slight hangovers every now and then. So you'll see I can't give anything any release date more accurate than early 2009.

TFalke55
22nd January 2011, 18:03
I've also been having a go with a qualifying result table (http://www.lfsforum.net/showthread.php?t=57344). I'm also going to try making a simple F1 (or more like motogp) style real-time timing to go along with it.

Fascinating someone remembers this...

hyntty
22nd January 2011, 18:28
Fascinating someone remembers this...

Speaking of that, I actually find the insim requests section completely pointless. No one ever gets help from there. Most of the requests are "zomg lol someone code me a tom cruise server 1!1!1!". Occasionally there are a few good requests (like yours there) which no one wants to help with even though for a real programmer it would only take a jiffy to do. Weird imo.

hyntty
27th February 2011, 15:27
So a bit of a progress report. Not that anyone cares but since I like to boast :smileypul

So in stead of doing something useful like driver / team / laptime statistics I have decided try something else that is really of no relevance regarding the actual data in question. As some of the people blessed with the gift of reading might remember Yann was earlier all jelly for the old, fancy graphical overlays. We all know how irresistible he can be with the sad-puppy look he makes with his face, so I couldn't decline the request.

So I've made a small proof of concept I intend to work on next week. Whether it makes it into a broadcast anytime soon I don't know. Also I haven't really put any effort into it since I discovered no one was willing to actually use this app for anything, apparently because it's too difficult to use (Currently you have to run it and press two buttons, I'll try and make them easier next time...)

So I've made a small app that creates a cunning borderless window, and makes the race order (according to the tracker) appear. The overlay window will be on top of everything else. It will appear after running the program and close after 10 seconds (this is because you can't close a window that has no button for closing it :P ).

Anyway, this proof of concept: In case you are interested to test how it works and / or give feedback on the possibilities you see in this, you can download it here. (http://www.speedyshare.com/files/27112582/exe.win32-2.7.zip)

Or from a mirror here (http://koti.phnet.fi/hynrau/timo/exe.win32-2.7.zip)

Disclaimer:
By downloading this application you acknowledge the fact that downloading applications from the internet may cause distress in the user. Viewer discretion is advised. Therefore you wave any right to be offended by the content.

JackCY
27th February 2011, 17:00
download: internal server error

hyntty
27th February 2011, 17:32
A mirror (even though the original one works fine :| )

http://koti.phnet.fi/hynrau/timo/exe.win32-2.7.zip

JackCY
27th February 2011, 21:39
meh, so many files and code for reading tracker and showing it in window?
TCL/TK heared about it, never used it, what is it about
+ python
you really are into scripting I see

hyntty
22nd March 2011, 20:05
I like to boast

I made this http://www.lfsforum.net/showthread.php?t=73621 meanwhile

:|

Jonathon.provost
24th July 2011, 18:32
Can you please send me the file threw pm as the page isn't working.
Cheers

CSF
24th July 2011, 18:39
Why do you require them? :scratchch

Jonathon.provost
24th July 2011, 18:41
I just want to try it out looks awsome:)

hyntty
24th July 2011, 20:32
To use the program you would need the WolleT/Poo fyi / Moe Tracker. Whether you have it or not I can't remember if I've written the tracker url to be configurable or not. It is likely it's not so you would not be able to use it for anything. I made it specifically for gtal, so I don't really see any use for it for anything else :D

However, if you read the post above yours you will see THIS LINK to the F1 overlay thing (http://www.lfsforum.net/showthread.php?t=73621) which is in fact what we used in GTAL last time round - I just had written a modified version to pull the results directly from the tracker.

Also, if someone would like I would be quite happy to share the source code for this. It's quite easily readable and modifiable python code*.

* Python is easily readable. The code might not necessarily be so, since often even I can't understand what I have written a few weeks earlier.

Jonathon.provost
24th July 2011, 20:40
OK, thanks for that. Could I please have a look at the code. I have been working with python for about 2-3 years now.
Cheers :)

hyntty
24th July 2011, 20:49
Okay, a few notes though: I've been a bit of an idiot apparently and used a lot of global variables. Packet handling things, connection establishment and so on are stolen from an example posted by DarkTimes.

A few variable names are annoyingly in Finnish.



################################################## ###
## First things first.
##
## 17.12.2010 THy
##
## This program is not copyrighted.
## In stead I will merely eat your heart if you steal it.
## - Timo Hynninen 2010 timo.hynninen at&t lut.fi
##
##Lets import stuff and define ports

import pyinsim
import urllib
import threading
import codecs

end = False
teamlist = []
track = "Fern Bay Black"
weather = "Clear Day, No Wind"


print("Input target IP please: ")
ip = raw_input()
print("Input target port. Use 32300 unless you hae a different on for TV director!: ")
port = raw_input()
print("Input commentator man's name:")
commentatorman = raw_input()
##print("Input URL for position data (can be txt, xml, html etc):")
##url = raw_input()
print
print("There is an admin password field too but I can't think of any use for it \nI was probably drunk whilst making this program")
##print("Anyway, please input your name. If you're not the commentator, don't type \nyour name but the commentators.\nBecause we don't care about your name you half wit:")
##commentator = raw_input()

print



########################################
def insim_multiplayer(insim, rst):
global track
global weather
global wind
trackcode = rst.Track

if trackcode == "AS6R":
track = "Aston GT Rev"
elif trackcode == "AS6":
track = "Aston GT"
elif trackcode == "SO4R":
track = "South City Long Rev"
elif trackcode == "KY3":
track = "Kyoto GP Long"
elif trackcode == "BL1":
track = "Blackwood GP"
else:
track = trackcode
weathercode = rst.Weather
if weathercode == 0:
weather = "Clear Day"
elif weathercode == 1:
weather = "Cloudy Afternoon"
elif weathercode == 2:
weather = "Cloudy Sunset"
else:
weather = "Lovely"
windcode = rst.Wind
if windcode == 0:
wind = "No wind"
elif windcode == 1:
wind = "Weak wind"
elif windcode == 2:
wind = "Strong wind"


#########################################

class team:
number = 0
name = ""
drivers = ""

#############################################

def run_classification():
print_classification()
if not end:
threading.Timer(5.0, run_classification).start()


#####################################
## lets define the button generator
def kirjota():
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=68,
BStyle=pyinsim.ISB_DARK | 5,
T=175,
L=68,
W=130,
H=10,
Text=teksti)

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=69,
BStyle=pyinsim.ISB_DARK | 5,
T=175,
L=48,
W=20,
H=10,
Text="Race Control:")
print

def commentary():
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=71,
BStyle=pyinsim.ISB_LIGHT | 2,
T=5,
L=140,
W=45,
H=10,
Text=teksti)

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=70,
BStyle=pyinsim.ISB_LIGHT | 3,
T=5,
L=110,
W=30,
H=10,
Text="Commentary box:")

def commentator():
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=70,
BStyle=pyinsim.ISB_LIGHT | 3,
T=5,
L=110,
W=30,
H=10,
Text="Your commentator:")

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=71,
BStyle=pyinsim.ISB_LIGHT | 2,
T=5,
L=140,
W=45,
H=10,
Text=teksti)
print

def trackinfo():
global track
global weather
global wind

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=61,
BStyle=pyinsim.ISB_LIGHT | 3,
T=17,
L=128,
W=12,
H=9,
Text="Track")

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=62,
BStyle=pyinsim.ISB_LIGHT | 4,
T=17,
L=140,
W=45,
H=9,
Text=track)
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=63,
BStyle=pyinsim.ISB_LIGHT | 4,
T=26,
L=140,
W=45,
H=9,
Text=weather)
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=64,
BStyle=pyinsim.ISB_LIGHT | 4,
T=35,
L=140,
W=45,
H=9,
Text=wind)
print


#######################################
##### This is how we get rid of stuff!
def clear():
insim.send(pyinsim.ISP_BFN, ClickID=61)
insim.send(pyinsim.ISP_BFN, ClickID=62)
insim.send(pyinsim.ISP_BFN, ClickID=63)
insim.send(pyinsim.ISP_BFN, ClickID=64)
insim.send(pyinsim.ISP_BFN, ClickID=65)
insim.send(pyinsim.ISP_BFN, ClickID=66)
insim.send(pyinsim.ISP_BFN, ClickID=67)
insim.send(pyinsim.ISP_BFN, ClickID=68)
insim.send(pyinsim.ISP_BFN, ClickID=69)
insim.send(pyinsim.ISP_BFN, ClickID=70)
insim.send(pyinsim.ISP_BFN, ClickID=71)

def clear_classification():
for i in range(1, 61):
insim.send(pyinsim.ISP_BFN, ClickID=i)
print



##################################
## Classification print code ##
def print_classification():

try:
classification(29)

except IndexError:
print("BTW:")
print("Boothy is an arse and changed the tracker. Yell at him for that")

try:
tiedosto = urllib.urlopen("http://tracker.newdimensionracing.com", "r")
x = tiedosto.read().split("</dd>")
y = x[3].split("<dd>")
remaining = y[1]
tiedosto.close()
except IndexError:
remaining = "00:00:00 "

## aika
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=60,
BStyle=pyinsim.ISB_DARK | 0,
T=175,
L=1,
W=47,
H=8,
Text=remaining+"remaining")


def classification(number):
apu = 5
tiedosto = urllib.urlopen("http://tracker.newdimensionracing.com/", "r")
x = tiedosto.read().split("<td class='teamName'>")
for i in range (1, number):

p = x[i].split("</td>")
p = p[0]

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=i,
BStyle=pyinsim.ISB_LIGHT | 1,
T=apu,
L=1,
W=6,
H=6,
Text=str(i))

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=30+i,
BStyle=pyinsim.ISB_LIGHT | 2,
T=apu,
L=7,
W=33,
H=6,
Text=p)
apu = apu+6
tiedosto.close()

###############################
# Team info
def print_team_info():
for entry in teamlist:
print entry.number, entry.name, ";",
print
print "Which team do you want (input number)? Non-existant number to exit:"
valinta = raw_input()
try:
valinta = int(valinta)
for entry in teamlist:
if valinta == entry.number:
teksti1 = str(entry.number)
teksti2 = str(entry.name)
teksti3 = str(entry.drivers)
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=65,
BStyle=pyinsim.ISB_LIGHT | 6,
T=155,
L=68,
W=12,
H=10,
Text=teksti1)
insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=66,
BStyle=pyinsim.ISB_DARK | 5,
T=155,
L=68,
W=80,
H=10,
Text=teksti2)

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=67,
BStyle=pyinsim.ISB_DARK | 5,
T=165,
L=68,
W=130,
H=10,
Text=teksti3)

break
except:
print "something went wrong again :|"



################################
## Team info handler here:

teamlist = []
tiedosto = codecs.open("nimet.timofile", "r", "utf-8")
tiedosto.readline()
while True:
rivi = tiedosto.readline()
if len(rivi) == 0:
break
else:
x = rivi.split(';')
y = team()
y.number = int(x[0][0:2])
y.name = x[0][2:]
y.drivers = x[1][:-1]
teamlist.append(y)


#################################

insim = pyinsim.insim(ip, int(port), Admin='', IName='TheMasterbator', Flags=pyinsim.ISF_LOCAL)
insim.bind(pyinsim.ISP_RST, insim_multiplayer)
insim.send(pyinsim.ISP_TINY, ReqI=1, SubT=pyinsim.TINY_RST)
pyinsim.run(background=True)

##Now the menu.


while True:
print("\nChoose what ya wanna do mother****er!")
print("1) Race control message")
print('2) Print "Voice of [commentators name]".')
print('3) Print "Voice of [someone else]".')
print("4) Clear everything but classification")
print("5) Print classification.")
print("6) Clear classification.")
print("7) Print track info.")
print("8) Print team info")
print("0) QUIT. Don't choose this one. SRSLY!")
print
print("Choose what you want to do: ")
valinta = raw_input()
try:
valinta = int(valinta)
except:
print("You've typed text instead of a number you halfwitted babboon!")
if valinta == 2:
teksti = commentatorman
commentator()

elif valinta == 5:
end = False
threading.Timer(0.1, run_classification).start()


elif valinta == 1:
print "Race control message:"
teksti = raw_input()
kirjota()

elif valinta == 4:
clear()

elif valinta == 6:
end = True
threading.Timer(5.0, clear_classification).start()
threading.Timer(11.0, clear_classification).start()

elif valinta == 7:
trackinfo()

elif valinta == 8:
print_team_info()

elif valinta == 3:
print "Write co-commentator's / interviewee's name:"
teksti = raw_input()
commentary()

elif valinta == 0:
break
## elif valinta == 11:
## threading.Timer(2.0, run_aika).start()
## elif valinta >4:
## print("No, you don't get to do that.")
## print
elif valinta < 0:
print("No, you don't get to do that.")
print
else:
print


################################
## Apparently this doesn't work. No matter, I'll do it anyway :)
insim.close()
print("You're a faggot. And you've just closed this program")


######################################
## EOF

Jonathon.provost
24th July 2011, 21:46
Cheers for that.
A few question.
1. Do I need any other programs eg pyinsim act.?
2. How do I connect it to LFS?
3. I have Python but do I just coppie that to the new window?
Kind Regards,
J.Provost :P

hyntty
25th July 2011, 06:49
Reading often helps :razz:

Cheers for that.
A few question.
1. Do I need any other programs eg pyinsim act.?


import pyinsim

You just might...



2. How do I connect it to LFS?


The same way every other insim program works. Do a /insim XXXXX in lfs, then run the program.


print("Input target IP please: ")
ip = raw_input()
print("Input target port. Use 32300 unless you have a different on for TV director!: ")
port = raw_input()


3. I have Python but do I just coppie that to the new window?

You'll need python 2.7. After installing get the latest pyinsim from here (http://pyinsim.codeplex.com/releases/view/69421).

Then just open IDLE (Python IDE), open a new file (ctrl+n), c/p the code in, press F5 to run it.

Note that this bit:

## Team info handler here:

teamlist = []
tiedosto = codecs.open("nimet.timofile", "r", "utf-8")
tiedosto.readline()
while True:
rivi = tiedosto.readline()
if len(rivi) == 0:
break
else:
x = rivi.split(';')
y = team()
y.number = int(x[0][0:2])
y.name = x[0][2:]
y.drivers = x[1][:-1]
teamlist.append(y)


will cause infinite IOError unless you comment it out ( highlight the section, Edit->comment out region).

...
As I said yesterday evening it'll probably do no good to try and use it for something as it is. It's not even a good programming example, I wrote the most bits last year about halfway through a course called "programming fundamentals" so you can imagine the quality.

Jonathon.provost
25th July 2011, 07:23
When Installing pyinsim I don't know what this means
" Unzip the archive on your computer and locate the folder contents using your computers command line tool. To install the library run the command python setup.py install."
Please help :)

hyntty
25th July 2011, 07:54
download the pyinsim.2.0.4.win32.zip file in stead, it has an installer wizard that does everything automatically.

Jonathon.provost
25th July 2011, 07:55
I have 64bit

" To install on a different OS, or with different installation options (64 bit Windows etc..) you must use the source distribution"


EDIT: Dosn't matter i downloaded the 32 bit python :) cheers

AMAZING system mate.
I just wanted to ask if we could use it for our events
Cheers

One thing where do I put the teams that I want to show and How
:)
And when I put the classifications up its Chinese or somin is that to do with the teams?

hyntty
25th July 2011, 17:18
I have 64bit

" To install on a different OS, or with different installation options (64 bit Windows etc..) you must use the source distribution"


Normally the files have instructions in them (even the .py file).


AMAZING system mate.
I just wanted to ask if we could use it for our events
Cheers


You can, as you can see I've released the source with a "do whatever the **** you want"-license.


One thing where do I put the teams that I want to show and How
:)
And when I put the classifications up its Chinese or somin is that to do with the teams?

It's not Chinese :)

The buttons in LFS work quite uniquely. What you are seeing is too many letters to actually fit in the button, therefore they are just very cramped there. Basically what has happened is boothy was a complete arse and made changes to the tracker. You would have to look up the part that handles reading the actual html code off the tracker website and adjust it to work with the new tracker layout. I might actually do that myself too and post it here, after all I use that same function in other programs so it only needs to be written once.

As I explained it's only a tool to read the Moe Tracker. To be able to use it you need to run the tracker as well. Or alternatively you can figure out how to make it work based only on lfs positions, there is a fine example of how to do that in the pyinsim thread. You can input the position and gap data yourself by modifying the button generation bit - the module called classification: (I changed the variable names to be more distinctive here, don't be scared of that, it's still the same piece of code)


def classification(number):
bookmark = 5
tracker_website = urllib.urlopen("http://tracker.newdimensionracing.com/", "r")
tracker_data = tracker_website.read().split("<td class='teamName'>") # split the whole string into an array
for i in range (1, number):

p = tracker_data[i].split("</td>") # split each member of the array again to get rid of unnecessary html code
p = p[0] # this is now the actual team name

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=i,
BStyle=pyinsim.ISB_LIGHT | 1,
T=bookmark,
L=1,
W=6,
H=6,
Text=str(i))

insim.send(pyinsim.ISP_BTN,
ReqI=255,
ClickID=30+i,
BStyle=pyinsim.ISB_LIGHT | 2,
T=bookmark,
L=7,
W=33,
H=6,
Text=p)
bookmark = bookmark+6
tracker_website.close()



If you don't actually understand what this bit does there is very little I can do to help. You could of course comment out the button parts all together and just print all the strings that are being handled, perhaps that'll give a better impression of what is being done. That said, to utilise any of this you should be able to understand basic list operations plus for and if clauses. That's about all there is.

boothy
25th July 2011, 17:25
The tracker is currently showing qualifying results so looking for a table cell with the class "teamName" would actually give you:<img src="/flags/fin.gif" alt="" title="FIN" height="12" width="18"><span title="maunokasa">Jarno Lehikoinen</span> - perhaps try the MoE tracker as it has a race result in it.

hyntty
21st March 2012, 15:49
BUMP LE ****!!

I've no idea if anyone cares anymore but I've been playing with stuff again. (not that stuff, that other, less disgusting stuff.)


making a simple F1 (or more like motogp) style real-time timing


So here's a shitty video of it (I should have used screencapping software I know :| ) http://dl.dropbox.com/u/16059823/VIDEO0007.3gp

TFalke55
22nd March 2012, 06:49
BUMP LE ****!!

I've no idea if anyone cares anymore but I've been playing with stuff again. (not that stuff, that other, less disgusting stuff.)



So here's a shitty video of it (I should have used screencapping software I know :| ) http://dl.dropbox.com/u/16059823/VIDEO0007.3gp

Great stuff... though... LFS scores a 33.65, your program a 30.9?

http://code.google.com/p/irtvo/

I know you're not known to iRacing, but since it is open source, and since it works really great with iRacing (ok, sometimes more sometimes less well), maybe you see something in the program to combine it with your stuff... It could be the ultimate Masterbator.

hyntty
13th April 2012, 11:45
Right, I've reconfigured the timer to actually time the lap (previously it didn't). Shit print screen previews attached. The timing window is of different size in the pics because it scales itself dynamically according to the string lengths of player name and time.