Is pre-planning scripts good idea?

I’m working on a game currently, but i feel like i need to plan my scripts for the needs of other core systems

After some time i found out about drawio, a tool for creating diagrams, and though about using it to pre-plan scripts on logic level

I wanted to ask if this is good idea or simply a waste of time, also if you have any idea how to solve this problem you can write it down, thx

3 Likes

is pre planning scripts good idea?

yeah

i found out about drawio, a tool for creating diagrams

waste of your time

organization and game structure is something i struggled with and i still do, but i honestly found out that its better to just make it even if the structure is trash, because then youll know what you could’ve done better or how you could have approached it differently. and next time you make a game you will know what to do.

and as you learn you find other and better ways to approach because you start to understand how it works

2 Likes

Planning ahead is always a good idea, however don’t force yourself to use tools like draw.io.

If you feel it boosts your productivity, or otherwise make development easier for you, go ahead and use it, but don’t use something like draw.io just for the sake of using it.

2 Likes

It’s very helpful if you have a big system and, well… seem to get lost while just thinking about it. I’d actually recommend writing out pseudocode instead of drawing a flowchart, because flowcharts take absolutely ages. But, if it’s something small you can plan as you go, just write it.

2 Likes

It definitely is a good idea but improvising is also good. You can set up a basic idea of your scripts and then add more elements to them as you think of more stuff.

2 Likes

Why are flowcharts bad? they look a lot better than this:

  1. Define variables
  2. Call a function
  3. Check if result is something
  • True, set value
  • False, repeat
  1. Destroy a script
1 Like

My co-developer definitely needed to make diagrams and plans for the movement systems for our game.

I also make my own plans for GUIs and gameplay features as well.

image


image

Basically, I highly suggest it! Especially if you’re working on a very advanced game with multiple potentially conflicting features, and even more so if you’re working with more people than yourself!

1 Like

Last question, on what kind of level do you propose to plan features? script logic, game mechanics, overall what i want in game?

1 Like

pseudocode can be to any standard you want it. It could even be simplified down to something like this:

function playerjoined(player) {
    load player data
    apply player data
    create player data repository
}

or you could go more in-depth:

function playerjoined(player) {
    try {
        load data from store
    } catch {
        kick player from game
        use attribute to indicate data shouldn't be saved
    }

    apply player data stats
    create a new player data repository with the class
}

It’s just from my experience, I’ve always found pseudocode to be more useful. Whatever you wanna use, though.

3 Likes

Can you provide some pros over flowcharts?

Generally just how long they take to make. Rushed flowcharts on paper can look really messy and be hard to understand, and if you want to make them digitally (with things like drawio) it can still end up messy and takes even longer. You might end up losing the thought process while making a flow chart, since you take longer between each step (sounds weird, but trust me, it’s happened to me before).

Pseudocode can also be easier to follow logic at points, especially if you are using standard flowchart symbols in your flowcharts (e.g. rhombus = input/output, square = process, etc.). For example, I personally find it easier to follow an iteration through pseudocode rather than a flowchart because it’s easier to see what belongs to where basically, and I see a break, I think right, stop reading this instead of looking and thinking, “Where does this arrow go?”. If you have complex logic within your iteration, it can also be harder to follow if you have loop exiters or continue (break, continue, return).

Different things work for different people. If you find flowcharts easier, go ahead!

TL;DR - I think they are more readable and they are also faster to make.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.