Some questions
Mar 29 2008, 5:17 am
By: Ateo  

Mar 29 2008, 5:17 am Ateo Post #1



Alright, I have been working on and off on an RPG map that I feel is complete enough to warrant an official post sometime soon. So far, the terrain is 100% complete, and the triggers concerning the core gameplay (no story triggers yet) are 99% done for player 1 and 100% done for computer players. The map was intended for 4 players, but depending on the answers I'm getting here, I might release it as only a single payer map.

Firstly, there's the issue of lag. The lag on single player manifests itself as a very noticeable jerkiness when scrolling the screen. These are the stats of the map (courtesy of MapStats by FaRTy1billion):

Units: 1166/1700 (68%)
Doodads: 1004
Sprites: 466/500 (93%)
Strings: 686/1024(66%)
CUWP Slots: 24/64(32%)
Locations: 148/256(57%)
Triggers: 1141
Briefings: 0
WAVs: 20/1024 (1%)

So as you can see, it is a pretty large map, but by no means the largest. I've seen maps with 1500 - 2000 triggers lag, but nowhere near as drastic as mine. I've tried several things to streamline the triggers. For example, I got rid of all the 'always' and 'preserve trigger' triggers and gathered them all up into one trigger. I reduced the number of strings. I've also deleted away most of the WAV files in the sound editor and found that they still run in the triggers, not sure how that works though. 90% of the triggers presently are triggers involving units, which I hear are the most significant contributors to lag. Unforetunately concerning the nature of the map, I don't think I can change anything about that. But still, Astrogears had 5000+ triggers and it still runs fine. I'd imagine that once I completed the triggers for all players, it would come up to that amount as well. What else could I do?

The map uses and absolutely needs hyper-triggers, and changing the waits to 168ms does help reduce the lag but the lag is still present. I don't just want to reduce lag though, I want to eliminiate it altogether. Because frankly, while the lag may be an annoyance it does not disrupt gameplay at all, at least on single player anyway. I don't want to do so much for with so little payoff. Although of course, the lag will probably become really bad in multiplayer, so this is a factor I would consider, among other factors, in deciding whether the map should be multiplayer or not.

This brings me to the next thing. I concentrated on player 1 first because the triggers for the other 3 players are pretty much identical save for the locations they use. So I was thinking of getting some advance text editing software, like the reconmended Notepad ++, copy/paste all the triggers from SCMdraft's trigger editor and do a 'find all' for "location X" and 'replace all' with "location Y". Is there any precautions to take before I do that, so it doesn't screw up the map completely? This is of course another factor in my Single player vs Multiplayer decision.

Finally, exactly how popular are RPGs on bnet? I don't see a lot of RPG maps being played in public channels aside from the usual such as Crash, which frankly my map is a far cry from. Maybe in private channels, or on networks or in map night? My map is planned to take 5 - 7 hours to complete, probably shorter if you do it in a group but I think it still might be outside the attention span of the regular bnetter. Like I said, if the multiplayer functionality is not gonna get used a lot, I don't see a point in putting too much effort into it really.

So, as you can see, the biggest challege I'm facing now is getting rid of lag, and the major decision is whether the map will be single player or multiplayer. I feel that the map is shaping up to be pretty good at this point, and I'm really determined to complete this map and make it the best it can be, so please help me out kay? ^^...all help is much appreciated...



None.

Mar 29 2008, 7:37 am NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Atm I cannot tell you much more than you have already taken into consideration but I'll tell you what I think.

First of all you already pointed out that modifying units are probably the cause of lag. Although you said you cannot change anything I doubt that. I recommend you post some of the critical triggers and we can try to improve the situation.

About the multiplayer gameability:
You're right, if you need 5-7hrs to finish it no one ever will publicly host it. The map will only be played by a few friends who can meet regularly and save/reload. But the same is true for single player as you will have to host this map somewhere and people have to notice it. Without bnet you have little chances to spread your map.
So you should modify your map that it takes 1.5-2hrs when playing with one player less (you always have a leaver:P) and average skilled players.

