November 2 2024 build

From Skyscraper Wiki
Revision as of 18:36, 7 November 2024 by Elevator1512 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article is legitimate.
It contains good-faith information, such as an existing building or content.
This article describes a development build of Skyscraper Simulator.
It contains good information related to Skyscraper Simulator.

This build includes a major structural change to the Skyscraper code, and also has some fixes related to running cities. The previous build had the start of the structural changes, but this one has the rest of them. You'll notice that there's a new "Moving Walkway Control" window in the control panel, this lets you adjust the settings on moving walkways just like escalators.

A fairly major bug was fixed, if objects were added while running the sim, and they created new graphics, the sim would crash, I found this when adding a new floor in the Object Manager's "Create" window. I've wanted to possibly change that Create code into more of a graphical designer, and the first step into doing that is to make sure the current code doesn't crash.

I've added the new City.bld, which is a modified version of the city simulation used in my demonstration video, it requires some of the IP building addons for it to work, I'm still working on this so expect more buildings in the future.

The city fixes include a fix for an issue where the ground would overlap sometimes after loading buildings, and also that the sky system (Caelum) can now only be controlled by the first sim engine, so if you load multiple buildings, you can only control the weather in the first building and not the others. In the future I might see if I can have it have different sky configurations based on which sim engine you're in.

For the code reorganization, on Windows systems, you'll notice that there's a new "VM.dll" file (on other systems it's either libVM.so or libVM.dylib), what I did is moved most of the Ogre (graphics), sound, and GUI (the windowing system) into a separate DLL file and component, which should make working with the source code easier, and should make the project easier for me to maintain. On Linux and Mac systems, there's also "libGUI" which is the GUI code split off into it's own library, I can't currently make a DLL on Windows due to how DLLs work (they don't allow two-way communication like how Mac and Linux work), and on Windows it's part of the VM library (Virtual Manager). This introduced some bugs which I've fixed. Due to this, we'll need to debug more of the app to make sure nothing else broke, and there won't be any more major structural changes like this until after the 2.0 release. Most of it should be fine since I mostly just moved code and reconnected things. This is part of my effort to modernize the C++ code, and since I've been getting better over time with the C++ language, to use better coding to improve the simulator.

Skyscraper's shutdown code has been improved, which should help prevent crashes on different systems.

If you're working with the source code, the VM code is now in src/vm (that manages the sim engines and does other things like Ogre and sound management), the GUI code is in src/gui (this is all the windows used except the main screen), and the Frontend (src/frontend, which is Skyscraper.exe on Windows) has been greatly reduced in size. Previously most of the code was part of skyscraper.cpp (except for each of the GUI windows), it's a pretty bad idea to have all of that in a single file. Also, the startup screen code has been moved into the file startscreen.cpp. So now instead of going through a huge single file to find things like the startup screen, things are now broken out into components to make it easier to work with. The new "hal.cpp" is all of the frontend's hardware-related code (Ogre graphics, sound, VR, etc), moved into a single file, since it abstracts all this, it's essentially a hardware abstraction layer. I'm planning on eventually connecting the SBS graphics and sound code to this, so that the whole simulator will use the HAL component to abstract all of that, right now SBS does graphics and sound it's own way. Windows DLLs are preventing this from being easy, due to the issue I mentioned before about two-way communication (actually linking).

MultiMonorail noticed a major bug in the code while this was being developed, and has been fixed. I noticed this too before he mentioned it, and it was due to the sim only starting the last sim engine loaded, and not all of them. What happened due to this is that when loading multiple buildings, the position you'd start in would be wrong, usually causing you to start in a different sim engine or fall through the ground. In the code it used to return 1 sim engine to start, now it returns a list of sim engines to start, and then starts each one. That bug took a while to find, but I was able to quickly fix it once I found it.

Changelog:

  1. migrated most of the Frontend code into separate libraries and folders
  2. added City Simulation (City.bld)
  3. Have cut options in Buildings section only run those commands if the engine is the root/primary. This fixes an issue where ground textures would overlap when loading cities, when some buildings would turn off the landscape cut.
  4. Only process Sky building parameters if the related engine is the root/primary engine, this fixes an issue where child sim engines would modify the sky parameters, affecting all engines.
  5. Fixed a crash that would occur if a new client was added to a dynamic mesh
  6. Added Moving Walkway Control window
  7. Ogre shutdown fixes
  8. Moved GUI system into separate component

Issue reported by MultiMonorail that didn't affect the last build, but was in the master code branch: -Fixed RunEngines() and related functions to support multiple engines in the return. This fixes an issue where sim engines wouldn't initiate a Start() when finished loading, causing the wrong buildings and wrong positioning to be applied after loading a set of buildings.

See also[edit | edit source]

External links[edit | edit source]