楼主: 紅塵市長

[新闻] 【SimCity】2014年官方博客索引:4月6日更新

发表于 2014-1-14 20:43 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-15 13:53 | 显示全部楼层


本帖最后由 紅塵市長 于 2014-1-15 14:15 编辑

Engineering SimCity for Offline Play【译文】
Jan 14, 2014  Simon Fox, Lead Engineer, Single Player Mode

Hi, I’m Simon Fox, lead engineer on the Single Player Mode for SimCity, and I’m here to tell you more about how we engineered Offline gameplay for SimCity.
嗨,我是Simon Fox,《模拟城市》离线工程师,在这里我会告诉你关于更多的《模拟城市》我们是怎么设计离线模式的。

When the game released, our fans were calling for Offline. I rallied the team to start making that happen as soon as practical after launch.


The original creative vision for SimCity was to make a game where every action had an effect on other cities in your region. As such, we engineered the game to meet this vision, setting up the player’s PC (client) to communicate all of its information to the servers. That means that our entire architecture was written to support this, from the way that the simulation works to the way that you communicate across a region of cities. So yes, while someone was able to remove the “time check” shortly after launch, they were unable to perform key actions like communicating with other cities that they had created locally, or with the rest of their region(s), or even saving the current state of their cities.

My team did, however, see a path forward towards Offline, one that would maintain the integrity of the simulation. Lucy once said that Offline wouldn’t be possible “without a significant amount of engineering work”, and she’s right. By the time we’re finished we will have spent over 6 ½ months working to write and rewrite core parts of the game to get this to work. Even things that seem trivial, like the way that cities are saved and loaded, had to be completely reworked in order to make this feature function correctly.


I wish it were as simple as flipping a switch and telling the game to communicate with a dummy client rather than our server, but it’s more than that. Entire calculations had to be rewritten in order to make the game function correctly.

SimCity was written to rely on the servers. The game routinely pings the servers for critical pieces of data (region status, workers, trading etc.) and it relies on that information to keep the simulation moving. This meant rewriting the entire system, which previously existed in Java, and putting it into C++. We’ve had to knock out the internet pipe stuff. There’s lots of code that hits the servers looking for information. We’ve had to write a lot of code to produce that data locally, specifically for region information.

Our game routes pieces of data from one city to another as data flows through the regions. All of that code exists on the server, and now we’ve brought all of that down into the client. The client processes the region box, which is what all of the cities pushes their data into. We’ve brought that down into the client as well.

And now, all of the regional simulation needs to be done locally. The algorithms governing trading between cities needed to be retuned in order to make the behavior between cities more responsive for this type of play. This in itself required major optimizations in order to run the simulation locally. We have an obligation to make the game fun and functional on all specs of machines. We wouldn’t want someone who was enjoying the Multiplayer game to find the Single Player game crippled due to poor optimization.

And it’s not just adding, we had to remove parts of the game for it to function properly as well. This means removing lots of code integral to Multiplayer include code and UI supporting Trading, Social Features, Global Market, Leaderboards and Achievements. And, all without crippling the Multiplayer game.

So where are we at right now? We’ve been working on this since August and now, we’ve hit Alpha and are in the final stages of testing before we release it as part of Update 10 in the future. On behalf of the engineering team, thank you for your patience on this one. We know you want Offline play in SimCity and we are really happy that we are finally getting ready to deliver it to you.
回复 支持 反对

使用道具 举报

发表于 2014-1-15 14:16 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2014-1-16 09:57 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2014-1-16 10:02 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2014-1-17 00:12 | 显示全部楼层
本帖最后由 yangxinhu1111 于 2014-1-26 10:26 编辑

回复 支持 反对

使用道具 举报

发表于 2014-1-20 15:07 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-22 12:22 | 显示全部楼层


本帖最后由 紅塵市長 于 2014-1-22 12:22 编辑

SimCity Cities of Tomorrow: The Hybrid Strategy Blog【译文】
Jan 21, 2014  Game Designer Chris Schmidt

