goglmethod.blogg.se

X3 reunion move to coordinates
X3 reunion move to coordinates





x3 reunion move to coordinates

Calculation of time estimate to jump to sector Beta : 30s. Ship A want to go to neighbor sector Beta. As such, there is no ships crossing borders. $$anonymous$$y game will be mostly text and description driven. Ships indeed have a position, but this is only to simulate distance to the player ship for the information screen. Someone mentionned something like you, with colliders and such on sector's border, but as i said, there is no graphic involved. Well maybe i didn't use the right keyword. Hi, and thanks for the answer ! Yes i was surprised that i wasn't able to find any relevant information on the net on something that seems like an early problem to me. I am not sure how you got trouble for approaching this problem. List for update() through 1 monobehavior.Įach station have List Docked Ship, List of Co$$anonymous$$g Ship, List of leaving ships $$anonymous$$y destination Station (I tell them i am co$$anonymous$$g)įor searching ship or station, best practice is several pre-made dictionary.ĭictionary of all Ship: $$anonymous$$ey will be name of ship or ID.

#X3 REUNION MOVE TO COORDINATES UPDATE#

1 $$anonymous$$onobehaviour Update all the ship) Update Position function (Only 1 $$anonymous$$anager. $$anonymous$$y Begin Station (I inform I just leave) If any ship co$$anonymous$$g, they will tell me.

x3 reunion move to coordinates

List of ship just go out and maybe co$$anonymous$$g to this station I would make each sector/Station have only: - List of Ship currently Docked It just a matter data control, who contain what and who control who. Did any of you encountered such problem ?įrom my personal program$$anonymous$$g design, I don't care how much ship you need. Overall i think solution 1, ships knowing their location, and a method to loop through all of them and generate a filtered list based on the selected sector seems to be the best choice. Sure, their list won't change as often as sectors, but we are still talking hundreds of small list that will change size and content through the game. They need to know which ships are docked. I got the exact same problematic with stations. But is that even more efficient than a loop on a List of Ships to check their Location value ? What do you think ? We're talking about about several dozens sectors, maybe a hundred (so 50 to 100 lists).ģ- I could also store a single List of KeyValuePair, containing ships and their location, in the static GameManager.

x3 reunion move to coordinates

I'm not sure this is performance friendly to have the list resize again and again to remove object and add object every 5 or 10 seconds. The thing is, I will end up with a lot of various size List that will change a lot through the game. So i just have to ask the current sector about his list that will constantly update real time. From now on, every time a ship will move, it will send an alarm to check if the ship entered or left the current sector, to update the local List.Ģ- The other solution is that each sector have a list of ships. I do that once to fill a temporary list available only to the sector the player is looking at. It should work at first, but i fear that in the more advanced stage of the game, where more ships will be available, this loop will be costly. How can i track theses ships on the global galaxy ?ġ- Either i use my variable Location of type Sector that every ship have, so i loop through all ships (contained in a hashset) to find which one are in the sector. So here is my "problem" ("" because it's not a real problem right now, i just want to know which way is better performance wise). When the player has intel on a sector, the game needs to quickly list the ships in the current sector. There is no graphic, so no 2d representation of where a ship is, only logic and references. The aim is to generate some life with useless travels, but also simulate a real economy with AI Ships looking for opportunity. Ships can fly in sector and from one sector to another, to reach infrastructure. Right now, the game is a galaxy composed of sectors. I'm currently coding a space management sim (in the like of X3: reunion) and i would like some advises on the way to keep tracks AI Ships.







X3 reunion move to coordinates