Stabyourself.net Game/Mod Loader

Feel free to showcase your own projects!
User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 12 May 2013, 05:10

Story:
Is it possible to create a "game" where when you load it up, you can choose a Stabyourself.net game?
Like for example, you have all the game files inside the .love in their own folders, like "mari0", "nottetris2", "orthorobot", etc., and when you open the .love, there is a GUI menu that allows you to choose a game.
Now, this kind of sounds dumb, but, it would be useful if you have multiple mods for games that you don't want to keep searching for.
Ok, so I'll show a image as an example of this all.
Image
Don't mind the squiggly white outline.
Ok, so you first have a main screen which allows you to choose a game. Once you choose a game...
Image
...you can then choose a mod. The mod can be located in the "mari0" folder, and can have its own folder, such as "smb+", and "cheeri0".
Now, so far you may think that for a .love with all these mods may be a hefty file size, - like 50MB - you'd think there would be a better solution. Well, there is!
Instead of getting a download with all the mods, you could download the "template" of the .love file.
So basically, it would include the selection screen, and then you could just add mods yourself. And, if you have no mods inside the .love file, it could just load the normal game, so probably this "template" .love file would be about 6MB.
Here is a illustration of the .love file, too.
Image
So, you have the game folders, and the main.lua, and possibly some more stuff.
Anyways, the main.lua will know what to do with the files, so for example, if you put a mod in the folder "mari0", and the mod is "cheeri0" (the folder name), it will detect it, and when you choose "Mari0" on the selection screen, it will appear on the selection screen.
Here's another picture.
Image
As you can see, all your mods for Mari0 are in the "mari0" folder.
Now, as for the icons that appear on the selection screen, you would have to make those, and they'd have to be a set dimension, such as 100x300. The icons on the selection screen would also have a nice pre-made border, unlike mine. :P

So, is this possible? I think it is, and it'd be great if this was real!
Maurice's version
Screenshots
Image
Screenshot by Maurice
https://dl.dropboxusercontent.com/u/174 ... oader.love
Runs smoothly, but music doesn't play.

Turtle95's Version
Screenshots
Image
Image
Screenshots by Mari0Maker
https://dl.dropboxusercontent.com/u/976 ... oader.love
Possibly still needs bug fixes.
Last edited by Mari0Maker on 28 May 2013, 03:17, edited 21 times in total.

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 12 May 2013, 09:53

