Ive been experimenting with ModuleScripts for a little. I believe ive gotten the basics and more understood and are trying to make a game using them now.
Im kinda looking to make a game similar to a gardening game or mining game in nature, with a bunch of customization for different aspects such as ores, and their rarities,model,attributes,etc.
If this doesn’t make sense, dw. cause I cant word it correctly to save my life.
I think most developers tend to dunk on these kinds of posts, because they’ve been done to death a million times before. I would suggest maybe reading some of these previous posts, as well as these few suggestions:
Take a walk. Generally a good rule of thumb for literally any kind of creative pursuit.
Read and watch stuff. You might find inspiration in a good show or book.
Write all your ideas down on your phone or paper. You can look at these later and possibly mix and match them to get good ideas.
Ive always tried to catch inspiration from shows, irl places or anything really but always found everything I conjured up with it to be either boring/ or way to complicated.
Well if you need a game idea to pratice module scripts with, I would recommend something like a minigame game or something like story games or games where you can build stuff. Those usually have module scripts or something and I think they would be easy enough for you to code
MinigameStateService Module Script that holds the Data of the Minigame. Active, Current Players, ScoreBoard?
Actual Minigame Module → Require is stored in MinigameStateService in a Table?
RoundSystem → Handles all the round information (Main Script) then access MinigameStateService to start a minigame that is stored in the table MinigameStateService.Minigames.Tag:Start() or something along those lines
Step 1: Look at other pieces of stuff you enjoy to play, don’t copy them, just get a thought of what you could do
Step 2: Write your thoughts on a piece of paper, write whatever your mind is thinking. It doesn’t matter what it is. You’ll click whenever you do this and make something out of it
Step 3: Simply doing step 2 or 1 can simply create more ideas simply from mixing them together or such, or they can just pop up in your head
The minigame idea is probably the best if you want to get used to using ModuleScripts. However, if you don’t want to make a minigames game, try a disaster survival game. You’d need ModuleScripts for both the maps (any special logic for individual maps, e.g. this merry-go-round rotates, etc) and the disasters.
Open this if you want to read how I'd structure the game
GameLoop.module.luau - Handles the teleporting of players between the lobby and the map, as well as picking and loading new maps and disasters.
Disasters.module.luau - Its children are the disasters. The module could have an easy way of picking a random one. Decoupling this from the game loop is a good idea, because it makes it easier to introduce double disaster rounds. This file also contains a type definition for a disaster, so you can have autocomplete when using disasters in code.
Type definition could be something like
export type Disaster = {
name: string,
model: Model,
run: () -> () -- This is a function that takes no arguments and returns nothing.
stop: () -> ()
}
Each disaster has a run function that starts the disaster, and a stop function that stops the disaster.
Maps.module.luau - Same as Disasters, but for maps. I’d decouple this for consistency; if disasters are decoupled, maps might as well be too. This file also contains a type definition for a disaster, so you can have autocomplete when using disasters in code.