Client-Sided Enemy

I am currently trying to add an enemy to my game that is client-sided, all clients gain the enemy at once, but I want it to separate per client so they have to individually deal with it.

Two images will appear on the UI, you must perform an action to make those images go away, if the images get too close together, you’ll die.

My only issue is I’m concerned on how to handle server-side logic, otherwise, client could potentially cheat the enemy and not have to deal with it at all. Does anyone have any ideas? I was thinking on having the server have its kill timer that goes down, with the client only handling the moving of the images, but I’m worried about desync.

Yeah, that’s a huge issue. The sever should ALWAYS handle the ai logic, never the client. The only thing the client should “have control” is the animation/image of the enemy. Server side you could just have the enemy moving around as an attachment, while the client creates an image of the enemy.

As to you’re main issue, I would advise not doing that.

I’m a bit confused about the attachment part, the enemy wouldn’t be physical, they’d just be the two images.

then use Vector2 as position, not attachment.
the point is server defines it.