Difference between revisions of "Gideros Player"

From GiderosMobile
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Gideros Studio comes bundled with Gideros Player, which can be used to test your applications on the fly, without sending it to the real device. It provides a method of interacting with your device using your mouse to simulate taps. What you see on the player is not an emulation, so what you see on the Gideros Player will be identically same to the application experience when you send it to your mobile device.
+
The Ultimate Guide to Gideros Studio
  
Basically when we talk about Gideros Player, we mean the same player on iOS, Android, Mac OS X desktop and MS Windows desktop. If you install the player on iOS or Android, then you’ll be able to test your applications on these platforms. If you do not have a device, then it’s fine too - Gideros Studio has a desktop player which works similar to the player on the real device. However, it may not be possible to test some of the features that comes with devices, like accelerometer, gyro and compass.
+
__TOC__
  
=== Running the Player ===
+
== Running your application on the Gideros Player ==
 +
To get your first sample script running in the Gideros desktop player, you need to start it. The fastest way is to click on that little game controller icon [[File:StartGiderosPlayer.png]] in the toolbar.
  
If you want to run the Player and test your code with Gideros Studio, do the following:
+
Gideros Studio will then start the Gideros Player application and shortly after you should see the player on your desktop:
  
# Open Gideros Studio
+
[[File:Desktopplayer.png]]
# Ensure that Player > Player Settings show 127.0.0.1 as the Player IP (which points to the Player application on your desktop)
 
# Run Player > Start Local Player
 
  
You’ll now see player on your desktop, ready to run your application. For a convenient view mode, click on View > Always on top, and your player will always be visible on your desktop.
 
  
Following steps form a basic lifecycle of your testing process:
+
The Start and Stop icons [[File:Startandstop.png]] become active in Gideros Studio only when a Gideros Player is up and running whether on the desktop or on a device.
  
# You code using Lua in Gideros Studio
+
== The Gideros Player parameters ==
# You manage your assets (e.g Lua files, sounds, graphics in Gideros Studio project pane)
+
There are many parameters for the Gideros Player, we will only list a few of them.
# Gideros Player stays on top of all other windows.
+
=== Screenshot ===
# Press Ctrl-R (Run) - and your code is immediately compiled and executed on the Player using C++ callbacks.
+
You can capture a screenshot of your app/game by going to the menu '''View->Screenshot''' (F12).
# By testing, making necessary adjustments and integrating your application over and over, you make a perfect application.
 
  
Now let’s dig into the Player a bit more by looking at several menu options.
+
To see the screenshot go to menu '''File->Open''' Directory.
  
=== View Modes ===
+
=== View modes ===
 +
The Gideros Player can be set to be always on top.
  
Gideros Studio has two view modes - 50% and 100%. Half-size view mode (50%) is especially useful when you try your application in iPad, and you have a smaller screen size, and iPad’s resolution is more than your monitor resolution.
+
=== Hardware ===
 +
Here you can emulate different devices by selecting a preconfigured set of parameters (iPhoneX, iPad, etc) or you can set your own parameters like orientation, resolution, and framerate.
  
=== Orientation ===
+
[[File:Resolution.png]]
 +
 
 +
You can also display various information on your running app, like FPS, size, etc.
 +
 
 +
On mobile devices, the natural frame rate is usually 60fps. This is more than enough for the fastest games out there (however there are some devices with a frame rate of 100). Normally this frame rate can be set at 60. If for some reason, you want to set to a different frame rate, you can choose either 30 or 15. This, however, does not change the frame rate on the device.
 +
 
 +
Hint: For some games, you may want to set to 15 FPS to see the details in order to debug some graphical elements.
  
Gideros Player supports 4 different orientation options, mentioned below:
+
== Installing the Gideros Player on Android ==
 +
Gideros ships with a pre-compiled player app for your Android device. It is located inside the main Gideros folder and is called GiderosAndroidPlayer.apk. There are two ways to actually load the apk file onto your device. For both, make sure that you set the options in your device to allow the installation of non-market apps. This option has to be activated in your phone under Settings->Applications->Unknown sources.
  
# Portrait
+
The first method is to upload the apk file to your web space and then point your device via your web browser to the location of the player apk file in the web.
# Landscape Left
 
# Portrait Upside Down
 
# Landscape Right
 
  
There are also "Rotate left" and "Rotate right" quick options in the menu to rotate the device.
+
The second method is to connect the phone to your computer and upload it with the ADB command. For this, the Android SDK and tools have to be installed. Please study the link below for further information about how to do this:
 +
http://developer.android.com/sdk/index.html
  
=== Resolution ===
+
To load the player app via ADB, open the console terminal on your computer and type in the following:
  
For your convenience, Gideros Player includes multiple resolution settings. This is handy when you develop for more than one resolution (which is almost always the case), or multiple operating systems. For example, when you want to see how your application looks like on iOS devices, choose either iPhone, iPhone4+ or iPad resolutions.
+
<code>
 +
adb install GiderosAndroidPlayer.apk
 +
