Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

[ad_1]

Excessive stage

At a excessive stage, I am trying to create a galaxy exploration-style sport.

Numerous factors of curiosity shall be selectable on the map (I would wish to goal for a number of hundred, however versatile and desires testing).

A POI will be one thing story-related or a supply of one in every of 4 sources.

Gamers begin with a ship, head to a useful resource node, harvest sources and might transfer on.

Thus far so good, I’ve received a small variety of sources, so can simply group them collectively as a single ResourceStockpile element and conceal empty sources within the UI.

The POI that produce sources may have a service that increments their stockpile over time, and ships may have a "cargo bay" of ResourceStockpile.

The participant can use [some resources] to create factories at a POI.

Factories convert sources to items (each completed merchandise and parts/components).

Complexity

I need to have the ability to ship items. In contrast to sources, I am anticipating to have a number of dozen varieties of completed good (and lots of extra intermediate components and parts), with a watch to increasing over time.

Storing a number of zeroes for sources appeared like a small overhead to take care of a constant ResourceStockpile I might reuse.

Because the variety of objects/fields grows, the design feels much less and fewer fascinating.

To make issues extra attention-grabbing, I would ideally like to have the ability to ship just about something (together with the factories, if the ship is massive sufficient).

Do I change to a HasX element for each doable useful resource/good? In that case, it looks like I’ll spend an terrible lot of time swapping between archetypes.

It additionally looks like quite a lot of duplicated code, except there’s some strategy to deal with it as a generic Has<X> as an alternative, however I consider that is fairly complicated to implement, and will negate among the reminiscence administration advantages of ECS (?)

Or do I create a ResourceStockpile with -say- 100 integers, one per doable useful resource/good and simply swallow the overhead?

What’s the best™ strategy to break this down?

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *