Edge FMV Reference Guide
Edge FMV Reference Guide
com/
Support/Inquiries: [email protected]
Thank you for downloading Edge FMV, the first native GML video solution for GameMaker Studio. Edge
Engine is a fully cross-platform, modular framework built to augment Game Maker Studio with pre-made
code and assets that serve as the foundation for a wide variety of game genres. All Edge Engine modules
feature creative, human-readable code with helpful notations throughout, making them both powerful
and easy to use.
MakeFMV
EULA
What's New
v1.1.2
Updated MakeFMV to v1.3.0 with minor improvements to the GUI, as well as functional improvements
including even better support for nonstandard paths, fix for command window not showing up on
conversion, and fix for some antivirus software generating a false positive when running MakeFMV.
Added edgefmv_get_time script for reading the playback position of FMVs
v1.1.0
Updated MakeFMV to v1.2.0 with GUI frontend, custom output paths, and better support for
nonstandard paths (e.g. not on C drive, paths with spaces, etc.)
v1.0.2
Fixed looped videos drawing a blank frame between replays
v1.0.1
Added ability to loop FMVs
v1.0
Initial release
Reference
Warning: Edge FMV is an experimental video player, and likely always will be. It is intended for advanced
users only, and may not perform as expected due to limitations within GameMaker Studio.
See the MakeFMV section of this document for instructions on converting videos to both storage
formats.
Additionally, Edge FMV features several built-in variables that can assist in general operation of
converted videos. While it is only necessary to run the edgefmv_load and edgefmv_play scripts to
achieve video playback, making use of these variables can take Edge FMV functionality beyond simple
playback for a variety of useful effects.
First, the global.fmv_complete variable stores the status of the video as either true (the video is
finished playing) or false (the video is not finished playing). Testing this variable can be used as a means
of executing code when the video is complete. For example:
if global.fmv_complete = true {
room_goto_next();
}
will automatically go to the next room of the game when the video is finished playing.
It may also be desirable to allow users to pause videos during playback. While this is accomplished with
the edgefmv_pause script and not a variable, the global.fmv_pause variable itself can be used to
execute code when a video is paused. For example:
if global.fmv_pause = true {
draw_set_alpha(0.5);
draw_rectangle_color(0, 0, room_width, room_height, c_black, c_black, c_black,
c_black, false);
draw_set_alpha(1);
}
will draw an overlay to fade the video while paused.
Furthermore, to aid in stylization of elements such as a pause screen, Edge FMV includes two variables
retaining
the
dimensions
of
the
current
video:
global.fmv_frame_width
and
global.fmv_frame_height. These variables are scaled, meaning they contain the dimensions of the
video as it is drawn, not necessarily as it is stored on-disk. See information on the edgefmv_play script
for more on video scaling.
And these are but a few of the variables that are accessible to developers. Advanced users are
encouraged to study the edgefmv_load script and use the variables it initializes to their advantage.
For all that Edge FMV has to offer under regular usage, refer to the rest of the reference guide below.
edgefmv_load(fname);
The first script that must be run for FMV playback. As the name implies, edgefmv_load will cache preload
files and set a number of essential variables for both preload and precache videos. It will also return the
integer 1 or the number of files cached to indicate that the load operation was successful. If the load
fails, 0 will be returned instead. The script requires only one parameter, the fname, or filename of the
FMV to be loaded. This should be input as a string (enclosed in quotes), including the files extension and
any necessary path information. In this case, the root directory is the Included Files section of the
GameMaker Studio project. For example, the path folder\myfile.fmv would actually refer to
C:\Users\USER\Documents\GameMaker\Projects\PROJECT.gmx\datafiles\folder\myfile.fmv. Do not
include a slash at the beginning of the path. If no sub-folder is used, no slashes are necessary.
This script must be run in the Create event or elsewhere that will only trigger it once. It does not,
however, have to be run in the same object or even the same room as the edgefmv_play script. This is
especially useful for preload files, as preloading can occur during a loading screen elsewhere in the game
prior to actually playing the video.
Note that regardless of whether a preload or precache is used, the input fname should include both the
filename and extension. In the case of a precache, the filename should match that of the folder, and the
extension should match that of the frame files extension (typically .fmv). Files converted with MakeFMV
will use the same fname regardless of whether they are stored in preload or precache mode. If both a
precache and preload version of the same file are present, the precache will be loaded preferentially.
Note: Once a preload file has been cached, it does not matter where it is loaded from againthe same cache will
be used regardless of the original files location provided the cache still exists after the file has been moved.
Note 2: Changes to the folder structure in the Included Files section will require re-importing files to the new
folder structure. This is a limitation of GameMaker Studio.
Note 3: While only the most recent loaded video can be played, multiple videos can be preloaded and then played
in succession by running edgefmv_load for each video again when its turn comes. If a cache already exists it will
not be recreated, therefore there is no performance penalty to the second instance of edgefmv_load.
edgefmv_play(framerate, a/v offset, x, y, xscale, yscale, rot, color, alpha, hidemouse, loop);
Plays the last video loaded with the edgefmv_load script with a variety of playback options and
transforms.
Of greatest importance is the framerate parameter, which sets the FPS at which the loaded video is
intended to be played. Fractional values are acceptable, therefore framerates such as 23.976 and 29.97
are valid inputs here. All videos converted with MakeFMV will have a framerate of 30.
The a/v offset parameter can be used to adjust the tracking between the video and audio being played,
to fix incorrect lip-syncing for example. This value is in number of frames, and can be both positive and
negative to offset the audio either forwards or backwards as necessary. Generally, no offset should be
necessary, in which case this parameter can simply be set to 0.
The x and y parameters specify where the video should be drawn, with the top-left corner being the
videos origin point. The xscale and yscale parameters set the size of the drawn video as well as the actual
values stored in the built-in global.fmv_frame_width and global.fmv_frame_height variables. A
value of 1 equals 100% size. Negative values can be used to mirror the video on either axis.
The rot parameter sets the videos rotation in degrees, where 0 is straight up and 180 is directly upsidedown. Although videos are positioned by the top-left corner, applying rotation will rotate them about
the center.
The color parameter sets a blending color to add a tint to the video, where c_white is neutral. The input
color can be anything from a built-in GameMaker Studio variable to a color made with make_color_rgb
or even Edge Engines own make_color_hex.
The alpha parameter is a fractional value that sets the videos transparency, where 0 is completely
transparent and 1 is completely opaque.
Next, the hidemouse parameter is a true/false value that enables or disables hiding the mouse cursor
during video playback on desktop platforms where a mouse cursor is used. The cursor will be restored
when the video is completed or skipped.
Lastly, the loop parameter is another true/false value that enables or disables endlessly repeating video
playback until the video is skipped.
This script must be run in the Draw event.
Note: While only the most recent loaded video can be played, multiple videos can be preloaded and then played in
succession by running edgefmv_load for each video again when its turn comes. If a cache already exists it will
not be recreated, therefore there is no performance penalty to the second instance of edgefmv_load.
edgefmv_unload(fname);
Resets all FMV playback variables to null values and attempts to delete the relevant preload cache, if any.
See edgefmv_load for usage of the fname parameter. Note that while only one video can be loaded at
any given time, the same does not necessarily apply to unloading. When videos are preloaded, their cache
remains on the system storage until it is unloaded manually. In this way multiple preload files can be
queued for successive playback without pausing to cache additional videos in between. However, this
will also constitute data buildup on the system storage, which is undesirable in large quantities. To unload
specific videos, supply that videos filename with any necessary path information. Otherwise to unload
precache videos or to unload all preload videos simultaneously, the keyword all can be supplied in place
of a filename here. For example:
edgefmv_unload(all);
In general, this is how edgefmv_unload should be used. Like edgefmv_load, this script should be
executed in an event where it is only triggered once.
edgefmv_pause();
Pauses and unpauses the current video, if any is playing. No parameters are necessary; simply run the
script in the desired input pressed event, where it will only be triggered once at a time.
edgefmv_skip();
Skips the current video, if any is playing. No parameters are necessary; simply run the script in the desired
input pressed event, where it will only be triggered once.
edgefmv_seek(time);
Sets the playback position of the current video, if any is playing. The time parameter is a value in seconds.
Fractional values are acceptable for seeking to a precise time in the current video. As with many other
Edge FMV scripts, it is important to only run edgefmv_seek where it will be triggered once.
Tip: Try setting the time value to a coordinate like mouse_x in a button event like global mouse left. With a little
additional math, you can create a full scrubbing system just like a real media player!
edgefmv_set_volume(volume);
Sets the volume of the current video, if any is playing. The volume parameter is a fractional value where
0 is silent and 1 is max volume. Changes in volume will transition smoothly over a period of 100
milliseconds. This script should ideally be run in an event where it will only be triggered once.
edgefmv_get_time();
Returns the playback time of the current video in seconds, if any is playing. Otherwise will return 0. No
parameters are necessary.
MakeFMV
As Edge FMV is a native GML video player, it relies on a unique format for storing videos. To simplify
the process of creating Edge FMV-compatible videos with the proper technical standards and right
balance of quality and output file size, Edge FMV also comes with its own conversion utility: MakeFMV.
As of version 1.1.0, MakeFMV has a GUI frontend which is very simple and easy to use.
First, select the video file you wish to convert by clicking the button to the right of the Input File
box. A familiar dialog window will appear allowing you to select your video from anywhere on your PC.
By default, the list of files will be filtered by popular video file formats, but if your video is not listed
you can always disable the filter by setting Video Files to All in the bottom-right corner of the
window.
It is also possible to fill out the Input File path manually. If you do so, remember not to put quotes
around the path!
Next, repeat the same process with the Output File path. Unlike with the input file, this time you will
not be able to specify an output formatthe .fmv format is required.
The output file does not have to be in the same directory as the input file. Create your .fmv anywhere
you like!
Finally, select whether to convert the input video as a Preload or a Precache by checking the
appropriate radio button at the bottom of the window. Remember, a preload FMV is a self-contained
file that is cached at runtime, while a precache is a folder that requires no extra processing to be used.
For mobile devices, precache is required!
Once youve made all your selections, click the big MakeFMV logo at the top of the window and start
converting! A terminal window will appear so you can keep an eye on the whole process.
When the conversion is complete, the MakeFMV terminal will provide the example Edge FMV commands
needed to play the output file in your GameMaker Studio project. Simply drag the output file or folder
to your GameMaker Studio projects Included Files section and play it with the edgefmv_load and
edgefmv_play scripts.
And thats it! Your MakeFMV-converted video is now ready to be played with Edge FMV.
below,
however
newer
version
of
this
document
may
be
available
at
https://marketplace.yoyogames.com/eula
3.4. In order to access Assets and Services, you first need to access the Marketplace, which you can do by following the
process explained in the Terms of Service, which includes having an activated GameMaker: Studio Professional licence.
3.5. Assets are licensed, not sold. When you buy Assets, what happens is that the Publisher grants to you a nonexclusive, worldwide and perpetual right (known legally as a licence) over the Assets for the purpose of using them and
integrating them with interactive entertainment products (which you may choose to distribute for free or for money
thats up to you). You may copy, use and modify Assets for this purpose only and you may not distribute, sublicense,
rent, lease or lend the Assets. You are therefore acquiring a licence over the Assets, not buying the Assets themselves
(which the Publisher will still own). Your licence over the Assets is subject to this EULA.
3.6. Provision of Services. When you obtain Services via the Marketplace, the Publisher will be obliged to provide those
Services to you and by default you will own what is produced from them, but not the Services themselves.
3.7. Multi-user/location arrangements. Only you are able to use the rights in this EULA regarding the Assets or Services
you use you cannot give rights to other people or share rights with others. If you would like to have a multi-user
arrangement regarding an Asset or Service, please contact [http://help.yoyogames.com/]
3.8. Payment for Assets. Assets that are licensed for money can be obtained using payment services that we provide
within the Marketplace with the help of third party payment services, like PayPal. As part of your licence acquisition
process, you normally need to provide standard contact/payment information alongside your licence acquisition, for
example your name, address and billing details. You can also provide your VAT number if you are a business (you will not
be able to add it to purchases later on). We will charge you for the amount of the Asset price, plus any VAT and if
applicable any bank charges, using your chosen payment method.
3.9. Updates to Assets. From time to time, Publishers may make updates (such as bug fixes, patches, new versions or
enhancements) to Assets that may become available. You can set in the Marketplace whether to download these updates
automatically or manually.
4. OWNERSHIP OF THE MARKETPLACE, ASSETS AND INTELLECTUAL PROPERTY RIGHTS
4.1. Ownership. The Assets, Services and all Intellectual Property Rights in them are owned by the Publisher. This
includes the Assets software, code, graphics, video, audio, music and text. The Marketplace is owned by YoYo Games
(this also includes the Marketplaces software, code, graphics, video, audio, music and text).
4.2. Open source software. Some Assets and/or Services materials (whether developed by YoYo Games or by third
parties) may contain open source software and so will also be governed by applicable open source software licences. If
there is a dispute or discrepancy between this EULA and any such open source licences, the open source software
licences will prevail.
5. CONSUMER RIGHTS REGARDING ASSETS
5.1. For consumers resident in the European Union. Under EU Distance Selling rules, consumers have the ability to
return Assets and Services for a refund within 14 days of their ordering of them in the Marketplace. However, that right
is lost as soon as consumers download or use the Assets or Services. Consumers will also benefit from legally required
warranties regarding the quality and use of the Assets and Services (depending on their national consumer protection
laws), which in appropriate circumstances consumers may use to claim a return or refund.
5.2. For consumers who are resident outside of the European Union (including the USA). All licence acquisitions are final
and consumers have no right of return or refund, nor are any warranties given by Publishers or YoYo Games regarding
the quality and use of the Assets or Services.
5.3. What happens when a consumer makes a return/refund request? For Assets, YoYo Games reviews that request on
behalf of the Publisher and, if a return/refund right is available to the consumer, make a decision regarding whether a
return/refund/other remedy should be offered. If a refund/return is offered, then usually you will be required to
delete/destroy all copies of the Asset(s) in question and all your rights to it (them) will terminate. For Services, this is a
matter for the Publisher.
5.4. What happens if an Asset or Service is taken down from the Marketplace? You will be notified that an Asset or
Service is going to be removed from the Marketplace. If you have already licensed the Asset previously then in most
situations we will endeavour to give you a reasonable period (normally 30 days) in which to use it a final time. However,
this is subject to the reason for which it is being taken down (for example, if it is owing to third party intellectual
property infringement we may be required to take it down immediately and not offer a final download period). For
Services, this is a matter for the Publisher.
5.5. All other consumer queries. Please contact the Publisher in the first instance (their contact details should be
available via the Marketplace). If you still have any concerns or queries after reasonable attempts to resolve them with
the Publisher, you can contact YoYo Games at http://help.yoyogames.com/.
6. WHAT YOU MUST NOT DO WITH THE ASSETS OR SERVICES
6.1. You must not do any of the following regarding Assets, Services or the Marketplace:
6.1.1. Reproduce, duplicate, copy, sell, trade or resell them;
6.1.2. Copy, sell, license, distribute, transfer, modify, adapt, translate, prepare derivative works from, decompile,
reverse engineer, disassemble or otherwise attempt to derive source code from them;
6.1.3. Interfere with, circumvent or bypass servers or security or content usage functionality (including any digital
rights management) in or regarding them;
6.1.4. Use them to access, copy, transfer, transcode or retransmit content in breach of any laws or third party rights; or
6.1.5. Remove, obscure or alter YoYo Games or any third partys copyright or trademark or other proprietary notices or
documentation regarding them, nor use any YoYo Games or other trademarks for your own purposes.
7. TERM AND TERMINATION
7.1. Start of EULA. This EULA starts when you confirm your agreement to it as explained at the beginning of this EULA
and it will end once it is terminated, as we explain further in the rest of this section.
7.2. Your termination rights. You may terminate this EULA by ending use of the Assets or Services.
7.3. Mutual termination rights. You or we may terminate this EULA at any time on written notice to you if: (i) you or we
materially breach this EULA; or (ii) you or we become or threaten to become insolvent or bankrupt.
7.4. Effect of termination. If this EULA terminates for any reason then it will cease immediately to have effect (apart
from any sections that are necessary for enforcement of any legal rights and remedies against you. Depending on the
details of the termination, you may lose your rights over your Assets and/or Services.
7.5. Removal of your Assets or Services. From time to time, there may be serious cases of breach of this EULA by an
Asset or Service. In that situation, you may be required to remove such Asset from any computer or other equipment
under your control and that you agree to comply promptly with such requirement.
8. LIABILITY
8.1. You agree on demand to indemnify and hold harmless YoYo Group and its officers, directors, employees and agents
(and keep them indemnified and held harmless) from and against any and all damages, claims, suits, actions, judgments
and costs (including legal costs) and expenses whatsoever, including reasonable legal fees and costs, arising out of your
use of the Assets or Services, including your downloading, installation or use of any Assets, or your material breach of
this EULA..
8.2. You understand and agree that your use of Assets and Services is at your own risk and that they are provided as is
and as available without warranty or representation of any kind. All warranties, representations and conditions of any
kind relating to them are disclaimed, including without limitation any implied warranties of satisfactory quality,
merchantability, fitness for purpose or non-infringement of third party rights. In addition, no warranty or
representation is given that your use of them will be uninterrupted or secure or free from bugs or errors.
8.3. The maximum and total aggregate liability of the Publisher and of YoYo Games, its group of companies, employees
and affiliates (YoYo Group) to you in connection with this EULA shall be equivalent to the sum of $100 (one hundred
US dollars).
8.4. In no event will the Publisher or YoYo Group be liable to you for any loss of profits, charges or expenses, loss of
data or any corruption or loss of information, or any loss of business opportunity, or any special, indirect, punitive,
exemplary or consequential loss or damage or disruption of any kind, in any case, whether based on breach of contract,
tort (including negligence or breach of statutory duty), misrepresentation, restitution or otherwise whether or not the
relevant party has been advised of the possibility of such damage. The foregoing limitations will survive and apply even
if any limited remedy specified in this EULA is found to have failed of its essential purpose.
8.5. Without prejudice to the generality of the rest of this clause 8, the Publisher and YoYo Group disclaim any liability
regarding or arising out of:
8.5.1 Any reliance by you on the existence, completeness or accuracy of any marketing or advertising materials
regarding Assets or Services;
8.5.2 Any changes made to any Assets or Services; or
8.5.3 Any damage or harm or deletion or corruption that is in any way attributable to your use of Assets or Services.
8.6. Nothing in this clause 8 purports to limit or exclude any partys liability: (i) for fraud, fraudulent misrepresentation or
wilful misconduct; (ii) for death or personal injury caused by that partys negligence; or (iii) to the extent otherwise not
permitted by law.
9. GENERAL LEGAL TERMS
9.1. No waiver. No failure or delay by a party to exercise any right or remedy provided under this EULA or by law shall
constitute a waiver of that or any other right or remedy, nor shall it preclude or restrict the further exercise of that or
any other right or remedy. No single or partial exercise of such right or remedy shall preclude or restrict the further
exercise of that or any other right or remedy.
9.2. Impact of enforceability finding. If any court or competent authority finds that any provision of this EULA (or part
of any provision) is invalid, illegal or unenforceable, that provision or part-provision shall, to the extent required, be
deemed to be deleted, and the validity and enforceability of the other provisions of this EULA shall not be affected. If
any invalid, unenforceable or illegal provision of this EULA would be valid, enforceable and legal if some part of it were
deleted, the parties shall negotiate in good faith to amend such provision such that, as amended, it is legal, valid and
enforceable, and, to the greatest extent possible, achieves the parties original commercial intention.
9.3. Third parties. No person other than YoYo Group or a party to this EULA shall have any rights (whether under the
United Kingdoms Contracts (Rights of Third Parties) Act 1999 or otherwise) to enforce any term of this EULA.
9.4. No partnership or agency. Nothing in this EULA or in any document referred to in it or in any arrangement
contemplated by it shall create a partnership, joint venture, agency or employment between the parties.
9.5. Entire EULA. This EULA contains the whole agreement between the parties relating to the subject matter hereof and
supersedes all prior EULAs, arrangements and understandings between the parties relating to that subject matter. Each
party acknowledges that, in entering into this EULA, it has not relied on, and shall have no right or remedy in respect of,
any statement, representation, assurance or warranty (whether made negligently or innocently) other than as expressly
set out in this EULA. Please remember, when reviewing this section, that you had had the opportunity at the start of this
EULA to raise any queries and propose any amendments to its terms.
9.6. Export restrictions. It is your responsibility to comply with any import or export laws or regulations that may apply
to your Assets on the Marketplace.
9.7. Assignment. The rights granted in this EULA may not be assigned or transferred by you, nor can you sub-contract
or delegate your responsibilities under this EULA, without our prior written approval. The rights granted in this EULA
may be assigned or transferred by us without your prior approval and we may also delegate or sub-contract our
responsibilities or obligations under this EULA without your approval.
10. GOVERNING LAW AND JURISDICTION
You and we agree that this EULA shall be governed by and interpreted according to the laws of England and that any
dispute regarding this EULA shall be heard by the courts of England.
Edge Engine, Edge FMV, MakeFMV, ThinkBoxly, and associated artworks are copyright 2012-2016 ThinkBoxly.
GameMaker: Studio, GameMaker: Marketplace, and associated works are copyright 2013-2016 YoYo Games Ltd.
This document makes use of the font 'Carme' as provided by the SIL Open Font License (OFL) version 1.1. See
http://scripts.sil.org/OFL for more information.
The MakeFMV application bundled with Edge FMV incorporates technologies based on FFmpeg and 7-zip. These
applications are licensed under the GNU Lesser General Public License (LGPL) version 2.1 or later. See
https://www.ffmpeg.org/legal.html and http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html for more information.
MakeFMV is not a commercial application and may be obtained compiled or as source code free of charge upon request.