Category

Computers & Programming

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

Video of a Working Train

The code is still far from optimal but the track network traversal and linear distance computations are working correctly. I haven’t tested a train with cars facing in both forward and reverse directions but the code is all written to handle it. It’s a lot of code for…

Continue reading
Computers & Programming

Working Single Unit Train

I have a working sample of the code I mentioned in an older blog post. I have a self-propelled train car that moves along any unending track layout. When the front wheels of the train car passes over a turnout, a random choice is made by this train…

Continue reading
Computers & Programming

Railroad Train Movement

I wrote some code and then had an epiphany. A minor one but one that made me realize I had approached something in the wrong way. It was not much code and can be reused with the new idea. First, the requirement is that the train move in…

Continue reading