Toby R's Recent Forum Activity

  • There are some serious issues with recording the gameplay of C2 games exported with NWjs.

    FRAPS can't see C2 games at all. Many other video recording softwares record C2 games as blank screen, so there's the sound recorded only. I found two recorders (d3dgear and Action Mirilis) which work pretty well with C2 games, but even using those you must first launch the game and then lauch the recording software (it took me a while before I figured it out). Otherwise you will record a blank screen.

    That would not be that big deal it if was only about recirding your game's trailer, but I have recieved messages from youtubers who wanted to record a gameplay review of our game and they couldn't record it, so they quit.

    As you know youtubers are the main marketing power for indie games these days and losing them is really painful.

    Anyone knows why there are these problems with recording C2 games? And if there's a solution to fix it?

  • Hey Guys! The game has been finally released . I have updated the first post here with more info [click here to jump there].

  • > Is the simulator working for you?

    >

    Still waiting for a Yes or No.

    I already wrote how I tested my AC apps. I haven't used the simulator, just launched my game via AC site and tested on my own real devices.

  • nvbenegra You can participate as a C2 developer, but you have to understand JavaScript, HTML and CSS as well. Also you need to be familiar with how JSON and C2 Dictionary works if you want to create something more advanced.

    So because C2 and AirConsole are not fully integrated, this game jam is not for those who are new to game dev (or it's at least harder for newbies) but it's still possible.

    Regarding snippets. I spent many hours months ago to figure out how to implement those things and I would be very grateful if someone could share those snippets back then. But no one did back then so I'm doing it now to save some devs here many hours of investigation, testing and frustration.

    I really don't understand why you say "no more snippets". Please note that I am not an AirConsole or Scirra employee. I just share my experience here. If you find it useful - I'm glad. If not - well, keep investigating/searching further.

  • Yeah that's the button demo from Airconsole. It works fine tbh.

    Still, I do have this remaining question... how do I read this in c2 ?

    "message": '{"c2dictionary":true,"data":{"action":"joystick_start"}}'

    or this

    "message": '{"c2dictionary":true,"data":{"action":"joystick_move","x":' + position.x + '}}'

    If someone could explain I will try and make a tutorial video about it to share if you have no time to do so.

    You have to load it to some Dictionary and then you can read from it. Like below:

    First example is for particular player. Second is generic approach (in theory, I haven't tested this one).

  • Yes, but if I have 8 players (ambitious!) max, then with this setup I will need 8 trigger condition events. I would rather have just one and then action according to id afterwards. Unless my code above works then it'll be impossible to do any other way than with multiple triggers (because AC site says that id numbers are assigned on connection and may not be predicted).

    I'm pretty sure your generic approach will work. I use the same trick for IAP's and other plugins and it works fine. I mean that the data is already available on condition trigger and you can use it as a condition parameter.

    New challenge: You plugin developers develop a plugin that adds airconsole functionality into CS2 w/o the scripting hassle and add it to the scirra store for a reasonable value point and us non-coders will pay you back.

    Yeah would be good. It's absolutely doable. Just need to add few functions to the plugin. I almost get it working back in March when there was previous game jam. But not many people from C2 were interested in AC at all. Scirra and AirConsole didn't seem to be keen to cooperate that time as well so I dropped this experiment as I had my freelance tasks to do. But now it looks like Scirra and AirConsole finally got interest in each other so hopefully we won't need any hacks in near future and instead we'll have built-in export options and valid plugin. Fingers crossed

  • Thanks - that what I suspected too, although I haven't tested it - I was hoping that the trigger would simply return an expression for the leaving device's id, rather than you have to check for a specific id in the trigger itself. Given that these ids cannot be known beforehand, I feel like it'll make for some clumsy events (however, my caveat is I haven't actually tested it yet).

    I was looking through the plugin and noticed that DeviceIDLeft in the edittime is a number, but the returned value from the runtime is a string. Possibly an error? Or am I just misunderstanding it?

    I'm still reading through the controller setup info, but returning c2 json messages is definitely the way to go.

    You have to store the ID of each player anyway in order to handle player's actions. This id determines which action is comming from which player (and the other directions as well).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Depends on what you need.

    • Official IAP does work with non consumable products, but does not cover consumable products, also does not have "on restore purchases finished" condition.
    • Cordova IAP brought me some issues recently and I couldn't get all features working well together (consumables, non consumable, restore purchases). Also it did not trigger "on product purchase succeed" condition which obviously is a serious problem.
    • CocoonIO IAP worked perfectly from the first attempt for all features.

    So this is the state of how it worked few weeks ago. But it all changes so fast. Maybe some bugs are fixed already.

    Good Luck

  • I have a question that I hope someone might be able to answer... If a device connects, the trigger event is as I would expect. However, if a device disconnects, the trigger event asks you for the id of the device you are checking for. This seems a little recursive... Am I correct to load the trigger expression as below?

    <condition name="On device left" type="AirConsole">
                                <param name="DeviceID">AirConsole.DeviceIDLeft</param>[/code:373xg6yg]
    
    Thus the trigger will check against the device id that triggered the trigger...? 
    
    Thanks.
    
    Edit - very early stages of looking into this and I have nothing to test yet.
    

    This is a generic approach which should work I think (if it returns the correct ID - I haven't tested this one). Basically after each controller joins the screen you save "AirConsole.DeviceIDJoin" to some variable/array. Something that will become this particular player's handler.

    Then when player disconnects you may put this variable as a param of condition "On device disconnects". This way you can take proper action when a particular user diconnects.

  • I just can't believe there is a contest for C2 "devs" and there is not a propper tool kit for it. Just a link with "snippets" of information done by sombody not involved with airconsole.

    The point is that it's not a contest dedicated for C2 devs. It's more dedicated to Unity developers. Construct 2 is not ready yet to work with AirConsole by itself. There's no "export to AirConsole" option nor any good AirConsole C2 plugin. But it is still possible to make AC games using C2 + Java Script. That's why I thought it's worth to mention this game jam here.

  • There you go. I was planning to make some tutorials for C2 and AirConsole, but really can't find the time recently so hopefully some code snippets will help you a bit.

        var gameplayScreen_joystick = new Joystick("joystick", {
    
            "touchstart": function () {
                airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"joystick_start"}}'
                });
            },
    
            "touchmove": function (position) {
                rateLimiter.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"joystick_move","x":' + position.x + '}}'
    
                });
            },
    
            "touchend": function (had_direction) {
                airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"joystick_stop"}}'
                });
            },
    
            "distance": 90,
            "min_delta": 0.01
    
        });[/code:2wxqs6xm]
  • Current plugin allows only to send simple messages. The trick I'm using as you saw in my earlier post is that I'm sending a C2 Dictionary JSON as a message string. As you know you can have as many data as you want with C2 Dictionary. So basically the trick is to send all data from Controller to Screen with C2 Dict JSON and then pick it with the screen (C2 app) and load into some Dictionary. Once it's loaded you have easy access to all data you sent with JSON.

     airconsole.message(AirConsole.SCREEN, {
                    "message": '{"c2dictionary":true,"data":{"action":"player_ready"}}'
                });[/code:3d5mt2xy]
Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies