GridVisualDesign Alternative

Hi CodeMonkey. I have been watching your videos on YouTube for a couple years now, so I was very happy to see that you got the opportunity to work with GameDev.tv. Awesome course so far!

Just a note about the GridVisualTypes being defined by color. As a personal preference, I would prefer to name the types by function rather than color.

MoveRange, SpinAction (SelfAction maybe), ShootAction (AttackAction), ShootRange (AttackRange)

In the spirit of extendable code, this allows you to separate out design decisions from code decisions. If I play around with materials and decide that I prefer green polka dots for the spin action more than blue, I don’t feel obligated to update the code. Default would also be a nice enum in this scenario for the case that not every visual is defined.

2 Likes

Yup that’s a great alternative, takes the decision out of the code and puts it in the editor instead.
If you really wanted to go very complex and very editor friendly I would also swap out the basic enums for Scriptable Objects Code Monkey - Make your Games Designer Friendly! (Scriptable Objects)

3 Likes

Privacy & Terms