I sort of do both really. I use the structure of OOP to make all my game objects (player or players, enemies, pick-ups, etc) and the game world (map ro level) into an object. And inside of those I create functions and procedures that do the majority of the manipulation of those objects to control that game mechanics.
Then my main code block is a single loop (no real multi-threading for me like this unfortunately) where I check for what game mode state the game is in and place all my objects' functions in there. I may also have supporting functions which are placed above the main game loop, such as the game reset/initialization block, program startup (init all my SDL, OpenGL, textures, input options, menus, etc...) and clean up after quitting code too.
Unless you are working for a professional development company, there is no set rule that you have to be all OOP or all procedural, it's all up to you and what is availible with the tools you use. As an indie game rpgrammer, it's about doing it the way YOU want.
Bookmarks