shiva404
|
fa189a4c3b
|
Попробовал самую очевидную оптимизацию рендера, теперь отрисовываются только те клетки, которые в камере. Карта корраптится при движении камеры, надо исправить, зато масштаб работает и прирост производительности очень хороший, теперь до 200 объектов обрабатывается при стабильных 60 ФПС. Промежуточный коммит, хочу посмотреть сколько можно ещё выжать кадров на 500 объектах, потом нужно починить движение камеры. Также написал простую функцию спавна эльфов в главном цикле для создания нагрузки. Эльфы создаются в углах карты и по центру каждые сто тактов цикла. Они начинают перемещаться по карте в случайные точки, создавая относительно равномерную нагрузку поиска пути.
|
2026-03-05 22:00:32 +03:00 |
|
shiva404
|
45f2c71cb8
|
Добавил систему задач для юнитов, она реализована в методе update класса Creature. Подчистил код, пофиксил по мелочам баги. Остался ещё техдолг Егору и задачи из main.
|
2026-03-05 16:35:08 +03:00 |
|
shiva404
|
6b6ca341dc
|
Добавил ускоренный A* из библиотеки pathfinding - произволительность выросла, но несильно. Пока этот вариант закомментил, сейчас реализация BFS + walkable матрица, работает гораздо лучше, с неоптимальным рендером 100 объектов держит, без рендера 300.
|
2026-02-24 02:03:22 +03:00 |
|
shiva404
|
0d9b052aca
|
Cleanup.
|
2026-02-22 23:30:55 +03:00 |
|
shiva404
|
2b114ddd2d
|
Diagonal pathfinding and moving works great! Fixed teleport bug and terrain overlay.
|
2026-02-20 04:53:33 +03:00 |
|
shiva404
|
7fbc1b38c2
|
slop-commit. check out all code, test and take a look at notes in main, need to clean up it
|
2026-02-20 04:02:51 +03:00 |
|
shiva404
|
171eff1434
|
pre commit, make CAPS tasks from main
|
2026-02-20 02:09:43 +03:00 |
|
shiva404
|
197469350d
|
move_obj func was added to Map class. Also console now can execute any command with exec.
|
2026-02-19 19:55:07 +03:00 |
|
shiva404
|
bf4a80a54a
|
Nevermind.
|
2026-02-18 22:31:31 +03:00 |
|
shiva404
|
b34aaa1664
|
shameslop, but gui still works.
|
2026-02-16 17:20:37 +03:00 |
|
shiva404
|
0e0bf1f84e
|
Finally fixed sprite caching. For now it works only for one map, need to develop mapmanager and have a list of cached sprites for each map.
|
2026-02-16 02:46:28 +03:00 |
|
shiva404
|
f89e0a86c4
|
Profiling functions were added.
|
2026-02-16 01:31:16 +03:00 |
|
shiva404
|
2e6e75866b
|
Couldn't beat graphic bugs with sprite caching. Returned to old way. Need to create branch with sprite caching and try to finish it.
|
2026-02-16 00:30:17 +03:00 |
|
shiva404
|
f679dde81f
|
P.S. to previous commit: instead of Sprite flow load_sprites function was changed: gathering the number of sprites with the same names before second _ and hold it at sprites dict. also now sprites must be named as objectname_action_number. Main commit - full sprites support, with caching, transparency and smooth scaling. drawing function moved to Object methods
|
2026-02-15 21:23:02 +03:00 |
|
shiva404
|
ab58803373
|
initial sprite animation support
|
2026-02-15 18:17:31 +03:00 |
|
shiva404
|
ffc87c9591
|
Sprite scaling support and a little refactoring
|
2026-02-14 05:24:52 +03:00 |
|
shiva404
|
d6a106301e
|
initial sprites support, only terrain for now
|
2026-02-14 03:09:52 +03:00 |
|
shiva404
|
d596101bd2
|
Add grid drawing, scaling, camera movements
|
2026-02-14 00:57:26 +03:00 |
|
shiva404
|
d7184ddab1
|
hlwrld1
|
2026-02-13 23:34:24 +03:00 |
|