Hi everyone, lately I spent some time to make a new colosseum type scenario for 6 players. What I had in mind was to make it innovative thanks to these significative improvements:
1) The buyers should be visible only to the player they belongs to.
2) The score system should be based on the XP gained killing the enemy units, and not simply on the number of them.
3) The spawning time of different units should be different: this in order to allow units that normally would be overpowered (like CAV in early levels for example). So, more powerful = longer spawning time.
After days of work I could be able to make this prototype:http://www.mediafire.com/?51oi3n11npn2kqs
And it works, but since I'm really really beginner with this I couldn't be able to build anefficient trigger system: it is BIG and heavy and kills the performances if played online (monster lag).
Who had the courage to look in it told me that it's a mess and should be rewritten from 0.
Since I have no idea of how to do it I ask here for your help.Can you think of a way to achieve the three tasks above with just some few, very efficient triggers?
And,last question, where I can test the map online at any time? (I'm on MAC OSX)
----------------------------------------------
Here I will explain my approach to achieve the 3 tasks.
1)BUYERS NOT VISIBLE. Not very brilliant here, I just solved it dividing the map in 6 areas, one per player, and every area contains all the 10 levels. So the buyers are physically separated.
Lately I thought of two others way to do it: returning to the old style with just one area for all the players, buyers should have 0 LOS and the area should be covered by fog of war. The units to buy should be visible 1) because they are "guardianized" (tresures guardians are visible through fog of war but I think that this can't be done) 2) because they are on a revealer with very small range so that buyers should be out of the sight.
2)THE SCORE SYSTEM. This was harder to do.
The score system is based on the total XP gained by a player. The problem is that XP increases by itself, let's say of x points every y seconds (I found that the correspondence is non-linear), so I had to make a first QV (named SCORE)that is copied from XP every y seconds and a second QV that subtracts x to SCORE, always every y seconds.
I first tried looping this every 1 second, then every 10.
It may not be elegant, but it works quite well
Edit: After some test online I found that the score system is not the cause of the intensive lag. It's OK.
3)THE SPAWN SYSTEM. Hands down, another tough task for me. The common spawn system needs a looped trigger like this:
CONDITIONS:
1) Buyer near the wanted unit
2) Timer
EFFECT:
1) Unit create
There must be 6 triggers (one per player) like this, for every different unit.
Firstly I tried changing the timer value to a custom one, depending on the unit. But that was not good because every timer ran independently from the others: I could for example make a weak unit (short time spawn) while I was waiting for the strong one to be ready (as its timer didn't stop while I was creating the weak unit).
The solution was, one more time, to use QVs.
I made one looped trigger like this:
CONDITION:
QV Timer (lets call the QV T1)
EFFECT:
QV Unit create (this create an unit using the QV as its PROTOID. So lets call the QV ID1)
Then, for every different unit, there was a looped trigger like this:
CONDITIONS:
1) Buyer near the wanted unit
EFFECT:
1) Set T1 to the right value.
2) Set ID1 to the right value.
And, one last time, I repeated this 6 times.
This worked but as you can imagine its probably very performances consuming. It requires hundreds of looped triggers. I may need to rebuild it in a more efficient way, if anyone can see this way.
Edit: After some test online I found that the spawn system is the main cause of the big lag. Therefore it MUST be rebuilt.
- o -
The remanent triggers do things like define the LEVELS from the SCORES and there is also a chat that informs the players of their progress through the levels. More QVs are used here but I hope they don't weigh too much on the system.
And there is also a Tech group. All the rest is quite easy to understand.
KNOWN ISSUES:
It seems like that for some reason the spawn system doesn't work properly for everyone. WortPropze stated that for some people units do not spawn or they spawn as treasure. Clearly the problem involves the PROTOID thing. I don't know what to think about it, since I don't have this issue, and people on gameranger didn't as well.
--------------------------------
Well that's it. A big THANKS to all who will help me!
PS: I'm sorry for my bad english. Without the automatic corrector I would be lost.
1) The buyers should be visible only to the player they belongs to.
2) The score system should be based on the XP gained killing the enemy units, and not simply on the number of them.
3) The spawning time of different units should be different: this in order to allow units that normally would be overpowered (like CAV in early levels for example). So, more powerful = longer spawning time.
After days of work I could be able to make this prototype:
And it works, but since I'm really really beginner with this I couldn't be able to build an
Who had the courage to look in it told me that it's a mess and should be rewritten from 0.
Since I have no idea of how to do it I ask here for your help.
And,
----------------------------------------------
Here I will explain my approach to achieve the 3 tasks.
1)
Lately I thought of two others way to do it: returning to the old style with just one area for all the players, buyers should have 0 LOS and the area should be covered by fog of war. The units to buy should be visible 1) because they are "guardianized" (tresures guardians are visible through fog of war but I think that this can't be done) 2) because they are on a revealer with very small range so that buyers should be out of the sight.
2)
The score system is based on the total XP gained by a player. The problem is that XP increases by itself, let's say of x points every y seconds (I found that the correspondence is non-linear), so I had to make a first QV (named SCORE)that is copied from XP every y seconds and a second QV that subtracts x to SCORE, always every y seconds.
I first tried looping this every 1 second, then every 10.
It may not be elegant, but it works quite well
3)
CONDITIONS:
1) Buyer near the wanted unit
2) Timer
EFFECT:
1) Unit create
There must be 6 triggers (one per player) like this, for every different unit.
Firstly I tried changing the timer value to a custom one, depending on the unit. But that was not good because every timer ran independently from the others: I could for example make a weak unit (short time spawn) while I was waiting for the strong one to be ready (as its timer didn't stop while I was creating the weak unit).
The solution was, one more time, to use QVs.
I made one looped trigger like this:
CONDITION:
QV Timer (lets call the QV T1)
EFFECT:
QV Unit create (this create an unit using the QV as its PROTOID. So lets call the QV ID1)
Then, for every different unit, there was a looped trigger like this:
CONDITIONS:
1) Buyer near the wanted unit
EFFECT:
1) Set T1 to the right value.
2) Set ID1 to the right value.
And, one last time, I repeated this 6 times.
This worked but as you can imagine its probably very performances consuming. It requires hundreds of looped triggers. I may need to rebuild it in a more efficient way, if anyone can see this way.
The remanent triggers do things like define the LEVELS from the SCORES and there is also a chat that informs the players of their progress through the levels. More QVs are used here but I hope they don't weigh too much on the system.
And there is also a Tech group. All the rest is quite easy to understand.
It seems like that for some reason the spawn system doesn't work properly for everyone. WortPropze stated that for some people units do not spawn or they spawn as treasure. Clearly the problem involves the PROTOID thing. I don't know what to think about it, since I don't have this issue, and people on gameranger didn't as well.
--------------------------------
Well that's it. A big THANKS to all who will help me!
PS: I'm sorry for my bad english. Without the automatic corrector I would be lost.
[This message has been edited by Seph29 (edited 03-18-2012 @ 09:17 PM).]