Transmitting the full image contents of the player's screen across the network to the server every frame is likely to be rather performance-intensive, not to mention bandwidth-intensive.
A much more scalable approach is to instead transmit the position and orientation of the player's camera. Then the server can spawn its own camera for each player in its ...
// you query database, calculate random damage etc in this method, to have a final damage.
var player_damage_dealt = calculate_player_damage()
// boss health atomicly ...
Do the host "decides" the enemies state?
This is one way to do it. Which I recommend, but there might be games which work with other methods.
Basically I'm asking whats the best way to handle a 4 player p2p game
with many enemies on screen.
There is no best way.The simplest way to do it would be to have one host control everything about the game, and ...
In a typical multiplayer game, clients are not all authoritative about the outcomes of their actions. They say what they're trying to do, not what the outcome was.
This avoids the classic playground bicker in imaginary play, "I hit you!" "Nuh-uh! You missed!" - if both players are equally authoritative about the outcome, then we can't resolve who's right.