December 15 2015 build

From Skyscraper
Jump to: navigation, search
This is the article of a development build of Skyscraper Simulator.
It has been confirmed a good-faith contribution to the Skyscraper wiki.

This build is probably the largest feature update in the history of the simulator, for a single build. In addition to numerous serious bugfixes, this build contains work from 2 feature branches and another major feature that was made in the trunk code. The new major features:

-New Sound System code (soundsystem branch) This build has new sound system management code, which makes sound loading and processing much more efficient. The old code would load sound files from disk for each sound object, resulting in a lot of disk loading activity, but the new system will only load a sound file once, and the objects will share the single loaded file, resulting in less disk loads and stuttering issues. This new sound system can also report statistics on the console, with new script commands. The new command ShowLoadedSounds lists the currently loaded sound files, along with the number of objects referencing it, and sound channels opened. The new ShowPlayingSounds command shows details on all sounds objects currently playing, in groups based on the sound file. Those commands are listed near the bottom of the Script Guide (designguide.html).

Skyscraper now uses the newer FMOD Studio sound library instead of the previously used FMOD Ex

-Person objects (trunk code) This feature is a replacement for the Random Activity feature. It's a basic simulation of people, and when Random Activity is turned on, a person is created for each floor the building has, and additionally a person with service elevator access (so for the Simple building it'll create 12 total, 11 regular people since it has 10 floors and 1 roof level, and an additional service person). When a person has random activity enabled, they will choose a random floor to go to in the building, and use Skyscraper's new elevator routing code to find a path to that destination floor. They'll press the related elevator call button, wait for the elevator, press the floor button inside the elevator, cross skylobbies if needed, and reach the destination floor. People can be managed in the new People Manager window, and this window lists the people along with their name, starting floor and destination floor, if the routing is active (if they're actively heading to the floor), status information, and other things. You can also create your own people this way, and even name them. This is the beginning of Sim Tower-like functionality, which is something I had always wanted. Keep in mind that this feature requires the new elevator Type parameter, in order for the person routing to know which elevators to use, otherwise all elevators appear as standard "Local" elevators to the sim engine. The routing code also supports up to 2 skylobbies between.

-Engine Contexts (engine_contexts branch) This is the big feature, and it needed it's own branch since it destablized the frontend code very significantly. With this feature, Skyscraper can now load multiple buildings in the same 3D environment, and switch between them. This is done by creating "Engine Contexts", or containers that hold a paired SBS sim engine and script interpreter together, for each instance. Buildings can also be loaded in parallel, loaded while the user is doing things in another building, and even rendered (displayed) while it's loading. This feature is still under development, but is working very well so far, and appears to be stable. Engines can be managed in the new Engine Manager window, and also with new keys, which are ";" (semicolon) to load a new building, the "k" key to unload the last building, and the number keys 1 to 0 (across the top of the keyboard) to switch the camera between per-engine cameras. Right now the system will place each new building at a diagonal offset of the previous building, but you can move the new building by making it active, then clicking on the Object Manager dialog, choosing it's root SBS object, clicking Move, and moving the whole sim engine instance around in 3D space. In the Engine Manager window, you'll see the per-engine position offset, and you can also choose "Concurrent Loading" to have any new building load while the active building is still running, and "Render on Startup" to display the new building as it's loading (this runs slow though). Camera states are also restored when switching between sim engines, since each engine has a separate camera object. Script language support for using this is still pending, and I wanted to get this feature in a build so that people could play with it before doing any more.

Screenshots of that feature in action:
http://www.skyscrapersim.com/screenshots/dev_pics/1.10/12-2-15/

There's a known issue of buildings loaded after the first one sometimes having darker textures, and this is being investigated. Also the ground for each building will appear, causing overlaps (I'll be dealing with this soon), but for now you can switch to the other instances and delete their Landscape ground objects to fix it.

For other things, the elevator doors are now using relative positioning, and they should be working properly now. The Caelum sky system now uses the SBS scaling factor, so positions in the "sky.os" script are correct now, and I've also added new "Cloudy" and "Overcast" sky types. There's been numerous call button enhancements, to make hall call handling more realistic (see the changelog below for more details). Script error messages now show the script filename instead of the section number (which was deprecated in relation to the better "script context" field), and they also now show the engine context number if there's more than 1 sim engine running, mainly to identify which script interpreter had the error, since there will be multiple ones running.

I just added the "Cloudy" and "Overcast" sky types to the script guide, and so they didn't make it into the build packages. You can see them in the SVN script guide copy (this link always points to the latest one): http://svn.tliquest.net/viewvc/skyscraper/trunk/designguide.html?view=co

In relation to future updates, lately I've been looking into multithreading portions of the app, and am looking into Intel Threading Building Blocks, which might be able to help out very easily - I'll be making a test branch for this: https://en.wikipedia.org/wiki/Threading_Building_Blocks

Linux builds are now done on Debian 8.

For other recent changes, see the previous build post: http://forum.skyscrapersim.com/index.php?topic=6948.0


Changelog:
-new People Manager dialog
-script errors now show the engine context number of the error, if more than one engine is running
-script errors now show the building filename instead of the section number, which isn't needed due to the script context string
-new Engine Contexts system, along with the Engine Manager dialog, which allows multiple buildings to be loaded and run in parallel
-elevators should continue checking elevator availability in a QueuePending stage, if the elevator is on the same floor as the call, and the doors are open or opening/closing. This lets the elevator take the call and re-open in that situation
-objects without parent scenenodes should attach to engine scenenode, not scene root node
-moved scenenode-related code out into separate SceneNode object
-added OgreBullet project files to main solution, to simplify building process on Windows. The separate OgreBullet solution is no longer needed.
-make sure building is specified before trying to load building
-call buttons should update arrival notification if elevator is on same floor and opened
-call buttons should reprocess call if the elevator that is handling the active call becomes unavailable during movement
-Random Activity now uses the new people code, and the old functionality has been removed
-added routing functions, for Person object to find an elevator route to a floor
-have elevators notify call buttons on arrival
-added object validity functions
-switched to FMOD Studio for sound
-ToRemote/ToLocal functions should support turning off the Z-flip (for rescaling only)
-created ObjectBase class for lightweight objects (currently Actions and Polygons)
-removed singleton pointer and properly propagate and store engine pointer, through object parent parameters
-added Person object
-added elevator type parameter, and added to main building files
-added ShowLoadedSounds and ShowPlayingSounds script commands
-cache file listing in VerifyFile function, to fix a major performance bottleneck when a building is missing lots of files along with a large data folder existing
-print FMOD version number on initialization
-new Sound System code, which provides more efficient sound management
-timers and meshes should be permanent by default
-call buttons should reject call if related button does not exist
-added Cloudy and Overcast sky types
-have Caelum use SBS scaling factor
-converted elevator door movement to relative positioning; also fixes an issue with vertically-moving shaft doors from working properly
-cleanups for HitBeam function
-converted elevator door movement to relative positioning; also fixes an issue with vertically-moving shaft doors from working properly
-sound support should not be switched off when IntroMusic is set to false in the INI file

See Also