In SimCity Cities of Tomorrow, players have two new specializations to choose from: the green Academy, and the money making OmegaCo. While these two may seem like they are in opposition, they actually share a number of advantages when used together to form a Hybrid city. A Hybrid city takes the profits of Omega sales and applies them towards the development of the Academy technology which allows a skilled player to take advantage of the content SimCity Cities of Tomorrow has to offer in a single city.

The Academy brings to the table a number of great technologies, but its biggest weakness is the reliance on finicky high-wealth Sims to keep their facilities humming with ControlNet, and the overall expense of running an Academy city. OmegaCo on the other hand provides your Sims with the Omega they crave and a nice green lining for your treasury, but you’ll find it to be at the expense of your Sims’ health. When building a Hybrid city, it’s important to find a balance between these two.研究中心会带来很强大的科技,但是最大的缺点就是需要高收入Sims的能力产生更多的ControlNet,以及运作研究中心城的昂贵费用。OmegaCo一方面为你的Sims提供渴望的Omega,另一方面在国库提供收入,但是你会发现这一切的代价是牺牲你Sims的健康。当建立这种混合城市时,发现这两者之间的平衡是很重要的。


Generally speaking it’s easiest to start on your road to a Hybrid city by focusing on whichever one of the two you want to take advantage of first. Starting with OmegaCo will provide a nice boost to your economy, but requires you to build a lot of factories and may heavily pollute your city. This may give you the money to take advantage of the pollution scrubbers to reverse the damage later, but it may make for a rough start getting your Academy up and operational. On the flipside, starting with the Academy will require more planning in advance, if you don’t you may find yourself bulldozing your downtown in order to get to the precious Oil you need to get a head start in building out your OmegaCo.


The key to a successful Hybrid city is segmentation, or building out your city in such a way as to keep a balance between each group’s needs. When I build a Hybrid city, I usually start out with OmegaCo, choosing a site that has plenty of Ore and Oil if one is available, and checking the wind heavy data layer to make sure I set up my industrial district downwind from where I plan on having my High Wealth Sims live. While this won’t prevent the heavy ground pollution from seeping out, you can delay the effects of pollution on your Sims by keeping the more immediate problem of air pollution at bay. My first priority is getting my OmegaCo up and running so I can turn a profit. It’s important to overbuild your industrial zones at the start so that you can get the most profit out of your Omega, as the conversion of industrial buildings is key to spreading your Omega quickly. Once I have built up enough money to keep my resources and Omega flowing, it’s time to switch gears and build my Academy.一个成功的混合城市的关键是需要细分它们,或是建立一种平衡关系在两者时间保持。当我建立一个混和城市,我通常用OmegaCo作为起点,选择一个有油有矿的矿藏丰富地点开始,检查风向确保工业区在高收入Sims的下风口不会影响高收入Sims的生活。这一点不会阻挡住污染渗透到地面,你可以延迟工业区对Sims的影响,紧迫的问题是让空气污染在一个角落里。我首要的任务是让OmegaCo运作起来给我带来利润。最重要的是建立更多的工业区让Omega获得最大利润,Omega传播的关键是工业区转换。一旦我有了足够的资金让城市运作以及Omega的流动,是时候开始研究中心的建造了。


To get the Academy working properly you will need to have a High Wealth district and to keep your factories working you will need a Low Wealth district in addition to the factories themselves. In SimCity Cities of Tomorrow, the most efficient way to achieve this is through the use of Elite MegaTowers. Elite MegaTowers give players the opportunity to have communities of workers in a compact area, which allows you to satisfy the needs of High Wealth Sims without having to raise the land value of most of your city, or provide as much education and services to keep them happy. In addition it is easier to keep High Wealth Sims away from the pollution that inevitably comes from Omega production. Elite MegaTowers can hold far more population in a small area than with regular RCI buildings. For our purposes you will want to try and keep your MegaTowers as self-contained as possible. It is important to keep an eye on your RCI proportions within the towers, so you don’t have too much of any given level.

