All 2 entries tagged Network

View all 22 entries tagged Network on Warwick Blogs | View entries tagged Network at Technorati | There are no images tagged Network on this blog

May 05, 2006

Road–Dragging / AutoRoad Complete

In what really should be one of my last things in TT3D before I start revising solidly, I implemented dragging of roads, not /quite/ as easy as it sounds given each square is only 2 triangles. A lot of the code that went into it will help a lot when it comes to doing work on Rail too.

Being able to build road networks a lot faster should help with testing as well, as before today it was click click click for every half tile you wanted… Anyway, another ~400KB video of road dragging, and if I post again, you'll know revision isn't quite going as planned.


May 04, 2006

Road Pathfinding Complete

Managed to finish the javacc a little quicker than I had expected, so spent the evening doing some more work on the road networks. While the actual method of placing roads is still a little shakey (half squares at a time, no dragging) it builds up a graph data structure to store the network. Currently every square is a node in the graph, but I've already implemented the concept of a "path" from point A to B, so just need to add a little extra functionality to remove straight lines as nodes.

On the pathfinding front, I think I am probably done. I did hope (before I started coding) that I'd be able to abstract rail/road networks into a single "network", but have opted not to, at least for now. Although they share many characteristics, signalling on rail networks is going to be a big enough pain that having the road network separate will make my life easier.

I chose A* pathfinding for a few reasons really, a) it seems generally to be the "fastest" of all the graph searching algorithms, b) OpenTTD uses it, so it must be good, and c) It's not as hard to implement as it might first seem. For a bit of extra reading, Wikipedia is a good place to start, while A* For Beginners does a fairly good job of explaining it.

No screenshot this time, just a video of the pathfinding doing it's stuff. A snip at 546K (xvid) it just illustrates a vehicle knows where it's going. Animation around corners and non–tiling road textures are the least of my worries at the moment :).


November 2020

Mo Tu We Th Fr Sa Su
Oct |  Today  |
                  1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30                  

Search this blog

Tags

Galleries

Most recent comments

  • I hope progress is being made, I would pay £30 for this game in 3d, I have many years enjoyment from… by AndyC on this entry
  • Well, I'd love to carry on working with it and I suspect I'll try and at least clean up the code and… by on this entry
  • Nice 3YP – a friend and me tried a similar project a while back – your videos of 3d rendered green l… by Cyphus on this entry
  • Also I checked, the presentations are open to anyone that wants to go, Computer Science or otherwise… by on this entry
  • My presentation is CS1.07, the full list is available here (proxy/campus required). by on this entry

Blog archive

Loading…
RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXX