Construct 2

Upgrade discounts

Now’s a great time to upgrade from Construct 2 to Construct 3 and take advantage of major new features, performance improvements and extra capabilities. The following past discounts are still available for Construct 2 users:

  • If you purchased Construct 2 before 1st February 2017, you are eligible for a 50% discount on the first payment of Construct 3 (either annual or monthly)
  • If you purchased Construct 2 between 1st February 2017 and 21st February 2018, you are eligible for a 100% discount on the first payment of Construct 3 (either annual or monthly)

Customers who purchased after 21st February 2018 are not eligible for a discount (Construct 3 was fully launched by then).

To claim the discount, sign in to your account on the website and visit Your discounts & offers page.

Описание Construct 2

Construct 2 – это отличная программа, которая поможет новичкам ознакомиться с написанием компьютерных игр. Отличительная черта утилиты – возможность разрабатывать проект без знания и использования специальных языков, применяемых в программировании. Все, что требуется от пользователя – освоить интерфейс приложения и понять принцип его работы. Для начала давайте выделим главные характеристики обозреваемого софта:

  • Проектирование С++ проектов и их преобразование в JavaScript.
  • Выбор поведения тех или иных объектов в игре.
  • В библиотеке есть большой выбор фонов, различных объектов и много другого.
  • Можно использовать наложение текстов самых разнообразных стилей.
  • Есть возможность настраивать систему событий.
  • Пользователь может применять в создаваемом проекте законы физики.
  • Можно настроить уровни объектов и их визуальное оформление.
  • Готовый объект можно перенести на телефон.
  • При желании можно подключить дополнительные плагины.
  • Готовый проект можно протестировать в любых браузерах, которые поддерживают

https://youtube.com/watch?v=O7W37Mj3DLE

Risks with Javascript string execution

The Browser object provides two ways to run a string as Javascript code: the Execute Javascript action, and the ExecJS expression. While occasionally useful, these are widely regarded as dangerous.

Here are a couple of the problems you may experience with these features:

  • If you execute a string containing user input, it’s possible the user can inject javascript to be executed. This can cause a security vulnerability, crash the game, or allow the user to cheat.
  • If you inadvertently use a feature only available on certain platforms, your game will crash on other platforms that do not support the feature. Construct 2 normally protects you from this since it’s well-tested on many platforms, but it’s an easy mistake to make if you execute Javascript by yourself. Certain non-browser platforms like CocoonJS have a very limited feature set available so are especially easy to break.
  • By default, code is minified on export. If you do not write Javascript that is compatible with Google Closure Compiler’s ADVANCED mode, it may be broken and crash the game after export.
  • Executing strings of Javascript from events can often result in dense and unreadable code which is difficult to modify in future.

Using the official Javascript SDK is almost always a more elegant way of including custom Javascript in Construct 2 projects. If at all possible, write your javascript in a plugin using the SDK.

Learn how to make multiplayer games

Construct 2’s multiplayer engine handles a vast number of technical details for you. For example, the built-in Sync object action alone initiates sophisticated object tracking process, causing objects to create, move and destroy in real-time on connected peers while compensating for minor transmission glitches and automatically minimising the necessary bandwidth. However getting used to the mindset of designing a game with multiple players participating over a network can be challenging. To help new users get going with their own multiplayer games, we have produced 31 pages of detailed tutorials and a comprehensive manual entry, ranging from the overall concepts of multiplayer games to setting up lag-compensated hit testing. See the links below to start learning:

  • Multiplayer tutorial 1: concepts
  • Multiplayer tutorial 2: chat room
  • Multiplayer tutorial 3: pong
  • Multiplayer tutorial 4: real-time game
  • Multiplayer object manual entry

IAP conditions

Has product
Test if a given product ID has been successfully purchased by the user. Note that in some cases this will be false for the first few seconds of the app running even if the user has purchased the item, and then later become true when the store finishes loading the store status in the background. Try to avoid using this condition before On store listing success triggers.
Is app purchased
On the Windows Store, test if the app itself has been purchased. On other platforms, tests if the product ID «app» has been purchased.
Is store available
True if a supported store is currently available and purchases can be made. False on unsupported platforms or if no store is available (such as in an ordinary web browser).
On any purchase success
On any purchase failed
Triggered after any purchase finishes to indicate whether it was successful (and the item is now owned) or unsuccessful.
On purchase success
On purchase failed
Triggered after the purchase of a specific product ID finishes, to indicate whether it was successful (and the item is now owned) or unsuccessful.
On store listing success
On store listing failed
Triggered after the Request store listing action has completed, to indicate whether the store listing was successfully retrieved. After On store listing success you can then check whether products are purchased, make new purchases, and retrieve lists of available items and their details.

