Jump to content

duda123

Member
  • Content Count

    585
  • Joined

  • Last visited

  • Medals

Everything posted by duda123

  1. duda123

    Tanoa Trains

    These are all great ideas! Lots of possibilities... Right now I'm just focused on getting the train movement working smoothly and improving performance - e.g. pulling 50+ cars without a FPS drop or a jumpy looking train.
  2. duda123

    Tanoa Trains

    Made some improvements to the track positioning. Here's a long CUPs train on the tanoa tracks:
  3. duda123

    Tanoa Trains

    Yes, absolutely. Probably won't be able to see the players on the train, but passengers will get the same type of 3rd person camera following the car they got into.
  4. duda123

    Tanoa Trains

    Wasn't planning on supporting 1st person. However, it might be possible. Seems like it would be useful in the CUPS engine since it has an interior. Eventually, yes, AI should be able to drive it.
  5. duda123

    Tanoa Trains

    Testing out some CUPS train models on Tanoa (they're way too big for the tracks on Tanoa)
  6. duda123

    Tanoa Trains

    Supporting other train models shouldn't be an issue.
  7. duda123

    Tanoa Trains

    Lot of updates today... Here's attaching train cars in action:
  8. duda123

    Tanoa Trains

    No sounds yet.... but at least it can drive on the side of a building:
  9. duda123

    Tanoa Trains

    Here's the latest version. Improved track switching using the graph generated in update 5. Some of the MP logic has been added. Few details on MP: The server auto-generates the track map and sends the data to clients. Supports multiple disconnected track maps. Maps get generated on the fly by the server once you get in a train. Tanoa track map (32km of track) takes ~15 seconds to generate or ~1min if the map is loaded for the first time on the server. Clients not driving the train will see a local-only version of the train - this should eliminate any jumpiness. The driving client only sends a distance from known point on track and train velocity every few seconds. All other clients simulate the train movement using local-only train objects.
  10. duda123

    Tanoa Trains

    Will work on any map. Currently only supports the track objects from Tanoa, but will look into supporting other track objects. However, if you place some tanoa tracks on another map in editor, it will detect and follow them. Primary interaction allows players to drive the trains and switch tracks at intersections by holding left/right while driving. Other players can ride along in other cars. Probably won't support AI driven trains for the first release. Tracks can't be damaged, but planning on ways to derail a train - e.g. train moving too fast around corner, driving off the end of the track, hitting a large object on the track, explosives on track. Not sure what I'll include in first release.
  11. duda123

    Tanoa Trains

    Here's the latest update video. Shows a visualization of the track mapping logic. It generates a node graph of the Tanoa tracks (each intersection / end point is a node - there are 100 on Tanoa) The markers you see in the video are the paths in-between the nodes. Follows editor-placed tracks as well. This graph is then used for train positioning, switching tracks and route finding (e.g. find shortest train path from point A to B). All of this node graph data is calculated in ~15 seconds.
  12. Was just working on some performance testing today. Here's a short script I created today for SQF profiling - others might find useful. Here's how to use it: 1. Include the code at the bottom of this post before the SQF code you want to profile. 2. In every method you want to profile, add in calls the start/stop profiling. You can use the #define macros as a shortcut. Lets say you want to profile this code: TEST_Function_1 = { sleep 10; [] call TEST_Function_2; [] call TEST_Function_2; }; TEST_Function_2 = { sleep 20; }; You would modify the code to look like this: TEST_Function_1 = { PROFILE_START("TEST_Function_1"); sleep 10; [] call TEST_Function_2; [] call TEST_Function_2; PROFILE_STOP; }; TEST_Function_2 = { PROFILE_START("TEST_Function_2"); sleep 20; PROFILE_STOP; }; Then, execute your code you want to profile. When you're done, execute: [] call DUDA_fnc_printProfiles; This will then write the following info to your arma log: The function name, the number of times it was executed, the total time spent executing the function, and the function's self time. Self time is the function's total time executing minus the time spent executing other functions inside your function. For the samples above, you would get the following: TEST_Function_1, Count: 1, Total Time: 50 seconds, Self Time: 10 Seconds TEST_Function_2, Count: 2, Total Time: 40 seconds, Self Time: 40 Seconds #define PROFILE_START(METHOD_NAME) [METHOD_NAME,diag_tickTime] call DUDA_fnc_profileMethodStart #define PROFILE_STOP [diag_tickTime] call DUDA_fnc_profileMethodStop DUDA_Method_Stack = []; DUDA_Profiles = []; DUDA_fnc_profileMethodStart = { params ["_methodName",["_time",diag_tickTime]]; DUDA_Method_Stack pushBack [_methodName,_time]; ([_methodName] call DUDA_fnc_getProfile) params ["_profileIndex","_profile"]; if(_profileIndex == -1) then { DUDA_Profiles pushBack [_methodName,0,0,0]; }; }; DUDA_fnc_profileMethodStop = { params [["_time",diag_tickTime]]; private _stackElement = DUDA_Method_Stack deleteAt ((count DUDA_Method_Stack) - 1); _stackElement params ["_methodName","_startTime"]; ([_methodName] call DUDA_fnc_getProfile) params ["_profileIndex","_profile"]; private _totalTime = (_time - _startTime); _profile params ["_pName","_pCount","_pTotal","_pSelf"]; _profile set [1,_pCount + 1]; _profile set [2,_pTotal + _totalTime]; _profile set [3,_pSelf + _totalTime]; DUDA_Profiles set [_profileIndex,_profile]; if(count DUDA_Method_Stack > 0) then { private _caller = DUDA_Method_Stack select ((count DUDA_Method_Stack) - 1); _caller params ["_callerMethodName","_callerStartTime"]; ([_callerMethodName] call DUDA_fnc_getProfile) params ["_callerProfileIndex","_callerProfile"]; _callerProfile params ["_cName","_cCount","_cTotal","_cSelf"]; _callerProfile set [3,_cSelf - _totalTime]; DUDA_Profiles set [_callerProfileIndex,_callerProfile]; }; }; DUDA_fnc_getProfile = { params ["_profileName"]; private _profile = []; private _profileIndex = -1; { if(_x select 0 == _profileName) exitWith { _profile = _x; _profileIndex = _forEachIndex; }; } forEach DUDA_Profiles; [_profileIndex,_profile]; }; DUDA_fnc_printProfiles = { { diag_log str _x; } forEach DUDA_Profiles; };
  13. duda123

    Advanced AI Command

    Not currently supported by the addon
  14. duda123

    Advanced AI Command

    Yes, take a look at the GitHub project. It has a sample mission.
  15. duda123

    High Command HELP

    The first one I listed doesn't rely on anything from standard HC.
  16. duda123

    High Command HELP

    There are some alternatives to high command if it's not working out well. Here's one I created: Here's another one Igitour created that expands the functionality of HC:
  17. duda123

    Tanoa Trains

    Status update: I'm currently working on track switching at the moment. As you drive your train into a split, the train will by default take the path requiring the least amount of turn. However, if you hold down left/right as you pass over the split, the train can be redirected down the left/right most paths. This will support track splits placed anywhere on the track. For instance, you will be able to place a split track object onto the existing tanoa track. The train can then be directed down your custom path by holding right/left. You could even create a 3-way split by placing 2 split objects on top of each other (one pointing left, the other pointing right). The train would by default head down the center track. However, you can press right/left to head down the other paths.
  18. duda123

    Tanoa Trains

    Sorry to say my train crash video wasnt cinematic enough for the video contest. If I have time I'll work on a better one.
  19. duda123

    Tanoa Trains

    You'll be able to get out of your train and disconnect the train cars behind your engine. Is that what you were wondering? To connect a train car to your engine, you have to back up into it with the engine. It will then auto-connect to your train. Disconnecting has to be done in person by getting out of the engine and walking over to train car.
  20. duda123

    Tanoa Trains

    Not sure what you mean?
  21. duda123

    Advanced AI Command

    That's expected - it has to switch you back to your original player before dying, otherwise you end up respawning.
×