I do have a load of Source and Mac games cluttered in one folder and I would love to have this. I am still learning how to script .lua so I am not quite sure how this will work. Will it be a expanded version of the .love of the game? (I'm interested, very interested)

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 12 May 2013, 10:11

Definitely possible.
I assume the games would be pre-included in the "selector"
There would be a "games" folder in selector.love, that contains other folders.
A "games/name_of_game" folder would contain an "original" folder, and some mods folder.
When you start a mod, it would first copy the "original" folder to a "current" folder, then slap the mod on it.
You then need to load the conf.lua, and use the love.conf in it to create an appropriate window.
Then it would load the main.lua of the modded game with love.filesystem.load()(), then run love.run().
Last edited by Automatik on 12 May 2013, 10:13, edited 1 time in total.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 May 2013, 10:13

I really doubt this is possible without someone putting a lot of time into it because the various SYS games have a lot of functions with shared names across different games which lua doesn't like. It would be possible, though.

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 12 May 2013, 10:14

Camewel wrote:I really doubt this is possible without someone putting a lot of time into it because the various SYS games have a lot of functions with shared names across different games which lua doesn't like. It would be possible, though.
Who talked about "requiring" every game at once? We can just require the game we want to play.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 May 2013, 10:26

What, and then unrequire it when you don't want it any more? Or are you going to make people restart it to switch games?

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 12 May 2013, 10:33

"Or are you going to make people restart it to switch games?"
At worst, yes. But I don't see why Ortho robot would use variables from mari0.
As for love callbacks, we can always erase them when we quit a game.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 May 2013, 10:35

The functions, Automatik. Things like game_update() will be in every game and impossible for love to differentiate.
And you can't edit them if you're getting people to install games themselves.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 May 2013, 10:39

I don't see why this shouldn't be possible.
Just reset every possible setting and nil all the standard functions before loading the new game.

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 12 May 2013, 10:55

Camewel wrote:The functions, Automatik. Things like game_update() will be in every game and impossible for love to differentiate.
And you can't edit them if you're getting people to install games themselves.
game_update is erased when you load a second game.
And if it's not, then there is probably no game gamestate(Not Tetris2) or it's another gamestate system(Not Pacman).
And we can make a list of what's in _G at startup, then when unloading a game, we remove everything that wasn't in _G.
Edit: turn out it's gonna be harder than expected.
I've to override every function that need a path so that it look into the game folder instead of the selector.
Except you can't override require, the keyword(you can override require, the function).

User avatar
Legend_of_Kirby
Posts: 752
Joined: 14 Oct 2012, 05:37
Contact:

Post » 12 May 2013, 16:52

Holy shit, This is an awesome idea. THIS certainly got my attention

User avatar
DaniPhii
Posts: 12
Joined: 12 May 2013, 17:07
Contact:

Post » 12 May 2013, 17:23

Hey, I'm interested too! :D

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 May 2013, 19:50

I'm already on it. While I can't seem to mount games the way it's described, I'll be doing it a different way. Expect it soon!

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 12 May 2013, 21:05

I was also working on that.

User avatar
BobTheLawyer
Posts: 2232
Joined: 01 May 2012, 21:00

Post » 12 May 2013, 21:18

I started for about two minutes, but I decided not to waste my time.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 13 May 2013, 02:46

Automatik wrote:I was also working on that.
Another way you could possibly do it is make a folder inside the "LOVE" folder in AppData titled something like "sysgamemerge", and then put seperate folders for games like Mari0 and such, and then put the mods in there.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 13 May 2013, 05:25

Mari0Maker wrote:
Automatik wrote:I was also working on that.
Another way you could possibly do it is make a folder inside the "LOVE" folder in AppData titled something like "sysgamemerge", and then put seperate folders for games like Mari0 and such, and then put the mods in there.
Well, my version is nearly done, but I need testers for Mac and Linux.

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 13 May 2013, 06:07

Turtle95 wrote:
Mari0Maker wrote:
Automatik wrote:I was also working on that.
Another way you could possibly do it is make a folder inside the "LOVE" folder in AppData titled something like "sysgamemerge", and then put seperate folders for games like Mari0 and such, and then put the mods in there.
Well, my version is nearly done, but I need testers for Mac and Linux.
I volunteer for Mac testing.

User avatar
copy
Posts: 417
Joined: 17 Apr 2012, 16:29
Contact:

Post » 13 May 2013, 15:40

I volunteer for Linux.

User avatar
BobTheLawyer
Posts: 2232
Joined: 01 May 2012, 21:00

Post » 14 May 2013, 02:04

I volunteer for Windows.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 14 May 2013, 03:05

BobTheLawyer wrote:I volunteer for Windows.
Tbh, I don't need a Windows tester. I am running Windows, and it works.

User avatar
BobTheLawyer
Posts: 2232
Joined: 01 May 2012, 21:00

Post » 14 May 2013, 03:41

You don't know that.
I demand for Windows.

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 14 May 2013, 03:45

Why don't you make an .exe for Bob to test? He seems like he really wants to test.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 14 May 2013, 03:46

ShankYourself.net wrote:Why don't you make an .exe for Bob to test? He seems like he really wants to test.
Well, Bob can test. Last time I checked I think he is a map maker for Turtle: Puzzles so he should be able to access it..

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 14 May 2013, 03:50

So, question. How are we getting this sent to us? Just for future reference.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 14 May 2013, 04:12

ShankYourself.net wrote:So, question. How are we getting this sent to us? Just for future reference.
I'll probably PM it.

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 14 May 2013, 06:16

Alright, testing it. This'll be edited with results.

Edit: Alright, it's opens up fine. I have All Night StabYourself downloaded and also Source Mari0. I have opened up the Mari0 Mods list bit I see none. Do I need to place the mari0.love (lets just call mari0's love file that) inside the SyS loader or does it load it for me? Screen capture coming in next edit.

Second Edit: May not be able to come up with a screenshot. :C

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 14 May 2013, 16:57

https://dl.dropboxusercontent.com/u/174 ... value.love (Doesn't work with chrome löve thing, cba to fix atm)

Just some poc. Not really tested. Had to disable the thread in mari0 because reasons.

