Make no mistake, I’m not pouring hours into fascinated by this since, like most individuals advise, there are larger fish to fry in gamedev. That is extra determining good design follow for structuring my sport.
I’ve a 3D Unity turn-based ways sport with a Breadth-first search algorithm to point out the potential motion vary throughout cursor hover. (A* will come down the road.) Out of behavior I saved the BFS searches as a result of it felt wasteful to re-run them each time the person strikes the cursor over any unit, which after all led me to this debate of commerce offs.
My solely actual objectives are:
- No delays with person enter
- Affordable efficiency throughout platform, together with cellular
- Attainable on-line multiplayer down the road
On common, I am considering 25 items per map, max 30 tiles per vary, so spherical up and say ~800 POCO refs to be saved in reminiscence if I save all of them. (Technically they’re Monobehaviours however down the road I am changing the prefabs for shaders). The maps are solely going to be ~800-900 tiles in measurement, so it is nothing remotely near Civ-sized maps.
Since every part is comparatively “small-medium” in measurement, each house and time are just about equal for BFS right here.
So I am left questioning which if saving the searches like I’m is sweet follow. My intestine is saying defend time as a result of I am certain I am going to discover methods to sluggish Unity down with unhealthy code. On the opposite, I rarely contemplate reminiscence limitations and whereas we’re not within the 2000’s anymore, it isn’t one thing to shrug off.
Once more, I am going to most likely simply hold rolling with what I usually do as a result of there are numerous extra issues I am going to have to resolve down the road.
I am simply curious if anybody has some knowledge they will share on the matter.
tl;dr Which is the higher behavior? Prioritizing time or house?