The Blender Game engine dose not support 2d blit-ing of lines, pixels or text like other game engines.
To make a straight line, use a small plane, place the object center on the -y side of the plane, and scale it.
If you want to do this dynamicaly, scale the line to its biggest possible length on its +Y axis (s,y) , and snap a quick IPO keyframe by pressing I. go forward 101 frames, and scale it to nothing, and snap a second IPO keyframe.
Add a IPO brick to play the IPO animation, set to property…
Now make a property that the IPO brick will monitor… This is the property you will manipulate for the line length.
You might want to do the animation I mentioned in reverse, so that the biggest is 100, and 0 is nothing… might make it easier for comprehension later (100 is the line’s 100% and 0 is the line at 0%)
Not the greatest method in the world, but you can do what I mentioned without any python code.
when you add it to a scene, it will inherit the rotation of the object you add it from. Then just poke in the IPO for the length , and you will be all set
hope that makes sense