Jump to content


Photo

[V0.1] Gmmodular - Submodules For Gm (All Assets!)


  • Please log in to reply
17 replies to this topic

#1 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 17 April 2014 - 08:29 PM

Hi guys,

I've been kind of irritated by the fact that GM has no real good support for merging / managing multiple modules in 1 project (see topic). The moment I really missed this, was when I tried to combine GMHydra and GMOculus.

Now, a few things I really wanted:

- Use version control
- Combine submodules using version control, or something like composer.
- Update a submodule idependently from the main project
- Remove / add submodules without hassle
- Use all the submodule assets in my project (constants, sprites, shaders, scripts) - WHILE maintaining the whole directory structure (you've ever exported / imported 1000 scripts? Yeah.)

- Make it recursive! (modules in modules in modules in modules in modules....)

- Make it portable. People shouldn't need the application to use the generated game files!

So, I've been working on my very own (open sourced) version of submodule support in game-maker that accomplishes all the above statements. I've tried VB first, but that was kinda crappy. I'm rather good with PHP, so decided to make a CLI app in PHP. This has a few advantages but also some disadvantages... But lets skip that for now, on to the features!

Combine all your projects';

  • Sprites
  • Sounds
  • Backgrounds
  • Paths
  • Scripts
  • Shaders
  • Fonts
  • Time lines
  • Objects
  • Rooms
  • Included Files
  • Constants

While keeping the structure of your submodule, and the ability to install, uninstall, and synchronize your game.

PLEASE NOTE: This is an early development version. Allthough it works, there might be a lot of bugs involved. ALSO: This version only supports GM:S! Sorry.

Also check the warning at the bottom of the page!

 

Video demo:

https://www.youtube....h?v=QWOPJRAP4Kg

Screenshots:

Spoiler

 

 

 
Source code
Repository on GitHub (includes readme)

Installation of GMModular

Spoiler

 

Adding submodules

Spoiler


How does this work?

Spoiler

Making modules

Spoiler

Notes

Spoiler

To do

I'll try to keep the todo list up to date in the github repository -> https://github.com/R...MModular/issues

Find an issue? Report it there. Want to fix an issue? Fork the software, try to fix it, and create a pull-request. Your help will be greatly appreciated!

BE WARNED
As this script edits your main project, just be sure to ALWAYS HAVE A BACKUP. This software creates a backup once it writes to the project file, but may MESS UP AND/OR DELETE GAME ASSETS. Using version control software is the best way. The other way is to copy your project to DropBox, USB, DVD, CD, 3,5" floppies, Tape, ZIP-Drive... or whatever you'd like.
Just be aware that this script MAY NOT be fault-proof and MAY mess up your project. May this ever happen, please leave an issue in the issuetracker. Just for you americans out there: I can not be held responsible for any damage done to your project or PC or peripheral devices or your cat, maybe your mom or that one weird guy that you sometimes see at the mall, by this software.


Edited by blackhawkrobbo, 19 April 2014 - 04:12 PM.

  • 10

#2 Tirous

Tirous

    GMC Member

  • GMC Member
  • 640 posts
  • Version:GM:Studio

Posted 17 April 2014 - 08:38 PM

does this work with gm 8.1 or just studio?


  • 0

#3 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 17 April 2014 - 08:40 PM

Sorry, this only supports GM:S. Maybe someone wants to build support for GM8.1, but I honestly think thats a sinking ship. (it was a pretty one though)

 

----

 

I'm very sorry that its not complete yet. A few things that i want to add are;

 

Automatic prefixing for modules (also variable names etc.)

Complete module packages in a central repository (kind of like composer)

Obfuscation of modules (if you'd like)

Generally make it bugless.

 

I just have so little time... Thats why I released this now. I hope some other GM/PHP nerds want to help out!


Edited by blackhawkrobbo, 17 April 2014 - 08:47 PM.

  • 0

#4 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 17 April 2014 - 09:15 PM

This will help a lot when I want to incorporate multiple sources. I could have used this ages ago.


  • 0

LD-Logo-sml.png


#5 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 18 April 2014 - 08:40 AM

Exactly! You can now easiliy add good expansion to your project. I'll try to make a demo video soon!
  • 0

#6 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 19 April 2014 - 04:00 PM

Here is a video explaining GMModular

https://www.youtube....eature=youtu.be


  • 0

#7 slayer 64

slayer 64

    Slayer of gingers

  • GMC Member
  • 4301 posts
  • Version:GM:Studio

Posted 19 April 2014 - 04:54 PM

wouldn't it be easier and less messy to put GMOculus into an extension package (gex) than to use this?
  • 0

5y5rs3d.pngfg0UQNL.png


#8 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 19 April 2014 - 07:47 PM

The current version of GM:S supports extensions.. As in DLL, JS files, some functions and variables. And thats it. No rooms, no objects, no shaders, no sprites, no timelines, no paths, nothing! So this basically fixes that shortcoming - and i also think that this is much better to use combined with git;

 

$ cd ~/project/Mygame.gmx
$ git submodule add git://github.com/RobQuistNL/GMOculus.git submodules/gmoculus.gmx
$ cd submodules/gmoculus.gmx
$ git checkout release/2.1-beta

 

Boom, you've added the GMOculus project and are using a beta version of the latest 2.0.

 

$ git checkout release/1.2-stable

Boom, you're using the stable version.

 

$ git checkout release/1.3-stable
$ ./gmmodular.php . --sync

Boom, you're on 1.3 and your game now uses the 1.3 version
  • 0

#9 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 2026 posts
  • Version:GM:Studio

Posted 21 April 2014 - 04:26 AM

I think this work may soon become obsolete with version 1.4.  It is my understanding that they are coding in a way that extension will be able to include many things, like sounds, objects, etc...  This is in preparation for the extension store that they have coming also in version 1.4.  At least this is my understanding of what is coming.


  • 0

My KBInput system is now on the marketplace here.  It wraps up nice and tight GMStudio's input system into a few function calls making a user configurable input system that works the same regardless of what inputs the player has chosen including keyboard, mouse buttons, and gamepad/joysticks using DInput/XInput.  The support forum topic for it is here.


#10 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 21 April 2014 - 12:57 PM

When i asked about it it wasn't sure when or if this was coming. So i made this. :)


  • 0

#11 paul23

paul23

    GMC Member

  • Global Moderators
  • 4147 posts
  • Version:GM:Studio

Posted 21 April 2014 - 04:58 PM

Hmm this is quite nice, I'm wondering though; could this be extended so you can make "self-unpacking extensions"?
  • 0

#12 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 21 April 2014 - 07:54 PM

Yep, this would be an addition that i would like to work on. Its actually not hard at all.. You can simply zip up a project and unzip it in GMModular. Supporting self-unpacking extensions is like 2% of the work that has been done now.. :P


  • 0

#13 Rani_sputnik

Rani_sputnik

    GMC Member

  • GMC Member
  • 482 posts
  • Version:GM:Studio

Posted 22 April 2014 - 09:06 PM

This is fantastic! Especially given the limitations of extensions.

 

I really hope this is only necessary as a short-term solution, this should really be natively supported by GameMaker.

 

So I think this has already been answered in your video, but if I am developing a library there are only two things I need to worry about.

  • Prefix modules names to avoid clashes
  • Keep all constants in All Configurations

Is this correct?

 

Once again, great tool blackhawk, many thanks.


  • 0

My games - In DecemberBoy Goes to Space

Utilities & Extensions - FloxGM, Destroyable Terrain

Check out my website: ryanloader.me, or follow me: twitter.com/RaniSputnik


#14 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 23 April 2014 - 12:35 PM

This is fantastic! Especially given the limitations of extensions.
 
I really hope this is only necessary as a short-term solution, this should really be natively supported by GameMaker.
 
So I think this has already been answered in your video, but if I am developing a library there are only two things I need to worry about.

  • Prefix modules names to avoid clashes
  • Keep all constants in All Configurations
Is this correct?
 
Once again, great tool blackhawk, many thanks.


Very nice to hear that, thanks!

And yes - you should prefix all asset names (sprites, sounds, scripts etc.), prefix the constants (in All Configurations), and preferably even prefix the included files.

I might be able to change this lateron (while installing) but that would mean changing code, and thats gonna be a little difficult / problematic.

As for now, i sugest that all your variables (especially global ones) use prefixed names;

gmo_spr_mysprite
global.gmo_setting_one;
GMO_CONSTANT = 2
gmo_scr_getValue
gmo_obj_myObject

  • 0

#15 Mr. R

Mr. R

    The Great One

  • Banned Users
  • 1031 posts
  • Version:Unknown

Posted 24 April 2014 - 03:51 AM

Aw man, PHP.

I would have really hoped for something else.

 

Does this also extract resources from a GMK file by any chance?

I can't use LateralGM to save sprites and backgrounds to a file yet.


Account closed on request.


#16 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 24 April 2014 - 07:11 PM

Aw man, PHP.
I would have really hoped for something else.

Whats wrong with PHP? Its crossplatform, and i know it very well.

Does this also extract resources from a GMK file by any chance?
I can't use LateralGM to save sprites and backgrounds to a file yet.

Nope. This only works with GMX files.
  • 0

#17 Slammin Sam

Slammin Sam

    I craft juicy things

  • GMC Member
  • 854 posts
  • Version:GM:Studio

Posted 02 June 2015 - 11:57 PM

INCREDIBLE! 


  • 0

Nothing to see here...move along


#18 blackhawkrobbo

blackhawkrobbo

    GMC Member

  • GMC Member
  • 1121 posts
  • Version:GM:Studio

Posted 03 June 2015 - 09:27 AM

Thanks, too bad there's not that much interest in it :/

This functionality is what the marketplace should support.
  • 2