I'm very new to SC2 editing and want to start off in the right direction. Sometimes early choices make all the difference (e.g. in my Tatooine map I didn't realize you couldn't replace cliff models so the insides of my ships look jagged). So I'm here asking a few questions.
1. Should I make the physics of my car game in the Data Editor or with Triggers? Here's what it requires:
- speed should depend on the z-axis (you go faster if you're going down hill)
- turns should be slow and respond to momentum, so rather than just turning around and going in the other direction, your vehicle will make a long arc turning slowly as it goes
- I want ground vehicles to be able to fly off of cliffs and fall down taking damage depending on the height fallen
- I want collision when two cars hit each other so that the car will spin if hit at an angle.
- I want a traction variable that is effected by snow, weight, and whether the car is turning or not
I know roughly how to do all this with the WC3 trigger editor. My initial plan is just to launch into the trigger editor for SC2, create a custom movement system and a periodic trigger that fires every .03 seconds and moves all the cars forward by their speed, checks for collision, turns, etc. I'll need to hunt down some special actions I imagine (like how to tell the height of a point), but I figure if WC3 can do it SC2 probably can.
I've heard the data editor can do virtually anything though, so I thought before I make expensive potentially lag-producing triggers I ought to check here.
2. For each car I need to store many variables, such as their speed, max speed, traction, weight, and so on. My plan is to create an array of Cars[1-10], one for each player, and sync them. So Player 2's car would be Car[2] moving at Speed[2] with Traction[2] and so on. Someone once told me I should be using hashtables for this, but I don't know how to use them and I can't see something being much more efficient than a dozen simple real arrays.
Is this a good way of modeling these variable or should I be using the data editor or some other feature I'm unaware of?
3. I've heard triggers cause lag whereas the data editor does not. How much of a problem is that? I had 450 triggers in my WC3 map. Is it worse in SC2? I'm worried that because SC2 has such better graphics and such that complicated triggers will be too much for a lot of computers. Is that a legitimate worry? Should I consider making the car game in WC3 instead?
Sorry to hit you with all these questions. Any help on any of them will be greatly appreciated.
1. Should I make the physics of my car game in the Data Editor or with Triggers? Here's what it requires:
- speed should depend on the z-axis (you go faster if you're going down hill)
- turns should be slow and respond to momentum, so rather than just turning around and going in the other direction, your vehicle will make a long arc turning slowly as it goes
- I want ground vehicles to be able to fly off of cliffs and fall down taking damage depending on the height fallen
- I want collision when two cars hit each other so that the car will spin if hit at an angle.
- I want a traction variable that is effected by snow, weight, and whether the car is turning or not
I know roughly how to do all this with the WC3 trigger editor. My initial plan is just to launch into the trigger editor for SC2, create a custom movement system and a periodic trigger that fires every .03 seconds and moves all the cars forward by their speed, checks for collision, turns, etc. I'll need to hunt down some special actions I imagine (like how to tell the height of a point), but I figure if WC3 can do it SC2 probably can.
I've heard the data editor can do virtually anything though, so I thought before I make expensive potentially lag-producing triggers I ought to check here.
2. For each car I need to store many variables, such as their speed, max speed, traction, weight, and so on. My plan is to create an array of Cars[1-10], one for each player, and sync them. So Player 2's car would be Car[2] moving at Speed[2] with Traction[2] and so on. Someone once told me I should be using hashtables for this, but I don't know how to use them and I can't see something being much more efficient than a dozen simple real arrays.
Is this a good way of modeling these variable or should I be using the data editor or some other feature I'm unaware of?
3. I've heard triggers cause lag whereas the data editor does not. How much of a problem is that? I had 450 triggers in my WC3 map. Is it worse in SC2? I'm worried that because SC2 has such better graphics and such that complicated triggers will be too much for a lot of computers. Is that a legitimate worry? Should I consider making the car game in WC3 instead?
Sorry to hit you with all these questions. Any help on any of them will be greatly appreciated.