Item system revamp and the struggles that came with it
Hey everyone,
Victor here again to share another tidbit on the project's development. Back when I first added our collectable item system, I already knew that eventually it'd need some significant touch-ups, mainly with the way item memory is stored.
The way it worked before had it so items would be stored by value and instantiate new copies of themselves whenever needed, this meant that whenever the player collected an instance of the item ScriptableObject and threw it, for example, it'd create another copy of it in memory.
In order to remove those unnecessary copies, I begin working with disabling and re-enabling the game objects rather than destroying and recreating them, which led into another issue where each scriptable object instance should store a reference to its gameobject, which I did so in Awake. By the end of that, the new system was working fine, preventing overuse of memory.
See you all in the next one, bye.
Hopeless Forager
Can you survive the next ejection?
Status | In development |
Authors | arcane-ground games, TheOwl724, Lusenio Incidium |
Genre | Survival |
Tags | Action-Adventure, Horror, Singleplayer, Space |
More posts
- How do you make a computer within a computer game?Mar 01, 2024
- Issues when moving the ship between scenesMar 01, 2024
- How to handle itemsFeb 24, 2024
- Press and Hold interactions for playerFeb 24, 2024
- The Audio SystemFeb 17, 2024
- AI perception system reworkFeb 17, 2024
- Item Transfer Update and ExpansionFeb 02, 2024
- Issues with interaction raycast and player model offsetJan 27, 2024
- Problems with carrying items from scene to sceneJan 27, 2024
Leave a comment
Log in with itch.io to leave a comment.