Advertisement

AI Simulation

Started by April 21, 2008 11:49 AM
0 comments, last by Kylotan 16 years, 7 months ago
I am currently working on a project that simulates a train station with various type of people moving in, out and around the world. I have used the following code to get a cube moving which represents a character: http://www.ziggyware.com/ziggywareimages/pathfinding/pathfinding3d.zip This character is generated by adding a modified MoveableObject class. The orginal MoveableObject class can be found in the above code. It was modified to iclude the following extra code: #region CONSTRUCTOR public cOfficer(Model model) { _model = model; } #endregion #region Set Start Postion public void setStartPosition(Vector2 StartPos) { positionCurrent = StartPos; startPosX = positionCurrent.X; startPosY = positionCurrent.Y; curveX = new Curve(); curveY = new Curve(); } #endregion #region Set Model Texture public void setModelTexture(Texture2D texture) { _texture = texture; } #endregion #region Set Model Size public void setModelSize(Vector3 size) { _size = size; } #endregion #region Set Tint public void setTint(Vector3 tint) { _tint = tint; } #endregion #region Set Waypoint public void setWaypoint(Point waypoint, int goalNode, Boolean waypointSet) { _waypoint = waypoint; _waypointSet = waypointSet; _goalNode = goalNode; } #endregion public void setWaypoint(int goalNode, Boolean waypointSet) { _waypointSet = waypointSet; _goalNode = goalNode; } #endregion Each time a character is generated an object of this class is added to the list. However, whenever I add an extra character to this list and get it to move, it does not move. Please feel free to provide comments & suggestions as to how I can resolve this issue. Since I am new to this forum, I have not submitted all my code, which would be useful in providing me with better comments & suggestions. If there is a way I can upload all my code for you to see, please let me know so I can do this, thanks.
What language is this? C#? Always specify your language, especially when it's not C++.

I don't think there's much relevance to that tint and texture code. In fact, much of the code you posted pretty much does nothing except wrapping variable access in method calls, which you probably shouldn't do anyway.

Could you be a bit more specific about this framework you're using? Does it perform as expected when you do not use your new code, for example?

This topic is closed to new replies.

Advertisement