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

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

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

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

Сообщества

Настроить S2

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



Пишет nancygold ([info]nancygold)
@ 2024-07-20 17:12:00


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

Symta Rewrite Progress
Ok. I've updated the ECS system to use new tagged pointer system.
No changes to the type system were needed.
Yet I had to update the object creation byte code.
Now it returns an enum style tag for 0-sized objects.


Generally having these enums is useful for stuff like Nil or Empty lists.
Previously allocated these on heap, which slowed down garbage collection.
And obviously typed enums instead of raw integers are nice too.
Yet compared to C/C++ everything is dynamic, so I can convert a string to enum.
I.e. now it feels a bit more flexible and useful.

Here is how one can implement enums using this mechanism

CityNames: amsterdam kyiv moscow
type city Name: = Me = ref_ tag_(Me): CityNames.locate Name
city.as_text = "#<city:[CityNames.(gid_ Me)]>"
City city kyiv
say City //prints #<city:kyiv>


Too lazy to test the performance of the game before and after.
And it ran at 60 FPS before anyway.
Yet I can finally convert every terrain cell into an entity.
That was one of the major reasons I had to improve runtime.



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


(Анонимно)
2024-07-20 21:53 (ссылка)
an important addendum: The more unattractive the male individual is, the more likely he is to do the risky shit.

(Ответить) (Уровень выше) (Ветвь дискуссии)


[info]nancygold
2024-07-20 22:08 (ссылка)
The less person has to lose the higher the likelihood for that person to do risky things.

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


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