TODO.txt 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. ----------------------------------------------------------------------
  7. C# Material/Shader:
  8. TODO - Material/Shader has no color type so I cannot know when to display normal vector and when color in inspector
  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. Extend ProjectLibrary.Refresh
  15. - Called in EditorApplication on start or assembly refresh
  16. - Calls checkForModifications(false) internally, retrieves dirty resources and adds them to a HashSet (if they're not already there)
  17. - EditorApplication also subscribes to FolderMonitor and when it triggers asset modification call Refresh(false)
  18. - In Update() go over all dirty resources and call checkForModifications(true) on that specific path
  19. - Time-slice the import so UI has time to update
  20. - Open/Close/Update the progress bar as necessary
  21. - Update is called every frame by EditorApplication
  22. Modify ProjectWindow so it only does file-system copy/move operations for copy/paste
  23. and drag and drop. After which it calls ProjectLibrary.Refresh.
  24. ----------------------------------------------------------------------
  25. Project window
  26. Simple tasks:
  27. - Hook up scene view drag and drop instantiation
  28. Later:
  29. - Hook up ping effect so it triggers when I select a resource or sceneobject
  30. - Add ping to SceneTreeView
  31. - Consider delaying search until user stops pressing keys
  32. - Save & restore scroll position when Refresh happens
  33. - Might need to handle overwritting better when importing/moving
  34. - When pasting generate a unique filename if the same one already exists
  35. - Do the same when drag and dropping (either internal, or OS)
  36. ----------------------------------------------------------------------
  37. Resources
  38. - Load/Unload/UnloadUnused
  39. - Uses same paths as ProjectLibrary
  40. - It uses different logic depending on Application.isEditor
  41. - If not in editor then a different path is used
  42. - That path is ..\..\Data (relative to the executable)
  43. - When in editor it also does special ProjectLibrary check to ensure that resource is included in final project
  44. - Internally just calls Resources (C++) Load/Unload/UnloadUnused
  45. - Need a flag in ProjectLibrary to include a resource in the final build
  46. - Need to be able to set that flag from C# (Likely through ProjectLibrary) interface
  47. - The final build procedure for the game would then be:
  48. - Copy all the prebuilt binaries (Banshee libraries, Banshee assemblies, 3rd party libraries and prebuilt executable) from Editor install folder to output folder
  49. - Which set of binaries is used depends on selected platform (e.g. win/mac/linux or 32/64bit)
  50. - Recompile script assemblies if needed and copy them from project Internal folder to output folder
  51. - Copy the Builtin resources for engine from Editor install folder to output folder
  52. - Copy all the resources marked with the flag mentioned above to \Data subfolder in the output folder, preserving the same asset structure
  53. ----------------------------------------------------------------------
  54. Simple stuff
  55. C#:
  56. Dialog.Show(title, text, btn1 text, btn1 callback, btn2 text, btn2 callback, btn3 text, btn3 callback)
  57. Other simple stuff:
  58. - Inject an icon into an .exe (Win32 specific)
  59. - C# wrapper for GUISkin (and a way to assign the current skin to a window)
  60. - Move all the code files into subfolders so their hierarchy is similar to VS filters
  61. - Font doesn't have a C# interface
  62. - Get rid of PoolAlloc and other unused allocators (plus fix bs_new and others which have weird overloads)
  63. - Call stack from C# to use in Debug.Log calls
  64. - Get rid of event callback from HString and figure out a better way
  65. - GUI TextureField similar to ResourceField but it displays the texture it has assigned
  66. - Better handle and gizmo shaders
  67. - Splash screen
  68. ----------------------------------------------------------------------
  69. Handles
  70. When scaling using center make sure to offset the object before scale
  71. Handles should probably not having shading, or have better shading.
  72. Rotate handle:
  73. - How to handle local/global with rotate handle?
  74. - This maybe just determines initial rotation of the handle?
  75. - I don't think my code properly handles rotation handle transforms (e.g. arc drawing)
  76. Ideally free scale handle indicator should always render and be interactable and never be hidden by axis scale indicators (Not high priority)
  77. Later:
  78. - Raycast snapping Ribek suggested
  79. ----------------------------------------------------------------------
  80. Include files:
  81. Test:
  82. - Try preprocessing using one RenderAPi and then load the shaders using another and see if they're created normally
  83. - Test if default values work
  84. - Test project library dependant resources (e.g. changing an include and seeing if shader is reimported)
  85. ----------------------------------------------------------------------
  86. Scene View
  87. AFTER I have scene widget in C#:
  88. - Test custom handles from C#
  89. - Test handle snapping
  90. Need a way to drag and drop items from Scene tree view to Scene view
  91. - When dragging a mesh it should by default create a SceneObject with a renderable
  92. - I might want a C# DragAndDrop class? It can contain Resource or SceneObject only for now, similar to Selection
  93. ----------------------------------------------------------------------
  94. Other
  95. There is a memory corruption happening. Haven't determined where exactly but it's possible it has something
  96. to do with the opening of ColorPicker window. One time I got a heap read after delete error caused by GUIManager
  97. attempting to allocate a new transient mesh, and another time I got a hang when inserting a script object into a std::set.
  98. Got a crash on shutdown that was caused by locking a mutex in an Event destructor. Event was Platform::onMouseCaptureChanged.
  99. Issue happened when I closed the app via the X button (if that's relevant). It doesn't seem to happen always.
  100. - 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.
  101. Create a stack allocatable custom vector implementation and make getResourceDependencies and getCoreDependencies use it.
  102. - These methods are called often and cause allocations whenever they are.
  103. ----------------------------------------------------------------------
  104. Multi-resource saving
  105. - Modify Font so it doesn't contain a texture, but instead keeps a handle to it
  106. - Register it in its meta file
  107. - When saving such a resource with dependencies save the contained files to a sub-directory with the same name as top level resource
  108. - 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
  109. - I'm not sure whether to do this for all Resource::save calls or only ones originating from ProjectLIbrary?
  110. /*********************************************************************/
  111. /************************ LESS IMPORTANT *****************************/
  112. /*********************************************************************/
  113. ----------------------------------------------------------------------
  114. Mono notes
  115. I can get mono errors by checking g_print calls in goutput.c
  116. - Calling thunks incorrectly can cause those weird errors with no real callstack
  117. Running embedded mono with VS attached causes managed null refs to be registered as access violations
  118. There seems to be a bug in Mono when passing complex structs from C# to C++. e.g. passing Rect3 as a parameter
  119. will corrupt the parameter after it, even if layout and size is exact as the C++ version.
  120. Rect3 has child structs (Vector3) which could be the reason. Be aware of other similar problems.
  121. Mono cannot marshal structures? Taken from their documentation:
  122. Internal calls do not provide support for marshalling structures. This means that any API calls that take a structure
  123. (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.
  124. ----------------------------------------------------------------------
  125. MenuItem
  126. LATER: Add keyboard controls to GUIMenuBar (left/right arrows should move between entries if user is not browsing a sub-menu)
  127. - esc should cancel out of the menu bar
  128. - alt should focus the menu bar
  129. ----------------------------------------------------------------------
  130. VisualStudio integration
  131. VS integration will likely not work with VSExpress or Community edition
  132. - 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
  133. - Community edition should work similarily to Pro, but might have a different executable and/or registry paths
  134. For later:
  135. - Make sure that 3rd party assemblies can be imported in the project, and that they are properly referenced in VS project generation and compilation
  136. ----------------------------------------------------------------------
  137. Script compilation
  138. For later:
  139. - I need to hook up script compilation with assembly refresh, and the build system.
  140. - e.g. when recompiling inside the editor it should automatically start compiling when changes are detected,
  141. show some kind of visual indicator and refresh assemblies when its done. When publishing it should recompile
  142. assemblies for release. Also hook up console to compiler output?