CGE Logout (or not)

CGE Logout (or not)

So after the “out of game” part was finished, it is now time to turn attention to the “ingame” part of the CGE engine. With outside of the game, I mean the the things a user can do before logging in (thats register, request a password change or login). Once logged in, all other game options become available.

But before I can start coding the actual ingame mechanics, a few settings and a configuration panel must be coded. This one was finished today and is accessed via the gearwheel you can see on the following screenshot on the top right (all positions and layout can be edited by editing the game template).

This little configuration panel allows a user to change the account password while being logged in. It also allows a user to delete the account (not that I encourage people doing so, but it saves the Admins a lot of work in regards of support as this feature is requested regularly). Note that this is a “soft delete” that simply marks the account as “deleted” instead of removing it completely. More on that later.

Finally, there is the eponymous “logout” feature, that allows a user to log-out of the account (surprise!). There are a few other things that are missing like a language setting and maybe audio support, those will be added in the future. Note that languages are already part of the engine, I just don’t want to add a switch option until I have a second language file ready.

A few more words about Logout and Account Deletion:

You might wonder why the Logout button was moved into the configuration settings instead of being present on each and every page? The answer is quite simple: Modern mobile games do not feature a log-out button and with some tweaking, CGE now behaves the same way. The system works in a way, that the classic logout is now obsolete, saving the users time and worrying about logging out. It also streamlines the bottom menu, as its now one option less.

On mobile, you simply press the “Home” button to leave an App, so there is never a real logout. The same is true for CGE now, featuring a session timer and a timed logout instead. This also means you can close and re-open the app and you will be right in the game again, without the need to login again and again. As mobile Apps are opened quite frequently throughout the day, this solution is the best one.

As mentioned, there is a logout timer and a internal app refresh to keep all things up to date. Users will still be logged out and asked for their passwords every now and then, for security reasons. But the only real reason to logout (and thats the only reason why the logout button is still there) is that you must logout when switching devices, as CGE does not allow mulitple logins into the same account at the same time.

Account Deletion
As mentioned above, when you delete your account it is always a “soft delete”. This means, the account is simply marked in the database as deleted, but none of its data is removed. This allows Admins to “un-delete” an account, should the user change his or her mind. I think this approach helps to keep support requests low and saves the admins a lot of stress. You cannot login into a soft-deleted account or change it’s password.

Finally, I added a “fake” Cron system to the CGE engine. This system does not require a real Cronjob to be installed, and is instead triggered when a user performs an action (any user / any action). The system is used to perform various checks and clean-ups in regular intervals. One of those checks is to delete all accounts that have been “soft deleted” beforehand – after a period of 30 days (that number can be changed in the games configuration). This timeframe should give a user as well as the admins enough time to act, if required. As you might have guessed, once the Cronjob triggers, all “soft deletes” are turned into “hard deletes” and ALL of the users data is removed from the database forever (this includes all game objects and their inventories as well). Both, the account name and the email address then become available for registration again.

This Cronjob system will be also used for a few other tasks as well in the future, for example database cleaning and more.

Comments are closed.