Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет nancygold ([info]nancygold)
@ 2024-10-06 18:13:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Настроение: contemplative
Entry tags:gamedev

List of Actions a Unit Can Do
Had to completely redesign the action system.

Originally each unit class had a list of actions, it can perform.

That was used by both AI and human players.

Such systems, while superficially easy, are defective by design.

Even in simpler action games.

But my case is exceedingly complex.

So since the beginning this typed action list created issues.

For example, I had to list `cast_spell` for every spellcaster.
And then also check the spellcaster is not silenced.

There was just no easy way to add cast_spell to a unit which initially had none.

I had some ad-hoc system to allow that, which basically simulated ECS.

Since the transition to ECS, I no longer have solid classes.

So actions dynamically attach onto entities which satisfy the requirements.

The cast_cast from the example will be available to any entity matching
spellcaster and -silenced

Even if that entity was dynamically constructed.

TLDR: just use ECS.



(Читать комментарии) - (Добавить комментарий)

Re: Thinking as Orang Utan
(Анонимно)
2024-10-06 23:53 (ссылка)
de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка


de grootouders
дедушка и бабушка

(Ответить) (Уровень выше)


(Читать комментарии) -