Home - SoPra18-07/Singularity GitHub Wiki
Welcome to the Singularity wiki!
- Issue und genaue Beschreibung des Tasks wird erstellt
- Erstellt einen neuen Branch mit Referenzierung des Issues (mit #<nr>)
- Sollten dinge an der Architektur geändert werden / anders implementiert werden als spezifiziert, fkarg bescheidsagen, damit die Architektur möglichst das darstellt was wirklich der Fall ist.
- Spezifikation des Issues sowie der Architektur sollten soweit möglich erfüllt sein und nichts weiter kaputt sein.
- Pull-Request (mit nachricht closes #<nr>)
- Eventuelle Merge-Konflikte mit dem Master sind zu beheben
- gleichzeitig: auf Whatsapp dem Reviewer bescheidsagen dass er was tun soll
- sollte sich dieser nicht innerhalb von 30min melden, soll jemand anderes Reviewen
- Reviewer meldet sich beim Autor mit resultat
- wenn alles ok:
- Autor mergt in Master
- Autor Committet auf SVN
- Autor löscht branch
- wenn nicht:
- Fragen beantworten, geforderte Änderungen übernehmen, weitere Reviews erfragen (geht dort weiter)
The code will be reviewed according to the assignments in the Reviewer Assignments page
do not add this in the svn!
The .gitignore
file is currently set for Visual Studio, C++, C#, ReSharper, Windows, and macOS.
This is the configuration file for Travis. Do not change!
Step 1. Add [DataContract] to every class you want to serialize.
Step 2. Add [DataMember] to every member or property you want to serialize.
There can be some issues with doing that for example: Multidimensional arrays are not serializable. There may be some classes (SpriteFont, Texture2D, etc., basically every content object and some exceptions) that are not serializable. Every property has to have a setter or otherwise the Serializer cannot set the values back.
There are even some things you DONT WANT TO SERIALIZE, like references to:
-
The director. Only the Basic level should have the old director. I made it this way because its easier to make sure only one director (and because of that the old managers too) exist and I can get rid of the old director after loading some managers back in the new director.
-
Same goes for the Map, the Camera, Gamescreen, etc. so basically all "ingameglobal" objects.
-
The Ui shouldnt be serialized at all! We will just make a new one when loading the game. Same goes for the Input manager.
Step 3. Write a ReloadContent() method for this class to initialize everything that you couldnt save. This is especially important to make sure the game runs as we want it. For example:
- The Military Manager has to redo the UnitMap, since it cannot be Serialized because of multidimensional arrays.
- Everything that had such references, has to hold the right reference to the Camera, the Director, etc.
- The Units in the Gamescreen have to be resubscribed to the Selection box and (if they have been) to the input manager. DONT FORGET TO RESUBSCRIBE YOUR CLASS TO THE INPUT MANAGER SINCE THE INPUTMANAGER IS NOT SERIALIZED AND NEEDS THE SUBSCRIPTION AGAIN OR ELSE YOUR CLASS WILL NOT GET ANY INPUT.
It works basically like the basic level will call reloadcontent() and then it is propagated to all the classes it holds, too.
Step 4. Make sure your ReloadContent() is called.
Step 5. Ask me if you have questions or you have no clue why the game doesnt work after deserializing anymore.