   How to import tracks in server?
  I want to develop a game server for a 3D car racing game. To decrease the load of the server, I'm not going to do any physics in server, just broadcast the player's state instead. I also want to do some simple check in server. For example, i want to check whether the car's coordinate is on the track. Here comes the problem: how does the program know the track's area? how can i import the racing track? Any ideas?Thanks!   
  How do you know whether the car is on the track on the client?Do the same thing on the server.;Quote:Original post by hplus0603How do you know whether the car is on the track on the client?Do the same thing on the server.Thanks!When the client sends its coordinate to the server, if the server knows the track's area, it can know whether the car is on the track. If the car isn't on the track on the client actually and the client sends a fake coordinate, it won't affect the game result, because the result is desided by the server. And other clients will see that the car is still on the track as long as the coordiante sent to the server is on the track.Anyway, how can the server know the track's area?   ;  Here's one suggestion:In your track editor, mark the triangles that are "track" (as opposed to scenery). When you export your track geometry, also export a file that contains only the "Track" triangles, projected to a 2D flat plane. Load these triangles into a quadtree.When you need to test "is coordinate X on the track", simply run the coordinate through the quadtree, and test the triangles that you find in the terminal nodes; if the point is inside a triangle, it's "on the track."   ;Quote:Original post by hplus0603Here's one suggestion:In your track editor, mark the triangles that are "track" (as opposed to scenery). When you export your track geometry, also export a file that contains only the "Track" triangles, projected to a 2D flat plane. Load these triangles into a quadtree.When you need to test "is coordinate X on the track", simply run the coordinate through the quadtree, and test the triangles that you find in the terminal nodes; if the point is inside a triangle, it's "on the track."Thanks a lot!I don't know about graphics very well. Can u explain more about how to load triangles from the file(is it a .mesh file?), or is there any article about that?   ;  I have read some basic articles about graphics and i know that triangles can be imported from a .x file. Is that right?However, i still don't know how to load them into a quadtree. Can u explain more?Thanks!   ;  This should be answered in the For Beginners section.