Publish Whole Game with Linked Sources problem

I am creating a game with many different places. Therefore I decided to use all my sharable files as Linked Sources. It has been working great except the problem happens when I save the game as a whole and deploy it for other people to play.

Once the game is deployed this way, I thought my linked sources are independent of this one time deployment I did. So I happily go and continue my development and make changes to the linked source scripts. It actually started breaking stuff in the deployed game and people couldn’t play the game anymore.

Does the game deployed via “Publish Whole Game” knows about the linked sources? If so, how do I deploy games at any point in time during development and have it totally self contained and independent of the linked source code?

1 Like

Pretty sure linked sources are bound to the game (not place).

I don’t understand why you would use linked sources though. I always found modules to be better.

Linked Sources and Modules are two different concepts. One does not replace the other. They are completely different things.

I’m pretty sure my game was broken due to the changes in the linked sources. If this is not true then I apologise for posting this. But I’m pretty sure I saw this happening. Could someone else also tell me if they experienced something similar?

You mentioned publishing the game. Did you publish to a different game?

1 Like

I think I get what you’re saying, it makes sense that it would happen but I see where it dumb.
If it’s bad enough, make a feature request.

The solution at the moment is to not use LinkedSources. If you need some shared code, make a ModuleScript in a place like ReplicatedStorage that everything can access.

1 Like

From Roblox Studio

FILE > Advanced > Publish Whole Game…

I am not sure why people are keep mentioning Module script where I am having problems with the Linked Sources. These are very different concepts. I am already using Module scripts everywhere in my code. This has nothing to do with Linked Sources. Linked Sources allow you to share code across multiple Places in your game. Where as Module scripts do not.

I will make feature request if this happens again I guess. In the mean time I would like to know if other people have experienced something similar while creating a multi place games and also using linked sources.

I’m suggesting ModuleScripts as an alternative.

You can require them using require(moduleId), but uploading them to Roblox has to be done manually so you don’t have it automatically updating and breaking your game like LinkedSources.

Your massive caveat there is not being able to test the game without uploading and playing online.

You can test it in Studio, if you write your game right, but there are no other options to fix this issue.

Doing “Publish Whole Game” is akin to publishing each place in the game manually yourself.

I think that whenever a place in a game is published, all linkedsources are published along with it. Either don’t use linkedsources (I stopped using them since ever since they started erasing themselves one day…) or make a duplicate of the game where you test your changes before going live.

edit: I would really advise you start making a duplicate of the game for testing because right now it seems like you’re testing in production.

Again. Could you stop mentioning use of Module Scripts as an alternative to Linked Sources? These two things do not compliment each other in anyway. A reasons to whether module scripts should be used or not has nothing to do with linked sources.

And for the record, I am already using module scripts every where in my game. And all of these module scripts happen to be marked as linked sources so that many places I have in my game share the same module scripts automatically. Linked Sources become such an essential thing to use when your game becomes large and goes beyond even 5 places in your game. Without it you can’t touch any code because you have to manually copy and paste the code every where.

Please do not tell me to NOT use linked sources anymore because it is just not possible to keep developing the game without having any kind of dependency managers like other frameworks have. (NPM in Javascript, Maven in Java, etc …)

Doing “Publish Whole Game” is exactly what it says. From any place in your game, it is supposed to publish the entire game as a whole with your Starting Place intact. It does not matter in which place you do this from. At least according to the Roblox wiki.

http://wiki.roblox.com/index.php?title=Development_cycle

That been said, by publish the game using the “Publish Whole Game” I am exactly doing what you are suggesting. I am separating the published game as production live game. And I have active development going with another game where the production game was produced from.

Problem here is what I thought was a self contained published game is being affected by its original game when I make changes to the linked sources.

According to the wiki, this should not be possible. I am wondering if I am even understanding what Publish Whole Game really means before I blame and point fingers at Roblox for having bugs like this. And just wondering if any other fellow developers had similar issues.

1 Like

I had to test this myself and you’re right. Editing a linked source on the testing environment also edits the script in production. The wiki article didn’t account for linked sources at all.

I did a bit of searching and I found out that the article was published in 2014, while linkedsources came out in 2015.

Actually EmeraldSlash,

I apologize for overlooking what you are suggesting so fast. I think what you are suggesting is something like

https://wiki.roblox.com/index.php?title=Private_module

and require published modules. I can use this approach to manage dependencies. This is definitely an alternative in this case. But you are forced to publish the code everytime you make changes. And if you have divided up your private module into small chunks, this could get annoying. It is such a shame that such a great concept like Linked Source causes many issues.

2 Likes

This is exactly what I am seeing and I could not believe it… How could one work on a large scale game when two separate game deployments are sharing code? I am not experienced with Roblox. Only started like 3 weeks ago. Do you know of any ways to achieve what I want while using Linked Sources? Is there a way to easily produce a copy of your game as a totally self contained project?

The only way I see this possible is by using private modules for now.

I was gonna suggest it specifically but then I didn’t think it was a good idea after all that :wink:

I’ve got one kinda self-explanatory tip, and that is:
If you want to test without publishing, you can just require the module like normal (only works in the place you are editing the module in, of course)

Anyway good luck