![]() SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery ![]() SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices SetVirtualResolution( 1024, 768 ) // doesn't have to match the window SetWindowAllowResize( 1 ) // allow the user to resize the window When AppGameKit loads the plugin it looks for a function 'ReceiveAGKPtr', this function is called by the runtime and sends the full set of function pointers to the plugin, we will setup this function but not use it yet, this function must exist for the plugin to work so we set this us with a C prototype If everything is good, we can add some code, if something went wrong, check each step and try again. ![]() You can add both if you want to compile for both systems but set your preferred as default (I set classic) (checkbox at bottom of compile targets list) and set the other 'Studio' Enable in build all targets, now we can compile our plugin for both Classic and Studio at a single button click, handy stuffĬlick OK in the dialog, you are now greeted with an empty code page, first lets test our compile targets to make sure we got it right, go to the main menu, click Compiler>Build All Targets, a dialog will appear and tell you what's going on, when its done you should now have a new DLL in the plugin folder (you will need to launch PureBasic with admin rights to compile to the Program Files folder) Studio: C:\Program Files (x86)\The Game Creators\AppGameKit Studio\Plugins\myPlugin\Windows.dll Set the input file to the main.pb file that was created with the project and set the output executable to :Ĭlassic: C:\Program Files (x86)\The Game Creators\AGK2\Tier 1\Compiler\Plugins\myPlugin\Windows.dll Now we need to set the compile targets, in the 'Project Targets' list, right click 'Default Target' and click 'Edit Target', this opens the project compiler options. Use the project creation dialog to add a file, call it main.pb and click the 'Create Project' button, this will open the project overview tab. ![]() Now, Open PureBasic (x86 - 32 Bit, we will deal with 64 bit later) and create a project, again call it myPlugin and save it where ever you save your PB stuff, We will worry about what this content means in a bit, lets get something working first. #CommandName,ReturnType,ParameterTypes,Windows,Linux,Mac,Android,iOS,Windows64 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |