Forums / DQ: Horizons / General Discussions / Galaxy Editor
Posted ByMessage
Emperor L
[ Posts : 1237 ]
[Post Date: 05-Jul-2008 17:01]

Ok, I have sent/uploaded the galaxy editor now.

Maverick I sent it to you by email, and Disrupter I uploaded it on our wiki. I also sent you a PM on their.

Anyway, I dont know how it will work with different browsers, but so far I have had it running ok on IE7, only problem is that some times you get an error saying that its running too slow, usualy when a lot of stars are being placed or your making lots of stars with the 'Spread from center' option. Just click no on that and it should be ok (may have to do this a few times on really large amounts), but I think this is an IE problem only...

Anyway, to use it firstly unzip the files (make sure you unzip and not just open it from inside the zip file, this dont work).

Then open the file GalaxyEditor.html in a browser and then you should have an empty screen with a few controls at the side.

Enter the galaxy size (400 - 1500) in the top 2 boxes, and click 'New Galaxy' and a black square of the set size will show to the right.

You can then click on this to place stars. And if you click on an existing star it should remove it.

You can also automaticaly spread stars from a given center point.

In the boxes at the side enter x and y coordinates of the center point and then the maximum amount of stars that shouls be generated (max 999). Note that this does not mean that this many stars will be generated, but is just a maximum. If stars are double placed then they are removed and so this effects the overall amount of stars placed, but also helps prevent too many stars in a small area.

The spread amount box is to set how much you want to spread the stars out. Set a minimum of 1, and any number above. The higher the number the more the stars will spread out. They will be more concentrated towards the center though, and more sparse around the edges.

It does not matter if you enter position or spread amounts that makes stars outside the galaxy range, these will not be placed so is fine to set for example 1,1 as the center if you want stars to spread from the top left corner. But the amount of stars made will be quite low, as many of the created stars will be ouside the galaxy range and will not be allowed.






Emperor L
[ Posts : 1237 ]
[Post Date: 06-Jul-2008 20:23]

Ok, I am working on making it better now, the things I plan to add are:

Worm Hole and Black hole placement. (need more information about format for entering to the database for these).

An undo option, with a set number of undo historys stored (maybe 3 or maybe user can choose).

Improve the interface some, maybe by only displaying options that are needed, having more options and information on screen like numbers of stars, WH, BH in galaxy etc.

Improve the delete option, so its easier to delete objects.

Some more automatic placement options.

And maybe some more things if anyone has some ideas.








This message was edited by Emperor L
Maverick
[ Posts : 1331 ]
[Post Date: 07-Jul-2008 11:17]

It doesn't work in FF. get a JS code in mouse position function. Here is my js code I'm using to get mouse coords"

function GetMousePos(e)
{
if (document.layers)
{
xMousePos = e.pageX;
yMousePos = e.pageY;
}
else if (document.all)
{
xMousePos = window.event.x + document.body.scrollLeft + document.documentElement.scrollLeft;
yMousePos = window.event.y + document.body.scrollTop + document.documentElement.scrollTop;
}
else if (document.getElementById)
{
xMousePos = e.pageX;
yMousePos = e.pageY;
}
return [xMousePos, yMousePos];
}

Maverick
[ Posts : 1331 ]
[Post Date: 07-Jul-2008 11:23]

in IE7 I get an error 'x' is null or not an object. It happens when clicking on same place several times.
Emperor L
[ Posts : 1237 ]
[Post Date: 07-Jul-2008 13:03]

Ok, thanks. I will fix them soon. I also get the problem in IE, because clicking a star SHOULD remove it, but I must have changed something at some point, it was working...

It still does remove it, but the problem I think is that it is expecting the deleted object later...I made some changes when adding the auto placement, and forgot to to test this part again

Also, thats a better way to get mouse position, didn't think of adding them for the scroll amount. I will change it for that also

Also, what information needs to be stored for wormholes and black holes?

I imagine black holes need a strength amount (maybe size?) and wormholes need a start and end position...

Also, for black holes, is the gravitational field square like in DQ, where the power effects how many quadrants in each direction it effects?

So a power 10 BH will have a gravity field of 21x21 square centred around itself? Just I want to automaticaly remove any stars placed too close to a black hole


This message was edited by Emperor L
Maverick
[ Posts : 1331 ]
[Post Date: 07-Jul-2008 13:25]

Quote
Also, what information needs to be stored for wormholes and black holes?

I imagine black holes need a strength amount (maybe size?) and wormholes need a start and end position...

Also, for black holes, is the gravitational field square like in DQ, where the power effects how many quadrants in each direction it effects?

So a power 10 BH will have a gravity field of 21x21 square centred around itself? Just I want to automaticaly remove any stars placed too close to a black hole


This message was edited by Emperor L


I don't know exact parameters of a BH and WH yet. So you should postpone their implementation for a while.
Emperor L
[ Posts : 1237 ]
[Post Date: 07-Jul-2008 14:23]

Quote
I don't know exact parameters of a BH and WH yet. So you should postpone their implementation for a while.


Ok, I will only make BH placement, and just store some fake values for now. These can be changed later


Disrupter
[ Posts : 458 ]
[Post Date: 07-Jul-2008 17:31]

So far i cant get it to work on IE6 or Mozilla Firefox.

Id also rather not update IE6 to 7 because 7 has ties to Vista and Vista is the devil.

