Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline AdrianeMapMaker  
#1 Posted : Monday, August 20, 2018 8:33:02 AM(UTC)
AdrianeMapMaker
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 3/8/2016(UTC)
Posts: 1,156
Philippines

Thanks: 312 times
Was thanked: 185 time(s) in 149 post(s)
well i am trying to minimize the lag of my map , i see some scripts that could help me
but i need more scripts.

did you know any scripts that could help to reduce lag except from the hulk override time?

anyways what are this scripts
[from Map/Environment]
infantry lighting reset
infantry lighting set

[from Map/Modify]
resize view guardband

[from UNUSED/Camera/Modify]
final visual game time for camera movement

[from UNUSED/Camera/Move/Modify]
Number of frames to average movement

Edited by user Monday, August 20, 2018 8:34:26 AM(UTC)  | Reason: Not specified

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb

UserPostedImage





Sponsor
Offline SkyMix_RMT  
#2 Posted : Monday, August 20, 2018 6:48:54 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
In what map are you experiencing lag? In my experience, particle count and AI pathfinding are number 1 cause of lag 99% of the time.
Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
Offline Unknown Editor  
#3 Posted : Tuesday, August 21, 2018 1:20:59 AM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
infantry lighting set

No Performance influence : Used to make infantry look Bright or Dark in the map , For example 0 makes Infantry look All Black .

infantry lighting reset : Makes the Infantry look their Default brightness depending on the time of map .

Others : Have not Exprienced yet XD
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
thanks 1 user thanked Unknown Editor for this useful post.
UTD^Force on 8/21/2018(UTC)
Offline acidbrain  
#4 Posted : Tuesday, August 21, 2018 8:57:59 AM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
One of the main reasons of lag in scripting is wrong use of subroutines, if you use a subroutine as generic it has to be a pulse...
Code:

***IF***
True
***THEN***
This team starts hunting


If you use this script as a behavior subroutine there is nothing going on, all sweet and dandy, if you use this script as generic however you will enter a world of pain, especially if you have multiple teams running at the same time with this script, imagine all ai factions on a multiplayer map using scripts like this together, horrible.
If you use subroutines as generic you either disable them on succes and enable again when needed or use flag/counters...e.g.
Code:

***IF***
Flag 'Go hunt' is False
***THEN***
This team starts hunting
Set Flag 'Go hunt' to True

When the team stops hunting you can set flag to false again...
Hope i was a bit of help, or maybe i am full of sjit...

Cheers
Panem et kirkinses
thanks 1 user thanked acidbrain for this useful post.
UTD^Force on 8/21/2018(UTC)
Offline SkyMix_RMT  
#5 Posted : Tuesday, August 21, 2018 3:56:14 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
Originally Posted by: acidbrain Go to Quoted Post
One of the main reasons of lag in scripting is wrong use of subroutines, if you use a subroutine as generic it has to be a pulse...
Code:

***IF***
True
***THEN***
This team starts hunting


If you use this script as a behavior subroutine there is nothing going on, all sweet and dandy, if you use this script as generic however you will enter a world of pain, especially if you have multiple teams running at the same time with this script, imagine all ai factions on a multiplayer map using scripts like this together, horrible.
If you use subroutines as generic you either disable them on succes and enable again when needed or use flag/counters...e.g.
Code:

***IF***
Flag 'Go hunt' is False
***THEN***
This team starts hunting
Set Flag 'Go hunt' to True

When the team stops hunting you can set flag to false again...
Hope i was a bit of help, or maybe i am full of sjit...

Cheers


I don't think you need flags. You can just check "Deactivate upon success" on generic scripts and they will work fine,
or maybe I am full of sjit...
Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
thanks 1 user thanked SkyMix_RMT for this useful post.
UTD^Force on 8/21/2018(UTC)
Offline Unknown Editor  
#6 Posted : Wednesday, August 22, 2018 10:30:31 PM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
You see , For subroutines we usually do not use "Deactivate upon success" , I mean How and when are you gonna activate them again ? This will go too far with failure so you might rather use a Logic I'm gonna announce soon then (I would rather announce it now but even for myself it's complicated so I want to release it with a map) ...

