Author Topic: I Wanna Be The GMS2 Engine YoYoYo Edition  (Read 6964 times)

YoYoYoDude1

  • Wannabe
  • Posts: 35
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 55.0.2883.87 Chrome 55.0.2883.87
    • View Profile
  • Playstyle: Keyboard
I Wanna Be The GMS2 Engine YoYoYo Edition
« on: December 23, 2016, 03:32:28 PM »
Hey guys!
GameMaker Studio 2 is currently in beta and has a bunch of new features and improvements, so I decided to start making a new fangame engine for it in case people wanted to give GMS2 a try. Keep in mind this is an early version of the engine that is missing a few features I'm planning on adding and that the current engine requires the full version of GMS2.

About
  • This is an engine specifically made for GameMaker Studio 2 with everything revised to work with the new features.
  • This engine assumes you have a reasonable amount of experience with GameMaker and requires basic GML knowledge for things like playing music.
  • This version of the engine requires the full version of GMS2 and will not work with the trial.

Features
  • Works the same as other standard engines, with cleaner code and various bugs like dying through platforms fixed
  • Includes a main menu system with file select and options menus
  • Includes gravity flipping, vines, jump refreshers, and other frequently used gimmicky objects
  • Includes slopes that support any shape
  • Includes native controller support
  • Built-in save verification system with MD5 hash checks to make saves harder to hack
  • Mute/unmute music with Ctrl+M
  • Stretchable window size
  • Pause screen that shows deaths/time with volume controls
  • Includes toggleable debug keys ("Tab" to drag player to mouse, "Backspace" to toggle debug overlay, "Ins" to save, "Del" to toggle showing the hitbox, "Home" to toggle god mode, "End" to toggle infinite jump, "Page Up" to go to next room, "Page Down" to go to previous room)
  • Several engine options for things you might want to customize for your game (such as enabling/disabling death music) in the "scrInitEngineOptions" script

Important notes
  • To set what music you want a room to play, change the "scrGetMusic" script. If you want something to stop music, use the "scrStopMusic" script.
  • Make sure when making new rooms that they all include "World" and "Player" layers as there are objects that require these layers to exist.
  • A template room with all of the correct layer and view settings is included which can be duplicated and modified.
  • If you're using slopes, it's possible that certain gimmicks such as ice blocks might not work properly with them because of how they're coded.
  • Because of how GMS2 saves files, all game saves are stored in "%localappdata%\<GameName>" instead of inside the folder where the game is located. Therefore, it is very important to change your game/project name to something unique before releasing your game to ensure there aren't save conflicts with other games.
  • Make sure to set the "global.debugMode" variable in the "scrInitEngineOptions" script to "false" before releasing your game, otherwise debug keys will still work.
  • Make sure to set the "MD5_STR_ADD" string in the "scrInitEngineOptions" script to something unique to your game to make saves harder to modify. This can be set to anything you want it to be, but it should be pretty hard to predict as it's kind of similar to a password.
  • When creating new objects, the order of the objects in the Objects list matters for collision/event order. Therefore, when making new objects try to keep the type of object in the corresponding folder to prevent collision issues (ie put block objects in the Blocks folder, player killers in the Killers folder, etc).
  • This version of the engine was made and tested in GMS2 v2.0.5.76. If you are using a different version of GMS2, there could be potential bugs as they sometimes tweak how things work in certain versions.

Special thanks
  • yuuutu for creating the fangame engine this engine was originally based off of
  • Patrick for giving a lot of feedback on engine structure and features

To-do list
  • Moveable blocks
  • Shader example
  • GMS2 trial compatible version of engine
  • Lite version

Download
I Wanna Be The GMS2 Engine YoYoYo Edition v0.9
GitHub repository

Changelog:
Code: [Select]
v0.9 (03/08/17):
-Updated project to GMS2 v2.0.5.76
-Tweaked main menu cursor so that it stays in the same place after switching between different menus
-Some minor tweaks/fixes

v0.8 (12/23/15):
-Initial public release
« Last Edit: March 09, 2017, 02:17:40 AM by YoYoYoDude1 »

Jmannorway

  • Wannabe
  • Posts: 7
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 52.0 Firefox 52.0
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #1 on: April 07, 2017, 11:14:16 AM »
Siiick, I'll try it out.

Jmannorway

  • Wannabe
  • Posts: 7
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #2 on: June 10, 2017, 07:07:38 AM »
Bug?


