1. Installing iFun Engine

This chapter will explain how to install iFun Engine before setting up a development environment.

iFun Engine runs on Ubuntu 16.04 LTS or 14.04 LTS (64bit) or CentOS 6 or 7 (64bit) . It also supports C++ and C#.

For C++ development, the developer can develop in a Linux shell, with the GUI IDE CLion in Linux, or with Visual Studio in MS Windows .

For C# development, the developer can develop with the GUI IDE Monodevelop in Linux.

1.1. Ubuntu 16.04 LTS or 14.04 LTS (64bit)

1.1.1. Getting Ubuntu

First, you need an Ubuntu 14.04/16.04 Linux box. If Ubuntu is not installed, you can easily install it from a cloud service such as Amazon AWS or use a solution such as Hyper-V, VMware, or VirtualBox on your computer to install Ubuntu as a virtual machine. (In this case, you need an Ubuntu install image, which you can get from the Ubuntu releases page )

Important

You must install a 64-bit version of Ubuntu. iFun Engine does not work in 32-bit Ubuntu.

14.04 LTS 에 대해서는 2019년 3월까지 지원하며, 새롭게 18.04 LTS 에 대한 지원을 준비중입니다.

After installing Ubuntu, you need to add the iFun Engine APT repository.

1.1.2. Automatically adding the APT repository

Download the automatic iFun Engine settings package for Ubuntu and double-click to install or open a command shell to run the next command.

$ sudo apt-get install wget apt-transport-https
$ wget https://ifunfactory.com/engine/funapi-apt-setup.deb
$ sudo dpkg -i funapi-apt-setup.deb

Important

For this method, you need to contact the following servers: If you have a firewall blocking outgoing traffic, you need to allow traffic to the following servers:
  • www.ifunfactory.com (54.65.9.158; may change in the future)
  • keyserver.ubuntu.com (PGP key server; optional)

1.1.3. Manually adding the APT repository

If your firewall is set to disallow outgoing traffic, the automatic settings method may not work for you. In this case, you need to manually add a PGP key for iFun Engine and add the APT repository.

Save the following as ifunfactory.gpg.key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQENBFHLrjgBCACzI7l8y1nygGN1b0XwgEDdBZGUlaTZhyHs1Y2VLBmYm3dgyRHp
qLfHhVGZm1FXzT1X7GlGgQRV+GsyeXNUHWcY794UwZMCM4h0mGDGXX1eR2objUNZ
tVE9VzoXwKwnu7mKJGXg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0Ja+XELABEBAAGJAR8E
GAECAAkFAlHLrjgCGwwACgkQo/fv3Uk4/+Y36Qf/VPov5n+h4pEzKspA6hHezD4J
rw9rVCQ/BvidBerV4VvL+oH5ghBV5QeAvd2TyccuKdZJsikAM9wUM1MS+Y4Akno7
vgIKO/7sGGkbAkgSG4vvfG4W9EQ0GqFycaTl9zpiNUrUri5vGNK2PC6p9uXxXmdQ
3iHe1c5+5jvLKCzOdC+Er2E949PzsMuI2L4viNp72J6ilm62RJ+/Pg1rOaRmTH1H
ax7L3Hwsy0GXeubKaeDizvBeKcv6e08DqI2TCllmd8NkR6OSLuks4yHDU1ztAa0c
+RcnddKag+TCYwto617oMZvCPaic/d6AjW3OL48PFNUPpfBeZEJ8B8tm16HxaQ==
=p+5n
-----END PGP PUBLIC KEY BLOCK-----

Also add the following key manually:

$ sudo apt-key add ifunfactory.gpg.key
OK

Next, save the text below as /etc/apt/source.list.d/ifunfactory.list .

deb [arch=amd64] https://www.ifunfactory.com/apt/ trusty non-free foreign

Note

If using 16.04 Xenial, replace trusty with xenial.

1.1.4. Installing iFun Engine

After setting an APT repository, get the package list from the repository and install funapi1-dev.

$ sudo apt-get update
$ sudo apt-get install funapi1-dev

When you run this command, the development package for iFun Engine game development, run-time package, and dependent packages will be all installed.

1.1.5. (Optional) Installing MySQL and Zookeeper on the same server

Install the following packages as well if you are planning to also run a MySQL server and Zookeeper server for the iFun Engine’s load distribution functions on the same server. This is typically the case when you install everything on a single server.

$ sudo apt-get install mysql-server
$ sudo service mysql start

$ sudo apt-get install zookeeper zookeeperd
$ sudo service zookeeper start

Important

When you install iFun Engine as instructed above, a temporary license is automatically obtained for one week. You can get a trial license application package from this license application page to request a 6-month trial license. Be sure to check it out.

1.2. CentOS 6 or 7 (64bit)

The steps for using CentOS is the same as for Ubuntu, but yum is used as a package manager instead of apt.

1.2.1. Getting Centos

