taltamir
Posts: 1290
Joined: 4/2/2010 Status: offline
|
quote:
ORIGINAL: Mysterius quote:
ORIGINAL: smokytoks the number of worlds displayed on the planner seems to be limited : once you reached the maximum number, the game seems to filter worlds displayed in the planner : Continental > Swamp > Ocean > Desert > Volcanic Oh god! How terrible is this system... I think i would have prefered a bug than such a nonsense. what he described IS a bug. The way programming work you must perform any task via very simple instructions, one by one... thus the task of creating a list is probably done as: 1. Create List (empty), Create Variable X, set X=0 2. Loop: a. Get conditions of planet X and dump them into a temporary variable b. Is conditions for planet X "owned by player" c. Is conditions for planet X "owned by AI" d. Is conditions in system owned by AI? e. if b, c and d are no, then put in in the list. f. increase X by 1 Repeat loop. This is a SUPER simplified example and I skip a lot of steps... Now, planets obviously much each have a unique identifier (planet 1, planet 2, etc). When the galaxy is created each planet is given such an identifier number. The system of galaxy generation and numbering is thus probably: 1. Get number of desired stars set by player in game creation, call it X 2. Create X*VariableA continental planets 3. Create X*VariableB Swamp planets 4. Create X*VariableC Ocean planets 5. Create X*VariableD Desert planets 6. Create X*VariableE Volcanic planets each one is a complex process in of itself, and each one involves assigning a number value to the planet as it is created. Notice the order was: Continental > Swamp > Ocean > Desert > Volcanic If your galaxy has 400 continental planets and 200 swamp planets, then planets 0-399 would be continental and planets 400 through 599 would be swamp, and so on. Thus when the list of planets is populated it is filled with planets in this order... if at any time the list size fills up then all the extras are simply lost (or worse, cause a buffer overflow and overwrite random data!) The solution to the bug is to increase the list size a lot, or better yet, make it future proof by creating an algorithm that first checks to see how many planets exist in the game, then makes sure the list has that many spots. Also, it should be made to run again whenever the game editor is closed, because you could have added planets.
< Message edited by taltamir -- 6/15/2010 1:00:04 AM >
_____________________________
I do not have a superman complex; for I am God, not Superman.
|