PLAYLIFE
Space cadet
Posts: 8
|
|
« Reply #30 on: February 14, 2009, 07:16:06 pm » |
|
Thanks for the editor. I also hope for the ability to zoom.
|
|
|
Logged
|
|
|
|
Minus
|
|
« Reply #31 on: February 19, 2009, 02:52:36 am » |
|
I'm not good at math, but I have a mapping-related math question that doesn't deserve its own thread -
If I have a point A at coordinates 0,500, how do I calculate the position of two other points B and C that are rotated around the origin 0,0 that are also 500 units' distance from 0,0, and so that A B and C are all equidistant from each other? Sorry if that doesn't make sense but I'm writing on an iTouch that is quickly running out of batteries. I think I want to make an equilateral triangle but that might not be the right terminology.
|
|
« Last Edit: February 19, 2009, 02:56:40 am by Minus »
|
Logged
|
|
|
|
Jp
Pilot
Posts: 30
Yet Another Generic Information-Age User Name
|
|
« Reply #32 on: February 19, 2009, 04:45:59 am » |
|
You're making an equilateral triangle. A, B, and C are all an equal distance d from each other, and are all 500 distance from O. (At 0,0) Angle AOB, BOC and COA are all 120 degrees, because they split a full rotation up into three equal parts. So rotate A around the origin by 120 degrees and -120 degrees. The matrix for that is: cos 120 -sin 120 sin 120 cos 120
and cos -120 -sin -120 sin -120 cos -120
In numbers: -0.5 -sqrt(3)/2 sqrt(2)/2 -0.5
and -0.5 sqrt(3)/2 -sqrt(3)/2 -0.5
Do the matrix multiplication, the points you're looking for are: (-250*sqrt(3), -250) (250*sqrt(3), -250) Or in decimals, roughly: (-433, -250) (433, 250) I really should write some programs to rotate maps and the like.
|
|
|
Logged
|
I used to play Mayhem Intergalactic before it was cool.
|
|
|
Chris
|
|
« Reply #33 on: February 19, 2009, 05:12:25 am » |
|
That's probably the most efficient way to do it. I can never be bothered remembering how to set up rotation matrices, though, so I do it with trig. Just figure out the angles from the origin that you want, feed the angle into cos() for the X coordinate and sin() for the Y coordinate, and multiply by the distance from the origin. The angle of point A from the origin is 90 degrees (where 0 degrees is due "east" and degrees go counter-clockwise as they increase), so x=500*cos(90)=0, and y=500*sin(90). Hence point A is at (0,500). Points B and C are each 120 degrees away from point A (360/3 = 120); i.e. they're at 90+120 = 210 and 90-120 = -30 degrees respectively. So point B is at (500*cos(210), 500*sin(210)) and point C is at (500*cos(-30), 500*sin(-30)). Breaking out the calculator, that's approximately (-433, -250) and (433, -250) respectively. Which is, thankfully, the same answer. The above method is exactly how the player planets are placed on random maps, incidentally.
|
|
|
Logged
|
|
|
|
Minus
|
|
« Reply #34 on: February 19, 2009, 06:10:52 am » |
|
Ugh, been trying for like an hour and this isn't working. You were right about those planets butFFFFFFFFFFFFFFFFFFFFFFFFFF MY CALCULATOR WAS IN RADIAN MODE, FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ASDFASDVJKASDFKDUKGCCJ,S8O35TTHEKAGJK.;AL;
|
|
|
Logged
|
|
|
|
Chris
|
|
« Reply #35 on: February 19, 2009, 09:00:20 am » |
|
Oh, I hate it when that happens...
|
|
|
Logged
|
|
|
|
RubenKraken
Space cadet
Posts: 19
|
|
« Reply #36 on: February 20, 2009, 04:26:48 am » |
|
Just as an update, this project hasn't died already. I've made a number of changes, but I am going to try and space out the updates a bit more as to give me more time to work on other projects and nobody likes having constant updates making the application they downloaded an hour ago obsolete.
I've also noticed a couple maps being put out using the editor so it's really cool to see some results.
|
|
|
Logged
|
|
|
|
Chris
|
|
« Reply #37 on: February 20, 2009, 04:38:06 am » |
|
nobody likes having constant updates making the application they downloaded an hour ago obsolete. Oh, I don't know... people didn't seem to mind when I was doing weekly updates of MI.
|
|
|
Logged
|
|
|
|
Minus
|
|
« Reply #38 on: February 20, 2009, 05:50:21 am » |
|
So at normal ship speed settings, planets separated by anything up to 200 units are reachable from each other in one turn. Distances of 201-400 units take two turns. Distances of 401-600 units take three turns. And so on. Chris, you wrote this in another thread, but I'm posting it here because it seems more related than in the thread it was in. Anyway, I don't believe it is the case. At normal ship speed, planets that are 200-400 units away are reachable in one turn. Planets that are about 190 units away also appear very close. Attached is an .ini with proofs - please doublecheck me because I could be wrong. I'm not pointing this out because I think it needs to be fixed, but because it seems important to take into consideration when making maps.
|
|
|
Logged
|
|
|
|
Chris
|
|
« Reply #39 on: February 20, 2009, 06:06:11 am » |
|
Hey, you're right; anything less than 400 units away is a 1-turn trip. The ETA formula is floor(floor(d/200)*m), where d is the distance and m is usually 1 (for Normal ship speed). Looking at it again, 399/200 = 1.995, which rounds down to 1. So yes, a journey of 399 units takes 1 turn (whereas a journey of 400 takes 2). I must have gotten flipped around somehow. My bad. Thanks for catching that! I've edited the original post.
|
|
|
Logged
|
|
|
|
Kumlekar
|
|
« Reply #40 on: February 20, 2009, 07:39:14 pm » |
|
LOL Minus, thats the hell that I went though in making government tyranny. Totalitarianism is the baseline, everything else was rotated around the center is failed trig functions. (Failed because I wasn't using a calculator for most of it) Anyways, do you have a screenshot of Hazard? Looking at it again, 399/200 = 1.995, which rounds down to 1. So yes, a journey of 399 units takes 1 turn (whereas a journey of 400 takes 2). *nitpick* I believe you mean trunicates. Of course I can't spell, and have no idea what I'm talking about.
|
|
« Last Edit: February 20, 2009, 07:41:11 pm by Kumlekar »
|
Logged
|
What is Six Times Nine Forty-Two!
Jp may have played mayhem before it was cool, but I play while its cool! *
* "Cool" is defined as the period of time in which Kumlekar plays a game.
|
|
|
Minus
|
|
« Reply #41 on: February 20, 2009, 08:20:41 pm » |
|
Until I get enough time to really work out all the trigonometry, Hazard is just seven planets, meant to be looked at in .ini format to calculate the distances with some geometry to prove the distance for one jump is 400. One planet at 0,0, three which are a distance of 500 units away from 0,0 and equidistant from each other, and another set of three planets about 360 units distance away from 0,0, equidistant from each other, and I think 160 units distance from the first set of three. It's for three players (but could probably play interestingly enough with only two), and the aesthetic I'm going for is the radiation hazard symbol:
|
|
« Last Edit: February 20, 2009, 08:23:09 pm by Minus »
|
Logged
|
|
|
|
PLAYLIFE
Space cadet
Posts: 8
|
|
« Reply #42 on: February 22, 2009, 06:20:43 pm » |
|
Just as an update, this project hasn't died already. I've made a number of changes, but I am going to try and space out the updates a bit more as to give me more time to work on other projects and nobody likes having constant updates making the application they downloaded an hour ago obsolete.
I've also noticed a couple maps being put out using the editor so it's really cool to see some results.
Well, its not like a multiplayer game when everyone needs to have the same version to play. Nobody NEEDS to download every update anyway. But I'm sure they won't mind if the program they are using gets better. Just make sure that when you release a version, it has a reason for people to download it. That's my humble opinion.
|
|
|
Logged
|
|
|
|
Kumlekar
|
|
« Reply #43 on: February 24, 2009, 06:40:54 am » |
|
lol, mayhem often doesn't require everyone to have the same version.
|
|
|
Logged
|
What is Six Times Nine Forty-Two!
Jp may have played mayhem before it was cool, but I play while its cool! *
* "Cool" is defined as the period of time in which Kumlekar plays a game.
|
|
|
Chris
|
|
« Reply #44 on: February 24, 2009, 08:56:32 am » |
|
Thank you for noticing.
|
|
|
Logged
|
|
|
|
|