You first need a CentOS server. If CentOS is not installed, just as with Ubuntu, you can easily create a virtual server on Amazon AWS or use a Hyper-V, VMware, or VirtualBox on your computer to install as a virtual machine. (If you need an install image, you can find one at the CentOS download page .

Important

You must install 64-bit CentOS 6 or 7. Lower versions of CentOS are not supported, and neither are 32-bit versions.

After installing CentOS, you need to add the iFun Engine YUM repository.

1.2.2. Automatically adding a YUM repository

Download the automatic iFun Engine settings package for CentOS and double-click to install or open a command shell to run the next command.

$ sudo yum install epel-release wget
$ wget https://ifunfactory.com/engine/funapi-yum-setup.rpm
$ sudo rpm -Uvh funapi-yum-setup.rpm

1.2.3. Installing iFun Engine

After setting a repository, get the package list from the repository and install funapi1-devel .

$ sudo yum update
$ sudo yum install funapi1-devel

When you run this command, the development package for iFun Engine game development, run-time package, and dependent packages will be all installed.

1.2.4. (Optional) Installing MySQL and Zookeeper on the same server

Install a MySQL server and Zookeeper server for the iFun Engine’s load distribution functions on the same server if you are planning to set up a development environment on one server. Enter the following for CentOS 6:

$ sudo yum install mysql-server
$ sudo service mysqld start

$ sudo yum install zookeeper
$ sudo service zookeeper start

Enter the following for CentOS 7:

$ sudo yum install mariadb-server
$ sudo systemctl enable mariadb
$ sudo systemctl start mariadb

$ sudo yum install zookeeper
$ sudo systemctl enable zookeeper
$ sudo systemctl start zookeeper

Important

When you install iFun Engine as instructed above, a temporary license is automatically obtained for one week. You can get a trial license application package from the iFun Engine website to request a 6-month trial license. Be sure to check it out.

1.3. Switching Between iFun Engine Distribution Types

iFun Enigne is provided in two distribution types: stable release with and experimental release. The stable release is selected by default if you installed iFun Engine using the automatic set-up packages. And the distribution type can be switched using a program named funapi_select_repo.

1.3.1. Checking the current distribution type

Type in the following command to check which repository is selected and where the currently installed package came from.

$ funapi_select_repo
Current repository: stable
Current package: funapi1-runtime_1.0.0-1661xenial: stable

The output above says we are going to use the stable repository and the package already installed on the machine is also from the stable repository.

Note

Because we can swtich the distribution type as described below, the current repository and a repository from where the current package came may differ.

1.3.2. 배포판 타입 변경하기

The stable release contains old, yet robust, implementation, while the experimental release contains new features. Packages in the stable repository are promoted to the experimental after robustness is verified.

If you run funapi_select_repo with an additional parameter indicating a desired distribution type, you can switch to the type.

$ sudo funapi_select_repo experimental
Activating iFunEngine experimental repository
기존:1 http://mirror/ubuntu xenial InRelease
받기:2 http://mirror/ubuntu xenial-updates InRelease [95.7 kB]
받기:3 http://mirror/ubuntu xenial-backports InRelease [92.2 kB]
받기:4 http://mirror/ubuntu xenial-security InRelease [94.5 kB]
받기:5 http://mirror/ubuntu xenial-updates/main Sources [194 kB]
받기:6 http://mirror/ubuntu xenial-updates/universe Sources [99.1 kB]
받기:7 http://mirror/ubuntu xenial-updates/main amd64 Packages [396 kB]
받기:8 http://mirror/ubuntu xenial-updates/main i386 Packages [390 kB]
기존:9 https://www.ifunfactory.com/apt xenial InRelease
받기:10 http://mirror/ubuntu xenial-updates/universe amd64 Packages [335 kB]
받기:11 http://mirror/ubuntu xenial-updates/universe i386 Packages [331 kB]
받기:12 http://mirror/ubuntu xenial-security/main Sources [42.8 kB]
받기:13 http://mirror/ubuntu xenial-security/universe Sources [10.2 kB]
받기:14 http://mirror/ubuntu xenial-security/main amd64 Packages [152 kB]
받기:15 http://mirror/ubuntu xenial-security/main i386 Packages [148 kB]
받기:16 http://mirror/ubuntu xenial-security/universe amd64 Packages [44.4 kB]
받기:17 http://mirror/ubuntu xenial-security/universe i386 Packages [44.4 kB]
받기:18 https://www.ifunfactory.com/apt xenial/non-free-experimental amd64 Packages [9,290 B]
내려받기 2,478 k바이트, 소요시간 0초 (4,525 k바이트/초)
패키지 목록을 읽는 중입니다... 완료

Please see highlighted lines from the output above. experimental distribution got activated and the apt package list also get refreshed. Once you run funapi_select_repo without any parameter, you can see the distribution type has been changed.

$ funapi_select_repo
Current repository: experimental
Installed funapi1-runtime does not belong to stable repository
Current package: funapi1-runtime_1.0.0-1661xenial: experimental

Then, you can install versions in the experimental release by apt-get upgrade or yum update.

Tip

Every iFun Engine package encodes a build number in its version string. Because packages in the experimental repository get moved to the stable repository after robustness verification, packages in the experimental repository have higher build numbers than ones in the stable repository.

For the reason, it’s straightforward to switch from the stable to the experimental and to install the most recent implementation in the experimental by either apt-get upgrade or yum update. However, the commands may not automatically downgrade when going back the stable from the experimental or when applying a special hotfix package for a stable package. In this case, you can explicitly give a version string when running the commands like follows:

  1. For Ubuntu: $ sudo apt-get install funapi1-dev=<version string> funapi1-runtime=<version string> libfunapi1-mongodblogger=<version string> python-funapi1-dev=<version string>
  2. For Centos: $ sudo yum install funapi1-devel-<version string> funapi1-runtime-<version string> python-funapi1-devel-<version string>

To switch back to the stable release, run the following command:

$ sudo funapi_select_repo stable

1.4. Uninstalling

To uninstall iFun Engine, use apt-get , just like when installing. The following command removes all packages to do with iFun Engine.

$ sudo apt-get purge funapi1-*

Attention

잠깐! Wait! If you are uninstalling because of any difficulties with iFun Engine, please email us to let us know what difficulties you encountered.