Bad practices and errors in New Templates (5.6)

In the Platformer Template, the Player Controller’s RespawnPlayer logic feels over-engineered. This is strange if the content is intended to help people learn.

For example:

A simple “Restart Player” is a better approach. It would run faster by relying on the C++ side and use the Default Character defined in the GameMode. Otherwise, if you change the Default Character, you introduce a bug upon death, the game will keep spawning the old character unless you remember to change the Default Character in two different places.

In the new FPS Template, AI characters are missing their Custom AI Controllers. This leaves all AI with no behavior at all.

Additionally, in the Arena Game Mode, the HUD is initialized Here. That’s bad practice. HUD setup should be handled inside the HUD class, where is there already ammunition HUD, it’s so weird.

While these new templates are a great idea for new Unreal Engine developers, they’re unfortunately not well executed. The code is sloppy and provides a poor first impression for beginners.

Also, incrementing scores in the GameMode is incorrect. The proper way is to do this in the GameState. The GameMode isn’t replicated and only exists on the server. The GameState, however, exists on both the client and server, and players’ scores are already implemented in Base Player State.

Please review and improve these templates. The idea is good, but they need to be much better executed so new users joining the community can have a solid learning experience.

3 Likes