</code>
  
[[File:Resolution.png]]
+
You should get a message that the player was installed on your device.
 +
 
 +
== Installing the Gideros Player on iOS ==
 +
For your iOS device, you need to build and sign the player application yourself. Like everything for iOS, this has to be done within XCode. Please unzip the GiderosiPhonePlayer.zip archive to a location of your choice. Start XCode and load the GiderosiPhonePlayer.xcodeproj project.
  
On the other hand, since Android works on several devices with many different resolutions, you may want to see how your screen shows up on different resolutions, using the menu entries for Android, under the iOS devices.
+
Inside XCode, browse to the resource section in the “Groups and Files” list box and there open the GiderosiPhonePlayer-Info.plist. Here you need to set the bundle identifier to the app ID you have used to create a provisioning profile in the iOS Provisioning Portal.
  
=== Frame Rate ===
+
After you have made your changes, save it and open the project settings. There you need to set the code signing identity to the one of your provisioning profile. If it doesn’t show up, then you have forgotten to actually install it. And make sure that you set the code signing identity in the configuration you want to use when you build the player. Close the settings and then Build and Run the player. If everything was set right, you will see the icon for the player show up in your device which should look like this:
  
On mobile devices, natural frame rate is usually 60. This is more than enough for the fastest games out there (however there are some devices with a frame rate of 100). Normally this frame rate can be set at 60. If, for some reason, you want to set to a different frame rate, you can choose either 30 or 15. This, however, does not change the frame rate on the device.
+
[[File:Iphoneplayer.png]]
  
'''Hint:''' For some games, you may want to set to 15 FPS to see the details in order to debug some graphical elements.
 
  
[[Adding a New Resolution to the Player]]
+
'''PREV.''': [[Getting Started]]<br/>
 +
'''NEXT''': [[Your first code]]

Revision as of 22:50, 25 January 2023

The Ultimate Guide to Gideros Studio

Running your application on the Gideros Player

To get your first sample script running in the Gideros desktop player, you need to start it. The fastest way is to click on that little game controller icon StartGiderosPlayer.png in the toolbar.

Gideros Studio will then start the Gideros Player application and shortly after you should see the player on your desktop:

Desktopplayer.png


The Start and Stop icons Startandstop.png become active in Gideros Studio only when a Gideros Player is up and running whether on the desktop or on a device.

The Gideros Player parameters

There are many parameters for the Gideros Player, we will only list a few of them.

Screenshot

You can capture a screenshot of your app/game by going to the menu View->Screenshot (F12).

To see the screenshot go to menu File->Open Directory.

View modes

The Gideros Player can be set to be always on top.

Hardware

Here you can emulate different devices by selecting a preconfigured set of parameters (iPhoneX, iPad, etc) or you can set your own parameters like orientation, resolution, and framerate.

Resolution.png

You can also display various information on your running app, like FPS, size, etc.

On mobile devices, the natural frame rate is usually 60fps. This is more than enough for the fastest games out there (however there are some devices with a frame rate of 100). Normally this frame rate can be set at 60. If for some reason, you want to set to a different frame rate, you can choose either 30 or 15. This, however, does not change the frame rate on the device.

Hint: For some games, you may want to set to 15 FPS to see the details in order to debug some graphical elements.

Installing the Gideros Player on Android

Gideros ships with a pre-compiled player app for your Android device. It is located inside the main Gideros folder and is called GiderosAndroidPlayer.apk. There are two ways to actually load the apk file onto your device. For both, make sure that you set the options in your device to allow the installation of non-market apps. This option has to be activated in your phone under Settings->Applications->Unknown sources.

The first method is to upload the apk file to your web space and then point your device via your web browser to the location of the player apk file in the web.

The second method is to connect the phone to your computer and upload it with the ADB command. For this, the Android SDK and tools have to be installed. Please study the link below for further information about how to do this: http://developer.android.com/sdk/index.html

To load the player app via ADB, open the console terminal on your computer and type in the following:

adb install GiderosAndroidPlayer.apk

You should get a message that the player was installed on your device.

Installing the Gideros Player on iOS

For your iOS device, you need to build and sign the player application yourself. Like everything for iOS, this has to be done within XCode. Please unzip the GiderosiPhonePlayer.zip archive to a location of your choice. Start XCode and load the GiderosiPhonePlayer.xcodeproj project.

Inside XCode, browse to the resource section in the “Groups and Files” list box and there open the GiderosiPhonePlayer-Info.plist. Here you need to set the bundle identifier to the app ID you have used to create a provisioning profile in the iOS Provisioning Portal.

After you have made your changes, save it and open the project settings. There you need to set the code signing identity to the one of your provisioning profile. If it doesn’t show up, then you have forgotten to actually install it. And make sure that you set the code signing identity in the configuration you want to use when you build the player. Close the settings and then Build and Run the player. If everything was set right, you will see the icon for the player show up in your device which should look like this:

Iphoneplayer.png


PREV.: Getting Started
NEXT: Your first code