You are browsing as a guest. Sign up (or log in) to start making projects!

trainTracks

  • 2 Devlogs
  • 6 Total hours

A randomly generated train simulator where the goal is to reach from one side of the track to the other while navigating a complex maze and many dangers.

Open comments for this post

3h 2m 27s logged

Devlog #2

Additions

  • Added a train node and scene that moves along the preplaced track nodes
  • The train moves toward a target exit or middle node until it can no longer go straight or it falls off the edge
  • The train uses the chunk nodes as waypoints, going from exit node to middle node then whichever exit node is chosen
  • The train defaults to going straight until it cannot. Once it cannot go straight it filters all exits removing exits you came from or lead nowhere
  • If there are no available directions, it moves to the end of the last node before stopping and falling off the edge

Planned Updates

  • Adding player input so you can control which direction the train goes
  • Adding indicators that show the default path for the train without any inputs. If input is given the train and indicator should move properly
  • Adding more things that happen when trains arrive at stations
  • And a lot more stuff

What was the goal

  • My main goal was to add a train and design the default path so it automatically starts and begins progressing throughout the default track. I had a lot of the foundation set that made it so I could use the nodes and they could move through the nodes. I had to make sure that there were conditions that made sure they could check to see if the exits lead to another chunk or just the void. The hard part was if a four-way was connected to a horizontal without a direct path but the train still moves over the void to the chunk. I had to check the chunk nodes and exits for the following neighbor chunks also to make sure it was a valid chunk, which took a while to troubleshoot. I want to next try and create more junctions and the default path indicator using arrows. Right now the path is generated as the train moves but if I wanted to set the indicators, I would have to premake the default path, which would also require some more time and work.
0
0
1
Open comments for this post

2h 57m 32s logged

Devlog #1

Additions

  • Added three basic train layouts (four-way intersection, vertical intersection, and horizontal intersection)
  • Added a train end and start station
  • Created a randomly generated network of tracks comprising of the three basic layouts
  • The end and start stations’ positions are predetermined and other intersections are generated randomly with each other’s connecting ends until there are no available grid spaces to generate new tracks
  • If the end station isn’t connected with a corresponding track, the entire map is regenerated

Planned Updates

  • More track layouts, including more complex ones like t-intersections and more
  • Creating the train so it can traverse along these tracks
  • Adding styling to the tracks and other elements
  • More rules to allow better and more unique map generation
  • A lot more other stuff

What was the goal

  • The goal for this devlog was simply to start out the game and make a beginning layout of what the game and tracks would look like. I created these three basic layouts and used a grid to track which tracks had been placed where to keep generating the map. I also had to work on simply getting GoDot engine setup alongside hacktime and learning both how to use the engine and GDScript since this is the first time I’m using GoDot and the first time i’m making a game at all so it’s a learning experience trying to figure out how to use it. Next I want to focus on figuring out how I am going to get trains to work and make them follow the track layouts that will later in the future become more accessible to trains (not have sharp 90 degree turns).
0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…