Colludium's Forum Posts

  • The Browser Open URL in New Window action should open your link in a new tab (depending on your browser's settings). I don't think that opening in a new tab can be forced by Javascript if the default in the browser is set to open a new window. You can, however, force a new window to open....

    If you want to have some control over the new window that's opened then you could use the Browser.ExecuteJavascript:

    To control how new window is formatted:

    "window.open('http://www.w3schools.com/jsref/met_win_open.asp', '_blank', 'toolbar=yes,scrollbars=yes,resizable=yes,top=300,left=300,width=400,height=400');"[/code:263grg0m]
  • Problem Description

    If a camera source is requested c2 returns a fault notification if the camera height/width are not set to zero (default).

    Attach a Capx

    capx

    Description of Capx

    A user media request is made after a button press.

    Steps to Reproduce Bug

    • Run the layout, click on the sprite.

    Observed Result

    [quote:662euvkn]Javascript error!

    TypeError: can't assign to properties of (new Boolean(true)): not an object

    http://localhost:50002/UserMedia_plugin.js, line 566 (col 36)

    and

    [quote:662euvkn]Uncaught TypeError: Cannot create property 'width' on boolean 'true'

    at pluginProto.Instance.Acts.RequestCamera

    This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.

    Expected Result

    No attempt to create a width on a boolean....

    NB this does not happen if a list of media sources is requested first.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Edge: (YES)

    Operating System and Service Pack

    W10 x64

    Construct 2 Version ID

    r240 64 bit.

  • It's a limitation of the physics engine - complex rigid box2d or asm.js structures simply cannot be made using c2. However, you could create a hidden physics object and pin the ball sprites to it; if you ever want to break the joints you'd then have to create new physics objects in the correct place.

  • I have the same problem as KYATRIC. R239 successfully exports minified, R240 cannot export minified. I have tried a few versions of Java and this was consistent behaviour. I have now reinstalled 8.31 as there were some suspicions about it's compatibility with minify (W10 64 bit).

    You could probably say the same about hand-writing assembly vs. compiling code. Beyond a certain point, the difference doesn't matter any more.

    No. Otherwise Unity and UE4 devs would think native export is overrated then....?

    Html5 wrapped export will never run as efficiently as a 'native' export, in the same way that a windows / virtual machine OSX will never run as quickly or smoothly on an i5 laptop as an installed version would. Anyone who believes otherwise is simply mistaken. This is why none (I say again - none) of the major game development software suites offer just one export option that you have to wrap using third party / uncontrolled software. There be dragons if you develop that way, and it could pose a risk to the stability of your development pipeline.

    I understand scirra's reasoning for choosing html5 and I respect that choice, but the consequences are clear if you wish to develop a game for something other than google chrome. If those consequences do not bother you then clearly there is no problem. If they do then you have to either accept them and work around them, or simply move on. I think c2 is excellent for developing browser based games, but the list of wrapper-induced bugs is forever being populated by new and unexpected problems - so wrapped export will always be challenging.

    Perhaps webassembly will be the way to go (like Unity's html5 export webassembly demo) as long as your target wrapper and target hardware can run it, of course.

  • I'm afraid that browser support of gamepads is sketchy at best, and I don't see a quick fix... To the point where I fear there will always be buggy support problems like this. see here for my example....

    I only use wired gamepads...

  • Just to add that this was tested using Wifi (not 4g / 3g) to negate this potential problem. When testing with my other project the Host can see the Peer for a few seconds (peer count 2 with correct alias), but the On Peer Connected trigger does not fire before the (incomplete) connection is terminated....

  • Can you please help me confirm a possible Multiplayer bug in android chrome? These simple steps should confirm my observations:

    • Open a new c2 project and use the Multiplayer Pong example/template.
    • Change the room name to something unique (just append some digits to the default) - as if you want your players to join a specific room.
    • Export the project to somewhere that will host html5 (I know, it's now a pain - I now use updog.co which automatically syncs with a dropbox folder).
    • Run the project on desktop (localhost will do) and join your room as host.
    • Run the exported project on android chrome.
    • Observe the indications in the LogText readout.

    I am consistently seeing "Attempting to establish connection to host" and then "Kicked (either could not connect to host or host quit) in android chrome. This does not happen if I open numerous browser tabs using either localhost, the exported project link or a combination of html5 sources. The only conclusion I can come to is that this is an incompatibility between the Multiplayer plugin and android/chrome. But, just to be sure, I would appreciate some confirmation that it's not a unique glitch in my setup before I submit a bug report.

    Thanks!

  • Going back over the years there have been various threads discussing whether it is possible to record audio input from a microphone and none have contained a working solution (and that includes Pode's excellent but now deprecated plugin that used SWF).

    So, I have a simple feature request - please add the ability to record an audio input (perhaps using the User Media Object because you can already request access to the system microphone). I would like to be able to access the audio data string so it can easily be saved and manipulated by c2 events.

    Thanks.

  • Looks like it has great potential. I noticed an error, if I may point it out for you: line 205 in runtime.js is unreachable (it comes after return - I am not sure if it needs to be actioned before) - and "mcRec" should read "micRec". Thanks for putting this together.

  • If I can get a test running this weekend then I'll have a hack around in the plugin to see what's going on.

  • 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).

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • question can this plugin deal with dynamic Ai situation based. As in if the Ai is almost dead intead of being a blood thristy attacker it should start to think about defend or using a heal from an ally or an item. as oppose to when it has 100% hp it should relie on attacking.

    And what about making it a bit smarter as in if you are weak against a particular spell it should be thinking to use that but if you fully resist it as in if it use an attack and it didnt work on you the first time drop it ? and use a different number placement?

    Because often times ive seen random number to alway choose one number and its irrating as hell like choose 1 2 3. so that 30% effective choice......1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 oh hi 3 back to 1111111. you can understand this fusteration.

    This plugin will only generate a random number; the AI is for you to manage in events. Depending on the distribution profile you select, it will produce a 'loaded' random number to fit that profile. Have a look at the demo if you're not sure / I'll try to answer if you have more questions.