8 Commits

Author SHA1 Message Date
Felix Boucher
43bc2c75f2 work on game scene + fix bugs
problems :

- game scene was not as shown in the GDD
- problem when moving tilemap (the placeholders didn't follow)
- possible to place units outside the game area

solutions :

- try to make the game scene as close to the gdd as possible
- don't move the tilemap : move the camera instead (this keeps the world position of tilemap intact)
- there was a logic bug in the DraggablePlaceholder. It ain't anymore
2023-07-11 15:52:43 -04:00
Felix Boucher
33fb1ffeee test scene, render issues, collision issues
problems :
- there were no test scene
- units would appear weird over some tiles
- units would not recognize some tiles when trying to know if it could place itself on it

solution :
- added test scene
- tweaked sorting layers in units
- added IsCollidable parameter in ILevelObject
2023-06-08 23:51:45 -04:00
Felix Boucher
8b5d0370dc tidied up + addressed issue with non-LevelTiles
problèmes :
- mon code et l'arrangement des fichiers avait besoin d'un peu de tidy up
- les tiles qui n'étaient pas des LevelTile ne loadaient pas

solution :
- rangé un peu + respecté structure une classe - un fichier
- tenté un build pour voir si tout roulait comme il faut, ce qui m'a porté à ajouter des directives de preprocessing et à bouger les custom inspectors dans le dossier Editor.
- ajouté une représentation simple des tuiles non-LevelTile dans la sauvegarde.
2023-05-28 22:00:47 -04:00
Felix Boucher
f1a328122c save / load dans un fichier
problème : le save et le load fonctionnait avec un string en mémoire

solution : créer un fichier save.txt dans les assets quand on sauvegarde, et lire de ce fichier quand on load.
2023-05-28 17:37:54 -04:00
Felix Boucher
4fbce56853 travail sur le save et le load
problème : pas de moyen de sauvegarder et de charger les niveaux entamés

solution : fonctions save et load dans le LevelManager
2023-05-27 20:38:43 -04:00
Felix Boucher
ef8a70aba4 finish to hijack update loop + serialization
problem : tiles dont have an update loop, neither do they have a start / destroy method

solution : finished working on a way to create a custom start/update/destroy pipeline for the projects custom tiles. it's using LevelManagerScript as to Update.

note : also created a database and a start of serialization system so we can save and load stuff.
2023-05-27 20:38:42 -04:00
Felix Boucher
d10677db6d tweaks to LevelManager
le fait qu'il faille updater des tiles du tilemap posait un réel problème

création d'un système d'héritage pour que les game objects et les tiles puissent cohabiter dans une même game loop

- ILevelObject contient des fonctions de start, de destroy, d'update, d'égalité et une position

- LevelTile et LevelObject héritent de ILevelObject et peuvent être hérité par des tiles ou des MonoBehaviours.

- le level manager est un monobehaviour singleton qui update tous les ILevelObjects à chaque frame.
2023-05-27 20:38:42 -04:00
Felix Boucher
22abe69340 tidy up level manager related scripts
scripts were not classified

created a LevelManager folder in the scripts folder
2023-05-20 22:42:03 -04:00