Support for Server-controlled In-game Announcements

iFun Engine provides a separate server in charge of delivering announcements to the clients. It’s in Python Django. Once Django administrator posts an announcement, it will be visible to the clients through the iFun Engine Plug-ins.

Installing iFun Announcer

To obtain iFun Announcer, please contact us at iFun Engine support.

Installing Python

iFun Announcer requires Python 2.7 or newer. Most OSes have nice installer to install Python. You can use one of them. Otherwise, you can also obtain from python.org.

Please check your python version like this:

$ python --version

Installing Django

iFun Announcer requires Django 1.7 or newer. Similarly to Python, Django has installers for various operating systems. Otherwise, you can obtain the most recent one from djangoproject.com.

Please check your Django version like this:

$ django-admin --version

Installing iFun Announcer

Unzip iFun Announcer where you’d like. You should be able to locate manage.py after unzipping. It can be run like this:

$ python manage.py runserver [ip:port]

Note

if ip:port is omitted, 127.0.0.1:8000 will be used, by default.

Tip

If you see a message like this, you need a DB synchronization process.

Performing system checks...

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

DB synchronization can be done simply by the migrate command.

$ python manage.py migrate

Adding an Administrator Account to iFun Announcer

Of course, we need an administrator. createsuperuser is the command to create one.

$ python manage.py createsuperuser
Username (leave blank to use 'master'):
Email address:
Password:
Password (again):

To change the password, use the changepassword command.

$ python manage.py changepassword [username]

Logging to iFun Announcer

If you do not see any error message after runserver, fire up your browse and open http://127.0.0.1:8000/admin/.

$ python manage.py runserver 127.0.0.1:8000

Managing announcements

You will see a board named [Announcements]. This is where you will post announcements. Click on the link. Then you will see [Add announcement +] button at the top right. Click on the button to post your first announcement. You can also use images or URLs in an announcement.

Client code for the Announcement feature

The iFun Engine Plug-ins already has a capability to read announcements from iFun Announcement. Please refer to Checking announcements for details.