Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
iCade support — Gideros Forum

iCade support

MagnusviriMagnusviri Member
edited February 2012 in Game & application design
Since Gideros is focused on games I think iCade support would be great. I don't have one yet but thought it shouldn't be too hard to add to games. Here is the documentation on it.

http://www.ionaudio.com/downloads/iCade_Dev_Resource_v1.3.pdf

Comments

  • atilimatilim Maintainer
    Hi,

    Although not soon, we're planning to support iCade through plugins.
  • I have an iCade now. I submitted a feature request for iCade support. I don't anticipate actually releasing a game any time soon (I'm busy learning and writing a book--and to release a game I'd need a virtual joystick and I don't care one bit about making one of those since I've never used one I liked--which is why I have an iCade...).

    However, I kinda don't know if I can wait. I really want to play with it now. I'm hoping someone (@Caroline or @MikeHart) can help me turn this into a plugin. I totally understand the how this all works on the Cocoa side, I just have no idea how to turn this into a plugin. I looked at the UIKit plugin and I see a lot of Cocoa and C++ and I haven't touched C++ in 12 years (and I only barely learned it)...

    https://github.com/scarnie/iCade-iOS
    https://github.com/scarnie/iCade-iOS/blob/master/README.md

    The source code:
    https://github.com/scarnie/iCade-iOS/tree/master/iCadeTest/iCade

    I'm thinking I probably want to create an iCadePlugin.mm file and import iCadeState.h and iCadeReaderView.h into it. I should probably import uikit.mm as well, but I'm not sure if I should import it or just duplicate some of the functions (the view class and addToRootView/removeFromRootView).

    Following the example of uikit.mm I probably want to create a C++ class iCadeReaderViewBinder and a Obj-C class iCadeReaderViewDelegate.

    iCadeReaderViewBinder will have setActive() and iCadeState().

    iCadeReaderViewDelegate will generate events stateChanged(), buttonUp(), and buttonDown(). It will add a field for the button/joystick that generated the event (or it could be one event, I don't know the performance implications of 3 vs 1 event). I also need to add the iCadeReaderView to the stage.

    Ok, I think I know generally what to do, but I really have no idea how to write the code. I understand the idea of the Lua stack but there so many things in the uikit.mm file that I don't understand at all. I haven't studied Lua's C bridge (but I generally get it) but worse is that I really don't know C++ anymore and I'm guessing what I don't undrestand in uikit.mm is C++ stuff.

    Can anyone help me figure this out? I don't really want to make plugins (althought I think it's a useful skill), I really want to get the iCade working...
  • I don't know quite what to say - I would find it very hard coding that blind (ie without an iCade), and it's not an easy plugin to start on.

    (P.S. I don't know C++ either - I keep trying to re-write plugins using C and Objective C instead :) )

    You could try cutting down uikit.mm to practically nothing and see how it's put together - ie take out UISwitch, UILabel, UIeverything apart from UIView, and if it still works, try and follow it through. Then put back in UILabel and see how that works.

    If you understood the construct, I don't think you would need to actually use uikit, but only your own iCade one.
  • ZoytZoyt Member
    Taking a shot in the dark - If you get input from a keyboard, the iCade acts as a Bluetooth keyboard. It gives you multiple key codes for different buttons. You might play around with that. I have a demo of it in Codea. I'll try and change it up for Gideros Mobile. Let me know the results.
Sign In or Register to comment.