View Single Post
Old 04-28-2010, 09:19 PM   #8
silvarilon
Member
 
Join Date: Dec 2009
Posts: 144
silvarilon is on a distinguished road
Re: Turn based combat ideas?

It's a tricky problem (especially because players might intentionally drop link to avoid loosing a fight.)

The easiest solution is that each "turn" it checks if the opponent is available, and if not, it ends the fight. You can start a new fight if they return. There may be problems where you need to wait for the opponent to time out and drop from the game if they are ghosting (and depending on your coding skills you may be able to avoid that problem.)

The problem of players intentionally dropping link is more problematic. There are plenty of things that you can do, such as allowing there opponents a few "free" hits before they vanish, or making them automatically die. That would remove any reason to intentionally drop out, but leaves a problem for the players that didn't mean to drop out, and just have a bad link.

If you want to get complex, you could do some automated statistical analysis. Do they tend to drop out when they are near to loosing the fight? More than would be expected with random variation? (Say, 75% of the time they drop out while they have less than 25% life...) Then maybe when they start dropping out when they're about to loose you could just automatically kill them. If they tend to drop out randomly at any given point of the fight, it's probably a genuine bad connection, and you can avoid giving any additional penalties to them.

(Man, I wish we were all on the same game engine, and we could give examples of actual code...)
silvarilon is offline   Reply With Quote