• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

javascript

  1. GameKiller

    How to Control an HTML5 Exported Game in GameMaker Studio 2 with External JavaScript?

    Hello everyone, I'm currently using GameMaker Studio 2 to create an HTML5 game, and I'm looking to control certain in-game functionalities through external JavaScript code. Specifically, I'd like to know how to call functions within the game, such as jump(), using JavaScript. I've successfully...
  2. S

    HTML5 How to ignore async errors from HTML5 extension

    Hi. I'm trying to write an extension for the HTML5 build. I am connecting the SDK of a third-party platform and do not have access to the source code. I can call their functions. Some functions are executed async and may return an error during execution. throw new Error("error_text"); The game...
  3. K

    (Beta) Rollback crashes, tells me to check the JavaScript console

    ...So here it is I have a set up of a basic project where each player moves the colored squares and the white ones just move from top to bottom, no collision Most of the times, when performing a local test Player 1 (i.e. the second) crashes and throws this message: These are all of the...
  4. Bingdom

    Asset - Scripts JS Arrays

    Github Marketplace JS Arrays is a small free library that aims to extend native array functions to provide identical functionality to JS arrays. Some useful examples array_map() // Creates a new array that contains just the names of items var items = [{ name: "Sword", type: TYPE.melee }...
  5. S

    HTML5 Typing into the console on html5 export pauses/crashes the game even in a blank project

    Hello, I noticed lately that if you type into the console (not even pressing enter just typing in the console) the game stops working and it shows this: as you can see it says paused in the debugger and I can press the little play button to resume but that crashes the game. This project has...
  6. L

    SOLVED Playtesting on Opera GX target results in FS error in JavaScript console

    Whenever I attempt to playtest my game on Opera GX (by selecting the Opera GX target using Game Maker Studio 2.3), a screen appears with a loading wheel that says "All Downloads Complete". When I open the JavaScript console, the following appears: Things I have tried: Turning off anti-virus...
  7. L

    Get Result of Async / Promise from JavaScript in Gamemaker

    I'm trying to get an result from a fetch in gamemaker. I have a client.js file with the following code: async function getMap(id) { const data = await fetch(`http://localhost:3000/map/${id}`) const map = await data.json() return map } /* Maps looks like this: { id: 1, name...
  8. G

    .js file in HTML extension not loading

    Hello everybody, I'm trying to extend derme302's great three.js wrapper for HTML 3d (https://github.com/derme302/gms-j3d) with a function to import .gltf files. I've put this code: // J3D GLTF LOAD import { GLTFLoader } from 'GLTFLoader.js'; function j3d_gltf_load(pathToModel, scene) {...
  9. A

    HTML5 About Saving Data in Html5 Version

    Hi, I am developing a game for pc but i want to make a web version to publish on itch.io but i guess i can't access ini files in web version, how can i solve this issue in web version. Edit: I posted this in the wrong place, please move it to the right place.
  10. angelwire

    Job Offer - Programmer Looking for experienced HTML5 developer to help fix bugs [Paid]

    I've developed an HTML5 game targeting mobile web browsers. The game is essentially complete, but there are issues with the game crashing while running on iOS web browsers. I cannot solve the issues due to personal time constraints. I'm looking to hire someone who has experience with...
  11. jobjorgos

    Legacy GM How to send variable over from GM to online Javascript file with 'http_post_string'?

    I need instance variable online_players to be send over from GameMaker to players.js on my website Too bad with the code below there has not anything been updated yet in the players.js file. Alarm[0] Event: http_post_string("http://example.com/***/***/players.js"...
  12. Vlad_

    SOLVED How do I change the standard load screen in HTML5 game?

    Greetings to all. I'm developing a game in HTML5. How can I change this standard loading screen? I have already created a simple JS extension to update the page. And I noticed that the extension works from the very beginning of the game until it loads. I got an idea to make a JS extension that...
  13. D

    GameMaker [SOLVED] Hiding an object in a room

    I thought this would be so simple but I can't figure it out. I've got an object that I've placed in a room. Not with a script, just plopped it into a room. How do I reference it? How do I get its index? I just want to hide the object by clicking on another object, using...
  14. Drell

    Legacy GM HTML5 Download Image

    I'm developing a board game that encompasses deck building, so I've built a deck builder which uses surface_save to create printable pages to test out different deck builds. Because some of my team uses Macs (and I don't have one), I'm trying out using an HTML5 build to be used across systems...
  15. S

    HTML5 Replace/Extend index.html to allow Fullscreen. Also, Retina Support

    I am new to game maker, but we just switched to it for an html5 web game project. Maybe still having trouble navigating the documentation, and couldn't resolve these issues: My HTML5 game should run both on Desktop and Mobile Browsers and have the option to go full screen. Now, I've been...
  16. F

    HTML5 javascript native drawing functions on a GML surface

    Is there a way to use the native javascript drawing functions in a GML surface? I am creating an on-screen drawing game and I would like to be able to use the native javascript functions to draw, since the stroke and performance are perfect ... if I had to implement a drawing algorithm with...
  17. Xalezar

    GML [SOLVED] Is it possible to execute javascript dynamically through GML?

    For example, say when the player clicks on a button in my HTML5 game, is it possible to execute a javascript function at that point in time?
  18. D

    HTML5 Readable meta comments and strings in .js file

    I just realized the 'gamename.js' file exported with the HTML5 build doesn't strip out meta comments (like ///@description, ///@param, etc) and it doesn't obfuscate strings in general, leaving a lot of readable content like resource names, logs, translations, urls, and other potential sensible...
  19. R

    Small tool to create a tile sheet from an image

    TL;DR: I made a small script that takes a grid-based image as a parameter and creates a tile sheet, getting rid of all duplicated tiles. I am more of a designer I guess, so when I am working on tile-based games, I often work directly in Photoshop, copying and pasting tiles when they already...
  20. A

    HTML5 JavaScript errors when testing HTML5

    Hi All! I've just started trying out HTML5 testing, and I'm having a bit of trouble... When I launch my game, in the browser, a loading screen shows up, but then the screen goes blank. The debug looks normal, however, the browser console displays the same error, repeatedly and indefinitely...
Top