October 04, 2023, 05:45:24 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1] 2

Author Topic: Should we switch to GM 8.1? (2019 edition)  (Read 6010 times)

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Should we switch to GM 8.1? (2019 edition)
« on: May 28, 2019, 03:21:15 pm »

IIRC we said in the past that it might not be worth the effort, but now BlackDoomer removed that argument by simply putting in the effort and porting the game to GM8.1.

Now we can decide whether to move forward from there, or to remain on good old GM8, or even do something else (take this branch as a start to move even further to Studio, or maybe there's a way to abstract away the differences and make the code work with either GM8 or GM8.1...). To do that I'd like to collect some arguments, particularly regarding

- availability and cost (GM8 has to be pirated these days, is the same true for GM8.1?)
- performance
- compatibility (operating systems? extensions?)
- further effort (adapting existing mods)
- anything else you can think of

Thanks!
« Last Edit: May 28, 2019, 03:22:04 pm by MedO »
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

PrOF

  • Heroic Member
  • ****
  • Karma: 43
  • Offline Offline
  • Posts: 600
  • Sometimes a dev. Only sometimes
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #1 on: May 28, 2019, 04:27:01 pm »

So here's my two cents on the question:
- availability and cost (GM8 has to be pirated these days, is the same true for GM8.1?)
"8.1 has been taken off sale for years now, just use GMS 1.4 with the GM8 theme on if you miss it."

- performance
Although apparently 8.1 has (better?) hardware acceleration, I didn't find any performance difference in this thread
- compatibility (operating systems? extensions?)
No difference afaik, we'd have to test if Wine works better or worse
- further effort (adapting existing mods)
No, plugins still work (?, check how many, if any, don't) and Derpduck is smart enough to know how to upgrade or merge from Git
- anything else you can think of
Some thoughts:
-"Disabled check for argument initialization in Global Game Settings."
  ??? Why? This looks like really bad practice
-"Problems with old videocards since GM 8.1 uses the hardware-accelerated vertex processing (which brings it a major speedup). We can of course turn it off, but why?"
  It worked fine on my old Nvidia G210 (2009) on Win10 when I ported it myself about a year ago, so we're good there.
-The interface was smoother and nicer overall when I used it a year (?) ago
-"I also plan to implement the proper internationalisation support if this PR gonna be merged."
  You have my attention and an Italian translation
Logged

BlackDoomer

  • Junior Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • *batteries not included
    • Doom2D.org
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #2 on: May 29, 2019, 10:22:20 am »

take this branch as a start to move even further to Studio
That was one of the points. I would suggest to use Studio for Ubuntu and MacOS ports without plugins support, and 8.1 for the vanilla full-featured Windows version.

or maybe there's a way to abstract away the differences and make the code work with either GM8 or GM8.1
It's somewhat possible, but not easy and quite pointless, since 8.0 build will not be able to operate properly with 8.1 because of string support changes. Problems outweigh the benefits.

- performance
Much better, since the YoYo guys bringed up the hardware acceleration, fixed the main loop timing and so on.

- compatibility (operating systems? extensions?)
OS support is mostly the same as in 8.0 (at least this operates without any problems on my good old WinXP SP3). Extensions are properly supported until they begin to use something encoding-related (for example, default 'GM Windows Dialogs' which wasn't rewritten to support UTF-8, so in 8.1 it requires strings to be converted to ANSI and then back). For such cases I've created a GM8 compatibility extension, I'll upload this on my GitHub soon. BTW, port doesn't utilize it.

- further effort (adapting existing mods)
I don't think that this will require so much effort because porting the whole GM was pretty straightforward (I was able to connect and play for a while on '[EU] Parisian Paradise' right after project conversion, without making any change). The biggest problem I can imagine for now is usage of string_insert() since it wasn't adapted for UTF-8, so it's actually string_byte_insert().

- anything else you can think of
Pros are: fuckton of bugfixes; UTF-8 so we can implement langpacks (I had invented an amazingly good pattern for this); full text search in the IDE; more common codebase with possible Studio 1.4.9999 port (I pretty doubt that Studio 2 will be suitable).
Cons are: annoying bug about invalid runner data in the IDE (I made a .cmd that restores the original and placed it in Start Menu) and possible runner bugs (although I've managed to fix a big part of them using the surface_free() trick, some of them may be in other places).

I also would suggest to examine the official Release Notes for the 8.1.x version branch.
http://www.gamemaker.cc/archive/gm4win_release-notes.html

Although apparently 8.1 has (better?) hardware acceleration, I didn't find any performance difference in this thread
This is a very lightweight example actually.

Some thoughts:
-"Disabled check for argument initialization in Global Game Settings."
  ??? Why? This looks like really bad practice
It's temporarily (I hope) and just for porting purposes. Also some plugins may rely on this.

Logged
Oh my God, who touch Sasha?! (c) Heavy
www.doom2d.org - Doom 2D, one of the best 2D-games in the world

LOL U MAD

BlackDoomer

  • Junior Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • *batteries not included
    • Doom2D.org
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #3 on: May 31, 2019, 07:23:35 am »

PrOF told me that registry access won't work in 8.1.141 runner. I've determined that it fails due to lack of admin rights.
This is a Delphi 2010 RTL problem: the TRegistry class requests read/write access by default, and GM doesn't notice that.
So I've workarounded this using byte-patching of runner EXE in memory at run-time. Maybe a bit hacky, but it's a simple solution that works.
The code for that is implemented in my extension for GM8 compatibility, so GG2 now uses it.

https://github.com/Gang-Garrison-2/Gang-Garrison-2/pull/242/commits/7a31ced6c68daa46338cc7fddd937c2c03173478
https://github.com/Gang-Garrison-2/Gang-Garrison-2/pull/242/commits/79c6383f6943f226083726b5fcd9e1a696706aa7
Logged
Oh my God, who touch Sasha?! (c) Heavy
www.doom2d.org - Doom 2D, one of the best 2D-games in the world

LOL U MAD

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #4 on: May 31, 2019, 03:11:39 pm »

Great work, and pretty awful that this doesn't work by default :(
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12699
  • Another one --
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #5 on: May 31, 2019, 08:22:00 pm »

Could always use our own registry extension.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

BlackDoomer

  • Junior Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • *batteries not included
    • Doom2D.org
Logged
Oh my God, who touch Sasha?! (c) Heavy
www.doom2d.org - Doom 2D, one of the best 2D-games in the world

LOL U MAD

ajf

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3493
  • she's never quite as dead as you think
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #7 on: July 28, 2020, 02:48:52 am »

Some thoughts:
-"Disabled check for argument initialization in Global Game Settings."
  ??? Why? This looks like really bad practice
It's temporarily (I hope) and just for porting purposes. Also some plugins may rely on this.
I wrote several Scripts that made use of that behaviour in GM8.0 to have optional arguments. I hope GM8.1 provides a cleaner way to do it if it insists on breaking it?
Logged
did you know that spinning stars work like this???

I've seen things you people wouldn't believe. execute_strings on fire off the shoulder of Overmars. I watched object-beams glitter in the dark near the room_goto_fix. All those moments will be lost in time, like tears...in...rain. Time to die.

BlackDoomer

  • Junior Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • *batteries not included
    • Doom2D.org
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #8 on: July 28, 2020, 03:04:10 am »

I wrote several Scripts that made use of that behaviour in GM8.0 to have optional arguments. I hope GM8.1 provides a cleaner way to do it if it insists on breaking it?
It actually does. Now there's argument_count variable available which tellls how many arguments were passed to script.
GM 8.1 determines the number of required arguments by parsing occurencies of argument0..argument15 variables.
If you want to use optional arguments, you should access them as argument[0]..argument[15] instead.
Logged
Oh my God, who touch Sasha?! (c) Heavy
www.doom2d.org - Doom 2D, one of the best 2D-games in the world

LOL U MAD

ajf

  • (Ex-?)Developer and forum/web admin
  • *****
  • Karma: 7
  • Offline Offline
  • Posts: 3493
  • she's never quite as dead as you think
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #9 on: July 28, 2020, 04:06:28 pm »

I wrote several Scripts that made use of that behaviour in GM8.0 to have optional arguments. I hope GM8.1 provides a cleaner way to do it if it insists on breaking it?
It actually does. Now there's argument_count variable available which tellls how many arguments were passed to script.
GM 8.1 determines the number of required arguments by parsing occurencies of argument0..argument15 variables.
If you want to use optional arguments, you should access them as argument[0]..argument[15] instead.
:woot:
Logged
did you know that spinning stars work like this???

I've seen things you people wouldn't believe. execute_strings on fire off the shoulder of Overmars. I watched object-beams glitter in the dark near the room_goto_fix. All those moments will be lost in time, like tears...in...rain. Time to die.

BlackDoomer

  • Junior Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • *batteries not included
    • Doom2D.org
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #10 on: January 28, 2021, 12:11:21 am »

BTW I would also propose to use this pretty thing:
https://github.com/skyfloogle/gm8x_fix
Logged
Oh my God, who touch Sasha?! (c) Heavy
www.doom2d.org - Doom 2D, one of the best 2D-games in the world

LOL U MAD

PrOF

  • Heroic Member
  • ****
  • Karma: 43
  • Offline Offline
  • Posts: 600
  • Sometimes a dev. Only sometimes
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #11 on: January 28, 2021, 02:38:13 am »

BTW I would also propose to use this pretty thing:
https://github.com/skyfloogle/gm8x_fix
Yeah I remember seeing that a long time ago, it'd be great even with the GM8 version.
Iirc I even sent it to MedO but (still, iirc) he wasn't sure about security.
Logged

BlackDoomer

  • Junior Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • *batteries not included
    • Doom2D.org
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #12 on: January 28, 2021, 02:48:24 am »

Iirc I even sent it to MedO but (still, iirc) he wasn't sure about security.
Well, this is developed by guys with whom we develop the gm8emulator.
We're on the same discord so I can ask them to add some comments on assembler bytes.
Logged
Oh my God, who touch Sasha?! (c) Heavy
www.doom2d.org - Doom 2D, one of the best 2D-games in the world

LOL U MAD

PrOF

  • Heroic Member
  • ****
  • Karma: 43
  • Offline Offline
  • Posts: 600
  • Sometimes a dev. Only sometimes
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #13 on: January 28, 2021, 02:53:07 am »

Well, this is developed by guys with whom we develop the gm8emulator.
We're on the same discord so I can ask them to add some comments on assembler bytes.
If it gets us to use it on GG2 then it'd be great.
Maybe wait on a comment by MedO?
Logged

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Should we switch to GM 8.1? (2019 edition)
« Reply #14 on: February 02, 2021, 03:48:56 pm »

I'm not sure how serious to be about the security aspect, after all we all use free software tools and libraries all day every day without looking more deeply into them. On the other hand, straight up injecting binary code we don't see the source for into our game feels a bit iffy :)

If you know the guys who made this that helps me a lot to feel better about it, and I'd appreciate having these fixes.
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.
Pages: [1] 2
 

Page created in 0.044 seconds with 36 queries.