The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
18 views

unity game dev - Tanks tutorial - how would you do it differently [on hold]

I would like to use good practices when working with Unity, but I'm finding it difficult deciding on what good practices are. In order to address that, could you describe what you would do differently ...
13
votes
1answer
1k views

Is * calling *= (or *= calling *) slower than writing seperate functions (for math library)? [closed]

I have some vector classes where the arithmetic functions looks like this: template<typename T, typename U> auto operator*(const Vector3<T>& lhs, const Vector3<U>& rhs) { ...
1
vote
1answer
46 views

Inherited property in derived class reference only base class

[Context] I am developing a game in Unity, and wanted to make a Game Manager. Like many examples out there, it uses a Singletron design pattern. But i have several other Managers, all using Singletron ...
1
vote
1answer
58 views

How can I refactor an enum so that it is still available in the inspector?

I am trying to use an enum so that it is available in the inspector. This code works: public ArmorTypeEnum ArmorType; public enum ArmorTypeEnum { Light, Medium, Heavy }; How can refactor it into a ...
0
votes
2answers
204 views

Handling differing inventory items on use interactions

Hey there my fellow programmers. Looking for a little input into a potentially smelly code problem (I was about to post this on the Code Review SE, let me know if that's the more proper place). After ...
2
votes
2answers
1k views

Would it be more efficient to handle 2D collision detection with polygons, rather than both squares/polygons?

I'm working on a 2D game engine and I'm trying to get collision detection as efficient as possible. One thing I've noted is that I have a Rectangle Collision collider, a Shape (polygon) collider and a ...
6
votes
1answer
490 views

How can I refactor “attack cooldown” into “attack speed”?

I'm building a game where the player's character can attack bad guys and vice versa. I built this with the concept of an "attack cooldown" because I don't want units to be able to attack each other ...
1
vote
6answers
127 views

When is a good point to revise a project? [closed]

I am currently working on a project. Some time ago I realized that I do achive my goals but the more code and prototypes I add the more I feel like there is no going back. For example some of the ...
1
vote
0answers
236 views

Command Pattern refactor for input processing? [closed]

According to Game Coding Complete 4th. ed. processing input via the following is considered unmanagable and inflexible. But does not show an example. I've used the Command pattern to represent GUI ...