• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Advice for Rebuilding with GMS2 (HTML5)

Senyors

Member
Looking for some general advice from the GMS2 community!

I've been an avid gamer and web developer for decades, and I've spent the last ten years or so building an online text-based, persistent world RPG that leverages a variety of web-based Microsoft technologies; through a combination of VB.NET server-side programming, SQL Server stored procedures/tables, Bootstrap 4 and JavaScript, I have the game working fairly well now. The overall initiative is called "BrowserQuests" and was designed to not only allow me to run my own RPG online but let other authors build and maintain their own "campaigns" as well if they'd want to learn the browser-based tools I developed.

However, the approach I've taken has some serious drawbacks. First and foremost, the traditional web client/server model I'm using causes a one to two second delay in virtually all player input, which can be quite annoying at times. Second, the Bootstrap 4 approach to building player UI elements works but it's also rather boring. Third, the whole thing is quite complicated and hence rather fragile. Finally, the whole thing was built from scratch, so there's no community to draw help and inspiration from.

Hence, I'm thinking about rebuilding the whole thing using GMS2 and essentially applying what I've learned over the past ten years to something that would play directly within the browser while taking advantage of not just the GMS2 toolset but the community as well.

Out of the gate, I'm not sure how to handle data--my online RPG utilizes a LOT of data for tracking a myriad number of persistent elements, so I'm wondering how to go about that. For example, in my current system online, I have a complete set of developer tools that allow me to build characters, monsters, places, items, quests and much, much more (managing some 60 or so database tables). How would I go about building a similar interface to first populate records of elements I'll need for the game, including player-based persistence (so players can save their progress and return to the game later)? I'd be happy if I could simply create .csv files to support all the data, but I'm not sure where to start.

Ultimately, my intent would be to move my game to WordPress and use GMS2 to drive the entire game from a browser (and, way down the road when the game is totally finished, port it to other platforms as well). Does that seem reasonable, or might I see performance issues with building a complicated RPG for HTML5 delivery (especially one that uses music and narration elements as well)? All put another way, does anyone have any feedback for me regarding whether GMS2 would be an appropriate tool to rebuild my online browser-based RPG? I'd appreciate any feedback the community has to offer!
 

Attachments

chamaeleon

Member
The HTML5 export will use a single canvas element for the display of the game (Javascript implementing all the game functionality of course). There are no special built-in GUI elements for more complex screen designs (no dropdown boxes, no textboxes, no buttons, and so on), and you either build them yourself using sprites, drawing simple lines, rectangles, circles, and text, or you get an existing framework someone else has created from the Yoyogames marketplace, etc. Whether these things are deal breakers given the look and feel of the screenshot I'll leave up to you to decide.
 

Senyors

Member
Thank you--that's helpful. Actually, I want to get away from standard UI elements and instead go with a fantasy-themed UI I purchased elsewhere. So, definitely not a deal-breaker! Perhaps I should review the marketplace again and see what may be appropriate.

Again, the BIG question I have is how to load and save data. I'm used to working with SQL Server, but I have used MySQL before and I'd even be OK with file formats such as .csv.

Question: Should I only be looking at assets associated with the latest version of GMS2 (2.3) or will older assets still work?
 

chamaeleon

Member
Loading and saving data in a database should imply you have a server implemented in some other language, perhaps Javascript and Nodejs, maybe PHP, maybe C# (the list goes on). You would more than likely package up data as JSON on the GMS side and transmit that for storage, and receive JSON from your server. The fact that a database is involved should be completely invisible to the GMS client.

I'd suggest looking at 2.3 assets if at all possible to avoid conversion issues and lack of support if the asset is old and the developer no longer maintains it.
 

Senyors

Member
Are there data access approaches that avoid using any sort of client/server environment? I'd rather develop an application just for myself to, say, populate a file with appropriate data, then write the actual game to read from the file and store changed/updated data locally on the player's device. Does that make sense?
 

Mert

Member
Game Maker does really stay away from the system-provided frameworks like html buttons etc. You also will not work with css. Designing is pretty much the same as making a game for PC or Android.
http functions as well as websocket ones are available for you to interact with server sided things. For saving/loading data, you can use .ini functions. If you can make an extension(This is the part where you can execute javascript code and bridge them to Game Maker), you can also achieve things that Game Maker cannot capable of.

The only issue you'll face is performance. Unfortunately, Game Maker still has some issues regarding the performance, but the roadmap looks promising as the Opera(yes that web popular web browser) company bought the Yoyogames recently.

Question: Should I only be looking at assets associated with the latest version of GMS2 (2.3) or will older assets still work?
A lot of things has changed in Game Maker, 2.3 is a lot different than older versions. You'll have no issues in most of the times(+%99 I can say)
 

chamaeleon

Member
Are there data access approaches that avoid using any sort of client/server environment?
As @Mert says, you can use ini functions to read and write ini style files. You can also use file functions for reading and writing more arbitrary text, but you'll have to keep in mind that you are running within the confines of a web browser no matter what, and as such, you will need to live with its limitations on what GMS and/or your Javascript code is allowed to do. The ini file and file operations will take place using the relatively limited storage space of browser local storage (I have seen references to it being limited to anything between 100KB and some low number of MB, but I have not looked deeper into it myself). At no point should your code be allowed to do arbitrary file operations on the user's computer (for obvious security reasons, strictly enforced by the browser).
 
Top