update docs: added dev guide :)

This commit is contained in:
alexiscatnip
2022-06-10 01:22:21 +08:00
parent ddc273c859
commit e76402f797
8 changed files with 81 additions and 27 deletions
+15 -27
View File
@@ -1,31 +1,19 @@
# LMV_unity / Raindrop viewer
## A viewer for secondlife and metaverse sims, target for android.
# Raindrop Viewer
An android client to connect to Secondlife and [OpenSimulator](http://opensimulator.org/wiki/Main_Page) grids, running on the Unity game engine.
Use Unity engine as crossplatform framework and library galore
This is experimental software.
Use LibreMetaverse library for client APIs.
Use FMOD for audio
## Development Screenshots
![Game/3D Screen](docs/image/game.jpg "Game")
![Main Screen](docs/image/main.jpg "Main")
![Login Screen](docs/image/login.jpg "Login")
![Map Screen](docs/image/map.jpg "Map")
## How to build/contribute?
Please see [Raindrop Viewer Documentation](docs/Readme.md)
## Key findings
### Imaging
- System.Bitmap and System.Drawing is tightly integrated into the OpenMetaverse/LibreMetaverse library.
- I have since changed all Bitmap references to unity's Texture2D.
- Bitmap reading/drawing seems to take 100x on android compared to laptop.
- slow GPU uploading? to profile.
- J2C is computationally expensive to decode (to profile; apparently in the order of 0.3s on PC), so we will have to get the J2C from tex pipeline, decode, then save as other raw/compressed textures (bitmap? GPU format?) to disk..
- turn off/ minimal texture fetching when in low-network more (metered internet).
- fetchy-ness factor in settings?
### consistency of connection
- limitiation - activity lifecycle
- android kills apps when switching due to memory pressure.
- user may answer a call, causing app to close.
- when this happens, the connection state can be non-determinatistic
- to avoid non-deterministic connection, our best bet is to force a logoff to the server, then reconnect once the app is switched back.
- our aim is to:
- preserve the illusion of connected-ness as long as the user did not log off.
- switching-off the app ALWAYS triggers log-off in the client API.
- upon returning to the app
- app is still alive : internally re-connect to server and do *not* reload scene.
- app is dead : internally re-connect to server. have to reload scene.
+18
View File
@@ -0,0 +1,18 @@
# Raindrop Viewer Documentation
This is the [Raindrop Viewer](https://github.com/RaindropViewer/RaindropViewer) development
docs.
## Contributing
If you are interested in contributing to the project:
- **[Discord Server](https://discord.gg/B279UXtu)** - Join us on the Raindrop Viewer discord!
## Building
- **[How To Build](how-to-build.md)** - learn how to build the
application
## Developer guide
- **Tooling** - use rider IDE. Or use VS 2019 if you believe in hardly working.
+6
View File
@@ -0,0 +1,6 @@
# Code Organisation
Under Construction...
## Libs
It uses a modified [libremetaverse](https://github.com/cinderblocks/libremetaverse) library.
+42
View File
@@ -0,0 +1,42 @@
# How to build Raindrop Viewer
## Dependencies
- Unity LTS 2020.3.29f1
- Windows 10
## 1. Setup developer environment
This assumes you are using windows 10.
1. install LTS Unity and your favourite C# IDE (VS 2019 or rider are known to work).
2. open command prompt, input this:
`git clone https://github.com/RaindropViewer/RaindropViewer`
3. Now you should have a folder called `RaindropViewer`.
4. open Unity Hub, and click the `ADD` button.
5. navigate to the folder `RaindropViewer` and click `Select Folder`.
6. Now, you can click the project and open it with Unity.
7. The project should load with no errors.
## 2. Run the Viewer in unity editor
1. In Unity, open up `BootstrapScene`
2. press the `Play button` at the top of unity editor.
3. The viewer should start and you can try out the app.
## 2b. (optional; sanity check) Try running some tests in Unity Test Runner.
Please ensure you download the unity test runner plugin first. (not documented here)
1. Open the test runner window: Window > General > Test Runner
2. Click `PlayMode` tab
3. You can run tests in the RaindropViewer>Tests.dll>OpenMetaverse folder. These are stable. It might take 5 minutes as a certain test takes strangely long.
4. Do note that network tests will fail unless you set an actual password in `secrets.cs`
## 3. Build for Android Device
In unity,
1. File > Build Setting
2. ensure `Android` is selected on left.
3. ensure `Raindrop/Bootstrap/Bootstrap` is the first scene at the top. (this is the entry point of the app)
4. (optional) you can now select your android device from the list
`(make sure you turn on ADB on your phone first!)`
5. Click `Build and Run` or `Build`.
6. if `Build and Run` succeeds, your viewer will start running on the phone! congrats :)
Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB