#How to make an entire game with module scripts

1 messages · Page 1 of 1 (latest)

fervent dock
#

i have seen many examples and recomendations of making my entire game with OOP and I am not sure how i should do this.

topics i need help with:

  • how do i run basic code for things, would i have a MAIN module and have it run all the other modules

  • what is the difference between handlers and services

  • if i can truly run a game without regular scripts, how do i determine things like inputs from the player

  • do i put everything a a class with the function .new() next to it, or do some modules not need that

things i know:

  • i know that you need to require a module script for it to run

  • i know basic OOP with things like inheritance and how to use them well

spare tiger
# fervent dock i have seen many examples and recomendations of making my entire game with OOP a...
  • depends on how you set it up. You can also just still split stuff up.

  • module scripts only work after they get required, so that statement is false. But, you can get user input inside of a module script. As they can be ran on both runcontexts

  • not everything needs it’s own special class. Definitely the smaller scripts (e.g. a shop can just be built onto the data class. Or how ui animations can just be written as it’s own entity without really needed a class (for simpler UI stuff)

#

Oh wait, missed question 2

spare tiger
devout zodiacBOT
#

studio** You are now Level 3! **studio

fervent dock
#

one more question, if i wanted to make a round timer start on the server being created, in what module would i activate that system

spare tiger
fervent dock
#

so, like make a module that handles everything round based that is required on the start command?

spare tiger
#

No, just have all that compacted into 1 system

fervent dock
#

i dont want to hold you but could i get an example?

spare tiger
fervent dock
#

thats fine, thanks so much for the help though, this is super helpful