Fantastic, huge thanks for that - extremely appreciated
No problem! Hopefully it can make adding controller support to HTML5 games a little easier by reducing the amount of platform-specific events required.
Don't have an account yet? Then register once and completely free of charge and use our wide range of topics, features and great options. As a registered member on our site, you can use all functions to actively participate in community life. Write posts, open topics, upload your pictures, put your videos online, talk to other members and help us to constantly improve our project and grow together! So, what are you waiting for? Become a part of us today!
Login or registerTo get support for a technical issue such as installing the software, to query a purchase that you've made/would like to make, or anything other than using our software, please visit our Customer Service Desk:
Open a TicketFantastic, huge thanks for that - extremely appreciated
No problem! Hopefully it can make adding controller support to HTML5 games a little easier by reducing the amount of platform-specific events required.
Another gem ! Thank you tobydavis
Happy to contribute!
Hello everyone! I have modified RunLoop.js to allow the use of gampads with Fusion's joystick actions on HTML5. This modification means you can now use the Joystick 1/2/3/4 input devices similar to how you would on the Windows runtime.
This is made possible through the use of the JavaScript Gamepad API. Without this modification, the inputs for all four players are just mapped to their keyboard controls. Now, if you select Joystick 1 for a player's input, the runtime will get the input for that player from the first gamepad recognized by the Gamepad API.
Since most developers would still want to support keyboard input in addition to any joystick support, a way to detect if a gamepad is connected at runtime is required. For this, you can use the Please login to see this link. that I have just released (and also attached to this thread for convenience). There is a condition in there that allows you to check if a gamepad is connected at a specific device index (0-3).
Please login to see this attachment.
You can also use the object to get joystick input without modifying the runtime, but that would require using the object's conditions over Fusion's built in ones. If you are fine with the built in joystick actions, then the extension is only needed for detecting if a gamepad is connected, which will allow you to set the player's input device accordingly.
Just replace the RunLoop.js file in the Data\Runtime\Html5 folder inside of your Fusion installation directory with the one provided here and you are ready to go.
The Gamepad Input object's files can just be dragged into the main Fusion installation directory (the same directory the mmf2u.exe is in). You may need to accept a prompt to merge the folders before proceeding, but after that everything should copy correctly.
It is important to note that the order in which gamepads are recognized (and subsequently the index they are assigned) may not reflect the player number displayed on the controller. This seems to be a problem with the API since there is no way to get the player number assigned to a connected device.
As a compromise for this, you'll find two different zip files for download here. The regular "RunLoop.zip" enables joystick input for all 4 players, while the "RunLoop_Single_Joystick.zip" file only enables joystick input for Player 1, with all other players falling back to keyboard input automatically if they have a non-keyboard input defined for them like they do on the current unmodified runtime.
Of course you could simply assign all other players keyboard input in Fusion before exporting, but the 2nd file ensures that even if you set the input for players 2/3/4 to a joystick device with an event, it will still fall back to keyboard input. This primarily benefits projects that already have events like these, but it also reduces concern when adding those events for other platforms. Just less to worry about
Sometimes Fusion will disable certain features when running a application through the editor with F5/F7/F8 based on the build target you have selected. For HTML5, it will ignore joystick input when running in debug mode through the editor. When it is actually deployed to HTML5 Development or Final with the modification though, the joystick input will work as expected. To my knowledge, this is something that can't be changed with simple file editing. So, if you are testing inside Fusion and notice your joysticks not working, that is likely because you have the HTML5 build type selected. Just remember, it WILL work when running in the browser though.
Okay I think that's everything. Have fun everyone!
The Gamepad Input object allows access to the gamepad on HTML5 targets using the Gamepad API.
With this object, you can use the provided conditions to easily check the state of the analog sticks, D-Pad, and other buttons. The analog stick conditions function similarly to Fusion's own joystick conditions, where you are simply checking if the stick is moving in a certain direction and not its exact position value.
Please login to see this attachment.
More exact data like the analog stick's position along a specific axis is available through expressions if you'd prefer to interact with the gamepad that way though.
Version 1.0 of the Gamepad Input Object can be downloaded from its Github repo here: Please login to see this link.
You can also get it from the attachment in this thread.
Inside you will find the Data, Examples, Extensions, and Help folders which can be installed by simply dragging and dropping them into your Fusion installation directory. The documentation can be found in the GamepadInput.html file in Help\Gamepad Input.
Gamepad devices are identified by a numerical index value. This value will be provided to most conditions and expressions so it knows which device you want to interact with.
Keep in mind the index value is NOT THE SAME as the player number that may be shown on your device, which means index 0 may not always equal player 1's controller. To my knowledge, there is currently no way to identify a device using the Gamepad API based on its player number visible on the controller. This is not really a problem for singleplayer games, but may require some workarounds for local multiplayer games (see the "Local Multiplayer Workarounds" section in the documentation).
The Gamepad API waits for an interaction from a specific device before identifying it and adding to the list of accessible devices. So even if your controller is connected, it will need to send some kind of input (joystick movement, button press, etc) before being identified.
If you have a question about this object or have found a bug, please don't hesitate to let me know in this thread or reach out to me through the forum message system.
I updated the code on the Please login to see this link. so that it doesn't throw any warnings if a value fetched using $_GET is not present. You normally wouldn't see it unless you have the display_errors setting enabled for your PHP installation, which is not recommended for a live environment.
It also now parses the $host variable in config.php for a separator character to see if it contains an optional port number (like "localhost:3306") that should be used when connecting to the database. With older PHP versions, it would parse the port number automatically, but now it requires it to be declared as a specific parameter when using mysqli_connect(), hence the need for the modification to parse it out before connecting.
Display MoreHi!
I've been working on my game for many years, and recently, Google and Acronis (Static ML) have been falsely flagging my .exe file as a virus. When I use virustotal.com, 3 out of 72 security vendors flag my .exe file as a virus.
I know false positives for .exe files are a known issue. In the past, I could solve this problem by checking the "Unpacked EXE" box in the game's Windows properties. However, this no longer works. Creating a new game with no code or graphics and exporting it as an .exe file results in even more false virus flags.
I'm desperate because I want to release this game, but I don't see how that will be possible if security vendors claims my file is a virus.
I'm currently using the standard edition of Clickteam Fusion 2.5 with the 2.5+ DLC. So, my main question is this:
Is the build process different when using the Developer Upgrade DLC compared to building with the 2.5+ DLC? Or, will the build process and the resulting .exe file still be flagged as a virus?If not, I would love to hear if anyone has had the same problem, and somehow solved it.
Hello!
I do not believe the build process is different between Standard and Developer edition.
3 flags on VirusTotal isn't that bad considering how many it checks against. You should also check which antivirus providers are flagging it. If it's a lesser known brand and not something like Avira, Avast, or McAfee flagging it then I would worry even less.
I'd say go ahead and release your game. I don't think you'll ever get down to 0 flags on VirusTotal, but like I mentioned above, it is all about who is doing the flagging. Unless you see it getting flagged by the bigger AVs, then I wouldn't consider it a problem.
You can also report false flags to an antivirus provider. They usually have some mechanism for reporting things like this to them.
Thank you for your patience. I'm sorry I didn't get to this sooner. I actually managed to find a tool from Please login to see this link. that made the script conversion quite easy. I wish I knew about it when I updated the online registration tutorial a couple years ago.
The tutorial with the updated script is available here: Please login to see this link.
I tested it on my own site with the latest PHP 8.3.22 and it seems to work just fine. Everything should work as normal and no tweaks were made to the tutorial information itself, so feel free to use the original PDF and MFA file that I also included in the repository.
The new version of the script uses mysqli_ function calls instead of the deprecated mysql_ function calls that no longer work on newer versions of PHP. As long as the mysqli module is enabled for your PHP installation, then you're good.
Please do not hesitate to mention any issues you encounter.
No. I using the standard windows fonts "tahoma" and "times news Roman"
Hmm. I can confirm the problem as well. It only refuses to show up on Direct3D 11 mode. Maybe it has something to do with the auto embed feature for fonts in that graphics mode?
This not work in DX 11 mode?
When I run this exemplo in DX 8 or 9 runs normal.
But in DX 11 not show the caracters
Please login to see this attachment.
Does it work if you choose another font?
The consistent communication is absolutely appreciated! We're also getting monthly streams every 3rd Friday of the month now if I understand correctly. HYPE!
I will give it a shot and get back to you
Ok but will this work with MP3, WAV too or is it just MP4's?
MP3 and WAV are audio formats. If you need to play those you can use the "Play Sample" action. The HTML5 runtime converts all your sound effects to MP3 files upon exporting (or M4A if the lame_enc.dll is not present in data\runtime). All browsers should and play these MP3 files just fine.
As far as what video formats the HTML5 runtime supports, that will be up to the browser running the application. Most browsers will support MP4, WebM, and Ogg Theora video files. I would recommend using a MP4 file, but WebM works and is better on size as well.
I have two songs in my game (one mp3, one WAV) both converted to Active Direct Show, however when I convert my project to HTML5 Development all the sudden they don't work on browser, how to fix this?
Active Direct Show is only available for Windows platforms. In order to play videos on HTML5, you will need to use the HTML5 video object. I mentioned how to do that here: Please login to see this link.
To test web applications anyone can simply start any Chrome browser with the startup parameter --disable-web-security and drag index.html into the browser.
Please login to see this attachment.
You can also just test your HTML5 application using the Build & Run option in Fusion. This will launch a local server and open it in your browser automatically. Since it is running from a server (even a local one), the application will load correctly.
Thanks Tobydavis, but sadly it does not work here. Am I missing something obvious ? I've replaced the file in the data\runtime as suggested, and restarted Fusion. Given the ( grayed out ) "Add" effect to an active. No joy.
I'm sure I'm missing something here..
Any help would be greatly appreciated.
Just putting this here for everyone else, but we resolved this in the Click Converse. It seemed to be a problem with your specific version of Firefox (128.8.0esr). Upgrading to a newer version of Firefox resolved the issue that wasn't present on other browsers like Chrome.
That's wild, was it present in Klik & Play then?
Big time nostalgia just mentioning it
That's correct. I tested it along with another user from the Click Converse Discord, and yep, it's there in K&P.
I also did some more testing this morning and can confirm that the bug is present in the Mac, HTML5, and Android runtimes as well.
I believe the bug is likely present on the iOS runtime too, but I haven't tested it.
Amazing, 30-year old bug... Yes this will be fixed in the build 296.
I was actually wondering how far back it went last night! Kind of crazy how no one seemed to notice it and report it in all that time. Glad to hear it is being fixed for 296
Almightyzentaco (Fusion 2.5 Tutorials)
Captain Quail (Firefly Tutorials)