At this point your city should be taking shape and you will be well on your way to productivity. Your Academy should start converting your Low Tech factories over to High Tech factories, which will help keep your pollution down, and your Omega business should be on your way to converting your entire city to omega consumers. With all that money you can get the Academy to work providing pollution scrubbers, clean energy, and advanced waste management, while taking advantage of the drone based services which will make for a productive, if somewhat dystopian police state. It’s a good idea to try and keep your wealthy Sims contained in your MegaTowers and it may be a bit of a challenge bouncing your focus between these systems but as long as you keep enough cash in your bank to keep the Omega flowing and keep your ControlNet online, you should find it a rewarding investment!

回复 支持 反对

使用道具 举报

发表于 2014-1-22 22:10 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-30 23:25 | 显示全部楼层


本帖最后由 紅塵市長 于 2014-1-30 23:34 编辑

How Things Work: Architecture and Space in SimCity
Jan 30, 2014  Cristian St. Aubyn, Senior Technical Artist


I'm Cristian St. Aubyn, a Senior Technical Artist at the Maxis Emeryville studio, and I work on the art creation process. Recently we released our Modding Policy; you can read that here. Modding is an important part of the history of our studio, and we're excited to see what you create.

Today, I'm happy to introduce you to the first in a series that we call "How Things Work". This series will help you understand the underlying ideas and processes of how we create game assets for SimCity. We hope that this gives insight and understanding that will help you create and build Mods.

This first blog is an introduction to how we create buildings in SimCity. Our pipeline is complex so I will start with a basic description of the building geometry and then go into the more involved topics later. For those interested, we use Maya in combination with a series of in-house custom tools to create almost all of our game models.

SimCity is a sandbox style game. A player's city can have an unpredictable combination of buildings, roads, and the like. Unlike "Levels" in more linear games we do not have strict control over the type and amount of geometry that needs to be rendered at any given time.

Our game engine needs to perform well regardless of the city that a player winds up creating. To address this issue we look at the play area and set various "budgets"; in this case polygon budgets which are based on the two dimensional space a game asset occupies.

Smaller buildings have lower polygon budgets, bigger buildings have larger ones. As long as all buildings stay within their budgets, a city filled from edge to edge with any combination of buildings should stay within the polygon limits of our rendering engine.

Here are a series of screenshots showing what various building geometry looks like.

This image shows one of the smallest buildings in the game, the "Shotgun Shack." It has the lowest polygon budget of all, but due to its small footprint it turns out to be a potential performance hog. While each one isn't very complicated, they can be placed very close together. When they all add up, a city filled edge-to-edge with "Shotgun Shacks" would represent a lot of polygons.

"Shotgun Shack"

Here's the "Highrise Office", an example of a larger more detailed building. Buildings like this take up much more area and therefore have higher polygon budgets.

"Highrise Office"
The repetitive nature of the middle of the building allowed us to concentrate most of the geometric detail at the street-level and at the top of the building where a player is more likely to see it.

"Highrise Office" Street Level
You can see that polygons have been used at the base to create architectural detail at the street level. This helps make the model unique compared to other tower style buildings. It also adds interest at the street level that players will see when they are zoomed in.

"Highrise Office" Roof
Considerable polygons were also focused on the top and roof of the model as this part of the building will show significantly as the game camera passed over the building.

"Medium" sized buildings can actually vary in size, but the lot space they take up on the game map affords then a higher budget than small buildings. While modeling such a building the polygons need to be used where they will give the building detail appropriate to its design.

The coal mine shown below needs to have a skeletal industrial look. Modeling this much cross bracing would not be possible in the budget allocated to small buildings. However, this relatively small building sits on a medium size lot and has a fairly generous budget for the physical size of the model itself.

"Coal Mine"

"Coal Mine" Detail

Level of Detail:

When a model is close, it needs a lot of detail, but when it’s seen from far away, it can be represented with simpler geometry.

