Feature Request: Improving orxConsole on Mobile

Hi,

I was wondering if we could make the console more usable on Mobile, that would be a great help for debugging, which is already harder than it needs to be on mobile.

Right now, I have a debug button in my game that shows the console, and I can use orxKeyboard_Show() to bring the virtual keyboard up, but there are two problems:
1) The command input line stays under the virtual keyboard. Maybe we could alleviate this with a function like orxConsole_SetHeight?

2) OK, this is more of a bug report, the "Enter" key on my Samsung Galaxy Note 10.1 virtual keyboard doesn't issue the command, so basically, I have no way of "enter"ing any command.

The console is already very useful as a logging medium but it would be ten times more useful if we could also enable inputting commands.

As a side question; what do you guys use for debugging on mobile (Android in particular)? Maybe we can share some tricks.

Thanks!

Comments

  • edited December 2015
    That's an interesting timing as a week or so ago I mentioned to Lydesik my desire of writing a quick plugin for orx that would create a tiny HTTP server that would service remotely issued requests. Such as executing commands, in a first time, or even used as a remote viewer, for example.

    That being said, it doesn't have to replace being able to use the console directly on mobile. I can add a SetHeight, as you mentioned, however someone would have to check for the enter key and probably have to add keyboard support to iOS (which I can't really do, not possessing an iDevice anymore).

    For the bonus answer: I don't really debug on mobile, I use the mobile version on desktop instead. :)
  • edited December 2015
    I remember your HTTP server idea, and I think it's a great on its own and I'm looking forward to it. But as you said, the console has its own place.

    I'll look into the enter key then, and I'll also look into the virtual keyboard as soon as I start targeting iOS. Meanwhile, SetHeight will be very useful.

    BTW, on some very high DPI devices, the default console font ends up being ridiculously slow. I know I can SetFont on the console, but can I scale an existing font? Because I'd like to scale it proportional to the device's DPI. And as a relevant point, now that I'll get my hands dirty with the Android plugin, would you like me to expose a mobile-only API that returns screen information. What's the convention on platform-specific functions? Maybe just return orxNULL on desktop?

    iarwain said:
    I use the mobile version on desktop instead.
    What do you mean by that? If you mean you compile it for desktop and debug locally, yeah, I also do that. I make sure that the game works exactly the same on desktop and mobile, so that I can do 99.9% of development and debugging on desktop, but there's still this rare annoying bug that only manifests itself on mobile :/

    Thanks
  • edited December 2015
    enobayram wrote:
    BTW, on some very high DPI devices, the default console font ends up being ridiculously slow. I know I can SetFont on the console, but can I scale an existing font? Because I'd like to scale it proportional to the device's DPI. And as a relevant point, now that I'll get my hands dirty with the Android plugin, would you like me to expose a mobile-only API that returns screen information. What's the convention on platform-specific functions? Maybe just return orxNULL on desktop?

    I can add scale & (relative?) size parameters to the Console config section (there's already one for the color).
    What screen information do you plan on returning? We can already query resolution, refresh rate and color depth.
    If possible, I'd rather keep the plugin APIs as minimal and platform-agnostic as possible.
    I make sure that the game works exactly the same on desktop and mobile, so that I can do 99.9% of development and debugging on desktop, but there's still this rare annoying bug that only manifests itself on mobile :/

    That's exactly what I meant. So far, I haven't encountered many (if any) mobile-only bugs, beside plugin ones and thus not related to game logic, so I haven't had the need of game debugging utility on mobile yet.
  • edited December 2015
    iarwain wrote:
    I can add scale & (relative?) size parameters
    I guess, by scale, you mean the scale of individual characters and by size, you mean the size of the console. Then that would be great!
    What screen information do you plan on returning?
    I'm planning to return physical DPI. Basically: resolution divided by physical screen size.
    I haven't encountered many (if any) mobile-only bugs
    Well, for one thing, you may need to debug things like ad integration and in-app purchases, though most of the code for that should be written native to the mobile platform (by native I mean java for android), so I keep the Orx-side of such platform-dependent things independent of the platform. I do that by providing mock APIs on desktop. Still though, there has to be SOME code on the C/C++ side.

    The bigger issue is when you inevitably have memory corrupting bugs from time to time. They, by nature, manifest themselves very randomly, and valgrind can't always catch them.
  • edited December 2015
    enobayram wrote:
    I'm planning to return physical DPI. Basically: resolution divided by physical screen size.

    I believe that's an Android-only feature. On iOS, there's no such API, you'll have to hardcode it if you want to support it, and update it with new devices. Which is less than optimal.
    For Android, I'd suggest storing the value in the [Android] section with a key of your choice, though DPI sounds good.
    The bigger issue is when you inevitably have memory corrupting bugs from time to time. They, by nature, manifest themselves very randomly, and valgrind can't always catch them.

    I'd disagree with the "inevitably" part though. :)
Sign In or Register to comment.