TODO.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. --------- ALL LONG TERM TASKS / FIXES BELONG TO GOOGLE DOCS: ImplementationTODO OR PossibleImprovements ----------
  2. ----------------------------------------------------------------------
  3. Assembly refresh
  4. When serializing Camera I cannot save the reference to RenderTexture. Make it a Resource?
  5. Possibly set up automatic refresh in debug mode after initialization? As an ad-hoc unit test
  6. Modal windows are set up as persistent but I don't serialize their internal data anywhere
  7. ----------------------------------------------------------------------
  8. C# Material/Shader:
  9. TODO - Implement param block and sampler support
  10. TODO - When creating a Material without a shader, a default one should be used, at least in editor
  11. TODO - Setting Material array parameters isn't possible from C#
  12. GUIResourceField doesn't distinguish between tex2d, tex3d and texcube.
  13. ---------------------------------------------------------------------
  14. ProjectLibrary import
  15. I'm not sure if queued dependencies are handled properly. They're handled on an internal ProjectLibrary loop but perhaps I should
  16. return them in checkForModifications?
  17. ---------------------------------------------------------------------
  18. Prefab diff
  19. Add "dirty object" system to C#. Each ScriptResource and ScriptGameObject should have a dirty flag.
  20. - It should be toggle-able via EditorUtility.SetDirty or similar. (Possibly make this part of ProjectLibrary)
  21. - There should also be a method to check if something is dirty via EditorUtility.IsDirty or similar. (Possibly make this part of ProjectLibrary)
  22. - Hook this up to Scene.IsModified because it is currently not implemented (Might need to keep a link to active Prefab in scene to do this)
  23. - Add a "Save Project" button that automatically saves all dirty assets. Do this automatically when user quits the editor.
  24. - Call SetDirty manually whenever:
  25. - A new object or component is added to the scene
  26. - An object or component is removed from the scene
  27. - An object is reparented
  28. - When component or resource is modified from inspector
  29. - Record all portions where objects & components get modified so I can mark them dirty, will likely need
  30. to use those some points for undo/redo
  31. Test (likely later once I have more editor functionality working):
  32. - Game object handle compare
  33. - ID restore systems
  34. - Native+Managed diff (only the link between the two)
  35. Code quality improvements:
  36. - Modify BinarySerializer so that _encodeIntermediate outputs intermediate format directly without a full on encode
  37. - Consider making ManagedSerializable* array/list/dictionary method/field references static (right now each instance has its own instance
  38. but they're identical)
  39. ----------------------------------------------------------------------
  40. Polish
  41. Ribek use:
  42. - Default material has no shader. What shader to assign to default materials?
  43. - When I'm directly editing a resource like material, I need to save it after editing is done. Use the "dirty" system for that?
  44. - Hook up color picker to guicolor field
  45. - Test release mode
  46. Other polish:
  47. - Add menu items:
  48. - Edit: Cut/Copy/Paste/Duplicate/Delete(need to make sure it works in Hierarchy, with shortcuts), View/Move/rotate/scale
  49. - Game Object (also add to context): Create(Empty, Empty Child, Camera, Renderable, Point/Spot/Directional Light), Apply prefab, Break prefab, Revert prefab
  50. - When I expand inspector elements and them come back to that object it should remember the previous state
  51. - Add a chaching mechanism to inspector (likely based on instance ID & property names)
  52. - This has to work not only when I come back to the object, but whenever inspector rebuilds (e.g. after removing element from array)
  53. - Consider saving this information with the serialized object
  54. - This has to work for custom inspectors as well (e.g. manually adding GUIFoldout) - manually recording "isExpanded" bool might be okay in this case
  55. - Need a proper way to detect when the scene was modified (and display it somewhere)
  56. Stage 2 polish:
  57. - Prefabs
  58. - Game window
  59. - Game play/pause/step (+ save/restore objects on play/pause switch)
  60. - Resource hotswap
  61. - C# script compiling in editor
  62. - VS integration
  63. - When managed exception happens log an error and continue execution
  64. - Doing a pass over all methods referencing Internal_ methods ensuring they do proper checking on C# side would be good
  65. - Game publishing (Build window, collect resources, output exe, default viewport) (described below)
  66. - Splash screen
  67. - Settings/Preferences window (+ menu entry)
  68. - Console window
  69. - About box - license info, version info and other general info (+ menu entry)
  70. Optional:
  71. - When starting drag from hierarchy tree view it tends to select another object (can't repro)
  72. - Handle seems to lag behind the selected mesh
  73. - When resizing library window while docked, selection area appears
  74. - Move all the code files into subfolders so their hierarchy is similar to VS filters
  75. - Undo/Redo
  76. - CmdRecordSO records an SO and all its children but it should only record a single SO
  77. - CmdRecordSO should instead of recording the entire object record a diff
  78. - There should be a CmdRecordSO equivalent for resources (probably)
  79. - Add commands for breaking or reverting a scene object
  80. - Test & finalize undo/redo system
  81. - Add "focus on object" key (F) - animate it: rotate camera towards then speed towards while zooming in (+ menu entry)
  82. - Ortographic camera views (+ gizmo in scene view corner that shows camera orientation)
  83. - Drag to select in scene view
  84. - MenuBar - will likely need a way to mark elements as disabled when not appropriate (e.g. no "frame selected unless scene is focused")
  85. - Likely use a user-provided callback to trigger when populating the menus (I already added a callback to MenuItem, just need to implement it)
  86. - Need to list all script components in the Components menu
  87. Seriously optional:
  88. - Automatically generate readable inspector names and add [Name] attribute that allows custom naming
  89. - Add Range[] attribute to C# that forces a float/int to be displayed as a slider
  90. - GUI tabbing to switch between elements
  91. - Better Prefab inspector - display SceneObject inspector of top-level object, and possibly prefab hierarchy?
  92. Finalizing:
  93. - Add copyright notices in all files & change license to GPL
  94. - Need to generate a proper merge of dev and preview branches
  95. - Use "git revert --no-commit <COMMITID>..HEAD" to reverse anything on the preview branch that was done after the branch creation, then merge
  96. ----------------------------------------------------------------------
  97. Build system
  98. - Test Resources (if loading works and if they're properly packaged in build)
  99. - The final build procedure for the game should be:
  100. - Copy all the prebuilt binaries (Banshee libraries, Banshee assemblies, 3rd party libraries and prebuilt executable) from Editor install folder to output folder
  101. - Which set of binaries is used depends on selected platform (e.g. win/mac/linux or 32/64bit)
  102. - Recompile script assemblies if needed and copy them from project Internal folder to output folder
  103. - Copy the Builtin resources for engine from Editor install folder to output folder
  104. - Copy all the resources marked with the flag mentioned above to \Data subfolder in the output folder, preserving the same asset structure
  105. - Make sure to go over texture resources and ensure they are saved in the valid format
  106. as we don't want to do format conversion at runtime (Not cruical, but it should be done eventually)
  107. - This should something similar to Unity where when changing the platform all resources get reimported
  108. - Make sure to clear all prefab diffs (possibly store them elsewhere in the first place)
  109. - And all prefab instances should have updateFromPrefab called on them.
  110. ----------------------------------------------------------------------
  111. Other
  112. There is a memory corruption happening. Haven't determined where exactly but it's possible it has something
  113. to do with the opening of ColorPicker window. One time I got a heap read after delete error caused by GUIManager
  114. attempting to allocate a new transient mesh, and another time I got a hang when inserting a script object into a std::set.
  115. /*********************************************************************/
  116. /************************ LESS IMPORTANT *****************************/
  117. /*********************************************************************/
  118. ----------------------------------------------------------------------
  119. Mono notes
  120. I can get mono errors by checking g_print calls in goutput.c
  121. - Calling thunks incorrectly can cause those weird errors with no real callstack
  122. Running embedded mono with VS attached causes managed null refs to be registered as access violations
  123. There seems to be a bug in Mono when passing complex structs from C# to C++. e.g. passing Rect3 as a parameter
  124. will corrupt the parameter after it, even if layout and size is exact as the C++ version.
  125. Rect3 has child structs (Vector3) which could be the reason. Be aware of other similar problems.
  126. Mono cannot marshal structures? Taken from their documentation:
  127. Internal calls do not provide support for marshalling structures. This means that any API calls that take a structure
  128. (excluding the system types like int32, int64, etc) must be passed as a pointer, in C# this means passing the value as a "ref" or "out" parameter.
  129. Mono has problems with returning a struct from an internal C++ method. Returned value might end up being corrupted. It works weirdly as
  130. I am able (for example) return a Rect2 with no problems, but it doesn't work when returning a Degree struct. Returning the value as input
  131. parameter solves the problem (presumably boxing the return value would also work).
  132. Sometimes exceptions cause a crash in Event, although this is due to an exception triggering a dialog box which triggers
  133. the message loop and causes another exception. Make sure to look for the original exception.
  134. Finalizers on attribute members will get called more than once. This causes issues if some of the members reference native
  135. objects as already deleted native objects will try to be deleted again.
  136. ----------------------------------------------------------------------
  137. MenuItem
  138. - Add keyboard controls to GUIMenuBar (left/right arrows should move between entries if user is not browsing a sub-menu)
  139. - esc should cancel out of the menu bar
  140. - alt should focus the menu bar
  141. ----------------------------------------------------------------------
  142. VisualStudio integration
  143. - VS integration will likely not work with VSExpress or Community edition
  144. - VSExpress doesn't support EnvDTE so the only option is to open it using a shell command which doesn't seem to offer precise parameters
  145. - Community edition should work similarily to Pro, but might have a different executable and/or registry paths
  146. - Make sure that 3rd party assemblies can be imported in the project, and that they are properly referenced in VS project generation and compilation
  147. ----------------------------------------------------------------------
  148. Script compilation
  149. - I need to hook up script compilation with assembly refresh, and the build system.
  150. - e.g. when recompiling inside the editor it should automatically start compiling when changes are detected,
  151. show some kind of visual indicator and refresh assemblies when its done. When publishing it should recompile
  152. assemblies for release. Also hook up console to compiler output?
  153. ----------------------------------------------------------------------
  154. Library window
  155. - Might need to improve search (need to test). Do multiple search keywords work properly?
  156. - Consider delaying search until user stops pressing keys (so not to have thousands of search results in the initial stages)
  157. - Save & restore scroll position when Refresh happens
  158. ----------------------------------------------------------------------
  159. Handles
  160. - Ideally free scale handle indicator should always render and be interactable and never be hidden by axis scale indicators (Not high priority)
  161. - Raycast snapping Ribek suggested
  162. ----------------------------------------------------------------------
  163. Include files:
  164. - Test if default values work
  165. - Test project library dependant resources (e.g. changing an include and seeing if shader is reimported)
  166. ----------------------------------------------------------------------
  167. Scene View
  168. Test:
  169. - Custom handles from C#
  170. - Handle snapping
  171. - Multi-select Move/Rotate/scale