Category

Computers & Programming

Computers & Programming

IE 8 Show/Hide CSS Bug

I found a bug in IE 8 related to showing and hiding div elements. I have some simply JavaScript code that runs when a button the page it clicked. <input class=”optionsbutton” type=”button” name=”ButtonHide” value=”Show” OnClick=”showoptions( true )”/> The showoptions function is quite simple as are the functions it…

Continue reading
Computers & Programming

Linear Distance on Curves

I was experimenting last week with handling the coupler distance between train cars and found something interesting. In the picture above, you can clearly see the issue related to how a train car sits on a curved piece of track. The issue is that the linear distance between…

Continue reading
Computers & Programming

Choice Cache for Path Finding

I thought that I’d write a little about a scheme I use to avoid constant path finding work in the train game. First, a status report. Coupling and decoupling are working. I had a problem with decoupling where the orientation of the “train” when a new string of…

Continue reading
Computers & Programming

Another Train Dilemma

What is the best way to detect that I have reached a waypoint and possible passed it? I currently manage the waypoints in a way that works well when the train stops at one. The train constantly adjusts it’s deceleration to make it stop at the right spot…

Continue reading
Computers & Programming

Tale of Two Trains

I managed to change the one global train object into a list. I had two trains running for a moment and it was cool. This led to all kinds of other headaches. The drawing code is crappy and needs to be more modular. There is also no good…

Continue reading