This is common technique in game engines, and involves building multiple LOD’s (Level of Detail) for each model. Using LOD’s dramatically improves performance, and can also help mitigate aliasing and other visual problems.

In SimCity, buildings are authored in four LOD’s, going from the most detailed to the least detailed. The game engine automatically selects a given LOD based on the model’s distance from the camera.

LOD-0 is the highest resolution version, LOD-1 is reduced by 50%, LOD-2 is reduced by another 50%, and finally LOD-3 is reduced another 50%.

Here’s a High Wealth, Low Density House and its chain of LOD’s.

"Modern House" LOD-0
Highest polygon version of the model. In this case it is under budget so there is less difference between LOD-0 and LOD-1

"Modern House" LOD-1

Decorative details have been removed such as the balcony railings and the trim at the edges of the metal roves.

"Modern House" LOD-2

Geometry has been significantly simplified while maintaining the overall mass of the building. Curved shapes use less divisions and narrow elements such as the roof edges and decorative cross beams have been removed.

"Modern House" LOD-3

This LOD appears when the camera is at a significant distance from the model and the building will be fairly small on screen. Polygons have been removed everywhere possible leaving only the forms that would show a visible “Pop” if they disappeared when the model transitioned from LOD-2 to LOD-3.

Building Scale:

Technically speaking a Maya unit translates to one meter in our game engine. However, the assets in our game are not true to scale. Small elements are usually exaggerated and very large objects are scaled down. Consider the image on the right comparing a house, a three story building and the Empire State Building (which is over 1200 feet tall). If the game represented a modern skyscraper to scale small buildings, cars, and pedestrians would be all but invisible by comparison.

The best approach to creating a building in SimCity is to find something that “Looks” like the right size in the game and work from there.

A bit more about polygon budgets:

As I mentioned before polygon budgets are based on the area a building occupies. This is actually measured by the lot size of the building not the model itself. Square area is what is taken into consideration not volume. So a taller building is not allowed more polygons simply for being tall. Fortunately most tall buildings sit on larger lots and therefore have reasonable budgets compared to smaller buildings.

The budget is: 0.5 triangles per square meter (for LOD0)

As an example all Shotgun Shacks sit on 16m x 32m lots:

16m x 32m = 512m2
512m2 x 0.5 triangles / m2 = 256 triangles
LOD-0 = 256 x 100% = 256 triangles
LOD-1 = 256 x 50% = 128 triangles
LOD-2 = 256 x 25% = 64 triangles
LOD-3 = 256 x 12.5% = 32 triangles
For LOD-3, the “Shotgun Shack” would need to be reduced to 32 triangles or less. 32 triangles isn’t much, but when a player sees LOD-3 of a building, it’s pretty far away.

Our buildings fall into two categories:
"RCI Buildings": The residential, commercial, and industrial buildings that appear automatically in zoned areas
"Placed Buildings": The player placed buildings such as fire stations, power plants, tourist attractions, etc.

When creating Player Placed buildings we are often more generous on the polygon budgets for two reasons. Firstly, we want these buildings to look a little more interesting as they are special assets. Secondly, they typically show up in limited amounts; you cannot fill the playable area with City Halls for example.

When creating custom buildings you could of course ignore the budgets we follow, but keep in mind the performance problems. If high polygon buildings start to fill a city it will not only affect frame rate, it could even start to take up too much memory. This can become a significant problem on lower spec machines.

I hope this helps give you an idea of how to create building geometry that fit within budget. Next time, I will tell you more about the building shader we use. Here’s a sneak peak at how the building shader allows us to add detail, depth, color variations and more.

Unshaded geometry

Same Model in game with shader applied
Head over to our Modding thread here.

Until next time,
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 入住


小黑屋|手机版|模拟城市中文网 ( 吉ICP备11002315号-1   

GMT+8, 2017-8-22 09:29 , Processed in 0.173746 second(s), 20 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表