.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old November 2nd, 2000, 09:10 AM

Tomgs Tomgs is offline
Sergeant
 
Join Date: Oct 2000
Location: Winnetka, CA, USA
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Tomgs is on a distinguished road
Default Repeat Galaxies

I just had something strange happen. I tried a new strategy so I had the computer on medium difficulty. The game went very fast and I had the galaxy well under control early so I started a game with identical settings except on hard. I got the same galaxy with the same starting planets. I noticed it because two of the planets in my starting system were habitable by me. I recalled my saved game and all the systems were in the same place and as I explore more all the planets in each system I go to is the same as it was in the first game. The alien locations are different and one new race is in the game. I have started many games but I have never had a galaxie repeat before that I have noticed. Has anyone else seen this happen? I will have to try a new game and make sure that something isn't glitched with my program.

[This message has been edited by Tomgs (edited 02 November 2000).]
Reply With Quote
  #2  
Old November 2nd, 2000, 10:04 AM

Saben Saben is offline
Private
 
Join Date: Oct 2000
Location: Tacoma, WA USA
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Saben is on a distinguished road
Default Re: Repeat Galaxies

A little secret of computer science is that random isn't. The computer is incapable of produceing real random numbers, so instead a value (the seed) is taken from a source which changes alot (ie number of seconds since midnight), and then run thru a few functions to yeild your number. If you put in the exact same seed, you will get the exact same sequence of "random" numbers.
Reply With Quote
  #3  
Old November 2nd, 2000, 07:04 PM

Tomgs Tomgs is offline
Sergeant
 
Join Date: Oct 2000
Location: Winnetka, CA, USA
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Tomgs is on a distinguished road
Default Re: Repeat Galaxies

Well I started 3 or 4 other games just to see if it happened again and it didn't. I must have just won the random occurance award. Of course there will be I assume a bit more things in the full Version, making a repeat galaxy even less likely, it was just very strange getting the same one twice in a row. If my starting position was on the other side of the galaxy I would probably never have noticed it since I use a large galaxy size.

[This message has been edited by Tomgs (edited 02 November 2000).]

[This message has been edited by Tomgs (edited 02 November 2000).]
Reply With Quote
  #4  
Old November 2nd, 2000, 09:44 PM

greghacke greghacke is offline
Corporal
 
Join Date: Oct 2000
Location: Columbus, OH, USA
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
greghacke is on a distinguished road
Default Re: Repeat Galaxies

In coding, I usually fudge the random sequence. A good trick for you coders out there...

Seconds since arbtrary time * Day of the week (1=Monday or what ever you want) * Week of the year

Following this random seed, it takes decades of gaming to get the same number. I even toss in a fourth multiplier. (the Last 4 digits of the machine's processor ID)
Reply With Quote
  #5  
Old November 2nd, 2000, 10:16 PM
dmm's Avatar

dmm dmm is offline
Captain
 
Join Date: Sep 2000
Location: USA
Posts: 806
Thanks: 0
Thanked 0 Times in 0 Posts
dmm is on a distinguished road
Default Re: Repeat Galaxies

You have to watch out with random number generators. Some of them stink! (By the way, they're ALL actually pseudo-random. Eventually they repeat. ) Lousy ones will generate a nice sequence of numbers that seems pretty random, but if you keep seeding it and looking at the result, you find that the generator is actually only able to generate a small number of "random" series. The chance that one "random" series will be identical to another "random" series can be quite high if your algorithm stinks badly enough. And it turns out that making a non-lousy one is harder than you'd think it would be.

Is that what happened in this case? NAH! It's a bug!

How do you like my use of emoticons? I just figured it out!

[This message has been edited by dmm (edited 02 November 2000).]
__________________
Give me a scenario editor, or give me death! Pretty please???
Reply With Quote
  #6  
Old November 3rd, 2000, 01:07 AM
Seawolf's Avatar

Seawolf Seawolf is offline
Second Lieutenant
 
Join Date: Aug 2000
Location: New York, New York USA
Posts: 480
Thanks: 0
Thanked 0 Times in 0 Posts
Seawolf is on a distinguished road
Default Re: Repeat Galaxies

Just a point,

Just becasue the planets were in the same location doesn't mean that they had the same minerals and the like. Also if ou set it to "hard" trsut me you would like knowing where everything is. The game would not have been the same.



------------------
Seawolf on the prowl
__________________
Seawolf on the prowl
Reply With Quote
  #7  
Old November 3rd, 2000, 01:19 AM
Instar's Avatar

Instar Instar is offline
Major
 
Join Date: Aug 2000
Posts: 1,246
Thanks: 0
Thanked 0 Times in 0 Posts
Instar is on a distinguished road
Default Re: Repeat Galaxies

Hmm In C/C++ you use the srand and stuff to get random numbers.
Usually the way I do it is to call the time function, put that into the seed, and call up the random number (that method is probably the best for normal uses IMO)
Then you can modulo the number down to whatever size
__________________
When a cat is dropped, it always lands on its feet, and when toast is dropped, it always lands with the buttered side facing down. I propose to strap buttered toast to the back of a cat. The two will hover, spinning inches above the ground. With a giant buttered cat array, a high-speed monorail could easily link New York with Chicago.
Reply With Quote
  #8  
Old November 3rd, 2000, 04:54 AM

Tomgs Tomgs is offline
Sergeant
 
Join Date: Oct 2000
Location: Winnetka, CA, USA
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Tomgs is on a distinguished road
Default Re: Repeat Galaxies

No the minerals and the planet locations were the same. The alien locations were different and one race was added from the first time.

The high difficulty just makes the game Last a bit longer I can still beat it in this Version. I do get challenged from time to time but human improvisation will win over formula building most of the time. If I see one race is using a lot of missles I can research the point defence or if there are a lot of mines I can build sweepers much faster than the computer can respond to my attacks. I do see that the computer will research point defence earlier now but I just counter with longer range beam weapons when that happens and still prevail. Actually the ones that mine everything take the longest to beat but they will still lose because they stay relatively static and let me outgrow them. I almost never get the AI attacking me in my home system after the first few turns because I take the fight to them before they get on the offensive. Long range Recon is a key to victory. If you know where they are and they only see your scouts they can't possibly become a threat. This isn't to say its easy to beat in this Version and I haven't give the computer a bonus yet I am still saving that for the full Version.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:55 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.