Popularity of RPGs: (my own opinion)
About 1-2 years ago RPGs were very sought-after then many RPGs were made and people got bored of them. Now you see a hosted RPG once in a while but not very often. I personally would love to have a RPG which is better and clearly distinguished from the average RPG map. So if you think your map is exceptional you should really make it multi and I bet people will play it.

Precaution before find/replace:
Save the triggers to a .txt file. I often use find and replace with standard notpad. It works fine. But if you have entered a not unique enough "find" you might edit things you didn't intend to and then you're glad you made a backup. ;)




Mar 29 2008, 6:05 pm fritfrat Post #3



Wordpad is exponentially better than notepad for using Replace All. Back up your triggers in a txt file, definitely, but there should be no problem with the replace all unless you mess up. Definitely make it multiplayer so you can play with friends :)

Modify your map to take less time? Are you kidding, Nude? Only make the game shorter if it makes it a better game, if it's repetitive or something. Make it for quality, not popularity. Concerning popularity, RPGs were ridiculously popular 7-9 years ago (Elements and Winterglades, for example), and really have been pretty consistent since then. Because not many people host them anymore, people will always like to join and try a new one out again. It's just that it takes so long to play it naturally doesn't get hosted as much, as well as that most mapmakers are too lazy to make a good RPG nowadays.

Finally, lag... don't worry about number of triggers as much as units and triggers that do things to units. Just remember that lag is caused by things that require image processing most of the time, and compare your map with other RPGs and big maps to see how yours is doing it more and how you can edit it. Good luck.



None.

Mar 29 2008, 6:38 pm NudeRaider Post #4

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from fritfrat(U)
Wordpad is exponentially better than notepad for using Replace All.
If you have simple expressions like zergling to hydralisk and not like 100 replacings there's no difference. I like notpad for its simplicity. Instant loading, and literally zero RAM usage.
When I need something better I use MS Word ;)




Mar 29 2008, 6:44 pm Falkoner Post #5



Quote
This brings me to the next thing. I concentrated on player 1 first because the triggers for the other 3 players are pretty much identical save for the locations they use. So I was thinking of getting some advance text editing software, like the reconmended Notepad ++, copy/paste all the triggers from SCMdraft's trigger editor and do a 'find all' for "location X" and 'replace all' with "location Y". Is there any precautions to take before I do that, so it doesn't screw up the map completely? This is of course another factor in my Single player vs Multiplayer decision.

This shouldn't be a problem, I've used this method in 3 maps now, and it works out just fine, just make sure to test out the other players a bit to make sure they work, and also try and see if it works with multiple players before you release it, just in case you accidently shared locations or something.

What kind of unit related triggers are going on? Are there any unnecessary triggers ordering, creating, or moving units? The amount of triggers is almost certainly not the problem, only what they are doing.



None.

Mar 29 2008, 9:45 pm Ahli Post #6

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

what could create lag:
-running scripts all the time (e.g. junkyard dog)
-ordering many units at the same time
-keep trying to move/teleport units to a location where they could be teleported to, if they were no units/buildings blocking them.
-something else




Mar 30 2008, 12:02 am Vrael Post #7



For triggers that absolutely require preserve trigger, but don't need to fire 12 times a second, make a death counter for 1 second, and put a certain number of deaths in for the required triggers so it only fires once a second.

Example

Trigger:
Player has suffered exactly 0 deaths of Independant Command Center
Set to 12 for Independant Command Center
Preserve

Trigger:
Always
Subtract 1 for Independant Command Center
Preserve

Now for your required triggers, add in

Trigger:
Condition 1
Condition 2
Condition (however many)
Player (with death count trigger running) has suffered exactly (1-12) deaths of Independant Command Center
Actions(however many)
Preserve

To reduce not the number of triggers, but the number of times a trigger fires.



None.

Mar 30 2008, 3:43 am Falkoner Post #8