Layers & Layout

Compare opacity
Compare the opacity (or semitransparency) of a layer, from 0 (transparent) to 100 (opaque). A layer’s opacity cannot be outside this range.
Effects are supported
True if WebGL support is available so effects can be displayed. For more information, see Effects.
Layer is empty
Test if a layer currently has zero instances on it. This counts any objects anywhere at all on the layer, so even one instance far outside the viewport will make this condition false.
Layer is visible
Test if a layer is currently visible or not.
On canvas snapshot
Triggered after the Snapshot canvas system action, when the snapshot is ready. It can then be accessed with the CanvasSnapshot system expression.

Text (strings)

Text is also known as strings in programming, and Construct 2 also sometimes uses this naming convention. Text in expressions should be surrounded by double-quotes, e.g. «Hello»

The double-quotes are not included as part of the text, so setting a text object to show the expression «Hello» will make it show Hello, without any double-quotes. To include a double-quote in a string, use two double-quotes next to each other («»), e.g. «He said «»hi»» to me» will return He said «hi» to me.

You can use & to build strings out of mixed text and numbers, e.g. «Your score is: » & score

To add a line break to a string use the system expression newline, e.g. «Hello» & newline & «world»

Browser conditions

Cookies enabled
True if the user has cookies enabled in their browser. (Typically it is rare for them to be disabled since many web sites rely on cookies to work properly.)
Is online
True if the browser currently has an active connection to the internet. Construct 2 games can work offline — see Offline games for more information.
On resized
Triggered when the browser window displaying the game is resized. This includes when changing orientation on a mobile device. The system expressions WindowWidth and WindowHeight will update to reflect the new size if a fullscreen mode is in use.
On went online
On went offline
Triggered if the connection to the internet is becomes available or unavailable during the running of the game. This is common on mobile devices which may be moving in and out of signal areas. The Is online condition also changes to reflect the connection status.
Is portrait/landscape
Determine if the current display is portrait (height is greater than width) or landscape (width is greater than height). This is performed by making a simple check on the window size of the browser, so also returns accordingly on a desktop browser depending on its dimensions.
On back button
Triggered when the user presses the device’s ‘Back’ button. Note not all devices have this button (e.g. iOS devices only have a ‘Home’ button) and not all platforms support this trigger.
On menu button
Triggered when the user presses the device’s ‘Menu’ button. Note not all devices have this button (e.g. iOS devices only have a ‘Home’ button) and not all platforms support this trigger.
On search button
Triggered when the user presses the device’s ‘Search’ button. Note not all devices have this button (e.g. iOS devices only have a ‘Home’ button) and not all platforms support this trigger.
Is downloading update
True if the game is running from cache, but downloading an updated version in the background. This can be used to implement a simple auto-updater. See Offline games for more information.
On update ready
Triggered when the game is running from cache, but an updated version has finished downloading in the background. If the user is still on the game’s menu or title screen, you may wish to prompt them to refresh the page (or just do it automatically) so the new version is loaded. See Offline games for more information.
Is fullscreen
True if the browser is running in fullscreen mode.
Page is visible
True if the page the HTML5 game is running on is currently visible. The page counts as hidden if the window is minimised, the page is in a different tab to the one being viewed, or on a mobile device when the app goes in to the background. When the page is hidden the game automatically pauses.
On suspended
On resumed
Triggered when the page’s visibility changes, or when a mobile app is going in to the background or foreground. When invisible or in the background the app is suspended: all events stop running and all audio is muted.
Supports requesting fullscreen
True if the current platform supports the Request fullscreen action. This can be used to determine whether a fullscreen button should be shown.

Основные возможности

  • 20 встроенных поведений;
  • более 70 визуальных эффектов;
  • поддержка эффектов частиц;
  • моделирование законов физики;
  • воспроизведение интересных физических эффектов;
  • экспорт игр на новые устройства и платформы;
  • система исправления ошибок в играх;
  • сохранение уровней, слоев и др. в формате XML;
  • перемещение проектов в отдельные папки.

