• Welcome to SC4 Devotion Forum Archives.

Improving region play

Started by croxis, September 08, 2009, 09:03:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jonathan

Is it possible to to say add 2 maps together, so like a 32 map with(next to) a 2 map?
And still have the Quad Trees thing
This would then allow for almost any size map.
Also DragonShardz idea (which is exactly what I was trying to say in the other thread :)) would work with squares.

townscape

Yes, you can insert the custom poligon into a square



funny how I link the banner to the only place I ever post :)
The Greatest place to get a game name

croxis

#22
Is it possible to add two different size maps next to each other? yes. however it requires two quad trees and the boundary would be terribly inefficient.

A custom polygon can be set in a larger square but that is a heck of a lot of wasted space. Every time the boarder of the square is crossed the square will have to quadrupedal in size. It might also makes the city boundary calculations a bit more messy (remember pollutiona nd other effects will spill over into neighboring cities). However I am becoming more tired so I don't know if that will be the case or not.

I also see no mention on how to prevent griefing.

Also plugins will be configured at the region level, not city.

townscape

my mind can't see obvious ways of griefing

examples?

funny how I link the banner to the only place I ever post :)
The Greatest place to get a game name

croxis

Positioning a city to inhibit growth of another player.
Creating long, skinny shapes which results in 8192x8192 16384x16384 squares or larger taxing the server.
Creating odd shapes which access more resources.
Odd shapes intending to block players from accessing transportation resources

townscape

in this case the square is the most obvious solution, but angle limitation to maybe 90- 80 degree not smaller could fix this also and limiting the number of angles a polygon can make

funny how I link the banner to the only place I ever post :)
The Greatest place to get a game name

croxis

Alright, time for some pros and cons.

In chat we've been discussing how to organize everything as far as cities and regions.

Right now it is set up to be a clone of SimCity 4. Why? Because it is a convention people are use to. It also makes multithreading very easy. Cities are spawn off as their own process.

Expandable and variable shaped cities are possible but will come at a cost. In order for the various issues to work out the coordinate system will be region based, as well as the quad tree. An active city will be a specific parts of the quad tree that is active. However multithreading will be much more difficult to implement as it will have to be simulation component based, not city based.

croxis

Unless other devs have an objection, I'm going to go with the expandable city option. It will be more easy to make each city feel like it is part of a larger region. It will also take up more memory and the size of the region will be limited by system memory.

That being said it will be more easy to revert to a sc4 system (mostly code deletion) vs attempting to add it down the road.

Atomius

The things I disliked about the way SC4 did the region thing were:

1. The lack of intercity effects such as pollution
2. The terrible system for edge alignment
3. The lack of regional terrascaping tools

as to the city growth idea... i am not for or against it but if it is the best idea i see no real objection to it, although i am a fan of the square shape

croxis

I shared the same complaints as you do. In Simcity4 each city was completely isolated from one another. The region view was little more than screenshots of the cities stitched together. What this did allow for were massive regions independent of system performance.  The problem is it can only go so far. Eventually it will become very complex to make intercity effects.

Intercity effects will be in, no doubt about that. Full region load will make that easy to do so. Edge alignment is something that will need to be considered more. We need to look at how it is implemented in multiplayer, especially in non cooperative settings. Having one giant mesh for the region terrain is also going to be problematic, especally on older and laptop systems. Perhaps the mayor of a city can set a flag for each neighboring city that will let any edge terrain adjustments spill over into this city. This means the mayor of the city trusts the other. Otherwise the mayor of the other city wont be able to do any terraforming that would spill over into the other city.

Having the whole region loaded will also enable regional level landscaping tools.

My current idea is to have squares (that are part of the quadtree for the same of simulation simplicity and programmer sanity) which cities can buy. Maybe something like 32x32 or 64x64 chunks of land. Max city size could probably be a variable that can be set by the player (with sane defaults) so the admin of a multiplayer game can prevent cities from getting too large and overwhelm the server. I also have code that parses the config.bmp from sc4, so simcity4 region cities can be made.

Nique

#30
Quote from: croxis on October 27, 2009, 04:54:29 PM
(..) My current idea is to have squares (that are part of the quadtree for the same of simulation simplicity and programmer sanity) which cities can buy. Maybe something like 32x32 or 64x64 chunks of land (..)

