Coder Social home page Coder Social logo

riperiperi / freeso Goto Github PK

View Code? Open in Web Editor NEW
796.0 51.0 96.0 397.87 MB

Re-implementation of The Sims Online.

Home Page: http://freeso.org

License: Mozilla Public License 2.0

C# 76.31% Batchfile 0.06% HTML 0.99% C++ 0.32% C 14.49% Makefile 0.69% Pascal 0.35% CSS 0.02% CMake 0.10% Shell 3.94% DIGITAL Command Language 0.20% Awk 0.17% Module Management System 0.02% SAS 0.01% Ada 0.50% Assembly 0.78% CLIPS 0.04% Perl 0.02% Smalltalk 0.01% HLSL 0.99%
sims sims-online c-sharp monogame re-implementation

freeso's People

Contributors

afr0 avatar andrewknoll avatar astropsynapse avatar bengrs avatar bxil avatar cosmatevs avatar cowplant-simmer-collin avatar cxong avatar darkkostas avatar ddfczm avatar dependabot[bot] avatar dotequals avatar fhachenberg avatar francot514 avatar heyitstigr avatar inb40 avatar itssim avatar jdrocks450 avatar kaetemi avatar lazyduchess avatar riperiperi avatar simptomo avatar thearchitectfreeso avatar thertzelle avatar tonytins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeso's Issues

[World] Censor shader

Obvious enough. Might need to force using a backbuffer rendertarget for this one (right now only used in software depth). TS1 has this easy because of their rendering pipeline.

image

Lot Creation Bug

Lot Creation in the cityview on the server rebuild Branch doesnt work, the Buy window doesn't show up

Build FreeSO with Mono under Linux

Hi there, thanks for your awesome work on FreeSO!

I am trying to build under Linux using Mono msbuild. Apart from the minor naming issues already fixed in #166 & #167 , I still have some issue left.

Where can I find the following files? They don't seem to be present in mainline MonoGame either

/FreeSO/TSOClient/FreeSO.sln.metaproj : error MSB3202: The project file "/FreeSO/TSOClient/../Other/libs/FSOMonoGame/MonoGame.Framework/MonoGame.Framework.WindowsGL.csproj" was not found. [/FreeSO/TSOClient/FreeSO.sln]
/FreeSO/TSOClient/FreeSO.sln.metaproj : error MSB3202: The project file "/FreeSO/TSOClient/../Other/libs/FSOMonoGame/MonoGame.Framework/MonoGame.Framework.Windows.csproj" was not found. [/FreeSO/TSOClient/FreeSO.sln]
/FreeSO/TSOClient/FreeSO.sln.metaproj : error MSB3202: The project file "/FreeSO/TSOClient/../Other/libs/FSOMonoGame/MonoGame.Framework/MonoGame.Framework.Linux.csproj" was not found. [/FreeSO/TSOClient/FreeSO.sln]
/FreeSO/TSOClient/FreeSO.sln.metaproj : error MSB3202: The project file "/FreeSO/TSOClient/../Other/libs/FSOMonoGame/MonoGame.Framework/MonoGame.Framework.Net.WindowsGL.csproj" was not found. [/FreeSO/TSOClient/FreeSO.sln]
/FreeSO/TSOClient/FreeSO.sln.metaproj : error MSB3202: The project file "/FreeSO/TSOClient/../Other/libs/FSOMonoGame/ThirdParty/Lidgren.Network/Lidgren.Network.WindowsGL.csproj" was not found. [/FreeSO/TSOClient/FreeSO.sln]
/FreeSO/TSOClient/FreeSO.sln.metaproj : error MSB3202: The project file "/FreeSO/TSOClient/../Other/libs/FSOMonoGame/MonoGame.Framework.Content.Pipeline/MonoGame.Framework.Content.Pipeline.Windows.csproj" was not found. [/FreeSO/TSOClient/FreeSO.sln]

The Sims 1 Port

