Mentions légales du service

Skip to content

Multi-character sprite management system (same sprite used for various NPCs, each one being independent) + upgraded holy_grail

DETROYAT Alexis requested to merge dev/holy_grail into main

Added methods in game.py to load every character other than WOP and player, including various characters from a single sprite. This consists in adding the tag 'characters' in the C metadata of a level (AGDB comments) and indicating the name of every NPC sprite followed by the number of NPC objects we wanna create.

For example :

/* @AGDB
 *
 * characters : guard:6 knight:2
 *
*/

will load 6 objects using the "guard" sprite (named respectively guard_1, guard_2, etc.) and 2 objects using the "knight" sprite (named respectively knight_1, knight_2, etc.).

Every object thus created will be independent from the others, meaning that they can all move in different directions, etc.

Used that system for upgrading the basic/holy_grail level.

Edited by DETROYAT Alexis

Merge request reports