Game Focus/Pause

by Flysbad
This system checks for users focus on the game window, and allows the game to be paused. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Flysbad.sfocus##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Flysbad.sfocus##version=1

129 downloads
Version 1
Date added: Jun 23 2013
Last updated: Jun 24 2013
5 fans
Have you ever wanted to be able to Pause your game or have the game automatically pause when you click off? This system allows you to be able to do that!

How to use:

mob/Login()
src.screen_focus()

Comments

Flysbad: (Jul 3 2013, 8:36 pm)
@Quadropus; That would be a good feature to have, if you used this for a multiplayer game.

@Magnum2; Thanks for pointing that stuff out to me, Maggy.


@everyone else; I'll try to get around to fixing this library up soon, and adding the requested features above. I've been bit busy working on Densetsu right now to bother with any other things. It might take sometime, but I'll eventually get around to it.
Magnum2k: (Jul 3 2013, 11:58 am)
There are a few notable changes you could make.

Instead of disabling each direction individually, why not just disable it in client.Move() altogether?
client/Move()
if(mob.is_paused)
return 0
else ..()

Also, you're only enabling pause for clients only; what about other entities? Currently, if I were to add walk_rand() under an NPC, it would still move, regardless of the game being paused or not.
Quadropus: (Jun 27 2013, 4:36 pm)
You should make a Auto AFK system when you look away from the game.
Xirre: (Jun 24 2013, 5:54 pm)
That's nice. o.o Good for single player games.