Преимущества и недостатки

Преимущества:

  • бесплатное распространение (условно);
  • использование популярного движка Box 2D Physics для простой и быстрой реализации физических эффектов;
  • удобный интерфейс;
  • тестирование готовых игр на мобильных устройствах;
  • поддержка Юникода.

Недостатки:

  • в бесплатной версии отсутствуют множество продвинутых функций, звуковые сопровождения, эффекты, действует лимит спрайтов;
  • отсутствие русскоязычного перевода.

Альтернативы

Unreal Development Kit (UDK). Бесплатная среда для разработки игр в 3D, в которой используется язык UnrealScript. Дает возможность работать с высококачественной графикой, светом, тенями, детализированной анимацией, множеством моделей персонажей и др. В программе присутствует большое количество наборов структур, спрайтов, скриптов.

GameMaker. Бесплатный инструмент для создания игр. Позволяет делать «живую» графику, добавлять к играм звуковое оформление, различные эффекты. В программе можно подключать готовые шаблоны, вставлять и редактировать объекты, моделировать их поведение и т. д.

Принципы работы

Интерфейс программы интуитивно понятный и отличается быстрой реакцией на любые действия пользователя.

Для разработки игры используется мощная визуальная система событий. Создание событий происходит путем выбора конкретных условий и действий. В результате получается организованный список событий, который можно многократно применять на разных уровнях.

Чтобы создать событие, нужно указать объект, выбрать условие, действие, а затем добавить его.

Добавить событие

Поведения представляют собой заранее предустановленные функции. Назначать их для объектов можно повторно.

Поведения включают движения:

  • платформер;
  • машина;
  • пуля;
  • нахождение пути и др.

Конкретное поведение прикрепляется за несколько секунд.

Поведение объекта

Предпросмотр игр запускается одной кнопкой в окне браузера. Это дает возможность быстро создавать прототипы, тестировать их в течение всего процесса создания приложения, устраняя все ошибки. Предпросмотр также можно осуществлять через Wi-fi на различных мобильных устройствах.

Предпросмотр игры

Для игры предусмотрены многочисленные эффекты, системы частиц, режимы наложения.

Разные эффекты

Процесс создания игры описан в ролике:

https://youtube.com/watch?v=_vFuqHZ6QSg

Construct 2 – мощнейший игровой конструктор, который идеален как для новичков, так и для профессионалов.

Multiplayer features

The Multiplayer object supports a number of features to enable low-latency gameplay over the Internet:

  • UDP-based transmission for minimal latency avoiding head-of-line blocking, with optional reliable modes
  • NAT traversal to connect through common router/network setups
  • Compensation for poor quality connections with high latency, packet delay variation (PDV), and packet loss
  • Interpolation and extrapolation modes to ensure smooth in-game motion
  • Scirra-hosted signalling server to connect peers to each other
  • Authoritative host model to prevent cheating, with local input prediction to hide input latency
  • LAN game support for near-zero latency gameplay, including support for mixed LAN/Internet games
  • Automatic bandwidth reduction when objects are not changing, avoiding redundant repeated transmissions of identical data
  • Binary transmission with control over specific datatypes to minimise bandwidth
  • Latency and packet loss simulation for realistic local testing
  • Support for lag compensation
  • Support for both peer-to-peer games (not needing a server) and centrally-hosted games (using a server)

Array actions

