New answers tagged

1

You should avoid invoking new instances in your render and update methods. As these methods are called numerous times per second, this can be a pretty straining task, as the unreferenced instances will have to be freed in memory through garbage collection. To solve the two Vector2 problems, easy: Declare and instantiate two global Vector2 attributes, and ...


1

Posting an answer to point out that there are other options. In some games (though I can't think of specific titles right now) you may notice the crosshair is projected out from the weapon's line of fire, similar to a laser sight. This is highlighted when you walk up to a wall and the crosshair moves dramatically, because the weapon barrel is far closer to ...


7

There are many reasons a designer/programmer would want to draw the crosshair on the exact center of screen, or a little lower. A hybrid system may even be implemented, taking advantage of the properties of these two systems in a game fich of different weapons, vehicles, interactive spots, and so on. Drawing the crosshair centered or lowered can depend on ...



Top 50 recent answers are included