November 11 2015 build
| 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 has significant internal changes, mostly due to overhauls I've been doing to modernize the codebase. I'm now also using Visual C++ 2015 for Windows builds, and so to be able to run this (and later) versions, you'll need to install the related runtime.
Windows XP is still supported, and Visual C++ needed a special build option for XP to work.
For this build, I rewrote the GIF detection code, and so now transparency should work fine in all situations. I had found a major issue with it, which caused issues in some GIF files. I've noticed some speed improvements due to the switch from Visual C++ 2010 to 2015 on Windows.
I've added support for sim objects to be able to switch parent objects, and this is a major change. Due to that and some additional work, you can now move models (such as couches) into elevators and transport them to other floors. This didn't work before, since the model would still be a child of the original floor it was created on, but now it'll switch to be a child of the elevator that it's pushed into, and then will switch to the related floor it's taken out at. I also added support for carrying models, which you can do by moving close to the model and pressing the "C" key, and then you can move it much more easily. You can drop it by pressing the "C" key again. What happens with this, is that the model switches it's parent object to be the camera instead of the floor/elevator it's on, and then then you drop it, it switches it's parent back to the object you drop it onto. You can see this in action in the Object Manager window, where when you pick up an object, it'll appear underneath the "Camera" entry, and when you drop it, it'll be removed from that and appear under the object you dropped it onto. The Console window will also report the parent changes. I've already had fun playing with these features. I've resized the couches to be more realistic, and they fit more easily in the Triton Center's elevators, especially the freight elevator. If you need to rotate a couch vertically to move it more easily, you can do that using the Object Manager window (the Move button). This should give you a good idea on the direction the simulator's going, and it's needed a lot of internal work like this for advanced things to become possible. Previously this feature would've been hard to make, but after adding the parent switching support, it became possible and easy.
Internally in the C++ code, I've switched entirely from "c-style" casts to better functions that use the static_cast and dynamic_cast functions, and also switched from "c strings" in function parameters and returns to STL strings (std::string), which results in the code being much more easy to read, and easier to work with. The older code (which mostly from the CrystalSpace days) needed to be cleaned up, since it was getting too messy. So basically, for people beginning to tinker with the source code, these changes and other ones I've made should make things easier to understand and work with.
I finally found the cause of the Bullet collider bouncing issue on 32-bit Windows, and it had to do with DirectX forcing the whole app into low-precision of numbers, which caused Bullet and Caelum to have serious problems. I had put in a partial fix for the bounce, but found that I had it turned off in previous builds, and so it wasn't being used. I've now prevented DirectX from doing that, and so that issue is fully resolved now. This only happened on 32-bit Windows builds, and when only using DirectX.
I added a Sky Control dialog, which lets you set some of the Caelum parameters, such as location and date/time. I'll be adding to this in the future. I also added the "Coordinates" and "DateTime" global commands in the script language so that you can set these on startup (previously they could only be set in the related Caelum script, data/caelum/sky.os). I still need to add a command to set which direction is north, so that the sky will be rotated properly, if that's possible. I rearranged the buttons on the main control panel window to look more cleaner. The Triton Center building has been positioned at it's fictitous location in downtown Chicago with these options, and I also set the startup date to be 6/23/2015 (my birthday). The Glass Tower is positioned around it's fictitious location in downtown San Francisco, and the startup date is the release date of the movie it's from, the Towering Inferno, which is 12/20/1974:
I've been fixing the main functions to properly work with files within mount points (from the Mount command).
The Bullet colliders for 3D models are now centered properly, and the models are now positioned correctly depending on their scale multiplier.
See the previous build for more info on recent changes:
-set location and date/time for Triton Center and Glass Tower buildings
-added Coordinates and DateTime global options
-resized couches to be more realistic
-model offset needs to be adjusted according to the scale multiplier
-for models, box colliders are now centered properly, and use a separate scene node to make it work
-SBS now calls a cascading init on all objects from the Start() function
-renamed any standard object runloops to Loop()
-renamed Sound's Loop() function to SetLoopState
-made standard inherited OnInit and Loop object functions
-OgreBullet should be checking for existence of resource group and loaded names directly instead of keeping a file-based existence flag. This fixes an issue where debug colliders (F7 key) would not enable when reloading a building.
-camera object needs to run loops of attached models
-camera needs to run NotifyMove and NotifyRotate functions, to properly update carried objects (child objects)
-object destructor was removing scenenode from parent twice, causing a crash - I reworked the code in this function
-moved functionality of camera's view and state resets (F3 and F6) into camera class
-re-enable main system meshes when doing a position reset (F6)
-restore absolute positioning and orientation of object scenenode when changing parent object
-fixed issue in RemoveChild function, that caused the scene node removal portion to be skipped
-consolidated FileExists function code into VerifyFile function
-overhaul of VerifyFile function, to check for files within mount points properly
-cleanup and fix of GetMountPath function
-have functions use SBS conversion functions instead of others
-added ToBool function
-removed Sky Time Multiplier from Camera Control window
-new arrangement for control panel buttons
-added Sky Controller dialog
-prevent DirectX on 32-bit Windows from switching into single-point floating point precision, which was causing the Bullet-related bounce issues
-model meshes now update parent (main) object scenenode on physics-related position update
-don't try to create a new submesh when deleting indices
-added ToFloat and ToInt global functions
-consolidated global functions; ToString2 is now just ToString
-input string in RemoveAction function needs to have whitespace removed for compatibility
-switched from c-strings to std::strings for function parameters and return types
-DeleteObject function can delete generic object directly, instead of recasting
-added new ConvertTo function to Object
-added template-based IsType() function to Object
-removed object's "raw_object" value, which is no longer needed due to previous change
-objects now use static_cast or dynamic_cast instead of c-style casts
-fixed bad return in FindWallIntersect function
-consolidated camera's mesh hit beam code into main SBS object
-added support for picking up models
-mesh HitBeam function should be converting direction to remote Ogre value, without a rescale
-objects can now report if they are global objects (children of engine object)
-added ability for non-global physics-enabled models to be moved into elevators, and to move along with the elevator, by dynamically changing parent object of model from floor to elevator, and vice versa
-added Shaft, Stairs and Model runloops
-added functions for dynamic removal/addition of models
-added ability for objects to switch parents
-IsInElevator function now optionally sets CameraOffset value
-added check for model's physics state
-added debugging options file for Visual C++
-updated project files for Visual C++ 2015
-rewrote GIF control extension detection code; fixes additional transparency issues. The previous code was not ensuring that the three values were adjacent, and was matching for non-adjacent values, causing malfunctions.