Monthly Archives

January 2011

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
Computers & Programming

Worked on Waypoints and Coupling

I was working last night on changing the waypoint activities that can be specified by the player. I’ll start saying player instead of user because it sounds more fun. I finished some work on the A.I of the trains. They can now detect when they are sitting on…

Continue reading
Computers & Programming

Path Finding

I was having trouble finding a path. Well, I was actually having trouble programming the path finding algorithm for the railroad game. I’ve never written something like this and what I threw together originally was just wrong. There are a few requirements that exist in this game that…

Continue reading
Computers & Programming

File Input and Output

I’ve decided to add file IO to my railroad game program. As always, every thing I do requires some new way to look at things. MFC provides serialization and I’m using MFC at the moment. The program only uses it for the user interface until now. Serialization is…

Continue reading
Computers & Programming

MFC Fun

The Microsoft Foundation Classes are fairly useful. I don’t have experience with any other framework for comparison but MFC it better than writing all of the message handling code by hand. The problem with MFC is that they give you plenty of rope to hang yourself. I’m adding…

Continue reading
Computers & Programming

Railroading Game Progress

I am at the point where I am programming the code to handle train-waypoint activities. The trains now look ahead for waypoints and brake at the appropriate time to reach the desired waypoint speed at the right place related to the waypoint. This is all cool because you…

Continue reading
Computers & Programming

What is a Train?

I was working last night on train routing and came across a serious dilemma; if a train splits in two, there is a new train that didn’t exist when the player first set routing information for the original train. What about a train that is created that has…

Continue reading