Our engine obviously has some interesting additional possibilities, one of which being a modern re-implementation of the original sims series, playable in full 3d, with new lighting and supporting other custom enhancements. Might create as part of this project to start, then branch out to its own repo later.

  • Support for TS1 content system
    • Generalize FSO.Content to support multiple content systems
    • Read all game objects (including downloads) to generate Catalog and GUID map at startup.
    • CMX/BCF format. (ANIM, APR, SKEL)
    • SKN/BMF format. (MESH)
  • TS1 client project.
    • TS1 UI. Nowhere near as complex as TSO, but we don't have UIScripts this time!
      • Neighborhoods
      • Ingame
      • Live Mode Panel
      • Build/Buy Mode
      • CAS
    • Expansion area support, with neighbourhoods.
    • Mobile projects.
  • Support for TS1 SimAntics VM
    • Switchable (Object/Avatar)Data Get/Set implementations.
    • Switchable primitive handlers. Already kind of possible.
      • All TS1 primitives
    • Switchable Memory Scope
      • Job Data
      • Neighbors (affect other areas)
    • Read house iffs (OBJm, OBJt, ARRY, SIMI) to support original houses (all objects reset tho)
  • TS1 tuned motive gameplay
  • HIT VM for TS1 (likely wont need much changing)
  • Plumbbob (very hard)

Build FreeSO for Android

I'm trying to build FreeSO for Android using VS 2017 (Windows). So I choose "Release, Any CPU, FSODroid", I'm I doing it right? I got 33 errors. Any tips, please?

The type or namespace name 'FSO' could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name 'TargalmagePCL' could not be found (are you missing a using directive or an assembly reference?)

The name 'FSOEnvironment' does not exist in the current context

And some other errors... (all in FSOActivity.cs)

[UI] Replace SpriteFont rendering with C# managed FreeType alternative

Currently, the game renders text using XNA SpriteFonts generated from the game's fonts at compile time. Not only does this mean we're distributing a rendered version of the game font, but it means that the result is rather low quality (limited size range) and requires slow redraws every frame.

We should be rendering using the ttf font directly, into "label" textures that are only regenerated when the text is changed.

We need a library that does this entirely within C#, so that we can cross compile to ARM easily. That means no wrapper classes!

Platforms supported

Apologies if this is mentioned somewhere, but what platforms are recommended for FreeSO development? Is anyone developing/testing on Linux or OS X ?

Protobuild.exe fails with 404 error

After cloning (including submodules), I attempt to run Other/libs/FSOMonoGame/Protobuild.exe and see:

Installing http://protobuild.org/hach-que/Protobuild.Manager...
(1/10) HTTP GET http://protobuild.org/hach-que/Protobuild.Manager/api
Exception during web request: 
System.Net.WebException: The remote server returned an error: (404) Not Found.
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) [0x00072] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at System.Net.WebClient.DownloadString (System.Uri address) [0x00020] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at (wrapper remoting-invoke-with-check) System.Net.WebClient.DownloadString(System.Uri)
  at Protobuild.RetryableWebClient+<>c__DisplayClass17_0.<DownloadString>b__0 (System.Uri u) [0x00000] in <2927a5e341f14949a89505ff5ebc49ee>:0 
  at Protobuild.RetryableWebClient.PerformRetryableRequest[T] (System.String message, System.Uri baseUri, System.Func`2[T,TResult] func) [0x00052] in <2927a5e341f14949a89505ff5ebc49ee>:0 
Backing off web requests for 100ms...
(2/10) HTTP GET http://protobuild.org/hach-que/Protobuild.Manager/api
Exception during web request: 
System.Net.WebException: The remote server returned an error: (404) Not Found.
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) [0x00072] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at System.Net.WebClient.DownloadString (System.Uri address) [0x00020] in <f8bb3922e51744d9ace1aa6aedc374ea>:0 
  at (wrapper remoting-invoke-with-check) System.Net.WebClient.DownloadString(System.Uri)
  at Protobuild.RetryableWebClient+<>c__DisplayClass17_0.<DownloadString>b__0 (System.Uri u) [0x00000] in <2927a5e341f14949a89505ff5ebc49ee>:0 
  at Protobuild.RetryableWebClient.PerformRetryableRequest[T] (System.String message, System.Uri baseUri, System.Func`2[T,TResult] func) [0x00052] in <2927a5e341f14949a89505ff5ebc49ee>:0 
Backing off web requests for 200ms...
(3/10) HTTP GET http://protobuild.org/hach-que/Protobuild.Manager/api
Exception during web request: 
System.Net.WebException: The remote server returned an error: (404) Not Found.
... <repeated>...

OSX 10.13.4

Option for making a local network server