By the way , Always try to give the Units paths instead of HUNT ;
Path Makes CPU calculate a way to get to the first pointed waypoint and then continue as expected .
Attack makes CPU calculate a Path to go and catch an enemy .
HUNT makes CPU run a calculation every frame to find a Path and attack the NEAREST enemy possible .

Hunt is efficient in Battles much more than Attack as AI will not just follow A Specific Target and get trapped but It also costs too much in FAR Positions , Always make a unit hunt enemy on sight and if lost sight , Make it Attack . Path is no more efficient under this condition if you want an Advanced AI ...

Edited by user Wednesday, August 22, 2018 10:32:23 PM(UTC)  | Reason: TOP SECRET

Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline SkyMix_RMT  
#7 Posted : Thursday, August 23, 2018 6:51:44 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
Originally Posted by: Unknown Editor Go to Quoted Post
You see , For subroutines we usually do not use "Deactivate upon success" , I mean How and when are you gonna activate them again ? This will go too far with failure so you might rather use a Logic I'm gonna announce soon then


Subroutines don't work like that. With subroutine scripts, every team gets its own copy of the subroutine script, so for example, if you had a subroutine <this team > hunt if <this team > inside area <area> script, and you assign that script to 3 different teams, then the script will be copied 3 times, one for each team, when one of the teams enters the area, the team's copy of the script will order the team that got inside the area to hunt and then it will deactivate itself (if it didn't deactivate they would just stand still because they would be ordered to hunt every frame). Basically, when the script is successful, it will only deactivate for the team that succeeded, it will not deactivate the other team's copies.

Most of the time you only need the team to do a specific action once, obviously if you want the same team to perform a generic script multiple times you must use the flag method that acid brain explained.

Originally Posted by: Unknown Editor Go to Quoted Post

By the way , Always try to give the Units paths instead of HUNT ;
Path Makes CPU calculate a way to get to the first pointed waypoint and then continue as expected .
Attack makes CPU calculate a Path to go and catch an enemy .
HUNT makes CPU run a calculation every frame to find a Path and attack the NEAREST enemy possible .

Hunt is efficient in Battles much more than Attack as AI will not just follow A Specific Target and get trapped but It also costs too much in FAR Positions , Always make a unit hunt enemy on sight and if lost sight , Make it Attack . Path is no more efficient under this condition if you want an Advanced AI ...


Why not just not using the hunt script at all? Make the team's behavior aggressive and just order them to follow a path into the opponent's base and watch the magic happen.

Aggressive behavior-ed teams not only are more performance-efficient but also will always attack and chase the closest enemy, making it look more realistic.

I also recommend ordering the team to hunt on idle to avoid the team to stop after finishing the path without seeing an enemy.

Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
thanks 2 users thanked SkyMix_RMT for this useful post.
UTD^Force on 8/23/2018(UTC), Unknown Editor on 8/25/2018(UTC)
Offline Unknown Editor  
#8 Posted : Saturday, August 25, 2018 12:39:19 AM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
Yeah , You can not be more right

Originally Posted by: SkyMix_RMT Go to Quoted Post

I also recommend ordering the team to hunt on idle to avoid the team to stop after finishing the path without seeing an enemy.


About this I have done it already , Believe me if the map is Big and Full of Obstacles like Mountains and Rivers and the opponent has relocated to somewhere faraway , For 10 Units You will Exprience LAG Big Smile
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline acidbrain  
#9 Posted : Saturday, August 25, 2018 2:17:36 AM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
SkyMix_RMT wrote:

Why not just not using the hunt script at all? Make the team's behavior aggressive and just order them to follow a path into the opponent's base and watch the magic happen.
Aggressive behavior-ed teams not only are more performance-efficient but also will always attack and chase the closest enemy, making it look more realistic.

If im not mistaking entering vehicles in aggresive state can cause trouble, so becareful with what teams you set aggresive

SkyMix_RMT wrote:

I also recommend ordering the team to hunt on idle to avoid the team to stop after finishing the path without seeing an enemy.

Are you aware of the 'when team is at end of waypointpath' script?
I usually give my teams a generic like this, a sub which disables after succes, used it many many times and works like a charm:
Code:

*** IF ***
Team '???' has reached the end of Waypoint Path '???'
*** OR ***
Team '???' has been attacked by Player '???'
*** THEN ***
Team '???' change their attitude to Aggressive
Team '???' begins hunting.


Cheers
Panem et kirkinses
Offline SkyMix_RMT  
#10 Posted : Saturday, August 25, 2018 7:21:14 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
Originally Posted by: acidbrain Go to Quoted Post
Are you aware of the 'when team is at end of waypointpath' script?
I usually give my teams a generic like this, a sub which disables after succes, used it many many times and works like a charm:
Code:

*** IF ***
Team '???' has reached the end of Waypoint Path '???'
*** OR ***
Team '???' has been attacked by Player '???'
*** THEN ***
Team '???' change their attitude to Aggressive
Team '???' begins hunting.


Cheers


I am aware of the script but I can only see drawbacks when using the method you explained.
Please correct me if I'm wrong:
- The team will only attack when it has been attacked, whereas in the method I explained the team will attack as soon as the enemy is in sight (because the team is already aggressive).
- The team will not go back to following the path if the enemy that triggered the script is killed, meaning that if this script is triggered very early in the path, and the enemy that triggered it is killed, the team is now hunting, this can cause pathfinding lag if the closest enemy is far or behind unpassable areas. It may also make the team not go to the way you want it to go (where the path originally was leading to). This also breaks surviving patrolling teams as they will not get back to patrolling and instead hunt.

If there is a benefit in your method that I may have missed please let me know.

Cheers ^-^
Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
Offline Unknown Editor  
#11 Posted : Saturday, August 25, 2018 9:45:58 PM(UTC)
Unknown Editor
Major
Joined: 3/22/2017(UTC)
Posts: 278
Location: Some where on Earth

Thanks: 123 times
Was thanked: 69 time(s) in 59 post(s)
Originally Posted by: SkyMix_RMT Go to Quoted Post

- The team will only attack when it has been attacked, whereas in the method I explained the team will attack as soon as the enemy is in sight (because the team is already aggressive).


Does this also Work when the team is made out of Infantry ? (Just a Question)

Originally Posted by: SkyMix_RMT Go to Quoted Post

- The team will not go back to following the path if the enemy that triggered the script is killed, meaning that if this script is triggered very early in the path, and the enemy that triggered it is killed, the team is now hunting, this can cause pathfinding lag if the closest enemy is far or behind unpassable areas. It may also make the team not go to the way you want it to go (where the path originally was leading to). This also breaks surviving patrolling teams as they will not get back to patrolling and instead hunt.


Actually there are ways to get the Team Back to the Path After cleared out enemies but that costs effort .
Asking is Not a Problem , Problem is Not to Know Something .

Operation : Dark Angel
Static : Launch Delayed
Reason : Uncool Terrain - Old Logic in use - Lack of Performance
Status : Applying new Terrain - Applying new Logic - Increasing Performance by 300%
Offline acidbrain  
#12 Posted : Sunday, August 26, 2018 4:04:25 PM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
Originally Posted by: SkyMix_RMT Go to Quoted Post

I am aware of the script but I can only see drawbacks when using the method you explained.
Please correct me if I'm wrong:
- The team will only attack when it has been attacked, whereas in the method I explained the team will attack as soon as the enemy is in sight (because the team is already aggressive).
- The team will not go back to following the path if the enemy that triggered the script is killed, meaning that if this script is triggered very early in the path, and the enemy that triggered it is killed, the team is now hunting, this can cause pathfinding lag if the closest enemy is far or behind unpassable areas. It may also make the team not go to the way you want it to go (where the path originally was leading to). This also breaks surviving patrolling teams as they will not get back to patrolling and instead hunt.

If there is a benefit in your method that I may have missed please let me know.

Cheers ^-^

First of all im not here to correct anybody...
There are usually more ways to solve a problem, it is just the way i aproach it, nothing more, it is not The way but A way...
I usually use the method i described because i only want teams to not proceed with their path if they are attacked by a player, if i send teams to a base i want them to get to that base as soon as possible, if you set a team to aggressive it scans 1.5 times further than default so a team aborts original objective of following a path sooner, i like to use teams that go to the enemy base and teams that go attack elsewhere, usually multiple smaller teams which can be build quickly and that can possibly be merged into 1 bigger team in combatzone for example, usually i create random teams for this so the map has more variation if you play it multiple times.

And about the pathfinding...
I always try to design maps in a way in which ai performs best so nice open areas to build and clear paths to follow with not too much obstacles in the way, pathfinding falls or stands with good mapdesign and if you dont put too much stuff on your map it doesnt matter if a unit goes hunting or aggressive from one side of the map to the other.
The returning back to path can be scripted if im not mistaking, not too hard, think about it.

I think that in the end it doesnt matter that much if a team goes hunting or follows a path just as long there are subroutines in generic that disable on succes or switch with flags or counters, i bet you have seen infantry in running animation while standing on one spot, that is a facky subroutine running.

One more time to make it clear.
This is just my way of aproaching this matter, not The way...

Cheers
Panem et kirkinses
thanks 2 users thanked acidbrain for this useful post.
SkyMix_RMT on 8/26/2018(UTC), Unknown Editor on 8/26/2018(UTC)
Offline SkyMix_RMT  
#13 Posted : Sunday, August 26, 2018 5:08:09 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
Ah I see, my bad, thanks for explaining.
Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
Offline acidbrain  
#14 Posted : Monday, August 27, 2018 1:05:36 AM(UTC)
acidbrain
General
Joined: 12/30/2011(UTC)
Posts: 982

Thanks: 95 times
Was thanked: 574 time(s) in 364 post(s)
I dont know if you fellaz already know this site but it contains a handy checklist for mapmaking, i suggest you print the page because well we are in days that sites are going down, old game...
Here is the link, RVMECH is one of the devs btw, in case you're wondering.
Check tip no 10 SkyMix...:P

Cheers
Panem et kirkinses
thanks 1 user thanked acidbrain for this useful post.
UTD^Force on 8/27/2018(UTC)
Offline SkyMix_RMT  
#15 Posted : Monday, August 27, 2018 6:59:47 PM(UTC)
SkyMix_RMT
Major
Joined: 2/21/2015(UTC)
Posts: 386
Portugal

Thanks: 80 times
Was thanked: 132 time(s) in 96 post(s)
Originally Posted by: acidbrain Go to Quoted Post
I dont know if you fellaz already know this site but it contains a handy checklist for mapmaking, i suggest you print the page because well we are in days that sites are going down, old game...
Here is the link, RVMECH is one of the devs btw, in case you're wondering.
Check tip no 10 SkyMix...:P

Cheers


Thanks for the list, but... In what situations is tip no 10 true? Because I have teams in aggressive that load into transports in Operation Kihill Beach:

Team is aggressive.

Team loads into transport.
Check out:

My Music (Techno/House/Experimental)

My Website (GeneralsCentral)

My Youtube Channel (Inactive)

World Builder Community Discord
Offline UTD^Force  
#16 Posted : Monday, August 27, 2018 7:28:18 PM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
I had this problem in my map, but the script is Team '<This Team>' loads into transports. Some infantry won't load into the transport (some of them not all and not every time) and they will keep following the HumV until it stops at the end of the waypoint path and then load into it. I don't know if this is the same issue.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.