I am currently working on a world war strategy game called World of War. I recently have been placing parts which act as cities manually around the map with their own name and population, but after manually placing ~350 one by one, I realized it will take way too much time since I am planning on placing ~1500 - 2000 cities. There is a game called Rise of Nations by @hyperant that has around 1400 cities in the same exact style as me. I know for a fact that they have a script that places the cities themself, but I am unsure on how they did it. If anyone has any information, ideas, or help on this matter please reply.
If you dont need it to mimic real life you could write a for loop that goes through all the parts finds a random position on that part and places the city piece
Well its possible that the map they have is scaled to fit real world cords, in that case it would be very easy to find a database online that you could copy and paste all the real world cords into the map
This is not a perfect example but try this out (server side)
oh btw the positions are in the same place currently so the two parts are going to be in the same spot lol
local cities =
{
{"Tokyo",35.6839,139.7744}, -- [city name], [lat], [long]
{"London",35.6839,139.7744},
}
for index,city in pairs(cities) do -- loops through all the cities
local CityName = city[1]
local Lat = city[2]
local Long = city[3]
local city = Instance.new("Part")
city.Size = Vector3.new(1,1,1)
city.Parent = workspace
city.Name = CityName
city.Position = Vector3.new(Lat,0.5,Long)
end
if you do not have a deadline, why not make like 50 cities every day?
you can pick any number that works for you, and eventually it will get done after a few weeks or months.
yes, it will take a while but good games take time to do.
if you really want you can do like 150 every day (or some higher number, I do not know how long it takes per city) and get it done faster but still not overworking.
It may also seem very annoying to do, but works faster and easier then you think.