/*
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Thank you for purchasing Interactive Books. Here's some information on how to use the asset.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Before you start:
The example provided together with this asset had its texture group set to no cropping. When importing assets from the marketplace this change does
not come through, so you have to set it manually. You can do this by going to Global Game Settings (ctrl + shift + G), clicking the "Texture Groups"
tab, then select the "Default" texture group in the list to the left, and check "No cropping" to the right under "Texture Group Settings".
This is just for the sake of the example code, you don't really have to do this with your own books. The reason it's done here is that it will
interpolate the curved edges of each sheet with a transparent border to get a smooth antialiasing effect.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
The resources:
If you've imported all the resources from the asset into your project you'll see that they're organized into two types of folders, one called
"Interactive Books" and the other called "Example". "Interactive Books" contains the essential resources needed to use the Interactive Books asset.
"Example" contains resources used in the example that shows up when you run the game. Resources in the "Example" folders are well commented and
shows you how you can use the Interactive Books asset.
To use Interactive Books all you have to do is to call scripts from the "Interactive Books" folder. All of the scripts are commented with a general
description of what the script does as well as descriptions specific to each parameter. It's recommended that you read through these whenever
you want to use them.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Implementing Interactive Books into your game - the essential steps:
First off you'll have to create a book with ib_book_create. This script returns an instance id that you will use with the other scripts in the
asset later. You can then add sheets to the book with ib_book_add_sheet. In the create event of obj_example_main you can see how ib_book_add_sheet
is used to add all the sheets of the example book.
Then you should find a draw event to call ib_book_draw in. This will draw your book to the screen.
You can use ib_book_goto_sheet to move to different pages in the book.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Further implementation of Interactive Books into your game:
ib_book_set_transformation: This script lets you set the position and scale of the book.
ib_sheet_position_curved_to_flat/ib_sheet_position_flat_to_curved: These scripts lets you transform positions between the flat version of a sheet
and the version where the sheet is curved out. This can be used if you e.g. want to check presses on rectangular buttons that are curved out when
drawn. The curve makes it impossible to check collision with the button like normal, so you have to transform the position from curved to flat first.
The example code shows how this can be done in obj_example_button.
If you want to know more, there are lots of comments with explanations in the example code and the scripts themselves. You can also contact me
by sending a mail to
[email protected] or messaging Dragon47 on the GameMaker Community.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
*/