-
Notifications
You must be signed in to change notification settings - Fork 0
Importing InputCandy Advanced Mode
To import InputCandy, simply import the folders from Objects, Rooms, Scripts, Sounds and Sprites. You will also want to import the font_jellee or pick your own for use with ICUI but it should match in size, and possibly the Notes.
The main parts of InputCandy are:
- The Library Itself InputCandy.gml script
- SDLDB.gml and its related features
- ICUI.gml and its related room, fonts, sprites and sounds
Questions you want to ask yourself when installing InputCandy Advanced:
- Do I want to support SDL?
I don't really recommend using the SDL extensions for InputCandy, but they are supported in the sense that it has a way to load an SDL database and it has a way to inspect and perhaps remap, by the player, for that database, but it can be dangerous to do so. If you aren't interested in using SDL's GameController Database, there is no reason to import or call functions related to the SDLDB.gml scripts. This will dramatically speed up game load time, since it takes a good 30 seconds or more to load the SDLDB file.
- Do I want to bother with the ICUI?
I think you should seriously consider using the ICUI and styling it, rather than trying to write your own, but you are welcome to. As long as the underlying rules are followed, you could reimplement the ICUI in your own way. It is going to take you a while and you don't need to. If you aren't going to be using the ICUI, then you do not need anything related to ICUI imported into your project.
- Should I use your rooms and objects as a basis for my game?
The controller objects, diagnostics, other rooms like the ICUI etc, can be reused and feel free to do so. Import them, if you wish, but they are not required, and you can use them as a guide to place the same required calls into your own game.
At the beginning of the game, meaning in a "startup" room, you need to call Init_InputCandy_Advanced()
Then, right after that, you should set up your game's global actions which configures all bindable actions.
This is the content of o_InputCandy_startup_example object's Create event:
Init_InputCandy_Advanced();
// Setup actions for our test game
__IC.Action( "Jump", IC_B, IC_space, IC_mouse_right );
__IC.Action( "Shoot", IC_A, [ IC_any_control, IC_lctrl, IC_rctrl ], IC_mouse_left );
IC_Action_ext( "Move", "None", IC_dpad, false, IC_arrows, false, IC_none, false, false, true, false, 0, 0, false, true, false );
__IC.Action( "Block", IC_X, [ IC_any_alt, IC_lalt, IC_ralt ], IC_mouse_right );
__IC.Action( "Duck", IC_Y, IC_key_X );
__IC.Action( "Dodge Left", IC_hat0_L, IC_key_A, IC_none );
__IC.Action( "Dodge Right", IC_hat0_R, IC_key_D, IC_none );
__IC.Action( "Dodge High", IC_hat0_U, IC_key_W, IC_none );
__IC.Action( "Dodge Low", IC_hat0_D, IC_key_S, IC_none );
__IC.Action( "Special", IC_Ltrigger, IC_key_E, IC_none );
__IC.Action( "Inventory", IC_Rshoulder, IC_key_I, IC_none );
__IC.Action( "Help/Menu", IC_back_select, IC_f1, IC_none );
In a controller object, call __IC.Step()
once and only once per frame, per room.
Covered under ICUI and how it works