encompass-cs-docs/content/getting_started/project_structure.md

20 lines
1.1 KiB
Markdown
Raw Normal View History

2019-05-22 20:56:04 +00:00
---
2019-06-12 01:21:47 +00:00
title: "LÖVE Project Structure"
2019-05-22 20:56:04 +00:00
date: 2019-05-22T12:19:55-07:00
weight: 15
---
Structuring your project is a crucial component of keeping your Encompass development sane. Let's review how an Encompass project is typically structured.
If we look at the Encompass/FNA starter project, it looks like this:
2019-05-22 20:56:04 +00:00
(screenshot goes here))
2019-05-22 20:56:04 +00:00
(describe top-level FNA entry point)
2019-05-22 20:56:04 +00:00
(Describe FNA Game setup here))
2019-05-22 20:56:04 +00:00
The rest of it is pretty straightforward. Put your sprites and sound effects and such in the **Content** folder. Define your components in the **Components** folder, your engines in the **Engines** folder, your messages in the **Messages** folder, and your renderers in the **Renderers** folder. (Again, we'll start getting into exactly how to define these in a minute.)
2019-05-22 20:56:04 +00:00
Finally, a quick note about **Helpers**. I like to use classes with static methods for common behaviors that will be useful for many different engines, for example a `Color` class with a `hsv_to_rgb` conversion function. Be careful not to abuse helpers. If your helpers aren't static, that is usually a sign that the behavior belongs in an engine.