One local/server script or multiple?

One local/server script or multiple + some module scripts? Im making a piggy type game and not sure how should i do it. I want a organized simple easy to read way but also efficient.

There is really no simple answer to this. Each type of script has its uses. I would recommend using all three in your game for different uses. I would suggest researching into their uses and choose each one for its purpose according to its ability.

1 Like

I mean like 2 main scripts one in the player(local) and one in the server script service(server) and modules into them

1 Like

Depends on what you’re trying to do.

You could cram everything into one script, but it’s possible two functions may overlap when you do not want them to. I usually put all the functions that are related into separate scripts and make a couple modules for them. However this is all personal preference.

There’s no right or wrong answer to this post. Do it however you wish.

2 Likes

Use module scripts for this, module scripts will probably be the easiest and cleanest way to set up your piggy-game. You will obviously need to use server and local scripts to require the module code, but in my opinion module scripts is probably the best way to do this and how I made my game, Bacon Burger.

Here is a playlist AlvinBlox made as well for help on making a Piggy inspired game:

1 Like

Alright im gonna solution this they are helpful but yeah thanks i think i might make it in multiple scripts also just a question what lags less one huge script or multipe small scripts

I wouldn’t say they “lag”. They both would have the same delay time as you are just calling functions from them. However, if you are trying to call two functions from the same script at the same time, I don’t know if it will have the same speed as calling two separate functions.

1 Like

Alright ill make it in multiple scripts well thanks everyone!

As many users have stated it is all dependent on your game. If you’re working on a project that is going to use a lot of code, functions, variables, etc… in order to keep it organized you should obviously use numerous scripts. I find it rather annoying when all of my scripts aren’t intertwining and communication is difficult between them hence why I’d use a framework. You can look at numerous resources on Frameworks and install some such as AeroFramework

At the end of the day what you decide to do is up to you!

Completely Off Topic
I don’t mean to sound rude or slanderous, but how does one get away with making a youtube video breaking down how to make an exact copy of a game, and then say he’s trust worthy because he’s an official “educator”… Even proclaiming you can buy the full version of someone elses game for $5 USD.

3 Likes

What is framework used for? Also how do you get it

I believe that’s a fair argument.

However, I also believe that introducing new scripters to recreating a game that is hot / highly praised could be a good introduction into advanced scripting. Newer scripters often say “I’m going to make the next Jailbreak / Adopt Me / Insert Front Page Game” but get discouraged when they cannot make it. Although I do think that selling the source code is kind of counter-intuitive, helping scripters understand what happens behind the scenes in games is a useful tool for aspiring programmers.

(also happy birthday)

1 Like

I understand that some people may get discouraged or frustrated when making ambitious projects but it’s a learning curve. A lot of people give up on their first project and move on to something that they feel they can better progress in, and those who don’t give up persevere though it and end up making an amazing project that challenged them.

Not going to argue about the source code thing, but I’ll leave it at this- he didn’t create the game, he recreated an exact copy of it, and is selling his own version for $5 USD. He’s not in the credits for Piggy, etc… While it’s a learning experience on how to make a game, he could’ve done that with a game he’s made himself, not take someone elses work.

Also thanks for the birthday wishes! :slight_smile:

@GamerPatriik A framework is a “handler” persae, it’ll manage your scripts and make it so you can communicate inbetween them. If you learn how a framework works certain ones can ease your life a ton, such as the Aeroframework which makes things like communication between modules, as well as the client to server, extremely easy. However as stated by @iy_uhn often times they can be difficult to learn at first, especially if you don’t understand the gist of communication.

1 Like

Right now im looking at a video on youtube and it looks nice i guess. The communication looks easy

But yeah ill just make it the normal way for now. But id say making one script is more organized than multiple.

Waaait server-client communication? Yes i want that than