TODO.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. TODO - Later - When building level for release make sure to clear all prefab diffs (possibly store them elsewhere in the first place)
  32. - And all prefab instances should have updateFromPrefab called on them.
  33. Test (likely later once I have more editor functionality working):
  34. - If level save/load works
  35. - If drag and drop works, both ways, plus double-click to load level
  36. - Game object handle compare
  37. - ID restore systems
  38. - Native+Managed diff (only the link between the two)
  39. Code quality improvements:
  40. - Modify BinarySerializer so that _encodeIntermediate outputs intermediate format directly without a full on encode
  41. - Consider making ManagedSerializable* array/list/dictionary method/field references static (right now each instance has its own instance
  42. but they're identical)
  43. ----------------------------------------------------------------------
  44. Polish stage 1
  45. Fix inspector crashes:
  46. - Try expanding/collapsing foldouts
  47. - Had one with invalid index in Layout.InsertElement called from InspectableObject.Update
  48. - And another
  49. Test inspector selection, selecting a resource and adding/removing component updates
  50. Handle seems to lag behind the selected mesh
  51. ProjectLibrary seems to import some files on every start-up
  52. Crash on shutdown in mono_gchandle_free
  53. Material/Shader has no color type so I cannot know when to display normal vector and when color in inspector
  54. First screenshot work:
  55. - Additional menu bar items:
  56. - File: Exit, Save Project, New Project, Open Project, Save Scene As
  57. - Edit: Undo/Redo, Cut/Copy/Paste/Duplicate/Delete(need to make sure it works in Hierarchy, with shortcuts), Frame Selected, Preferences, Play/Pause/Step
  58. - Assets (also add to context): Create(Folder, Material, Shader, Script, Prefab, GUI Skin), Show in explorer
  59. - Game Object (also add to context): Create(Empty, Empty Child, Camera, Renderable, Point/Spot/Directional Light), Apply prefab, Break prefab, Revert prefab
  60. - Possibly create helper objects: Cube, Sphere, Plane, Quad, Capsule, Cylinder
  61. - Component (also add to inspector context): Camera, Renderable, Point/Spot/Directional light, all other components from scripts
  62. - Help - About, API Reference (link to site)
  63. - Camera & Renderable inspector
  64. - Normalize colors between project and hierarchy windows (both blue or both orange selection + same ping color)
  65. - (Optionally) New UI look (tabs, component/array containers, better buttons)
  66. - (Optionally) Console window
  67. -----------
  68. SceneTreeView
  69. - Hook up ping effect so it triggers when I select a resource or sceneobject
  70. - Add Selection::ping method to both C++ and C# and an Event that triggers when its called
  71. - See if it needs other enhancements (rename, delete all work properly? etc.)
  72. - Add copy/cut/paste/duplicate (with context menu)
  73. - Cannot deselect element by clicking on empty space
  74. Need a way to add scene objects and components (and remove them)
  75. - Components adding should be only done by drag and dropping scripts to inspector (undoable)
  76. - COmponent removal should be done by context menu in inspector (undoable)
  77. - Adding scene objects should be doable from context menu in Hierarchy, by dropping a Prefab or by main Menu (undoable)
  78. - Deleting them should be doable by context menu in Hierarchy and Del keystroke (undoable)
  79. Add shortcut keys for view/move/rotate/scale
  80. Add "focus on object" key (F) - animate it: rotate camera towards then speed towards while zooming in
  81. Ortographic camera views (+ gizmo in scene view corner that shows camera orientation)
  82. Drag to select in scene view
  83. Replace "minimize" button in tabbed title bar with maximize and make sure it works
  84. Make sure to persist EditorSettings
  85. Later:
  86. - I could record undo/redo per-property using the new diff system
  87. - When building game make sure to go over texture resources and ensure they are saved in the valid format
  88. as we don't want to do format conversion at runtime (Not cruical, but it should be done eventually)
  89. - This should something similar to Unity where when changing the platform all resources get reimported
  90. - Save the default editor layout somewhere and make sure its used on initial startup when no layout exists
  91. - Undo/Redo when breaking or reverting a scene object
  92. ----------------------------------------------------------------------
  93. Simple stuff
  94. - Inject an icon into an .exe (Win32 specific)
  95. - C# wrapper for GUISkin (and a way to assign the current skin to a window)
  96. - Move all the code files into subfolders so their hierarchy is similar to VS filters
  97. - Font doesn't have a C# interface
  98. - Get rid of PoolAlloc and other unused allocators (plus fix bs_new and others which have weird overloads)
  99. - Get rid of event callback from HString and figure out a better way
  100. - Splash screen
  101. ----------------------------------------------------------------------
  102. Resources
  103. - Load/Unload/UnloadUnused
  104. - Uses same paths as ProjectLibrary
  105. - It uses different logic depending on Application.isEditor
  106. - If not in editor then a different path is used
  107. - That path is ..\..\Data (relative to the executable)
  108. - When in editor it also does special ProjectLibrary check to ensure that resource is included in final project
  109. - Internally just calls Resources (C++) Load/Unload/UnloadUnused
  110. - Need a flag in ProjectLibrary to include a resource in the final build
  111. - Need to be able to set that flag from C# (Likely through ProjectLibrary) interface
  112. - The final build procedure for the game would then be:
  113. - Copy all the prebuilt binaries (Banshee libraries, Banshee assemblies, 3rd party libraries and prebuilt executable) from Editor install folder to output folder
  114. - Which set of binaries is used depends on selected platform (e.g. win/mac/linux or 32/64bit)
  115. - Recompile script assemblies if needed and copy them from project Internal folder to output folder
  116. - Copy the Builtin resources for engine from Editor install folder to output folder
  117. - Copy all the resources marked with the flag mentioned above to \Data subfolder in the output folder, preserving the same asset structure
  118. ----------------------------------------------------------------------
  119. Project window
  120. Later:
  121. - Might need to improve search (need to test). Do multiple search keywords work properly?
  122. - Consider delaying search until user stops pressing keys (so not to have thousands of search results in the initial stages)
  123. - Save & restore scroll position when Refresh happens
  124. ----------------------------------------------------------------------
  125. Handles
  126. Ideally free scale handle indicator should always render and be interactable and never be hidden by axis scale indicators (Not high priority)
  127. Later:
  128. - Raycast snapping Ribek suggested
  129. ----------------------------------------------------------------------
  130. Include files:
  131. Test:
  132. - Test if default values work
  133. - Test project library dependant resources (e.g. changing an include and seeing if shader is reimported)
  134. ----------------------------------------------------------------------
  135. Scene View
  136. Test:
  137. - Custom handles from C#
  138. - Handle snapping
  139. - Multi-select Move/Rotate/scale
  140. ----------------------------------------------------------------------
  141. Undo/Redo C#
  142. UndoRedo class
  143. - RegisterCommand(cmd, operationName)
  144. - pushGroup
  145. - popGroup
  146. - undo
  147. - redo
  148. - clear
  149. RecordObjectCommand
  150. - Saves the entire object and at the end of the frame performs a diff of the object to actually generate the undo operation
  151. - Must work for scene objects, components and resources
  152. SetParentCommand - For reparenting scene objects
  153. AddComponentCommand
  154. DestroyCommand - for destroying scene objects or components
  155. ----------------------------------------------------------------------
  156. Other
  157. There is a memory corruption happening. Haven't determined where exactly but it's possible it has something
  158. to do with the opening of ColorPicker window. One time I got a heap read after delete error caused by GUIManager
  159. attempting to allocate a new transient mesh, and another time I got a hang when inserting a script object into a std::set.
  160. Got a crash on shutdown that was caused by locking a mutex in an Event destructor. Event was Platform::onMouseCaptureChanged.
  161. Issue happened when I closed the app via the X button (if that's relevant). It doesn't seem to happen always.
  162. - This is likely due to some other error. When VS finds an exception it triggers a dialog box which triggers the msg loop in-engine and causes another exception.
  163. Create a stack allocatable custom vector implementation and make getResourceDependencies and getCoreDependencies use it.
  164. - These methods are called often and cause allocations whenever they are.
  165. I shouldn't crash the app when a managed exception happens
  166. /*********************************************************************/
  167. /************************ LESS IMPORTANT *****************************/
  168. /*********************************************************************/
  169. ----------------------------------------------------------------------
  170. Mono notes
  171. I can get mono errors by checking g_print calls in goutput.c
  172. - Calling thunks incorrectly can cause those weird errors with no real callstack
  173. Running embedded mono with VS attached causes managed null refs to be registered as access violations
  174. There seems to be a bug in Mono when passing complex structs from C# to C++. e.g. passing Rect3 as a parameter
  175. will corrupt the parameter after it, even if layout and size is exact as the C++ version.
  176. Rect3 has child structs (Vector3) which could be the reason. Be aware of other similar problems.
  177. Mono cannot marshal structures? Taken from their documentation:
  178. Internal calls do not provide support for marshalling structures. This means that any API calls that take a structure
  179. (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.
  180. ----------------------------------------------------------------------
  181. MenuItem
  182. LATER: Add keyboard controls to GUIMenuBar (left/right arrows should move between entries if user is not browsing a sub-menu)
  183. - esc should cancel out of the menu bar
  184. - alt should focus the menu bar
  185. ----------------------------------------------------------------------
  186. VisualStudio integration
  187. VS integration will likely not work with VSExpress or Community edition
  188. - 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
  189. - Community edition should work similarily to Pro, but might have a different executable and/or registry paths
  190. For later:
  191. - Make sure that 3rd party assemblies can be imported in the project, and that they are properly referenced in VS project generation and compilation
  192. ----------------------------------------------------------------------
  193. Script compilation
  194. For later:
  195. - I need to hook up script compilation with assembly refresh, and the build system.
  196. - e.g. when recompiling inside the editor it should automatically start compiling when changes are detected,
  197. show some kind of visual indicator and refresh assemblies when its done. When publishing it should recompile
  198. assemblies for release. Also hook up console to compiler output?