Zap! Curve Tool is available for download
by Angantyr · in General Game Discussion · 04/26/2005 (7:01 pm) · 24 replies
I have implemented BarrierMaker shapes that follow a curve manually in the editor, however, it is tedious and kludgey. I realized that it would be very simple to make a program to do it for me, so I decided to do so.
It will generate a curve of any radius > 0.0 from 0° to 360° in 15° increments. You can specify the start angle of the curve (also in 15° increments).
Why 15°? that is how much things rotate in the editor when you press the R key to rotate selected items. Plus, it makes it easy to hit all the major angles: 30, 45, 60, 90, etc.
It will generate the BarrierMaker command as a text line that you can cut and paste into your map file. Here's a sample:
BarrierMaker 50 2 0 1.93185 0.517638 1.73205 1 1.41421 1.41421 1 1.73205 0.517638 1.93185 0 2 -0.517638 1.93185 -1 1.73205 -1.41421 1.41421 -1.73205 1 -1.93185 0.517638 -2 0 -1.93185 -0.517638 -1.73205 -1 -1.41421 -1.41421 -1 -1.73205 -0.517638 -1.93185 0 -2 0.517638 -1.93185 1 -1.73205 1.41421 -1.41421 1.73205 -1 1.93185 -0.517638 2 0
You can download it from here: members.cox.net/angantyr/ZapCurveTool.zip
For you Mac guys...sorry...this is a Windows app. However...if any of you are Mac programmers, I'd be happy to send you the source code.
Enjoy!
-Angantyr
It will generate a curve of any radius > 0.0 from 0° to 360° in 15° increments. You can specify the start angle of the curve (also in 15° increments).
Why 15°? that is how much things rotate in the editor when you press the R key to rotate selected items. Plus, it makes it easy to hit all the major angles: 30, 45, 60, 90, etc.
It will generate the BarrierMaker command as a text line that you can cut and paste into your map file. Here's a sample:
BarrierMaker 50 2 0 1.93185 0.517638 1.73205 1 1.41421 1.41421 1 1.73205 0.517638 1.93185 0 2 -0.517638 1.93185 -1 1.73205 -1.41421 1.41421 -1.73205 1 -1.93185 0.517638 -2 0 -1.93185 -0.517638 -1.73205 -1 -1.41421 -1.41421 -1 -1.73205 -0.517638 -1.93185 0 -2 0.517638 -1.93185 1 -1.73205 1.41421 -1.41421 1.73205 -1 1.93185 -0.517638 2 0
You can download it from here: members.cox.net/angantyr/ZapCurveTool.zip
For you Mac guys...sorry...this is a Windows app. However...if any of you are Mac programmers, I'd be happy to send you the source code.
Enjoy!
-Angantyr
#2
Now you've made me want to make a Mac version too.
zugok8@gmail.com
-Hamster.rs
04/26/2005 (10:11 pm)
Dang! I'm gonna have to check that out on one of my friends windoze machines. I've always wanted something like that...Now you've made me want to make a Mac version too.
zugok8@gmail.com
-Hamster.rs
#3
-_- :bows:
-Hamster.rs
04/26/2005 (11:23 pm)
Oh sweet lord! Capsule is the most beautiful map I've ever seen! You're like, some sort of soccer level making god!-_- :bows:
-Hamster.rs
#4
I've noticed that Capsule works best with at least 3 people per team. Less than that and it can get a little slow.
I'm working on my next map...I'm thinking that this one will be a Retrieve and/or CTF map.
Anyway...I'll be making improvements to the Zap! Curve Tool (such as being able to offset the center point of the generated BarrierMaker shape). I'm also thinking of adding additional shapes, such as ellipse, sine/cosine wave, parabola, etc.
I'll try to make sure that the current version is always available from the link above and I'll throw a post here anytime I release a new version.
-Angantyr
04/27/2005 (11:06 am)
Hehe...thanks...I've noticed that Capsule works best with at least 3 people per team. Less than that and it can get a little slow.
I'm working on my next map...I'm thinking that this one will be a Retrieve and/or CTF map.
Anyway...I'll be making improvements to the Zap! Curve Tool (such as being able to offset the center point of the generated BarrierMaker shape). I'm also thinking of adding additional shapes, such as ellipse, sine/cosine wave, parabola, etc.
I'll try to make sure that the current version is always available from the link above and I'll throw a post here anytime I release a new version.
-Angantyr
#5
I threw the soccer ball in so you have something to play around with.
SoccerGameType
Team Blue 0 0 1
GridSize 250
LevelName "Shape Demo"
BarrierMaker 25 9 3 8.96593 3.25882 8.86602 3.5 8.70711 3.70711 8.5 3.86602 8.25882 3.96593 8 4 7.74118 3.96593 7.5 3.86602 7.29289 3.70711 7.13398 3.5 7.03407 3.25882 7 3 7.03407 2.74118 7.13398 2.5 7.29289 2.29289 7.5 2.13398 7.74118 2.03407 8 2 8.25882 2.03407 8.5 2.13398 8.70711 2.29289 8.86602 2.5 8.96593 2.74118 9 3
BarrierMaker 25 12.75 3 12.7244 3.38823 12.6495 3.75 12.5303 4.06066 12.375 4.29904 12.1941 4.44889 12 4.5 11.8059 4.44889 11.625 4.29904 11.4697 4.06066 11.3505 3.75 11.2756 3.38823 11.25 3 11.2756 2.61177 11.3505 2.25 11.4697 1.93934 11.625 1.70096 11.8059 1.55111 12 1.5 12.1941 1.55111 12.375 1.70096 12.5303 1.93934 12.6495 2.25 12.7244 2.61177 12.75 3
BarrierMaker 50 5.9 5 6 5 6.16667 5.01704 6.33333 5.06699 6.5 5.14645 6.66667 5.25 6.83333 5.37059 7.16667 5.62941 7.33333 5.75 7.5 5.85355 7.66667 5.93301 7.83333 5.98296 8 6 8.16667 5.98296 8.33333 5.93301 8.5 5.85355 8.66667 5.75 8.83333 5.62941 9.16667 5.37059 9.33333 5.25 9.5 5.14645 9.66667 5.06699 9.83333 5.01704 10 5 10.1667 5.01704 10.3333 5.06699 10.5 5.14645 10.6667 5.25 10.8333 5.37059 11.1667 5.62941 11.3333 5.75 11.5 5.85355 11.6667 5.93301 11.8333 5.98296 12 6 12.1667 5.98296 12.3333 5.93301 12.5 5.85355 12.6667 5.75 12.8333 5.62941 13.1667 5.37059 13.3333 5.25 13.5 5.14645 13.6667 5.06699 13.8333 5.01704 14 5 14.1 5
BarrierMaker 50 5.9 1 6 1 6.16667 0.98296 6.33333 0.93301 6.5 0.85355 6.66667 0.75 6.83333 0.62941 7.16667 0.3706 7.33333 0.25 7.5 0.1464 7.66667 0.0670004 7.83333 0.0170002 8 0 8.16667 0.0170002 8.33333 0.0670004 8.5 0.1464 8.66667 0.25 8.83333 0.3706 9.16667 0.62941 9.33333 0.75 9.5 0.85355 9.66667 0.93301 9.83333 0.98296 10 1 10.1667 0.98296 10.3333 0.93301 10.5 0.85355 10.6667 0.75 10.8333 0.62941 11.1667 0.3706 11.3333 0.25 11.5 0.1464 11.6667 0.0670004 11.8333 0.0170002 12 0 12.1667 0.0170002 12.3333 0.0670004 12.5 0.1464 12.6667 0.25 12.8333 0.3706 13.1667 0.62941 13.3333 0.75 13.5 0.85355 13.6667 0.93301 13.8333 0.98296 14 1 14.1 1
BarrierMaker 50 6 1 4.86 1.2 3.84 1.4 2.94 1.6 2.16 1.8 1.5 2 0.96 2.2 0.54 2.4 0.24 2.6 0.0599999 2.8 0 3 0.0599999 3.2 0.24 3.4 0.54 3.6 0.96 3.8 1.5 4 2.16 4.2 2.94 4.4 3.84 4.6 4.86 4.8 6 5
BarrierMaker 50 14 1 15.14 1.2 16.16 1.4 17.06 1.6 17.84 1.8 18.5 2 19.04 2.2 19.46 2.4 19.76 2.6 19.94 2.8 20 3 19.94 3.2 19.76 3.4 19.46 3.6 19.04 3.8 18.5 4 17.84 4.2 17.06 4.4 16.16 4.6 15.14 4.8 14 5
Spawn 0 2 3
Teleporter 8 3 12 2.5
Teleporter 12 3.5 16 3
Teleporter 3 3 7.3 3
SpeedZone 15.4 4.4 17.3 4
SpeedZone 17.7 3.9 19.2 3.4
SpeedZone 18.5 2.3 17.5 2
SpeedZone 16.1 1.7 14.3 1.4
SoccerBallItem 15.9 4.3
04/27/2005 (6:13 pm)
I added a bunch of functionality to the Curve Tool, but I have a little polishing up to do before I release the latest version, however, for a taste, I made a quick little demo level that includes all the currently available curves: circles, ellipses, sin/cosine curves, and parabolas. It looks really cool! (Well, way cooler than I was planning, anyway.) If any of you want to use it as a base for other maps, feel free. :)I threw the soccer ball in so you have something to play around with.
SoccerGameType
Team Blue 0 0 1
GridSize 250
LevelName "Shape Demo"
BarrierMaker 25 9 3 8.96593 3.25882 8.86602 3.5 8.70711 3.70711 8.5 3.86602 8.25882 3.96593 8 4 7.74118 3.96593 7.5 3.86602 7.29289 3.70711 7.13398 3.5 7.03407 3.25882 7 3 7.03407 2.74118 7.13398 2.5 7.29289 2.29289 7.5 2.13398 7.74118 2.03407 8 2 8.25882 2.03407 8.5 2.13398 8.70711 2.29289 8.86602 2.5 8.96593 2.74118 9 3
BarrierMaker 25 12.75 3 12.7244 3.38823 12.6495 3.75 12.5303 4.06066 12.375 4.29904 12.1941 4.44889 12 4.5 11.8059 4.44889 11.625 4.29904 11.4697 4.06066 11.3505 3.75 11.2756 3.38823 11.25 3 11.2756 2.61177 11.3505 2.25 11.4697 1.93934 11.625 1.70096 11.8059 1.55111 12 1.5 12.1941 1.55111 12.375 1.70096 12.5303 1.93934 12.6495 2.25 12.7244 2.61177 12.75 3
BarrierMaker 50 5.9 5 6 5 6.16667 5.01704 6.33333 5.06699 6.5 5.14645 6.66667 5.25 6.83333 5.37059 7.16667 5.62941 7.33333 5.75 7.5 5.85355 7.66667 5.93301 7.83333 5.98296 8 6 8.16667 5.98296 8.33333 5.93301 8.5 5.85355 8.66667 5.75 8.83333 5.62941 9.16667 5.37059 9.33333 5.25 9.5 5.14645 9.66667 5.06699 9.83333 5.01704 10 5 10.1667 5.01704 10.3333 5.06699 10.5 5.14645 10.6667 5.25 10.8333 5.37059 11.1667 5.62941 11.3333 5.75 11.5 5.85355 11.6667 5.93301 11.8333 5.98296 12 6 12.1667 5.98296 12.3333 5.93301 12.5 5.85355 12.6667 5.75 12.8333 5.62941 13.1667 5.37059 13.3333 5.25 13.5 5.14645 13.6667 5.06699 13.8333 5.01704 14 5 14.1 5
BarrierMaker 50 5.9 1 6 1 6.16667 0.98296 6.33333 0.93301 6.5 0.85355 6.66667 0.75 6.83333 0.62941 7.16667 0.3706 7.33333 0.25 7.5 0.1464 7.66667 0.0670004 7.83333 0.0170002 8 0 8.16667 0.0170002 8.33333 0.0670004 8.5 0.1464 8.66667 0.25 8.83333 0.3706 9.16667 0.62941 9.33333 0.75 9.5 0.85355 9.66667 0.93301 9.83333 0.98296 10 1 10.1667 0.98296 10.3333 0.93301 10.5 0.85355 10.6667 0.75 10.8333 0.62941 11.1667 0.3706 11.3333 0.25 11.5 0.1464 11.6667 0.0670004 11.8333 0.0170002 12 0 12.1667 0.0170002 12.3333 0.0670004 12.5 0.1464 12.6667 0.25 12.8333 0.3706 13.1667 0.62941 13.3333 0.75 13.5 0.85355 13.6667 0.93301 13.8333 0.98296 14 1 14.1 1
BarrierMaker 50 6 1 4.86 1.2 3.84 1.4 2.94 1.6 2.16 1.8 1.5 2 0.96 2.2 0.54 2.4 0.24 2.6 0.0599999 2.8 0 3 0.0599999 3.2 0.24 3.4 0.54 3.6 0.96 3.8 1.5 4 2.16 4.2 2.94 4.4 3.84 4.6 4.86 4.8 6 5
BarrierMaker 50 14 1 15.14 1.2 16.16 1.4 17.06 1.6 17.84 1.8 18.5 2 19.04 2.2 19.46 2.4 19.76 2.6 19.94 2.8 20 3 19.94 3.2 19.76 3.4 19.46 3.6 19.04 3.8 18.5 4 17.84 4.2 17.06 4.4 16.16 4.6 15.14 4.8 14 5
Spawn 0 2 3
Teleporter 8 3 12 2.5
Teleporter 12 3.5 16 3
Teleporter 3 3 7.3 3
SpeedZone 15.4 4.4 17.3 4
SpeedZone 17.7 3.9 19.2 3.4
SpeedZone 18.5 2.3 17.5 2
SpeedZone 16.1 1.7 14.3 1.4
SoccerBallItem 15.9 4.3
#6
Now you can make:
Circles
Ellipses
Polygons (3 to 12 sides)
Sine/Cosine Waves
Parabolas
What's more, you can make these shapes as BarrierMakers, LoadoutZones and GoalZones. :)
Use the same link as before (listed above) to download.
04/29/2005 (8:32 pm)
I just finished polishing up the CurveTool app. New version is 2.0.0.38.Now you can make:
Circles
Ellipses
Polygons (3 to 12 sides)
Sine/Cosine Waves
Parabolas
What's more, you can make these shapes as BarrierMakers, LoadoutZones and GoalZones. :)
Use the same link as before (listed above) to download.
#7
-guerrito
05/09/2005 (10:22 am)
Holy crap! its awsome! :) please program a mac version im not into programing yet. ;)-guerrito
#8
However...I may be able to release a Linux version using Kylix. Is there interest? If there is, I'd need to set up a Linux box and install the Kylix development environment on it, and I'm not sure how long that would take me. (I'd have to scrounge up a machine somewhere.) I don't want to go through all that effort if nobody is using Linux.
05/09/2005 (2:08 pm)
Sorry, I don't have a Mac compiler. I thought you could run PC programs on a Mac in PC emulation mode or something...is that not true?However...I may be able to release a Linux version using Kylix. Is there interest? If there is, I'd need to set up a Linux box and install the Kylix development environment on it, and I'm not sure how long that would take me. (I'd have to scrounge up a machine somewhere.) I don't want to go through all that effort if nobody is using Linux.
#9
Out of curiosity, I did some searching on PC emulation for Macs and found that most adequate solutions are not free...and often not cheap. One looked interesting though: http://www.iemulator.com/ It looks like it is under $25. You would still need a copy of Windows (98/2000/XP). I'm not saying that you Mac guys should run out and buy it so that you can run my program...but if you have been looking for a way to run PC software in general, this might be a fairly inexpensive way to do so.
Also...if you don't want to install Windows in an emulator (or don't have a copy of Windows), you might want to look into WINE. ( http://www.winehq.com/ ) I think you could run WINE inside an emulator (like iEmulator), which would enable you to run Windows programs without having Windows installed. :) Of course, not having a Mac means that I can in no way verify that this setup would work, but the WINE people seem to indicate that it will.
05/09/2005 (3:29 pm)
Hmm...I tried editing my post above to include the following info, but it doesn't seem to work, so I'll just make a new post:Out of curiosity, I did some searching on PC emulation for Macs and found that most adequate solutions are not free...and often not cheap. One looked interesting though: http://www.iemulator.com/ It looks like it is under $25. You would still need a copy of Windows (98/2000/XP). I'm not saying that you Mac guys should run out and buy it so that you can run my program...but if you have been looking for a way to run PC software in general, this might be a fairly inexpensive way to do so.
Also...if you don't want to install Windows in an emulator (or don't have a copy of Windows), you might want to look into WINE. ( http://www.winehq.com/ ) I think you could run WINE inside an emulator (like iEmulator), which would enable you to run Windows programs without having Windows installed. :) Of course, not having a Mac means that I can in no way verify that this setup would work, but the WINE people seem to indicate that it will.
#10
So, if this works, there are now two versions of Zap! Curve Tool...Windows and Linux.
Here are the links:
Zap! Curve Tool 2.0.1.41 (Windows version)
Zap! Curve Tool 2.0.2.41 (Linux version)
Now, since I'm only slightly familiar with Linux, I don't know what the typical file extension is for Linux binaries, so I just left it off. If you are using Linux, I'm assuming you know what the extension should be and can add it after you download it. (I'd be happy to add it if someone can tell me what it should be).
Also, be aware that I have no way to test the Linux binary. (I was able to test the source code that the binary was created from, however) If someone with Linux could be so kind as to test the program for me and let me know how it works, I would be grateful.
05/09/2005 (6:47 pm)
Well, I dug deeper into the whole Linux thing and found that with a simple tool called CrossKylix, I would be able to compile a Linux binary without having to create a Linux environment. So, I decided to give it a shot.So, if this works, there are now two versions of Zap! Curve Tool...Windows and Linux.
Here are the links:
Zap! Curve Tool 2.0.1.41 (Windows version)
Zap! Curve Tool 2.0.2.41 (Linux version)
Now, since I'm only slightly familiar with Linux, I don't know what the typical file extension is for Linux binaries, so I just left it off. If you are using Linux, I'm assuming you know what the extension should be and can add it after you download it. (I'd be happy to add it if someone can tell me what it should be).
Also, be aware that I have no way to test the Linux binary. (I was able to test the source code that the binary was created from, however) If someone with Linux could be so kind as to test the program for me and let me know how it works, I would be grateful.
#11
Nifty work. Any way you could implement a feature to ensure that all points align on the grid properly?
05/21/2005 (1:11 am)
The typical extension.. is none ;)Nifty work. Any way you could implement a feature to ensure that all points align on the grid properly?
#12
05/21/2005 (1:14 am)
Oh, and how does your tool handle level scaling? (GridSize)
#13
I suppose I could have a "snap to grid" option...but it would have the effect of distorting the overall shape...for example, given a circle with radius 1.0, the point at 15 degrees would have the coordinates (0.965926 0.258819). If you snap that to the grid (to the nearest 0.1), you get (1.0 0.3). Apply this type of rounding to the whole circle and you are left with something that doesn't look much like a circle anymore.
However, since I could add it as an option without too much difficulty, I might do it for those instances where you want to keep points snapped to the grid for easier joining with other BarrierMaker shapes.
As far as level scaling, that is all determined by GridSize after the fact, meaning that you can select any GridSize in your map file and it will be properly applied to all shapes within the map, including the ones generated by the curve tool.
05/23/2005 (12:26 pm)
Cool...so you tested the linux version and it worked? :)I suppose I could have a "snap to grid" option...but it would have the effect of distorting the overall shape...for example, given a circle with radius 1.0, the point at 15 degrees would have the coordinates (0.965926 0.258819). If you snap that to the grid (to the nearest 0.1), you get (1.0 0.3). Apply this type of rounding to the whole circle and you are left with something that doesn't look much like a circle anymore.
However, since I could add it as an option without too much difficulty, I might do it for those instances where you want to keep points snapped to the grid for easier joining with other BarrierMaker shapes.
As far as level scaling, that is all determined by GridSize after the fact, meaning that you can select any GridSize in your map file and it will be properly applied to all shapes within the map, including the ones generated by the curve tool.
#14
-Guerrito.rs
05/23/2005 (2:38 pm)
...just out of curriosity. if i were to have a microsoft, how would this tool be used properly?-Guerrito.rs
#15
1.) Open the Zap! Curve Tool and select the Circle tab.
2.) Select the radius that you want the circle to be. We'll say this is going to be a relatively large circle (if GridSize is 250), so let's make the radius 5.0.
3.) Since this will be a closed circle, Start Angle doesn't matter much, so leave it at 0 degrees.
4.) Angle To Fill should be 360 degrees.
5.) Click the "Generate" button. It puts the following line in the Output box:
BarrierMaker 50 5 0 4.82963 1.2941 4.33013 2.5 3.53554 3.53554 2.5 4.33013 1.2941 4.82963 0 5 -1.2941 4.82963 -2.5 4.33013 -3.53554 3.53554 -4.33013 2.5 -4.82963 1.2941 -5 0 -4.82963 -1.2941 -4.33013 -2.5 -3.53554 -3.53554 -2.5 -4.33013 -1.2941 -4.82963 0 -5 1.2941 -4.82963 2.5 -4.33013 3.53554 -3.53554 4.33013 -2.5 4.82963 -1.2941 5 0
6.) Now, copy and paste this line into your level. Save.
7.) When you open the level in the Zap! editor, you will see the circle. Now you can move the BarrierMaker shape to wherever you want to put it. Remember that you can add and delete vertices...so use that to help you link your circle in with other BarrierMaker shapes (if desired).
That's about it. Even without a Microsoft box, you should be able to copy the above line into a level to see how it looks.
05/23/2005 (3:57 pm)
Well, for an example, say you had started a level that you wanted to put a BarrierMaker circle in. (For simplicity, we'll assume you are going to put the circle in at 0, 0 with a width of 50, then move it to where you want it once you are back inside the Zap! Editor.)1.) Open the Zap! Curve Tool and select the Circle tab.
2.) Select the radius that you want the circle to be. We'll say this is going to be a relatively large circle (if GridSize is 250), so let's make the radius 5.0.
3.) Since this will be a closed circle, Start Angle doesn't matter much, so leave it at 0 degrees.
4.) Angle To Fill should be 360 degrees.
5.) Click the "Generate" button. It puts the following line in the Output box:
BarrierMaker 50 5 0 4.82963 1.2941 4.33013 2.5 3.53554 3.53554 2.5 4.33013 1.2941 4.82963 0 5 -1.2941 4.82963 -2.5 4.33013 -3.53554 3.53554 -4.33013 2.5 -4.82963 1.2941 -5 0 -4.82963 -1.2941 -4.33013 -2.5 -3.53554 -3.53554 -2.5 -4.33013 -1.2941 -4.82963 0 -5 1.2941 -4.82963 2.5 -4.33013 3.53554 -3.53554 4.33013 -2.5 4.82963 -1.2941 5 0
6.) Now, copy and paste this line into your level. Save.
7.) When you open the level in the Zap! editor, you will see the circle. Now you can move the BarrierMaker shape to wherever you want to put it. Remember that you can add and delete vertices...so use that to help you link your circle in with other BarrierMaker shapes (if desired).
That's about it. Even without a Microsoft box, you should be able to copy the above line into a level to see how it looks.
#16
05/24/2005 (6:50 am)
For GridSize, I meant the preview, not the data being generated. Sorry :)
#17
05/24/2005 (8:42 am)
Ok im now going into programming. my dad is a pro programmer. 4 real. if possible i will make a programm compatible for all computors. just give me time. ;)
#18
I wait for when you realize how much of a pain in the arse it is.
;)
05/24/2005 (6:51 pm)
I am touched by your boundless enthusiasm for multiporting.I wait for when you realize how much of a pain in the arse it is.
;)
#19
> being generated. Sorry :)
Ah, ok...I gotcha now.
I dunno...I don't have any plans right now to use a GridSize variable for the preview. The preview is really just to give you a rough estimate of how the shape will look.
I'm not ruling it out as a future feature, though.
05/25/2005 (11:27 am)
> For GridSize, I meant the preview, not the data> being generated. Sorry :)
Ah, ok...I gotcha now.
I dunno...I don't have any plans right now to use a GridSize variable for the preview. The preview is really just to give you a rough estimate of how the shape will look.
I'm not ruling it out as a future feature, though.
#20
05/25/2005 (2:42 pm)
What du ya mean pain in the @$$.
Torque Owner Bob
cheese1113@gmail.com
Bob