TODO.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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 - Material/Shader has no color type so I cannot know when to display normal vector and when color in inspector
  10. TODO - Implement param block and sampler support
  11. TODO - When creating a Material without a shader, a default one should be used, at least in editor
  12. TODO - Setting Material array parameters isn't possible from C#
  13. GUIResourceField doesn't distinguish between tex2d, tex3d and texcube.
  14. ---------------------------------------------------------------------
  15. ProjectLibrary import
  16. I'm not sure if queued dependencies are handled properly. They're handled on an internal ProjectLibrary loop but perhaps I should
  17. return them in checkForModifications?
  18. ---------------------------------------------------------------------
  19. Prefab diff
  20. TODO:
  21. - Document new Prefab code (Prefab & PrefabDiff)
  22. - Test prefab diff creation and applying (unit test)
  23. Prefab unit test:
  24. - Create a set of scene objects
  25. - Create a prefab from them
  26. - Modify original set objects
  27. - Create prefab diff
  28. - Save prefab to disk
  29. - Load prefab and compare with instance
  30. - Compare and assert results
  31. Get prefab saving/loading working and only add diffs later
  32. Need to figure out how to restore IDs after prefab revert/update
  33. High level goal list:
  34. - Add prefab ID system
  35. - Update IDs when linking/breaking a prefab
  36. - Fix native and binary diff so that GameObjectHandle can be compared properly
  37. - Hook up updates:
  38. - Save a diff whenever a HSceneObject with a HPrefab link is saved
  39. - Update active scene when prefab is modified (destroy them, create original prefab then apply saved diff)
  40. When dealing with prefab saving make sure to consider scene object flags like "dont save"
  41. Later: Native+Managed diff is not tested (only the link needs to be tested, I have a separate managed and native tests)
  42. Later: Modify BinarySerializer so that _encodeIntermediate outputs intermediate format directly without a full on encode
  43. See "Prefabs" gdoc for later goals
  44. See "Brainstorm" gdoc for ideas about how to solve the ID issue (and see below)
  45. When deserializing diffs I need to turn on GameObjectManager
  46. - Since diffs should be part of HSceneObject it should already be active but it is something to pay attention to
  47. GameObjectHandle compare in managed serializable diff won't work for prefabs (will have the same problem for native diff)
  48. - Handle comparison compares instanceIDs which will be different between prefab and its instance
  49. - Best solution is probably to add a flag that tells the diff system how to deal with game object handles
  50. (i.e. compare using instance IDs or use the prefab link IDs)
  51. - But since I know I will be using serialized data (and not actual objects) to compare with
  52. I could do a pre-processing step and replace all the handle IDs before compare
  53. Consider making ManagedSerializable* array/list/dictionary method/field references static (right now each instance has its own instance
  54. but they're identical)
  55. ----------------------------------------------------------------------
  56. Polish stage 1
  57. When elements are docked in the main window the menu bar drop down appears behind them
  58. Click on empty part of the menu bar doesn't close the menu bar (ignoring NC area clicks?)
  59. Attempting to dock a window that is not in focus will start drag instead (NC area incorrectly set up?)
  60. Docking problem: When I dock three windows next to each other, e.g. Hierarchy|Scene|Inspector and then try to dock another
  61. so it splits space with Hierarchy vertically the dock area appears over both hierarchy and scene, and the when docked it looks wrong
  62. Decent looking default layout
  63. Fix DX11 (and possibly DX9) rendering
  64. Missing Inspector values (name + transform fields)
  65. Fix handles
  66. Moving the title bar tab and then dropping it closes the window (possibly only happens when there is just one tab)
  67. ----------------------------------------------------------------------
  68. Project window
  69. Later:
  70. - Hook up ping effect so it triggers when I select a resource or sceneobject
  71. - Add ping to SceneTreeView
  72. - Consider delaying search until user stops pressing keys (so not to have thousands of search results in the initial stages)
  73. - Save & restore scroll position when Refresh happens
  74. ----------------------------------------------------------------------
  75. Resources
  76. - Load/Unload/UnloadUnused
  77. - Uses same paths as ProjectLibrary
  78. - It uses different logic depending on Application.isEditor
  79. - If not in editor then a different path is used
  80. - That path is ..\..\Data (relative to the executable)
  81. - When in editor it also does special ProjectLibrary check to ensure that resource is included in final project
  82. - Internally just calls Resources (C++) Load/Unload/UnloadUnused
  83. - Need a flag in ProjectLibrary to include a resource in the final build
  84. - Need to be able to set that flag from C# (Likely through ProjectLibrary) interface
  85. - The final build procedure for the game would then be:
  86. - Copy all the prebuilt binaries (Banshee libraries, Banshee assemblies, 3rd party libraries and prebuilt executable) from Editor install folder to output folder
  87. - Which set of binaries is used depends on selected platform (e.g. win/mac/linux or 32/64bit)
  88. - Recompile script assemblies if needed and copy them from project Internal folder to output folder
  89. - Copy the Builtin resources for engine from Editor install folder to output folder
  90. - Copy all the resources marked with the flag mentioned above to \Data subfolder in the output folder, preserving the same asset structure
  91. ----------------------------------------------------------------------
  92. Simple stuff
  93. - Inject an icon into an .exe (Win32 specific)
  94. - C# wrapper for GUISkin (and a way to assign the current skin to a window)
  95. - Move all the code files into subfolders so their hierarchy is similar to VS filters
  96. - Font doesn't have a C# interface
  97. - Get rid of PoolAlloc and other unused allocators (plus fix bs_new and others which have weird overloads)
  98. - Get rid of event callback from HString and figure out a better way
  99. - GUI TextureField similar to ResourceField but it displays the texture it has assigned
  100. - Better handle and gizmo shaders
  101. - Splash screen
  102. ----------------------------------------------------------------------
  103. Handles
  104. When scaling using center make sure to offset the object before scale
  105. Handles should probably not having shading, or have better shading.
  106. Rotate handle:
  107. - How to handle local/global with rotate handle?
  108. - This maybe just determines initial rotation of the handle?
  109. - I don't think my code properly handles rotation handle transforms (e.g. arc drawing)
  110. Ideally free scale handle indicator should always render and be interactable and never be hidden by axis scale indicators (Not high priority)
  111. Later:
  112. - Raycast snapping Ribek suggested
  113. ----------------------------------------------------------------------
  114. Include files:
  115. Test:
  116. - Try preprocessing using one RenderAPi and then load the shaders using another and see if they're created normally
  117. - Test if default values work
  118. - Test project library dependant resources (e.g. changing an include and seeing if shader is reimported)
  119. ----------------------------------------------------------------------
  120. Scene View
  121. AFTER I have scene widget in C#:
  122. - Test custom handles from C#
  123. - Test handle snapping
  124. Make sure that camera controls only work when scene view is in focus
  125. ----------------------------------------------------------------------
  126. Other
  127. There is a memory corruption happening. Haven't determined where exactly but it's possible it has something
  128. to do with the opening of ColorPicker window. One time I got a heap read after delete error caused by GUIManager
  129. attempting to allocate a new transient mesh, and another time I got a hang when inserting a script object into a std::set.
  130. Got a crash on shutdown that was caused by locking a mutex in an Event destructor. Event was Platform::onMouseCaptureChanged.
  131. Issue happened when I closed the app via the X button (if that's relevant). It doesn't seem to happen always.
  132. - 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.
  133. Create a stack allocatable custom vector implementation and make getResourceDependencies and getCoreDependencies use it.
  134. - These methods are called often and cause allocations whenever they are.
  135. I shouldn't crash the app when a managed exception happens
  136. ----------------------------------------------------------------------
  137. Multi-resource saving
  138. - Modify Font so it doesn't contain a texture, but instead keeps a handle to it
  139. - Register it in its meta file
  140. - When saving such a resource with dependencies save the contained files to a sub-directory with the same name as top level resource
  141. - If it already exists in the manifest at a different location do it anyway, keep the other copy as-is in case user wanted it that way
  142. - I'm not sure whether to do this for all Resource::save calls or only ones originating from ProjectLIbrary?
  143. /*********************************************************************/
  144. /************************ LESS IMPORTANT *****************************/
  145. /*********************************************************************/
  146. ----------------------------------------------------------------------
  147. Mono notes
  148. I can get mono errors by checking g_print calls in goutput.c
  149. - Calling thunks incorrectly can cause those weird errors with no real callstack
  150. Running embedded mono with VS attached causes managed null refs to be registered as access violations
  151. There seems to be a bug in Mono when passing complex structs from C# to C++. e.g. passing Rect3 as a parameter
  152. will corrupt the parameter after it, even if layout and size is exact as the C++ version.
  153. Rect3 has child structs (Vector3) which could be the reason. Be aware of other similar problems.
  154. Mono cannot marshal structures? Taken from their documentation:
  155. Internal calls do not provide support for marshalling structures. This means that any API calls that take a structure
  156. (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.
  157. ----------------------------------------------------------------------
  158. MenuItem
  159. LATER: Add keyboard controls to GUIMenuBar (left/right arrows should move between entries if user is not browsing a sub-menu)
  160. - esc should cancel out of the menu bar
  161. - alt should focus the menu bar
  162. ----------------------------------------------------------------------
  163. VisualStudio integration
  164. VS integration will likely not work with VSExpress or Community edition
  165. - 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
  166. - Community edition should work similarily to Pro, but might have a different executable and/or registry paths
  167. For later:
  168. - Make sure that 3rd party assemblies can be imported in the project, and that they are properly referenced in VS project generation and compilation
  169. ----------------------------------------------------------------------
  170. Script compilation
  171. For later:
  172. - I need to hook up script compilation with assembly refresh, and the build system.
  173. - e.g. when recompiling inside the editor it should automatically start compiling when changes are detected,
  174. show some kind of visual indicator and refresh assemblies when its done. When publishing it should recompile
  175. assemblies for release. Also hook up console to compiler output?