Galaxy types...

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderators: Committer, Committer

Message
Author
modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Galaxy types...

#1 Post by modulus » Sat Oct 25, 2003 10:52 pm

So I thought an easy place for me to jump in is with the galaxy types. I heard it said that some want it in, so I thought I could write them to learn the system and get familiar with everything. So I've started with spiral and I'm was just wondering is there an idea of what these should look like. I'm currently using Bezier curves but I'm going to switch to b-splines for the better control of the base shape. Should these curves make complete spiral revolutions or only half a revolution. There end up being a lot stars packed in the arms really close together and the longer the arm the more sparse it will get. Also do we want a greater weight towards the center?

(If the leads decide they don't want this in for 0.1 then it can stay out untill later, its still a good place to jump in.)

Tim
Tim

jbarcz1
Creative Contributor
Posts: 226
Joined: Thu Jun 26, 2003 4:33 pm
Location: Baltimore, MD

#2 Post by jbarcz1 » Sun Oct 26, 2003 1:09 am

I think its a good idea. No reason not to include it if you're willing to do it.
Empire Team Lead

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#3 Post by tzlaine » Sun Oct 26, 2003 2:39 am

This is something that is officially supposed to be part of v0.1, and there is even a place to select your galaxy shape in the game. I only wanted to leave it out only because it is less essential right now. If you could get this done in time for the v0.1 release, that would rock.

User avatar
Ablaze
Creative Contributor
Posts: 314
Joined: Tue Aug 26, 2003 6:10 pm
Location: Amidst the Inferno.

#4 Post by Ablaze » Sun Oct 26, 2003 3:16 am

If you want to read up on what galaxies tend to look like in the real world, I can give you a couple of links.

Here is a good overview, and here is a more specific explanation of what they tend to do over time.

A good general model is "the larger the bar the more young stars."
Time flies like the wind, fruit flies like bananas.

modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Will do

#5 Post by modulus » Sun Oct 26, 2003 4:38 am

I'm on it... Two questions... Can you point me in the right direction to...

1. Randomize your random funcitons (I get the exact same galaxy every time)

2. Set the system type with parameters. I assume star_type_gen() does this, but I might like to fiddle with it to set it according to length out on the arm. Do I just replace that with my own value.


EDIT: Oh and when is 0.1 suppsed to be "complete".

Thanks and I'm having fun...

Tim
Tim

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Will do

#6 Post by tzlaine » Sun Oct 26, 2003 6:14 am

modulus wrote:I'm on it... Two questions... Can you point me in the right direction to...

1. Randomize your random funcitons (I get the exact same galaxy every time)
No. Later on, when we actually release a finished product, we should do that. For now, determinism helps with development. If you want to test different configurations, try different seeds, or try using the clock as a seed value. Check out the code in Random.h; the seed should be fairly obvious. Please do not commit any changes to Random.h at this point though.
2. Set the system type with parameters. I assume star_type_gen() does this, but I might like to fiddle with it to set it according to length out on the arm. Do I just replace that with my own value.
star_type_gen is just an instance of a random number generator. Roll your own based on the comments in Random.h.
EDIT: Oh and when is 0.1 suppsed to be "complete".
Who knows? Two or three weeks I hope, but probably longer.

modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Re: Will do

#7 Post by modulus » Sun Oct 26, 2003 6:54 am

tzlaine wrote: No. Later on, when we actually release a finished product, we should do that. For now, determinism helps with development. If you want to test different configurations, try different seeds, or try using the clock as a seed value. Check out the code in Random.h; the seed should be fairly obvious. Please do not commit any changes to Random.h at this point though.
Yeah I figured that, I meant locally for testing... :wink:

Thanks for the help,
Tim

modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Screen shots

#8 Post by modulus » Sun Oct 26, 2003 4:37 pm

How can I post screen shots to get oppinions... Its completely adjustable right now so it would be a good time for input. I have two three and four.
Tim

iamrobk
Space Dragon
Posts: 289
Joined: Sun Sep 07, 2003 12:27 pm

#9 Post by iamrobk » Sun Oct 26, 2003 5:37 pm

if you need to get screenshots, pressing "Print Screen" will copy whatever is on your monitor, then you can open paint or whatever, paste it, save it, crop it a bit, upload to a site and post it here.

modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Screen shots

#10 Post by modulus » Sun Oct 26, 2003 5:40 pm

Yeah its the site thing thats the issue... My server doesn't have web up yet (at least not secure)... I guess I'll create a yahoo acct...
Tim

modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Images

#11 Post by modulus » Sun Oct 26, 2003 6:38 pm

OK heres the images... hope they aren't too big... There is a small issue with the 3 arm which I can fix easily (running off the map). You will notice I put a star in each corner to indicate bounds. I haven't done the proper aging yet where stars in the middle are redder. That is a simple linear interpolation though. I follow a bezier curve and then randomly offset by a scalar of the normal (weighted towards 0).

Image

Image

Image
Tim

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#12 Post by tzlaine » Sun Oct 26, 2003 8:54 pm

Awesome. Those look terrific.

iamrobk
Space Dragon
Posts: 289
Joined: Sun Sep 07, 2003 12:27 pm

#13 Post by iamrobk » Sun Oct 26, 2003 8:59 pm

Last one looks the best, by far IMO. Try to do a MOO3 like thing where the center of thegalaxy has more stars. Personally I think the 2 arm galaxy is kinda ugly though. Just doesn't look appealing to me... The 3 arm is ok, but I definately like the last one the best.

User avatar
Extremepumpkin
Space Kraken
Posts: 125
Joined: Fri Aug 22, 2003 4:02 pm
Location: Here.

#14 Post by Extremepumpkin » Sun Oct 26, 2003 9:16 pm

I cant see any of the pictures, could someone email me them?
Only after 14 hours of work, will you realize you can do it in 2.

modulus
Space Floater
Posts: 22
Joined: Fri Oct 24, 2003 9:19 pm
Location: Houston

Stuff

#15 Post by modulus » Sun Oct 26, 2003 10:30 pm

I can weight them towards the center easily. As for which you like, each is an individual option (2,3,or 4 arm) so tell me how to improve each on an individual basis....

If the actual curve is non appealing I can modify it... I'm trying to get away with Bezier but may have to switch to b-spline for better control in the middle.
Tim

Post Reply