Clear
Set every element in the array to the number 0.
Set at X
Set at XY
Set at XYZ
Write a value at a position in the array. Indices are zero-based. Writing to values outside the array has no effect. If Set at X is used, the Y and Z indices are 0. If Set at XY is used, the Z index is 0.
Set size
Set the dimensions of the array. Values are preserved, but if the new array is smaller it is truncated. If the new array is larger, new elements are set to store the number 0. If any of the dimensions are 0 the entire array is empty, so usually all the dimensions are at least 1.
Download
Invokes a browser download of a file containing the Array’s contents in JSON format. This is intended for offline development, e.g. creating level editors.
Load
Load the contents of the array from a string in JSON format. This must have been retrieved from either the Download action or the AsJSON expression. It could also be retrieved dynamically from the AJAX object.
Push
Add a new value either to the beginning (front) or end (back) of an axis. Since the Array is a 3D cube of values, technically this inserts a new 2D plane of elements all with the given value. However in 1D arrays this adds a single element, and in 2D arrays it inserts a new row of elements.
Pop
Delete the value at either the beginning (front) or end (back) of an axis. Since the Array is a 3D cube of values, technically this removes a 2D plane of elements. However in 1D arrays this removes a single element, and in 2D arrays it removes a whole row of elements.
Insert
Insert a new value at a specific index on an axis. Since the Array is a 3D cube of values, technically this inserts a new 2D plane of elements all with the given value. However in 1D arrays this adds a single element, and in 2D arrays it inserts a new row of elements.
Delete
Delete the value at a specific index on an axis. Since the Array is a 3D cube of values, technically this removes a 2D plane of elements. However in 1D arrays this removes a single element, and in 2D arrays it removes a whole row of elements.
Reverse
Reverse the order of elements on an axis. Note that in multidimensional arrays this only reverses one axis. For example reversing the X axis in a 2D array will reverse the order of the columns while preserving the contents of each column.
Sort
Sorts the order of elements on an axis in ascending order. Note that in multidimensional arrays this sorts based on the first element on the axis. For example sorting the X axis in a 2D array will sort the order of the columns based on the elements at Y co-ordinate 0, while preserving the contents of each column.

Values

choose(a, b )
Choose one of the given parameters at random. E.g. choose(1, 3, 9, 20) randomly picks one of the four numbers and returns that. This also works with strings, e.g. choose(«Hello», «Hi») returns either Hello or Hi. Any number of parameters can be used as long as there are at least two.
clamp(x, lower, upper)
Return lower if x is less than lower, upper if x is greater than upper, else return x.
float(x)
Convert the integer or text x to a float (fractional number). If x is text, non-numeric characters are allowed after the number, but not before. For example float(«3.1xx») returns 3.1, but float(«xx3.1») returns 0.
int(x)
Convert the float or text x to an integer (whole number). If x is text, non-numeric characters are allowed after the number, but not before. For example int(«33xx») returns 33, but int(«xx33») returns 0.
random(x)
Generate a random float from 0 to x, not including x. E.g. random(4) can generate 0, 2.5, 3.29293, but not 4. Use floor(random(4)) to generate just the whole numbers 0, 1, 2, 3.
random(a, b)
Generate a random float between a and b, including a but not including b.
rgb(r, g, b)
Generate a single number containing a color in RGB format. This is useful for conditions or actions taking a color parameter.
str(x)
Convert the integer or float x to a string. Generally not necessary since strings can be built using the & operator, e.g. «Your score is » & score

Multiplayer conditions

Compare peer count
Compare the number of peers currently in the room, if a room has been joined. The peer count includes the host so is at least 1 if in a room.
Is host
True if in a room and acting as the host. The host of the room is effectively the server for the game. Peers only connect to the host, and the host must relay data if two other peers are to communicate.
On any peer message
Triggered when a message with any tag is received. The Message, Tag, FromID and FromAlias expressions can be used to retrieve information about the received message. The order messages are received, or whether a sent message is received at all, depends on the reliability mode chosen when the message was originally sent.
On kicked
Triggered if kicked from the current room. This can occur if the host quits, the connection to the host could not be established, or the host otherwise decides to forcibly remove you from the room. After On kicked the player is no longer in the room and must re-join a room to be able to participate in a game.
On peer connected
Triggered when another peer joins the same room. It also triggers once per peer already in the room when joining an existing room, including the host. The PeerID and PeerAlias expressions identify the relevant peer.
On peer disconnected
Triggered when a peer disconnects from the room. The PeerID and PeerAlias expressions identify the peer that left. The LeaveReason expression can indicate why the peer left, such as if they intentionally quit or timed out.
On peer message
Triggered when a message sent with a specific tag is received. The Message, FromID and FromAlias expressions can be used to retrieve information about the received message. The order messages are received, or whether a sent message is received at all, depends on the reliability mode chosen when the message was originally sent.
Is ready for input
True when a peer is ready to send input to the host. This means On client update has triggered at least once, or is about to trigger. Do not allow players using input prediction to move or act before this condition is true or On client update has triggered: doing so will simply cause an input prediction error since the host is not yet ready to receive input.
On client update
Triggered when a peer is about to send its input state to the host. The input state should be updated in this trigger using the Set client state action.
Is connected
True if currently connected to the signalling server. It is not necessary to be connected to a signalling server once connected to the room host.
Is in room
True if currently in a room on the signalling server.
Is logged in
True if currently connected to the signalling server and successfully logged in.
On connected
Triggered after successfully connecting to the signalling server. In order to join rooms, it is necessary to next log in to the server.
On disconnected
Triggered after disconnecting from the signalling server.
On error
Triggered if an error occurs with the signalling server. The ErrorMessage expression indicates the type of error that occurred.
On game instance list
Triggered after Request game instance list when the list has been received from the signalling server. The List… expressions can be used to retrieve the list details.
On joined room
Triggered after the Join room or Auto-join room actions when the room has been successfully joined. The Is host condition can be used to determine if the player is the first joining peer and has been assigned the room host.
On left room
Triggered after the Leave room action when the room has been left. The room is also left if On kicked triggers.
On logged in
Triggered after the Log in action if the login is successful. Once logged in it is possible to join rooms. Note the signalling server may have assigned a different alias to the one requested if it was already taken; use the MyAlias expression to determine the actual alias in use.
On room list
Triggered after the Request room list action when the room list has been successfully received. The room list expressions can then be used to inspect the received list.
Supports multiplayer
Test if the current browser or platform supports multiplayer games. If false, none of the features of the Multiplayer object will work.

