![]() |
PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
|
This page is about what I don't like in the code of PRooFPS-dd, and should be changed after 2026.
Stuff here will be turned into Issues on Github at some point, but currently these are only thoughts.
Adding a new weapon requires too much modification here and there in the code.
This is an example commit of adding a new weapon.
Even the keyboard-weapon pairs should NOT be hardcoded but come from the weapon definition files somehow.
Also, map item types are also hardcoded, which is used in MsgWpnUpdateFromServer for identifying the weapon instead of using the filename char array.
TODO
https://github.com/gperftools/gperftools
https://jemalloc.net/
https://github.com/electronicarts/EASTL
https://github.com/cacay/MemoryPool/tree/master
https://github.com/lenonk/memorypool
https://github.com/danielkrupinski/StringPool?tab=readme-ov-file
MsgBulletUpdateFromServer already contains the weapon ID, and based on the client is able to find out bullet properties.
Therefore, we could remove a lot of things already from MsgBulletUpdateFromServer and stop extending that struct.
Adding a new weapon to the game is currently possible only by extending the code.
This definitely needs to be changed so anyone can easily add a new weapon.
First the development perspective shall be simplified as explained above, and then we can think about weapons from modding perspective.
There is no map editor.
Even though map file format is simple ASCII text-based format, it can be a bit difficult to master map creation using a text editor.
Rebuild of the game code is required if someone wants to add new logic into the game.
To solve this, the base part shall be separated, and it shall be able to invoke extra code using external mod library.
For this the base shall be able to provide run-time game data to the mod libraries, such as list of players and their status.
For example, the Minimap could be also an external lib instead of an internal class.