1
\$\begingroup\$

I'm making a Love2D board game video game, which has multiple different components which need to be run and displayed on the screen at the same time. For example, I need to display the board, the characters, and the UI. Ideally, I would like to store each component in a seperate file (similar to Unix philosphy) In what way should I go about this?

My first idea was to create a screen/gamestate for each of these componenets, and stack them on top of each other so each is running/displaying at the same time. This feels like it's not a very proper solution so I'm open to other ideas.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

My first idea was to create a screen/gamestate for each of these components, and stack them on top of each other so each is running/displaying at the same time. This feels like it's not a very proper solution so I'm open to other ideas.

Seems like a fine solution. Especially as a first implementation.

After that, you might see if some parts are static and can be rendered to a canvas instead.

I'd only steer away from the "draw them on top of each other" plan if some aren't visible at all. Then you might have a list of drawables for each gamestate.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.