- Loads untouched games (some games won't work)
- Can hook into any callback function (I put something into draw and keypressed for this demo)
- filesystem shit works

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 14 May 2013, 17:55

Music doesn't work, other than that it's pretty good.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 14 May 2013, 18:02

Music runs on the thread that I had to disable. Blame slime.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 14 May 2013, 21:43

Well, Maurice's version is pretty good. The only thing that kind of is annoying is the "press alt+e to go back", but I didn't really mind.
I be glad to see Turtles (and maybe Automatik's version) when it comes out. :)

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 14 May 2013, 21:51

Mari0Maker wrote:The only thing that kind of is annoying is the "press alt+e to go back", but I didn't really mind.
You make it sound like that's a bug or that I accidentally put a print in there proving that you can draw over the game.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 14 May 2013, 22:13

Maurice will occasionally do all the complicated stuff for a project and leave them to do the cleanup to make it look nice and fit well and whatever.
He did the same thing with the turret mod when turtle messed it up.

User avatar
Vyper
Posts: 155
Joined: 16 Jan 2013, 23:18
Contact:

Post » 14 May 2013, 22:25

I actually had an idea like this once. I would be fine with making some graphics for this.

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 15 May 2013, 02:45

Mari0Maker wrote:Well, Maurice's version is pretty good. The only thing that kind of is annoying is the "press alt+e to go back", but I didn't really mind.
I be glad to see Turtles (and maybe Automatik's version) when it comes out. :)
Not sure if Turtle's is fully working.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 15 May 2013, 03:25

ShankYourself.net wrote:
Mari0Maker wrote:Well, Maurice's version is pretty good. The only thing that kind of is annoying is the "press alt+e to go back", but I didn't really mind.
I be glad to see Turtles (and maybe Automatik's version) when it comes out. :)
Not sure if Turtle's is fully working.
It's fully working, except for the mac and linux command lines for opening files. I'd rather get those done than release it without that stuff working. This way, everyone is happy.

User avatar
Shank
Posts: 225
Joined: 24 Feb 2013, 04:17
Contact:

Post » 15 May 2013, 04:18

Working on one of my first Löve projects by expanding on Maurice's version. Yay?

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 15 May 2013, 11:21

https://dl.dropboxusercontent.com/u/174 ... oader.love

Image

A graphical overhaul of my previous demo, not much code wise changed.
No game except for Mari0 (because of threads) has been modified. Even works in chrome thing now.

User avatar
popcan12
Posts: 592
Joined: 10 Feb 2012, 02:30

Post » 15 May 2013, 11:49

I see those images are from http://guegan.de/. Also, nice stuff.

User avatar
TheJonyMyster
Posts: 1795
Joined: 03 Sep 2012, 05:12
Contact:

Post » 24 May 2013, 00:28

Two things:
Trosh's text gets cut off, and it should look for folders from the other games.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 24 May 2013, 04:14

Well here's mine:

https://dl.dropboxusercontent.com/u/976 ... oader.love

It searches for games in the respective LOVE path. Much like how Mari0 searches for mappacks, this uses that kind of thing. It'll look for games in:

Code: Select all

LOVE\SySGames\lovemods
It automatically makes the folders for all games made by Stabyourself when it starts so that you don't need to make them yourself (which would have caused issues). Furthermore, it only works on Windows right now, but the Mac and Linux command lines are being tinkered with. If anyone can help me include the original games inside the game, then do it. I also need help with executing games from the Mac and Linux terminals.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 24 May 2013, 04:31

Turtle95 wrote:Well here's mine:

https://dl.dropboxusercontent.com/u/976 ... oader.love

It searches for games in the respective LOVE path. Much like how Mari0 searches for mappacks, this uses that kind of thing. It'll look for games in:

Code: Select all

LOVE\SySGames\lovemods
It automatically makes the folders for all games made by Stabyourself when it starts so that you don't need to make them yourself (which would have caused issues). Furthermore, it only works on Windows right now, but the Mac and Linux command lines are being tinkered with. If anyone can help me include the original games inside the game, then do it. I also need help with executing games from the Mac and Linux terminals.
Love it. Just absolutely love it.
But, how do you add mods? .zip files, .lua files, or .love files? .love files don't work for me.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 24 May 2013, 04:34

Mari0Maker wrote:
Turtle95 wrote:Well here's mine:

https://dl.dropboxusercontent.com/u/976 ... oader.love

It searches for games in the respective LOVE path. Much like how Mari0 searches for mappacks, this uses that kind of thing. It'll look for games in:

Code: Select all

LOVE\SySGames\lovemods
It automatically makes the folders for all games made by Stabyourself when it starts so that you don't need to make them yourself (which would have caused issues). Furthermore, it only works on Windows right now, but the Mac and Linux command lines are being tinkered with. If anyone can help me include the original games inside the game, then do it. I also need help with executing games from the Mac and Linux terminals.
Love it. Just absolutely love it.
But, how do you add mods? .zip files, .lua files, or .love files? .love files don't work for me.
Right now only Windows can run the .love files. You have to add any Source version of the game into

Code: Select all

LOVE\SySGames\lovemods\'game name'
For example,

Code: Select all

LOVE\SySGames\lovemods\Mari0\Portal+.love
something like that

'game name' is the folder in the directory where you place that specific mod/game.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 24 May 2013, 04:38

Turtle95 wrote:
Mari0Maker wrote:
Turtle95 wrote:Well here's mine:

https://dl.dropboxusercontent.com/u/976 ... oader.love

It searches for games in the respective LOVE path. Much like how Mari0 searches for mappacks, this uses that kind of thing. It'll look for games in:

Code: Select all

LOVE\SySGames\lovemods
It automatically makes the folders for all games made by Stabyourself when it starts so that you don't need to make them yourself (which would have caused issues). Furthermore, it only works on Windows right now, but the Mac and Linux command lines are being tinkered with. If anyone can help me include the original games inside the game, then do it. I also need help with executing games from the Mac and Linux terminals.
Love it. Just absolutely love it.
But, how do you add mods? .zip files, .lua files, or .love files? .love files don't work for me.
Right now only Windows can run the .love files. You have to add any Source version of the game into

Code: Select all

LOVE\SySGames\lovemods\'game name'
For example,

Code: Select all

LOVE\SySGames\lovemods\Mari0\Portal+.love
something like that

'game name' is the folder in the directory where you place that specific mod/game.
Ok, I added the Source of Mari0, and then this happened in the Gameloader.
Image
Same thing happens with the mod that I added.

It may be becuase on Windows XP, our "documents" is named "Documents and Settings".

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 24 May 2013, 04:41

Weird. The code I used to run the game is pretty much the same thing used in Mari0 to open the 'save folder' but modified. Not sure what could cause that.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 24 May 2013, 04:47

Turtle95 wrote:Weird. The code I used to run the game is pretty much the same thing used in Mari0 to open the 'save folder' but modified. Not sure what could cause that.
The source also didn't appear for the rest of the games (Ortho, Tetris, etc.).
It may of been because no mod was included with them, though.

I also had a problem where when I did what you explained above (putting the Mari0 Source into the folder with a mod), it didn't even show up on the mod selection screen.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 24 May 2013, 04:55

Maybe this will help.
Image
http://i.imgur.com/h1YQ2Qn.png

Look at the top of the screenshot for the directory, too.

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 24 May 2013, 05:05

Sorry for triple posting, but I'm trying to notify Turtle.
Anyways, I started from scratch, with only the Source in each game folder, and when I click on Mari0, it shows two sources, and with every other game, no game at all appears.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 24 May 2013, 05:07

Mari0Maker wrote:Sorry for triple posting, but I'm trying to notify Turtle.
Anyways, I started from scratch, with only the Source in each game folder, and when I click on Mari0, it shows two sources, and with every other game, no game at all appears.
You haven't installed anything inside the other folders is why. I haven't gotten down to 'integrating' the files of the original sources to the mod yet (if I would even want to which would make it more convinient).

User avatar
Mari0Maker
Posts: 1348
Joined: 07 Apr 2012, 17:10
Contact:

Post » 24 May 2013, 05:09

Turtle95 wrote:
Mari0Maker wrote:Sorry for triple posting, but I'm trying to notify Turtle.
Anyways, I started from scratch, with only the Source in each game folder, and when I click on Mari0, it shows two sources, and with every other game, no game at all appears.
You haven't installed anything inside the other folders is why. I haven't gotten down to 'integrating' the files of the original sources to the mod yet (if I would even want to which would make it more convinient).
So what can I do to make it work correctly while you try to "make it more convenient"?

Post Reply