Make it work on Mozilla at least
Emperor L
[ Posts : 1237 ]
[Post Date: 07-Jul-2008 17:41]

Quote
So far i cant get it to work on IE6 or Mozilla Firefox.


I tried it on IE6 on my laptop...it was ok...will try again, but whats wrong with it on their? Also whats wrong with firefox? So I know what to fix . If its the mouse location, then Maverick posted some code to fix that for all browsers (I think), so should solve that...

Quote
Id also rather not update IE6 to 7 because 7 has ties to Vista and Vista is the devil.


IE7 is fine...better than 6 at least, so far I had no problems with it...and it runs on XP fine, thats what I am using...

Quote
Make it work on Mozilla at least


Ok ...but whats wrong with it? You did unzip the file first and not just open inside the zip file right? That stops it working for me...


This message was edited by Emperor L
Emperor L
[ Posts : 1237 ]
[Post Date: 07-Jul-2008 17:41]

Double post...
This message was edited by Emperor L
Disrupter
[ Posts : 458 ]
[Post Date: 07-Jul-2008 17:55]

Quote
Ok ...but whats wrong with it? You did unzip the file first and not just open inside the zip file right? That stops it working for me...


Ok i did this and it works

New Problem: a 500x500 galaxy with a 250x 250y center at 999 stars and spread 2 does not generate centered, either that or my browser wont load over 400x400.

I tired 400x400 with center at 200:200 and its centered fine, so any bigger doesnt seem to be too friendly.

Also the "show map" doesnt seem to be working to very well, if at all for me.


I suggest also that you try to have different types of galaxies too, like spiral or cluster or wagon wheel.

Oh, and can you make it so there are multiple centers? So a making a galaxy like Pleiades is possible
Emperor L
[ Posts : 1237 ]
[Post Date: 07-Jul-2008 18:09]

Quote
New Problem: a 500x500 galaxy with a 250x 250y center at 999 stars and spread 2 does not generate centered, either that or my browser wont load over 400x400.


Hmm, works on both IE6 and IE7 for me...you can move with the scroll bars to move right and down...

Also, its random, so possible it will have more stars on one side than the other, although not very much...where is it placed for you?

Also, if you got the slow scripts warning and clicked yes, then that will stop it half way, so may cause problems...click no on that...

Quote
I tired 400x400 with center at 200:200 and its centered fine, so any bigger doesnt seem to be too friendly.


Hmm...it could just be off screen, do you have scroll bars in the window?

Quote
Also the "show map" doesnt seem to be working to very well, if at all for me.


Show map also is only to return to the map, it is if you generate the code then want to return. This will be hidden in the next version, and only shown when you generate code. It just reloads the map, but if your on the map it wont do much...


Quote
I suggest also that you try to have different types of galaxies too, like spiral or cluster or wagon wheel.


Heh, yeah...quite hard to do though, but is possible...just need to work out a way to do it...I will have a think about that

Quote
Oh, and can you make it so there are multiple centers? So a making a galaxy like Pleiades is possible


You can do this, just do one then the next and so on, so set the center for each location, it does not have to be the center of the galaxy.

You can use the auto placement as many times as you want, not just once. So for example in a 400x400 galaxy you can have it at 100,100 then 300,300 then 100,300 and so on, making a quad galaxy or something...


This message was edited by Emperor L
Disrupter
[ Posts : 458 ]
[Post Date: 07-Jul-2008 18:17]

Quote
Hmm, works on both IE6 and IE7 for me...you can move with the scroll bars to move right and down...

Also, its random, so possible it will have more stars on one side than the other, although not very much...where is it placed for you?

Also, if you got the slow scripts warning and clicked yes, then that will stop it half way, so may cause problems...click no on that...


I get the verticle scroll bar, no horizontal. When i set the core at 250x250 for the 500x500, its in the lower right hand corner, where youd expect it to be, but its almost like the right and bottom sections over 400 in value just dont load.

Oh and i get none of your silly little "too slow...cant...handle...data..." messages

Quote
You can do this, just do one then the next and so on, so set the center for each location, it does not have to be the center of the galaxy.


This message was edited by Emperor L


Oh ok, i see what you mean, ill mess with it more then
Emperor L
[ Posts : 1237 ]
[Post Date: 07-Jul-2008 18:21]

Quote
I get the verticle scroll bar, no horizontal. When i set the core at 250x250 for the 500x500, its in the lower right hand corner, where youd expect it to be, but its almost like the right and bottom sections over 400 in value just dont load.


Hmm, try a 1000x1000 galaxy with 500,500 as the center, should have both bars then...and also could you post a screen of the problem on the wiki? So I can see

Quote
Oh and i get none of your silly little "too slow...cant...handle...data..." messages


Thats good, I do...

Disrupter
[ Posts : 458 ]
[Post Date: 07-Jul-2008 18:26]

Quote
Hmm, try a 1000x1000 galaxy with 500,500 as the center, should have both bars then...and also could you post a screen of the problem on the wiki? So I can see


That woke it up lol. Now it works fine, i went back and tested the 500x500 and it worked there too I dont need scroll bars for 500x500 though, least not a horiztonal.

Quote
Thats good, I do...


My computer is new and shiny while yours is old and slow.

If you get a desktop, more or less any desktop too, itll be better then my laptop lol.
Pages: 1 2