Well, 1000 triggers shouldn't cause lag problems on their own, it's what the triggers are doing.



None.

Mar 30 2008, 3:57 am Brontobyte Post #9



The lag is created with the "Create" and "Remove" triggers. Also take into consideration what type of machine your using. RAM affects the gameplay in StarCraft to.

Edit: Astrogears has some 6000 triggers, but the game doesn't lag.



None.

Mar 30 2008, 5:02 am Ateo Post #10



Vrael: Thanks! I'll try that out!

The majority of the triggers involve creating and removing units in some way. Would killing instead of removing help? Also, unless I'm mistaken, my comp is pretty high end, it's a new laptop. And yeah, I did mention Astrogears, how did it have 6000 triggers and not lag?

Edit: About earlier comments regarding multiplayer: You're right, I shouldn't have to compromise my vision especially since from the outset the map was meant to be easier to complete in multiplayer than in singleplayer. Also the storyline is pretty flexible since I only have a general idea atm, it was the gameplay I concentrated on first. So yeah, it's definitely no biggie to reduce the length to 4 hours. And the way the game is set up, with 4 players the game should take 1/4 of that amount of time, meaning an hour. ^^

Edit2: I just realized: Could the lag also be caused by having a location constantly being centered around a hero unit?

Post has been edited 2 time(s), last time on Mar 30 2008, 1:16 pm by MalFunkShun.



None.

Mar 30 2008, 1:37 pm Falkoner Post #11



No... That wouldn't cause lag, I think kill actually causes more lag than remove, but centering locations causes virtually no lag. It definitely isn't the amount of triggers, since AG has 7484 triggers right now to be exact, and it doesn't lag much, how many units are on the map at once?

Post has been edited 1 time(s), last time on Mar 30 2008, 1:56 pm by Falkoner.



None.

Mar 30 2008, 3:06 pm Ateo Post #12



Still probably around 1166, since none of the units get removed except those that are being created by spell triggers, usually. I can remove 180 units sometime after the beginning, but will that help?



None.

Mar 30 2008, 6:19 pm NudeRaider Post #13

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

present units or buildings without orders do not create lag if you have enough ram (which everybody should nowadays) and if you're not near the max unit limit (1700 units).




Mar 30 2008, 10:04 pm Falkoner Post #14



Are you constantly ordering or giving units or anything? Anything that could be done in longer intervals instead of constantly?



None.

Mar 31 2008, 6:53 am Ateo Post #15



Yes, I am running a cast disruption web AI script constantly among other things, but reducing the interval does help slightly. I'm working on using that with 168ms hypertriggers to see if lag is eliminated entirely. Thanks!

But another question though, if I finish the other 3 players, wouldn't the lag come back? :(



None.

Mar 31 2008, 7:12 am NudeRaider Post #16

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Just adding triggers does not really contribute to lag. It depends what the players' triggers are doing.
Is the said cast disruption web running for a comp or for a player and gets multiplied?
Also, as we already said make the triggers for more players and then we will optimize the triggers. ;)




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are some real members mixed in those latter pages, but the *vast* majority are spam accounts
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are almost 3k pages
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- the real members stop around page 250
[2024-4-14. : 9:20 pm]
O)FaRTy1billion[MM] -- look at the members list
[2024-4-12. : 12:52 pm]
Oh_Man -- da real donwano
da real donwano shouted: This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
it's pretty common
[2024-4-11. : 9:53 pm]
da real donwano -- This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
[2024-4-11. : 4:18 pm]
IlyaSnopchenko -- still better than "Pakistani hookers in Sharjah" that I've seen advertised in another forum
[2024-4-11. : 4:07 pm]
Ultraviolet -- These guys are hella persistent
[2024-4-11. : 3:29 pm]
Vrael -- You know, the outdoors is overrated. Got any indoor gym and fitness equipment?
[2024-4-10. : 8:11 am]
Sylph-Of-Space -- Hello!
Please log in to shout.


Members Online: Roy, armitage