I'm finding this game really interesting but I've stumbled upon a lack of a really nice feature - being able to play on a local server with friends. I know that legacy versions of FreeSO relied on LAN servers only but I'd love to see an online (MMO-like gameplay) and LAN play options. Is there any chance for that?

[Linux] FreeSO crashes when changing to neighbourhood view

Steps to reproduce:

  1. Follow steps in this forum post to install. (http://forum.freeso.org/threads/freeso-on-linux-natively.6249/)
  2. Run either of the launchers
  3. Update, restart the app, login, then try to change to the neighbourhood view

Output of error:

exception inside UnhandledException handler: The type initializer for 'System.Console' threw an exception.

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
  at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
  at System.TermInfoDriver..ctor (System.String term) [0x00055] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
  at System.ConsoleDriver..cctor () [0x0004d] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
  at System.Console..cctor () [0x0008e] in <0cc37f4786fa491387f4cb0ad6d68b47>:0 
   --- End of inner exception stack trace ---
  at FSO.Client.FSOProgram.CurrentDomain_UnhandledException (System.Object sender, System.UnhandledExceptionEventArgs e) [0x0000b] in <40b2c171dc624f2d8a922b51726e2050>:0 
AL lib: (EE) alc_cleanup: 1 device not closed

Game crashes on credits screen

When clicking the top left icon (marked with the black arrow) in the select a sim screen it should display the credits. These are empty. When trying to exit this screen the following error occurs.

crashfreeso

[WIP] Implementing Plugins (EODs)

Plugins, or EODs, are TSO's way of adding extra functionality to objects that the normal gameplay of The Sims doesn't allow. They're a large part of what made TSO what it is, and made it easier for people to manage their lots, have fun and make money with others.

image

Our implementation works in a "Client/Server" kind of fashion, where the EOD acts as a standalone server within the simulation. This server is started upon the first call of the SimAntics "Invoke Plugin" primitive, and closed when everyone disconnects. Here's a textdump from VMEODServer:

        When Invoke Plugin is called, the calling thread blocks in the format of an animation.
        The plugin returns EVENTS (short code, short[] dataForTemps) on the false branch.
        These events obviously queue up, multiple per frame and have priority over the final "close".
         - these MUST be synchronised across clients (using commands)! all other comms (UI) are done async

        Plugins can either run on an object, with connections (Thread, ObjectID) (joinable, objects share same plugin)
        ...or run just on their thread alone. (Thread)
        AvatarID specifies who sees the UI and "connects" to the plugin. This can be 0. (Dance Floor Controller connects to itself to get events)

The primitive "Invoke Plugin", as well as providing events allows SimAntics to send events to the plugin server, contained in the specified local. Special event "-2" initiates a connection, while special event "-1" closes one. See VMInvokePlugin.cs for more details.

Plugins need two different handlers, one for UI and one for the "server".

UI handlers are in FSO.Client.UI,Panels.EODs and are managed by UIEODController. They subclass UIEOD, which provides the messaging functionality.

Server handlers are in FSO.SimAntics.NetPlay.EODs.Handlers, and are managed by VMEODServer. They subclass VMEODHandler, which provides some functionality, but most of it (outgoing messages) is through a back reference to the VMEODServer that owns it. Save data for plugin servers is currently accessed via the GlobalLink, and generally tied to the persist id of the object in question. See SignsPlugin for an example.

Have a look at the existing classes to get a feel of how this all works. To implement additional plugins, you will need to watch videos of how they worked, and look at their scripts within Volcanic or Edith.

Plugins to be implemented:

  • ScoreboardPlugin: 0949E698
  • DanceFloorPlugin: 4A5BE8AB
  • PaperChasePlugin: CA418206
  • PizzaMakerPlugin: EA47AE39
  • RoulettePlugin: 0B2A6B83
  • TrunkPlugin: AA5E36DC
  • SignsPlugin: 2A6356A0
  • TimerPlugin: AA65FE9E
  • PermissionDoorPlugin: 0A69F29F
  • BandPlugin: 8ADFC7A2
  • SlotsPlugin: CB2819CB
  • BlackjackPlugin: 2B2FC514
  • DresserPlugin: 8B300068
  • RackCustomerPlugin: CB492685
  • RackOwnerPlugin: 2B58020B
  • SkillMiniGamePlugin: AB5E434E
  • SpotlightPlugin: 6B6A9FD3
  • VideoPokerPlugin: AB709B32
  • DancePlatformPlugin: EC55D705
  • DJStationPlugin: 6C5C7555
  • Night Club - Controller Plugin: CCC5BC43
  • Night Club - Dance Floor Plugin: 6D113845
  • WarGamePlugin: 2D642D39
  • TwoPersonJobObjectMazePlugin: 4A245A22
  • GameCompDrawACardPlugin: 895C1CEB

Sim can't route "through" counters

When clicking into the room past these counters, pictured sim gets very confused.
I expected the pathfinding system to route around the counters through the other doors, but it appears to just give up!
Here is a screenshot of the room in question with the Sim:

"I could have sworn there was nothing there..."

[Client, Server] New Updater

The current update path is very primitive:

  • An update zip is manually created by the server owner and placed on any web server. This is typically done by extracting the new servo binaries over the previous update (with a few file exceptions)
  • The server configuration is manually changed to point to the new update zip.
  • The server is stopped via the Admin API or an automated restart, and then the update files are manually copied into the server.
  • Usually, version.txt has to manually be modified on both the update zip and the server to match the server's versioning structure.

The key word you're looking for here is "manually". There are many chances for this process to go wrong (and it has) and a lot of time is typically spent preparing these updates. Other issues include the increasing size of our updates, and the increasing chance that something will either be corrupted or not extract. There are no safeguards when this happens, and the user often has to reinstall the FreeSO client, which the launcher doesn't make too easy.

The solution is to rethink how we do updates entirely. The less files we have to update, the less intrusive it will be to push out corrective updates for both us and our users, especially for minor updates that just change objects or PIFF patches. Catching things that go wrong and re-updating when they do will save a lot of hassle for users that are affected often.

Automated update generation

  • Updates are based off of the latest master on http://servo.freeso.org . This may be changed to Microsoft Azure in the future.
  • Development should be done on develop or feature branches, to avoid affecting game updates.
  • The server also keeps a store of "addons", files that should be added to the binary to make the final version. (eg. server specific objects, plugins) These should be uploadable to the server using the manage api, and named.
  • A new update should be created from the Admin API. This should include parameters for the servo build number (default: latest master) and addon pack (default: latest uploaded) to use.
    • Options: db-init on restart, force non-incremental, force incremental on protected (discord-rpc) etc.
  • The server should build the update by extracting the servo build into a new folder, then extracting the addons over it.
  • Catalog xml should either have another method for replacement/management or move to being served upon login instead of via updates.
  • Version number should be generated and put into version.txt for both client and server.
  • May be interested in maintaining multiple update and feature branches within the same database.

Incremental Updates

Update binaries are getting larger and larger, as they contain all of the files used by the FreeSO client. This includes our additional objects, 3D city, ui etc... The thing is, most of these files do not change between game versions, and most likely never will. If we discover a bug with a single library or object, it doesn't make sense pushing out an update with 128MB of content to fix it.

The solution is to instead only update the files that have changed from the last patch. With the above in mind, that means the following:

  • When generating and saving update distributions, all files in the distribution are compared with those in the last, and we note which files we added or modified. (deleted may also be tracked)
  • These files which were changed are put into their own Incremental Update distribution, which contains the difference between this version and the last.
  • A manifest is stored which contains hashes for all of the files which will be changed. If any are different, then something may be wrong and we can recommend the user do a full update instead. A manifest should also be used for the full distro, though that can't check what was there before.
  • If a user is a few updates behind, they can simply run back to back incremental updates to get to the latest version. If they are many updates behind (file size exceeds full update), have an invalid game state, or are installing for the first time, the game will download the full update instead.

Note that this means a few things for servo - specifically that for the most optimal calculation of differences we will need to make sure the buildbot does not build clean every time. This will mean it could leave multiple dlls unmodified, meaning they do not need to be included in the incremental update.

New update installation (server)

  • Revise the watchdog application to support the new update system. (also use .net core like the server)
  • Decision: generate zip or just in-place patch? I think generating a zip and then applying it will help us figure out if something goes wrong.
  • The usual exemptions for important files, like NLog.config, scripts and other config.
  • Should be possible to schedule a server update to occur automatically on next restart.

New update delivery

  • Updates should be uploaded to a service outside the game server that can scale appropriately. The initial goal for this is Amazon S3, but it should be possible to extend the service to add targets like generic FTP servers.
  • An API endpoint for getting all recent versions of the client that are available. For each, we need a link to their full update, incremental update, manifest and obviously name. The list should be ordered by time descending, leaving the newest first and letting us work up from the version we are on to the latest.
  • Should still be compatible with old update method (serving latest FULL update) so people aren't stuck on old versions of the game. Incremental portion and metadata will be added on top.

New update installation

  • May still want to download inside the game... on osx and linux leaving the game means not displaying a GUI at all, so we couldn't show download progress to the user.
  • Launch updater from game: find a way to do this without making antivirus freak out so much, and while also releasing all of freeso's dlls.
  • Launch game via updater: if the game cannot launch for some reason, the user should be able to use update.exe to redownload and install the last attempted update (standalone, from the game's server info ini). The game could attempt to open the updater on failed launch, or there could be a shortcut in the freeso launcher to do this.
  • Updater self update: right now it renames to update2.exe and the game replaces the original on start. May want to find a cleaner way to do this.
  • The updater must correctly handle failures when writing files. It is best to complete the update as fully as we can (after at least FreeSO.exe is free), then list any errors afterwards. It should be possible to retry or ignore these errors, and info should be provided to the user about how to re-run the updater if they need to restart their pc to free them.
  • The updater must also verify that the files are correct via the hashes in manifest.

This issue is still WIP, but it is the current focus of development. As a result the Admin API angular app will probably be cleaned up too.

[World] Partial updates for sprite vertex caches

Currently, when one element in a sprite group (wall/staticobj/floor) changes, the whole cache for it is regenerated, then re-rendered. This can get very expensive for viewing multiple floors, especially when one is more active than the others (eg. walls cutaway on top, all others walls up).

Sprite caches should be generated per-floor. This has obvious benefits despite needing more draw calls, and in render modes like software depth for iOS, the sprite-texture groups tend to be split over floors anyways due to their overlaps.

In fact, since baked sprite draw-arrays are only for sprites sharing the same texture, we only actually need to regenerate the them for textures where the sprites have been modified, removed or added. This requires a lot smarter sprite tracking, which should be easy to do for objects (since they have sprites hard-attached to them), but will likely require a considerable rewrite for walls/floors.

It's worth considering even just for objects alone, as they tend to have the most draw calls. For example, one object in the cache could change, but no other of the 3000 sprites share the same texture, therefore they can continue using the vertex data generated previously. This would directly impact the "dynamic" object layer the most, as it currently regenerates its sprite caches every frame.

Transparency issues in the 3D and hybrid modes

In the 3D mode, the more transparent a part of a texture is, the darker it is although it shouldn't. In the hybrid mode transparency works exactly the opposite – it makes textures lighter.
Transparency issues

[VM] Room Motive Scoring

Currently, room score is unimplemented and stays at whatever value it started at. This can be done in a similar way to how lighting contribution is calculated. See room-map generation and related lighting functions in VMContext, VMEntity, VMArchitecture.

Native Linux version?

Hi just wondering if there is plans to make a native version of the launcher and game for Linux?

Neighborhood View: Client responds to 4K screen resolution only in the top left quarter

Windows 8.1, screen resolution 3840x2160 (4K), Version beta/update-16:
On the neighborhood view, where moving the mouse curser normally results in a squares on the ground to be drawn, this only happens in the top left quarter of the screen. It also does not react to left clicking in the area where the squares are not drawn. Right clicking in the bottom right area results in ultra-fast screen movement towards the bottom right (which is probably caused by the client taking the mouse distance from the presumed "center", which is here in the top left quarter, to determine the scroll speed).

Resizing the window back to 1080p resolution is a workaround to this issue. This issue does not arise inside of lots (there, 4K works fine).

[VM] Idle animation mode

There is one animation mode that has not been implemented (because it doesn't seem used in many cases, but the notable instances are very noticable). This is the idle animation, which is played when no other animations are present on the sim. Here's a few potential cases:

  • Telephone
  • Toilet
  • Sitting (we kind of hard code this right now)
  • Many plugin objects which seem to return the sim to standing in our current implementation
  • More?

Additionally, implementation of this mode would stop avatars "running on the spot" when they exit routing and do not play another animation.

Unexpected behaviors while typing using AltGr

Many keyboard layouts use AltGr to allow to type diacritized letters or special characters. FreeSO doesn't take it into account for now. AltGr+A erases whole message you're typing, AltGr+S opens the lot save dialog, etc.

add-a-page

PM window lose focus on ENTER

Main screen takes the main focus from Private Messaging system when pressing the ENTER key.

The only way to bypass it is by ctrl+H having the chat window up.

[World] Investigate drawing with less scroll buffers.

While it's nice to have separate sprite caches for walls, floors and objects, having multiple scrolling render targets and having to restore them all to screen really seems to burn up battery/gpu cycles due to filling the space of the entire screen >6 times every frame. All of these scroll buffers need to redraw at the same time when you scroll anyways - there's only a minor benefit right now when it only has to redraw objects while the camera is static (and not walls/floors).

Drawing them all to one scroll buffer would also avoid weird z-order issues where transparent static objects would remove the floor between it and an object behind it, as they would be drawn in the correct floor order.

Bigger UI on high resolutions

The UI isn't exactly very big on high resolutions (1080P). Is there an option to increase the icon / font size?

Simitone seems an option but I am unaware how to set that up without owning The Sims Collection.

[VM] Outside room segmentation, light/room score bleed

Currently, balconies play havoc with the room pathfinding. It thinks there is a path through the single "outside" room on the upper floor, but there isn't. This can make lots with many balconies hard to work with. These should ideally be multiple "outside" rooms, and even be possible inside.

Pools do a segmentaton like this, but they do not correctly retain the lighting from their surrounding room, or bleed it into other adjacent rooms. This effect creates a sort of black hole, where all the light is hilariously absorbed by the pool.

image

To fix these issues, we must segment rooms on fences and pool boundaries, and do it right, so that "outside" room status and lighting contributions bleed over these room boundaries. These rooms would be marked "adjacent", and any changes to their lighting contribution/room score would bleed into the other rooms via a depth first search or other traversal.

Login screen exception

I will try to fix it I think I found the root of the problem! I know C# but this is a huge project i'll suggest a pull request if I succeed (its a minor problem anyway), can be reproduced by a+ctrl+delete on textbox

[Server] Lot-City Connection failure causes lots to become stuck.

When the lot-city connection fails, all lots on the lot server are closed and released to ensure consistency, and to release those lots' claims in the database. However, if the city is still alive, it will still have allocations for these lots set up in LotAllocations, meaning that the city server believes the lot server is hosting the lot when it has already shut down.

When a user attempts to re-open their lot after this, LotAllocations believes it is already open, and tells the user to connect to it on the lot server. However, when the user connects to the lot server, they are booted off immediately because the lot is not actually being hosted.

Any additional lots will start and allocate as normal.
image

Solution:

  • Attempt to re-establish connection a few times before doing the city panic. (disconnecting all lots is not something we want to do often.
  • Double check that a lot has been claimed when obtaining an allocation saying that it is open on a specific lot server. If it is not, remove the allocation and try creating a new one instead.
  • We may need to double check this going the other way. What if the city believes a lot is not allocated, but it is open on the lot server? Should it reroute to the one that is open, or attempt to close the old allocation, assuming the city server has been restarted?

[Low-priority] When running Charvatia, FreeSO complains about failing to link Monogame, but continues regardless

This is a pretty low priority issue as the game functions correctly after closing the error message, but it is slightly annoying.
On startup, while Charvatia has claimed exclusive access to the Monogame dll in the root directory, FreeSO tries to use it and fails. This results in the following error message:

Error message reading "Unable to link Monogame"

Since the global server will render Charvatia obsolete, this problem will be resolved then. Even so, it would be nice to at least have a flag that suppressed this error.

"Go to Work" fails after sim changes

(I'm aware this is a known issue)
At a specific time in the day, the sim changes for the robot factory job and walks up to the carpool. Aaaaand... nothing!
I'm aware that in the global server the sim would probably be transported to the job lot, but right now it would be a good idea to either simulate the sim "going to work" and receiving a paycheck before changing back to normal clothes, or maybe just having the "Go to Work" interaction disabled for the time being.
I'd like to hear your comments on this!

[Low-priority] Server sim's needs decay

The "server" sim from Charvatia has his/her needs decay, which means a tombstone is placed multiple times. Despite you needing to click through a dialog to die more than 2 times, Rhys has added a timeout to this, meaning the server sim can now spam gravestones.

A potential solution to this would be freezing the server sim's needs meaning that they wouldn't have needs decaying causing death and cause this spam.

Another solution could be simply disabling death for the sim. This would stop the gravestone spam, but the invisible server sim would still complain about low needs!

Finally, we could simply remove the gravestones entirely, or the trigger to place them on death, thereby resolving the potential for trolls to die in front of entrances or certain areas with the intention of blocking out other players - with permissions, this means the players have to wait until a build/buy roomie or an admin to join and remove the tombstone.
However, removing tombstones means this potential trolling method is impossible, which would improve the experience for everyone!

[API] Change password fails on old password check

The Change Password API ('/userapi/password') doesn't properly validate the old password. It calls the PasswordHasher.Hash directly (which generates a hash with a new salt), rather than PasswordHasher.Verify.

See RegistrationController.cs line 380:

var old_password_hash = PasswordHasher.Hash(model.old_password);

if (old_password_hash.data!=da.Users.GetAuthenticationSettings(user.user_id).data)
...

I assume this should instead be similar to the AuthLoginController's method of validating the password:

var authSettings = db.Users.GetAuthenticationSettings(user.user_id);
var isPasswordCorrect = PasswordHasher.Verify(model.old_password, new PasswordHash
{
    data = authSettings.data,
    scheme = authSettings.scheme_class
});
if (!isPasswordCorrect)
...

Empty wiki

It would probably be a good idea to have at least some basic information on the wiki so people can test the modifications they make.

[VM] Smarter Idle with Scheduler

Most objects in a lot are completely inanimate, eg. windows, doors, chairs, counters, but still perform a full VM tick every frame. This tick usually consists of initializing the execution context, checking to see if it is valid, checking interaction status, finding the top stack frame, getting the current instruction & its handler, running the Sleep primitive to poll for interrupts and decrement the parameter (one of the 20000 ticks the object wants to sleep for), handling its return value and then doing a few other checks and background operations that really could be skipped for most objects.

I would say over 90% of objects in most lots have a main method that is literally just "idle 20000 ticks", as the objects do not need to animate or do any kind of internal polling. The tick function also performs some operations to do with currently playing sounds and headlines, which are in an even smaller minority, yet are currently run constantly on every object. It is only important to run entity and thread ticks every frame on avatars.

The solution would be to implement a "schedule", where the VM would only run ticks on the objects that have been "scheduled" to continue executing on that frame, instead of all of them. The thread would be extended to include an internal timer to indicate how long it has been dormant for, so time sensitive variables can be updated accordingly. For example, an object entering idle for "20000 ticks" would schedule itself to run again on tick (current + 20000). If it is interrupted out of idle by another object, this registration should be moved to (newCurrent + 1) to execute as soon as possible. Its "Tick()" function would never even be touched for the frames where it is not scheduled, saving execution time.

When idling in freeso.ml, VMEntity ticks take ~79% of the internal tick's execution time. If we could strip out this theoretical 90%, that's an easy 3.5x speedup for idle lots. This would make it a lot easier to host lots on the MMO server, and a little easier to run on slower devices. The bottleneck would quickly become the renderer. (yes, even more than it is now)

Things which need to be considered:

  • Thread interrupts must be direct. These must also update the parameter we were waiting on.
  • An implementation would assume that no objects would change another object's current thread Args[] (used to keep track of sleep duration), and true enough there is not a way to do this.
  • VMGameObject does per-tick checking on pending roommate deletion and object limit exceeded.
  • "LockoutCount" variable will need to be lazily evaluated on request from the last tick it was set.
  • Objects with active sounds will need to tick them regardless. These are also a minority.
  • Objects with headlines are a similar case. May wish to rethink their render path entirely.
  • ALL internal frame counters must be replaced/suplemented with a "last set" timestamp against a global tick clock.
  • Ordering and synchronisation. If it's reliable enough, the schedule will not have to be sent with the VM state to maintain synchro, but it might be quite difficult to get it working this reliably.

[World] Roof Drawing

Currently, we don't have any way to draw roofs. The original game looked at the room map for the floor beneath for indoors rooms, and placed roofs over them. These roofs were always a simple shape, and extended one half tile off of clean edges (with no tiles on them). Here is an example from TS1:

image

Images for Readme

Post any images to be used in the Readme or anywhere else in the repo in this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.