Just 10m*10m (per tile buy like in Rollercoaster Tycoon (but of course, with a more user-friendly method to buy big chunks @ once).. I think we should use some kind of zoning tool like thing to buy land. (Change the zoning plan) let the player decide how much land he want to buy. Cities should be able to grow to eachother. In a 'state / provincial' way there should be the possibility to lay down (rail)roads to connect cities / towns in your region. So, for building new 'buildings' you have to buy land, but for connecting roads, you are free to go (to connect to other cities).

To prevent abuse in Multiplayer: when a city buys land where another city laid some road-network, the road can be destroyed (for free?). In realtime there is some national or provincial/state agency that makes the decisions but this is a city-sim game... so we have to invent some kind of solution.

You also should be able to create a new or annex a (suburb) town inside your current city region.

When you create a new region, maybe we should include options (not required!) to let the computer create small towns 'randomly' for you. You then can pick a town/city to start with.. This will create some kind of scenario feeling  ()stsfd()
Proudly developer of

croxis

It is possible to have cities buy in the 10x10m grid. What I am worried about will be the impact on performance crossing into so many different quad trees (again, depends on how much we use it in simulation (tom, any input on this?). For rendering it will definitely be important as we are using so many models). Thankfully the chunk size is easy to adjust. There is really no way to tell until we try it. In this case I would rather go conservative and have a positive first impression than people complaining about performance issues.

A realism argument can be thrown in as well. Most cities annex land in chunks.

Tom said that the economy model will require a road connection to outside the region to start things off. I do not see why this can't be expanded so the region is also populated with some rural houses and farms.

The random start option is a great idea. We can combine this with importing sc4 region maps to make existing, but empty, cities like sc4.

Another idea is the option to buy land from other cities.

Nique

#32
Quote from: croxis on October 27, 2009, 09:21:03 PM
It is possible to have cities buy in the 10x10m grid. What I am worried about will be the impact on performance crossing into so many different quad trees (again, depends on how much we use it in simulation (tom, any input on this?). For rendering it will definitely be important as we are using so many models). Thankfully the chunk size is easy to adjust. There is really no way to tell until we try it. In this case I would rather go conservative and have a positive first impression than people complaining about performance issues.

A realism argument can be thrown in as well. Most cities annex land in chunks.

Tom said that the economy model will require a road connection to outside the region to start things off. I do not see why this can't be expanded so the region is also populated with some rural houses and farms.

The random start option is a great idea. We can combine this with importing sc4 region maps to make existing, but empty, cities like sc4.

Another idea is the option to buy land from other cities.

these 'tiles' are already there while rendering the terrain. Add a parameter to that specific tile "OWNER=" I think every computer can handle it as long you keep the camera pointing to the ground, and let the program only 'draw' what should be drawn inside that viewport.. Our solution using 'billboards' for static content will be one of the most performance lifters.
Proudly developer of

tomkeus

Quote from: croxis on October 27, 2009, 09:21:03 PM
It is possible to have cities buy in the 10x10m grid. What I am worried about will be the impact on performance crossing into so many different quad trees (again, depends on how much we use it in simulation (tom, any input on this?). For rendering it will definitely be important as we are using so many models).

Ah, I have a few things to say on that but we have to decide first whether we're going with 3D terrain + billboards for buildings or we're going SC4 way: bunch of bitmaps with alphas in the memory.
#define TRUE FALSE /*Happy debugging suckers*/

Nique

sc4 is a 3d engine with billboards technique
Proudly developer of

tomkeus

#define TRUE FALSE /*Happy debugging suckers*/

Nique

#36
Quote from: tomkeus on October 28, 2009, 08:03:39 AM
Not exactly. Read this

http://simcity.ea.com/about/inside_scoop/3d1.php

"In fact, SimCity 3000 and SimCity 4 internally are entirely 3D; only the user's view of the city is limited to certain positions and angles.;)

Maybe i shouldn't say 'billboards'. I think we have to stick with the SC4 way. We can use the remaining resources that are saved using this method for the simulation engine / special effects

But we need to split something here. Static = pre-rendered, dynamic (roads are dynamic because you want to make nice flexible corners) = rendered by engine. Not everything needs the same approach. Efficiency comes in ;D
Proudly developer of

croxis

Right. SC3k used billboards (prerendered image slapped on a quad) while SC4 used full 3d objects but an interesting buffer system. The latter is the better option as we can still use shadows. I also plan on maintaining an unoffical full 3d client branch, but that is something for my own time. Because each building might be at a different angle it is possible that there could be a separate render for each building. With different zooms and rotations, a lot of video cards may run out of memory. Many video cards only have 128, 256, or 512 megabytes. Laptops usually have less. But that is something we can also test and should be too difficult to switch.

Nique

I'm sorry but i think there is no reason to step off the squared terrain. There are no 'reasonable' benefits. We also shouldn't limit the computer with a 'city life' way gameplay (buying pre-defined chunks of land.. thats so limited). Let the city only buy what it needs. Very simple. (this makes zoning cheaper as you already purchased the land)

We still have one major problem. Connectivity with other cities. Even with cities that lies 3 'blocks' away.
Proudly developer of

Jonathan

In SC4 buildings are not full 3D, they are cuboids with an image of the building on it taken from the correct angle etc. Only cars and networks are full 3D.