Version 0.4.5 is here!
Greetings!
This update brings rendering performance optimizations to Sipho!
These improvements were long overdue. Sipho was started in Global Game Jam 2017 which required various "quick to do" fixes for the game to run, no matter how, just to be done in time. We have re-written many parts of it since then, but we did not re-write rendering because we did not know how we are going to render all those zooids. Since then game has solidified and we have become more confident in our workflow, knowing how things are made-up in the engine and what can be sacrificed for performance.
To not get too technical on this post, I am going to be writing up a separate post about current rendering in Sipho. Quick explanation is that we used to render sprites and their outlines one after another. That made CPU talk with GPU for every object on the screen at least twice, each frame.
- Render Spike base outline here - says CPU
- Okay - replies GPU
- Now render Spike base here
- Yeah - GPU
- Now render Spike tip outline there
- 😩
[...]
And all this conversation for 20 of your spikes.
CPU is usually slow at talking to GPU and one would want to make the CPU bother GPU as little as possible. One of techniques is batching sprite meshes to a single large mesh and rendering that. But our shaders rely on local vertex positions and many additional parameters like health or animation speed. That makes batching sprites in Unity engine hard.
Worry not, there is other rendering technique is called instancing. It takes one mesh and tells GPU do render it multiple times in a single "sentence":
- Render these 20 Spike outlines, here is a list of positions and parameters for each one - confidently says CPU
- You got it - replies GPU
This has improved Sipho rendering performance on CPU by about two times. If GPU does not support instancing, it will fall back to old system of having consecutive calls for each image. Worst case scenario for this type of rendering is many different sprites being rendered at once. Imagine Frakir with about 500 unique zooids just to get back to where we were with performance. We would love to have that many unique zooids!
Oh and we had a sneak update few weeks ago. It had hot-fixes for our input system changes. Check out our history of changes for these versions:
Version 0.4.5
- Disable outlines for invisible rocks in Guardian boss lair
- Make mine poison a bit more visible
- Also fix energy leech and muck consumable pull
- Limit leech tip position lerp velocity which might fix AABB errors
- Fix eater food pull scaling - forgot to adjust some zooids and power to fit Range stat
- Fix grappling hook line being invisible
- Cleanup some UI
- Don't use placeholder icons that are nowhere else used to prevent them from being included in builds
- Fix claw top being rendered below blades
- Circular fade-in to growth mode for decorations
- Add ZWrite control to environment shader to fix bone ball lower pats hiding outlines
- Flower petal lower sprite sorting layer
- Fade-to-zooid-color zooid connectors in growth mode
- Make zooid outline hashes consistent
- Make deep objects render correctly
- Force render sort order for all environment objects
- Offset sprite animation according to world position
- Aquarium spawn ghosts now use tight meshes to display atlassed ghost sprites
- Make decorations work with instancing
- Use tight sprite mesh in UI buttons that might draw atlased sprites
- Support flipping in instanced zooid outline shader and fix Claw outline
- Make all outlines render explicitly before their original sprites
- Remove unusued trail material from pusher effect as it produced drawcalls
- Make projectiles work with Zooid shader instancing
- Remove unused _ColorBrightness from zooid shader and make mines compatible with instanced rendering
- Remove unnecessary transform.position call in graphics connector
- Set spike background connector sorting order to be unique so backgrounds get batched
- Fix animated materials not animating through overrides
- Use instancing for zooids and remove zooid sprites from atlases to preserve local UVs
- Create copies of Zooid material to allow instancing
- Use instancing for zooid shaders
- Rename Zooid shaders to better reflect their purpose
- Add an achievement prototype for beating the game without building a single weapon zooid
- Rename Zooid Highlight material to Zooid and use it instead of Zooid Nohighlight
- Don't error out if EnvironmentObject has no SpriteRenderer
- Add Zwrite control to Zooid shader
- Use non-legacy sprite atlases
- Improve gameSave to allow saving arbitrary struct/classes inside a dictionary. We no longer have to add any game save fields for anything
- Set packing tags for all zooid sprites
- Add base outlines to all zooids
- Inherit sorting order of zooids and improve outline
- Collect outlines at the base of graphics rather than from parent
- Use separate multiple outline objects to define outlines for zooids. Update some zooids to this system
- Game save now saves a Dictionary<string,bool> for generic serialization purposes
- Use non-legacy sprite packer settings
- Revert tight sprite packing as it breaks UI ghost rendering
- Set scale of obstacles in Start as well because OnEnable is too early for just spawned objects
- Make all obstacles batchable - group into atlases, use separate EnvironmentOutline object to render growth mode outlines
- Enable batching and remove outline passes from environment shaders
- Add outline shader for environment outlines
- Add Environment Alien Rocks and Outlines render sort layers
- Setup outline renderers for Alien Rocks
- Scale Rock outline object instead of setting property block of scale when available
- Disable Sorting Group for spike
- Put Alien rocks into atlas
- Enable batching for No Highlight shader
- Add renderer for Alien outlines
- Separate Outline pass from main highlight shader.
Version 0.4.4
- Recreate globalSettings file in case we fail reading json
- Fix a bug where the in-game options menu would open and instantly close in the same frame when pressing Esc
- Allow closing the game menus with the cancel button
- Fix a bug where rebinding would instantly succeed with the key that initiated the rebinding process
- Added M4 and M5 buttons to the string beautifier
Files
Get Sipho
Sipho
Design a creature and eat your way to the top of the food chain.
More posts
- Sipho 1.1.0 is now available in more languages!Oct 29, 2023
- Sipho 1.0.1f3 is now available - better performance and AI!Oct 16, 2023
- Sipho 1.0 will come out of Early Access this September!Sep 05, 2023
- Sipho 0.9.5 - Bounce BackMay 03, 2023
- Sipho 0.9.3 - New contest winning Mutations!Dec 01, 2022
- Sipho 0.9.1 - Bugfixes and preparationsOct 26, 2022
- Halloween Mutation Creation contest!Oct 23, 2022
- Sipho 0.9.0 - A new Epoch begins!Oct 14, 2022
- Sipho 0.8.3 - Layout browser improvementsApr 23, 2022
- Sipho 0.8.2 - Better performance, more synergy and new effectsFeb 28, 2022
Leave a comment
Log in with itch.io to leave a comment.