Zero-G

  • [+--oo]
  • Alumi
  • Spike Dodger
  • Administrator
  • Posts: 167
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 58.0.3029.110 Chrome 58.0.3029.110
    • View Profile
    • My twitch channel
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #3 on: June 10, 2017, 08:51:46 AM »

Jmannorway

  • Wannabe
  • Posts: 7
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #4 on: June 10, 2017, 04:57:21 PM »


Dear mr. Zero. I know people sometimes do some obvious dumb shit without even realizing it but, when these things happen, can you actually explain things instead of just being a dick? big thank

YoYoYoDude1

  • Wannabe
  • Posts: 35
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 58.0.3029.110 Chrome 58.0.3029.110
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #5 on: June 11, 2017, 04:51:30 AM »
Yes, the top of the Kid's jumping sprite peeks outside of the hitbox by a couple pixels. It's like that in pretty much every fangame engine as far as I'm aware.
Not really a bug, more of a weird visual design decision since the jumping sprite is longer than the hitbox itself.

Jmannorway

  • Wannabe
  • Posts: 7
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #6 on: June 11, 2017, 05:52:24 AM »
Yes, the top of the Kid's jumping sprite peeks outside of the hitbox by a couple pixels. It's like that in pretty much every fangame engine as far as I'm aware.
Not really a bug, more of a weird visual design decision since the jumping sprite is longer than the hitbox itself.

Hi YoYo o/

Thanks, that makes sense.

ViTheGhost

  • Wannabe
  • Posts: 7
  • egg
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 64.0.3282.121 Chrome 64.0.3282.121
    • View Profile
    • strim
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #7 on: February 02, 2018, 08:47:56 AM »
Sorry to necro a thread.

For some reason, when I try using this engine, it runs way faster than other fangames. The room speed is 100% set to 50. I've tested it at various other room speeds, 30, 40 and 49. They all function as they should. However, fifty, for whatever reason, is a bit faster. You can see it being demonstrated in this gif


I've spent a lot of time trying to figure this out, but nothing seems to work. I've tried setting the room_speed through code, setting vsync to true instead of false, and using game_set_speed. I have a sneaking suspicion it's a fault of GameMaker and not Yoyo's engine.

The closest I've gotten to a fix is using
Code: [Select]
game_set_speed(49.9999999,gamespeed_fps) in the Game Start event. But you can probably tell a very slight difference. If anyone has any idea how to solve this, I'll kiss you on the mouth :)

EDIT: The gif really doesn't show it off very well. It's a lot more noticeable when you're playing it. The jumps feel a lot heavier and more precise.
« Last Edit: February 02, 2018, 08:53:08 AM by ViTheGhost »
egg

WetWookie

  • Cherry Eater
  • Posts: 90
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Firefox 58.0 Firefox 58.0
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #8 on: February 02, 2018, 06:41:04 PM »
If you draw the FPS to the screen, what number gets displayed?

ViTheGhost

  • Wannabe
  • Posts: 7
  • egg
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 64.0.3282.121 Chrome 64.0.3282.121
    • View Profile
    • strim
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #9 on: February 04, 2018, 02:14:28 PM »
If you draw the FPS to the screen, what number gets displayed?

For whatever reason it fluctuates between 58-63. Very strange.
egg

HAEGOE

  • Spike Dodger
  • Posts: 101
  • Why the *beep* they're not in puyo tetris?????????
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 68.0.3440.106 Chrome 68.0.3440.106
    • View Profile
  • Playstyle: Keyboard
Re: I Wanna Be The GMS2 Engine YoYoYo Edition
« Reply #10 on: September 08, 2018, 03:52:16 AM »
I ran into a problem that makes character get stuck sometimes.
luckily it was shallow enough to jump out and something I could fix myself, but I think you'll have to change the scrSaveGame script a bit.


Quote
    global.savePlayerX = objPlayer.x;   
    global.savePlayerY = objPlayer.y;
to     
Quote
    global.savePlayerX = objPlayer.x-objPlayer.hspeed;   
    global.savePlayerY = objPlayer.y-objPlayer.vspeed;
I think it's the savePlayerX/Y somehow gets objPlayer's x and y position with its speed added.
a.k.a. tasteisgone
pronounciaton of HAEGOE is HAEGWE, not HAEGO.

I MAEK MBOILE GEAMS!
https://play.google.com/store/apps/details?id=com.Haegoe.MostPop