Staredit Network > Forums > SC1 Map Production > Topic: Speed Tennis
Speed Tennis
Dec 20 2009, 1:27 am
By: Cinolt  

Dec 20 2009, 1:27 am Cinolt Post #1



Gameplay is very simple, and doesn't deserve that much explanation. It's similar to Volleyball, you hit the ball until it reaches one of the teams' boundaries, and would then give a point. The unique part is that when you hit it, the ball goes in the direction your zealot moved.



It's been rushed aesthetically, so it's not fancy. Also, as FoxWolf1 pointed out, it doesn't take into consideration the trajectory of the ball from which it came, it's sort of a "grab and throw" hit. I'll possibly look into adding that, but division triggers wore me out enough in this map ><

If you liked it, tell me some other ideas you have that could implement slope in some way, I've been very interested in it lately. :)

Attachments:
Speed Tennis 0.0003.scx
Hits: 5 Size: 135.48kb

Post has been edited 2 time(s), last time on Dec 20 2009, 4:38 pm by yoonkwun.



None.

Dec 20 2009, 1:37 am ClansAreForGays Post #2



didnt like it




Dec 20 2009, 1:42 am Morphling Post #3



Quote from ClansAreForGays
didnt like it
:lol: You didn't even dl the map. :lol:



None.

Dec 20 2009, 2:06 am ClansAreForGays Post #4



You don't know me.




Dec 20 2009, 2:31 am Morphling Post #5



Quote
division triggers wore me out enough in this map
You could use Macro Triggers to easily do it. I might not have done it effeciently(?), but I like the way I did it. If you do not have Macro Triggers, you can download it here.

Post has been edited 1 time(s), last time on Dec 20 2009, 9:05 pm by Morphling.



None.

Dec 20 2009, 3:07 am Cinolt Post #6



Quote from Morphling
Quote
division triggers wore me out enough in this map
You could use Macro Triggers to easily do it. I might not have done it effeciently(?), but I like the way I did it. If you do not have Macro Triggers, you can download it here.

Thanks, that'll potentially be a huge help. Out of curiosity, if it was compiled as it is, what is the maximum possible values for the dividend, divisor, and quotient?



None.

Dec 20 2009, 3:10 am Morphling Post #7



The maximum as is is 65535 for everything and 612 triggers. Obviously, the smaller your maximum dividend and divisor is, less triggers are required.

Post has been edited 1 time(s), last time on Dec 20 2009, 3:23 am by Morphling.



None.

Dec 20 2009, 3:24 am Cinolt Post #8



My division triggers use 388 triggers total, but with maximum values way lower than 65535, I think my maximum divisor value is 15. So it's for certain I've been using a really inefficient method.. and sort of manually. I'll use your method from now on.. :) Thanks again.



None.

Dec 20 2009, 3:26 am Morphling Post #9



If the maximum is 15, you would only need 60 triggers. ^^



None.

Dec 20 2009, 8:58 pm PearS Post #10



god this is so over my head it's nuts. I wish i had a grasp on this stuff like yall do :D



None.

Dec 20 2009, 9:09 pm Morphling Post #11



I reduced the division triggers to 537 with the maximum dividend and divisor at 2^16 - 1 or 65535. You only need 45 triggers since you only have a maximum dividend and divisor of 15.

Attachments:
Division
Hits: 1 Size: 3.68kb



None.

Dec 21 2009, 12:06 am Dungeon-Master Post #12



Quote from PearS
god this is so over my head it's nuts. I wish i had a grasp on this stuff like yall do :D
Yea, me too, I feel WTF'd in my head right now :hurr:



None.

Dec 21 2009, 12:09 am Morphling Post #13



What don't you get? It's just basic math.



None.

Dec 21 2009, 3:04 am PearS Post #14



its not math...i'm great with math. Just doing it in stacraft. And not even division and stuff because all it is is subtraction and setting aside other counts to carry over numbers or whatever....its all the really advanced concepts. Like unit coordinates, crazy grids, knowing what direction a unit is facing. Sometimes when i crack the maps open to see how it works, there is just nonsense. Tons of triggers with x this and y that and minerals this and gas that and i just get overwhelmed and say hell with this. I salute you guys, really :D



None.

Dec 21 2009, 4:19 pm Dungeon-Master Post #15



Quote from PearS
its not math...i'm great with math. Just doing it in stacraft. And not even division and stuff because all it is is subtraction and setting aside other counts to carry over numbers or whatever....its all the really advanced concepts. Like unit coordinates, crazy grids, knowing what direction a unit is facing. Sometimes when i crack the maps open to see how it works, there is just nonsense. Tons of triggers with x this and y that and minerals this and gas that and i just get overwhelmed and say hell with this. I salute you guys, really :D

^This^



None.

Dec 21 2009, 4:27 pm Morphling Post #16



If you want to learn you can. We have a great wiki on Location Grids, Inverted Locations, and a topic on Unit Coordinates.



None.

Dec 22 2009, 3:06 pm PearS Post #17



thsoe first two articles were really awesome...don't know how i missed them. Thanks. The last one is still bananas though =]



None.

Dec 28 2009, 10:38 pm stickynote Post #18



Quick question. How did you figure out the slope? Did you just record the player's current position and the ball's current position, then find the slope for each possibility?



None.

Dec 28 2009, 10:55 pm Morphling Post #19



To find the slope of a unit you use the formula y2 - y1 over x2 -x1. To put in simpler terms you just set the units death counter coordinates to 0 and detect how much the x and y changed by using a pixel detection method. (Kenoli's method is the most effecient)



None.

Dec 29 2009, 12:29 am Cinolt Post #20



Morphling is right about detecting slope, but I might as well explain how the map itself works in case you or anyone else is interested. I don't know if it's the best method, but this is a general overview of how I did it:

1) The ball is hit. Previously, the players' and ball's coordinates are detected using Kenoli's method and kept in respective counters (we'll call them playerX, playerY, ballX, ballY). How far the players moved from last cycle (which is essentially the slope the ball has to move in) can be detected using the same method. For instance, let's say player 1 moves his zealot 1 pixel up and 1 pixel to the right. His 'slope' would be 1/1, and we'll place them in slopeX, slopeY.

2) Next it detects the distance of the ball and the two borders it can possibly collide in (in this case, it will be the top and right border). Let's say ballX = 52 and ballY = 50, the top border is 100 and the right border is 100. The absolute value of (ballX - right border) = 48, and the absolute value of (ballY - top border) = 50. We'll put these values in counters distanceX, distanceY.

3) Now we detect which of these two values is lower: (distanceX / slopeX), and (distanceY / slopeY). Why? Because the lower of those two quotients will be the dimension border the ball will land on. Since (distanceX / slopeX) is the lower of the two, we'll call the situation "X Recessive", and we know that the place to order the ball will be somewhere in the right border, so we can set systemX (the counter for the location grid) to the right border (100). Now it's just a matter of the Y dimension.

4) To find the dominate dimension coordinate to order the ball (Y dimension), the formula in this case is (distanceX / slopeX) multiplied by slopeY. You would multiply distanceX and slopeY, then divide it by slopeX, which produces systemY.

5) systemX and systemY are set appropriately for the location grid system to place the location, then the scourge would be ordered. The rest of the triggers (scoring, victory) is obvious.

I didn't explain a lot of why it does what it does, because it would over complicate things. But yeah. I was in an explaining mood. Ask questions if you have any.

Post has been edited 1 time(s), last time on Dec 29 2009, 3:09 am by yoonkwun. Reason: bad example



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Roy