Compatibility

On Safari for iOS and Chrome for Android, video playback cannot begin unless triggered by a user input event. The Play action will work in a user input trigger like On touch start, but if done outside of that it cannot play right away. To work around this the video plugin will wait until the next touch event to start playing the video. This also applies to autoplaying videos: it will not start until the first touch.

Safari on iOS does not currently support rendering video inside the game canvas itself. To work around this, the Video plugin creates a video element floating above the game, similar to a form control. This ensures the video can appear, but prevents other objects being displayed on top of it.

Text

find(src, text)
findCase(src, text)
Find the first index within src that text occurs, else returns -1. find is case-insensitive, and findCase is case-sensitive.
left(text, count)
Return the first count characters of text.
len(text)
Return the number of characters in text.
lowercase(text)
Convert the given text to all lowercase.
mid(text, index, count)
Return the count characters starting from index in text.
newline
A string containing a line break. Use to insert line breaks in to strings, e.g. «Hello» & newline & «World»
RegexMatchAt(String, Regex, Flags, Index)
Process the regular expression Regex on String with Flags, and in the list of results, return the entry at Index.
RegexMatchCount(String, Regex, Flags)
Process the regular expression Regex on String with Flags, and return the number of entries in the list of results.
RegexReplace(String, Regex, Flags, Replace)
In String substitute matches for the regular expression Regex (with Flags) with the string Replace. The replacement string can contain the following special characters: $$ (inserts a $), $& (inserts the matched substring), $` (inserts the portion of the string that precedes the matched substring), or $’ (inserts the portion of the string that follows the matched substring).
RegexSearch(String, Regex, Flags)
Return the index of the first character in String where a match for Regex with Flags could be found.
replace(src, find, rep)
Find all occurrences of find in src and replace them with rep.
right(text, count)
Return the last count characters of text.
tokenat(src, index, separator)
Return the Nth token from src, splitting the string by separator. For example, tokenat(«apples|oranges|bananas», 1, «|») returns oranges.
tokencount(src, separator)
Count how many tokens occur in src using separator. For example, tokencount(«apples|oranges|bananas», «|») returns 3.
trim(src)
Return src with all whitespace (spaces, tabs etc.) removed from the beginning and end of the string.
uppercase(text)
Convert the given text to all uppercase.
URLEncode(str)
URLDecode(str)
Convert to and from a string in a format suitable for including in a URL or POST data.
zeropad(number, digits)
Pad number out to a certain number of digits by adding zeroes in front of the number, then returning the result as a string. For example, zeropad(45, 5) returns the string «00045».

Монетизация

В качестве способа монетизации я решил использовать наименее простой, на мой взгляд, способ – рекламу. Я решил, что рекламу обязательно подключить сразу. Было бы подло выкладывать впоследствии обновление бесплатного приложения, после установки которого у пользователя появляется отсутствующая ранее реклама.

Единственный способ подключения рекламы к созданной в Construct 2 игре под Android и экспортируемой через CocoonJS – это связка рекламных сетей Mopub + Admob и остальные. Реклама MoPub подключается к приложению при экспорте в CocoonJS. Однако эта рекламная сеть, помимо своих объявлений (которых у нее мало, и оплата за них небольшая), может служить посредником между другими сетями, выставляя при этом для каждой сети минимальную стоимость за показ. Таким образом, можно в одном приложении показывать рекламу нескольких рекламных сетей, и для показа будет выбрана одна из наиболее дорогих. Admob, безусловно, является фаворитом среди рекламных сетей для Android, поэтому в качестве дополнительной я остановился на ней.

Сразу отмечу, что для тестирования рекламы публикация в App Store не нужна, можно встраивать и тестировать рекламу на любом удобном этапе разработки приложения.

Мой выбор формата показа рекламы пал на Full screen ads в момент нажатия кнопки Back или Restart, но не чаще чем раз в 2 минуты. Использование баннеров на экранах меню бессмысленно, ибо никто там надолго не задерживается; баннер на экране с уровнем в случае с динамичной аркадной игрой еще более бесполезен.

При подключении рекламы по данной схеме следует отметить несколько особенностей. 1. Интегрировав рекламу в приложение – не стоит волноваться первые минуты/часы при тестировании. Первое время реклама не будет показываться вовсе, потом будет показываться очень редко – нужно некоторое время, чтобы объявления начали подгружаться в полную силу. 2. Admob имеет один из самых высоких показателей Fill Rate, однако в случае с реализацией по данной схеме с использованием MoPub в качестве посредника FillRate сети Admob падает до 30-80%. Эта проблема существует, о ней известно, и разработчики обещали ее исправить. Однако когда это произойдет – неизвестно.

По данной причине я решил не ждать и выйти из сложившейся ситуации достаточно простым способом. Очевидно, никто не будет показывать рекламу в приложении каждые 10 секунд. Независимо от реализованного вами способа выбора момента показа рекламы (будь то нажатие определенной кнопки, или показ каждые n минут), между двумя показами проходить сколько-нибудь существенное время. Допустим, 2 минуты. В Construct 2 при подключении рекламы делаем следующую вещь: заводим переменную AdsLoadTrigger, обозначающую, была ли подгружена реклама, и, если нет – каждые 10-20 секунд пробуем загрузить снова, вплоть до удачной попытки. Таким образом, при фактическом Fill Rate в 20% можно без труда достичь близкой к 100% вероятности показа рекламы в нужный вам момент.

На подключение рекламы я потратил уйму времени. Анализ множества различных рекламных сетей, регистрация и освоение в каждой из них, интеграция рекламы в приложение, ее тестирование и настройка оптимальных мест и частоты показа занимают очень много времени. Однако если вы сразу пойдете по указанному выше пути – справитесь за несколько дней.

Other useful advanced features

Unique IDs (UIDs) and Instance IDs (IIDs)

UIDs and IIDs are often useful to advanced users for advanced instance picking.

A UID can be used as a «reference» to an object. A UID can be stored in a variable and the object later picked with the Pick by Unique ID condition.

IIDs can be used to retrieve specific instance’s expressions. For example, Sprite(1).X will return the second Sprite’s X co-ordinate (since Construct 2 uses zero-based indices). For more information see Object expressions in the manual entry on expressions. IIDs can also be used to pick instances using the Pick Nth instance system condition, but beware that an IID is not a permanent reference to an object: for that a UID should be used instead.

For more information, see UIDs and IIDs in the manual.

Time

CPUUtilisation
The percentage of the last second that was spent in the application logic. This is for advanced users to make performance measurements. Note on hardware-accelerated devices the rendering happens on the separate GPU and therefore this measurement cannot tell you anything about how fast or slow the rendering is; for that fps is a better measure. Also note this measurement is based on timers so should be treated as an approximation, and it only measures the main Javascript thread time.
dt
Delta-time in seconds. See Delta-time and framerate independence.
fps
The current frames per second (FPS) rate, which is how many times the screen is being drawn every second. Most computers run at 60 fps if they are fast enough.
tickcount
The number of ticks that have run since the game started.
time
The number of seconds since the game started, taking in to account the time scale.
timescale
The current time scale.
wallclocktime
The number of seconds since the game started, not taking in to account the time scale (i.e. the real-world time).