MobileUO icon indicating copy to clipboard operation
MobileUO copied to clipboard

Upgrade MobileUO to CUO version 0.1.11.0

Open mandlar opened this issue 10 months ago • 0 comments

https://github.com/VoxelBoy/MobileUO/issues/24

This PR is bringing CUO up to version 0.1.11.0. This build seems stable in both Unity Player and my Android phone from my testing. Again, there could be issues that I haven't noticed.

This took a lot longer due to a number of rendering changes - I had to incrementally go through the commits instead of my usual version big-bang.

Changes since 0.1.10.0 PR: https://github.com/mandlar/MobileUO/compare/21d1b6f2...2b5a9bcf

  • Added a new splash background
  • Alpha layer was inverted between 0.1.10.0 and 0.1.11.0
  • Symlinked all files that have no changes from CUO version. Once we get to latest version, I'll probably drop the symlinks
  • Rendering was changed to use render lists per statics, mobiles, effects and transparents. I couldn't figure out how to get a depth stencil to work Unity, so I instead merged all the render lists into one and do my own z-depth sort on the entire list. This fixed the issue I had where mobiles were walking on roofs, etc. The performance seems to be okay on my phone (30-50+ fps, depending on number of objects on screen), it can be re-visited again alter.
    • Additionally, if you write vertex's beyond 100 on the Z plane, they won't render in Unity. I don't know why, it feels like there is some sort of clipping plane going on but this is beyond my knowledge. If you look in Unity Batcher I have some debug flags that shows this behavior. If you divide the Z values to get them under 100, it works. But that doesn't fix the depth rendering. However, it isn't needed with my above z depth sort for rendering. We only need to figure this out if we want to get CUO's multiple render lists working. Someone smarter than me can figure it out 😄
  • I re-added the Pixel checks to make coarse Item gump selection to work again
    • I also added it to ItemView so that the same behavior works on items on the ground!
  • 0.1.11.0 added TextureAtlas (sprite sheets). It'll generate the sprite sheets correctly, but I'm having issues with it loading the textures from it. So for now, I changed it to where each sprite sheet is just one sprite (which works correctly) and will re-visit later
  • Unity Batcher:
    • As mentioned above there is some sort of issue with anything drawn above Z 100 and I added debug flags to show that
    • All of the drawing methods were re-written in the CUO batcher. I kept some as deprecated because they were used by the Assistant, so they'll need to be fixed later
    • I turned off UseGraphicsDrawTexture flag. Everything now uses vertex to render. The previous Unity graphics way was causing some weird textures getting flipped vertically
  • XNA:
    • Replaced Color with latest FNA version - this fixed a lot of color issues
    • Added TextureSize and Brightlight to Effect
    • Added SpriteEffects

Everything else is base CUO changes. These were all the significant issues I encountered.

mandlar avatar Feb 20 '25 17:02 mandlar