Jump to content
The Dark Mod Forums

stgatilov

Active Developer
  • Posts

    6804
  • Joined

  • Last visited

  • Days Won

    235

Everything posted by stgatilov

  1. Looks like restoring the original intent to me. The potential for breaking something... exists indeed This code is here since the very beginning. And it seems that all "hide" methods remove clip contents, so they don't just change visual representation.
  2. I'm trying to add wxActivityIndicator to my dialog. It seems wxFormBuilder does not have it. So I try to add it in constructor like this: GameConnectionDialog::GameConnectionDialog() : wxutil::TransientWindow(_(GameConnectionDialog_TITLE), GlobalMainFrame().getWxTopLevelWindow(), true) { loadNamedPanel(this, "GameConnectionMainPanel"); //could not find activity indicator in wxFormBuilder wxActivityIndicator* ConnectedActivityIndicator = new wxActivityIndicator(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxT("OMG")); replaceControl(findNamedObject<wxWindow>(this, "ConnectedActivityIndicator"), ConnectedActivityIndicator); As the result, layout of the whole window is dropped: I see empty window with all widgets having the same zero position: Without the additional two lines about progress indicator, the GUI looks perfectly fine. What kind of magic I need to invoke to recompute window layout? Just calling Layout() does not help.
  3. I switched to Restart game command. Right now there is no explicit moment when DR connects to TDM. When you click on something, it implicitly tries to connect, and if it succeeds, then do whatever it needs to do. Wouldn't it be better if connection was fully explicit? So when connection is missing, the whole GUI except for Start Game button is greyed out. And when connection is up, this GUI becomes active. It would definitely simplify the code. With such change, perhaps it would make more sense to rename this "Restart Game" button to just "Connect", and let it have two checkboxes: "Restart" (default ON) and "Dmap" (default OFF): "restart off" + "dmap off" allows connecting to existing game without restarting it. "restart on" + "dmap off" always restarts game, even if it manages to connect to TDM. "restart on" + "dmap on" also runs dmap before starting map. Of course, if there is no TDM process to connect to, a new one will be started in any case. And if mod/map does not match, the new game will be started in any case too. Alternatively, I can leave "Start Game" button with "dmap" checkbox, but add Connect button somewhere, maybe hidden from normal users... Don't want to force everyone (including myself) to restart map to connect. Another issue I noticed is that I need to do some asynchronous programming. At this moment, all automation commands are executed synchronously. The whole GUI is blocked until the current automation command was finished. The only exception is camera synchronization, which is some sort of special case of "continuously executed" request. For the "Restart Game" feature, I definitely don't want to block GUI while dmap and level load are running. Of course I would block connection for anything else while these tasks are going, but the user should be free to continue working on his map. Which means I need one of: Separate thread. With all the problems coming from it... Asynchronous programming around some sort of event loop. I'm not very experienced with asynchronous programming, but I have worked a bit with promises and async/await in javascript. The game connection singleton already has "think" function called on timer, which is something like its own event loop embedded into event loop of wxWidgets. I can either implement something like promises, or implement something basic like a hardcoded chain of steps with waiting for response between then.
  4. I guess one approach would be to enable "Update entities" mode automatically when user clicks on "Restart Game" button. At this moment we can save .map in DarkRadiant, then spawn TDM or use existing or attach, in which start this map afresh of restart it. After that, the user can use the mode without problems, and cannot disable it (unless connection is lost). On the other hand, if the user did not click "Restart Game" button, i.e. started TDM manually, enabled automation, and started the map manually, then the whole line is blocked. He can do camera sync and reload from .map though.
  5. The idea is mostly to replace on/off radio buttons with single checkbox. Yes, it can be done for camera sync. Yes, it can be done for "reload from .map". Unfortunately, it cannot be done for "hot reload" / "update entities" / whatever it is called (soon I'll get confused myself with all these names ). User has to explicitly enable the mode even if he only wants to update manually, because we have to install a huge listener over all the entities. This mode only tracks the changes done to entities while the listener is on. It is important that when the mode is enabled, TDM has the same state of the map. That's why we should save .map file and force TDM to reload from .map file when user enables this mode. I can switch to your style, but I need additional widget on "Hot reload" line, which would actually enable the mode. By the way, "restart game" + "dmap" checkbox already fits your proposal.
  6. Yeah, and I would still be happy to change color of "manual" (yellow) and "on" (green) radio buttons when they are selected. Same applies to "Connected" checkbox... although it sucks being a checkbox. And inactive checkbox is especially hard to notice if it toggles...
  7. After looking at rather weak and varied response about game connection, I decided to put all available features into GUI. Here is how it looks on FormBuilder: Buttons should have better images The "connected" checkbox is just a boolean indicator, I did not find any well-established widget for this. I prefer adding lengthy tooltips over writing lengthy text labels. The buttons on right side (from top to bottom): set camera from game, reload entities now, reload from .map now. The buttons on bottom (from left to right): respawn selected entities, pause game. Are there any guidelines for button sizes? how to draw images? UPDATE: Same widget with a big larger size:
  8. Can particles in TDM be affected by lights? As far as I remember, that was limitation of the renderer...
  9. GL_COMPRESSED_RG_RGTC2 is the right format. We don't have precompressed RGTC textures yet, maybe precompressed upload is broken. Although I recall that someone tried it and said it was OK... Unfortunately, you won't be able to pass RGTC texture "as is" to renderer. It only contains X and Y components, so Z component must be computed in shader (maybe also X and Y normalized).
  10. I think new GUI plus (re)start button will significantly improve on both points. Except that I'm against enabling automation by default: either you start TDM from DarkRadiant, or you enable it manually.
  11. As of now, I see only 3 responses. And every feature (except for "pause game") has its users. If it continues the same way, then I'll ditch @peter_spy's idea of "less buttons", and put all implemented features into the GUI, like it was in my original suggestion (except LEDs replaced with something like radio buttons).
  12. That's not a call for new DR features. The discussion is exclusively about Game Connection feature, or the "Connection" menu in DarkRariant.
  13. I hope I'll return to Connection feature in DarkRadiant soon. Since better GUI is the first on the TODO list, I decided to create a poll about used features. Almost half a year have passed, and hopefully some usage patterns exist now. Unfortunately, our forum only allows 3 questions in a poll, so I created poll in google forms. Here it is: https://docs.google.com/forms/d/e/1FAIpQLSf8ITryAHqiByvXIKdRJcfQnnvgDxgN8gNlFckxXtr2rms-IQ/viewform?usp=sf_link Depending on results, some features can be removed from the GUI, or put to less obvious location (like "advanced" tab or whatever).
  14. It seems this process is finally over. I have repacked 33 missions out of 147, which for some reason take 6.5 GB out of 8.8 GB If anyone has objections or comments about the result of repacking, better say now. Note that you can test all the updated FMs yourself: the first post in this thread describes which version of TDM to install, and how to connect in-game downloader to updated versions. Also you can download updated FMs by direct links in the second post of this thread. My plan is to give a week or two to this, then merge my SVN branch to trunk. It means that all the future dev builds will include my changes, and will be able to work with updated FMs properly. The FM database, however, will not receive updated versions of FMs until 2.10 is released, or at least until the late moments of 2.10 beta phase (i.e. till 2022).
  15. Mission "Hidden Hands: The Anomaly" by @JackFarmer. It has exactly the same overrides as in hhtlc: mainmenu_background.gui for custom background mainmenu_briefing_video.gui to skip briefing state mainmenu_newgame.gui for a size tweak on mod selection page (not necessary here) Removed all the overrides. Added to mainmenu_custom_defs.gui: //stgatilov #5323: skip briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: change background in main menu #define MM_BACKGROUNDS_META_ALLSIMPLE BackgroundCustomHHAnomaly Added mainmenu_background_custom.gui: windowDef BackgroundCustomHHAnomaly { rect 0, 0, 640, 480 background "guis/assets/custom_title" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomHHAnomaly) } In new TDM, the update FM looks good: custom background is displayed, briefing page is skipped. In TDM 2.09, default background is shown in main menu, and empty briefing page is displayed --- as expected.
  16. Mission "Hidden Hands: The Lost Citadel" by @JackFarmer. This one overrides mainmenu_background.gui to set background, mainmenu_briefing_video.gui to avoid empty briefing page. Also, it overrides mainmenu_newgame.gui to slightly move the title of the mission on mod selection page. Removed all these files. Added to mainmenu_custom_defs.gui: //stgatilov #5323: skip briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: change background in main menu #define MM_BACKGROUNDS_META_ALLSIMPLE BackgroundCustomLostCitadel Added mainmenu_background_custom.gui with: windowDef BackgroundCustomLostCitadel { rect 0, 0, 640, 480 background "custom_goldwell_animated_menu" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomLostCitadel) } The updated FM works fine in new TDM: animated background works, briefing page is skipped. However, the "Citadel" in the name of the FM is not visible in mod selection page. But given that this screen is defined by the currently installed mission, that dirty fix won't take effect most of the time anyway. In TDM 2.09, the FM works too, but with default background in the menu, and with empty parchment shown as briefing. Speaking of mod selection screen, there the complete name of the FM is displayed, but it does not fit the parchment it is displayed on... hmm
  17. Mission "Hidden Hands: Vitalic Fever" by @JackFarmer and @Amadeus. It overrides mainmenu_background.gui for main menu background and mainmenu_briefing_video.gui to skip empty briefing page. Removed both files, then added this to mainmenu_custom_defs.gui: //stgatilov #5323: skip briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: change background in main menu #define MM_BACKGROUNDS_META_ALLSIMPLE BackgroundCustomVitalicFever Also added mainmenu_background_custom.gui: windowDef BackgroundCustomVitalicFever { rect 0, 0, 640, 480 background "guis/assets/custom_title" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomVitalicFever) } As usual, everything is OK in new TDM, but TDM 2.09 now shows default background and displays empty briefing page.
  18. Mission "The Painter's Wife" by Fractured Glass Company (I guess @Bikerdude is corresponding author). It overrides mainmenu_background.gui for custom background, and mainmenu_briefing_video.gui to hide empty briefing page. I removed the custom .gui files. Then added the following to mainmenu_custom_defs.gui: //stgatilov #5323: skip briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: change background in main menu #define MM_BACKGROUNDS_META_ALLSIMPLE BackgroundCustomPaintersWife Added mainmenu_background_custom.gui with: windowDef BackgroundCustomPaintersWife { rect 0, 0, 640, 480 background "guis/assets/mainmenu/pw_background" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomPaintersWife) } The update FM works properly in the new TDM: custom backgrouns is displayed, briefing is skipped. In TDM 2.09, main menu show default background, and the empty briefing page is shown.
  19. Mission "The Hare in the Snare, Pt. 1" by @Frost_Salamander and @Kerry000. The authors decided to avoid "forbidden overrides" by using custom title to change background in main menu. Now custom title is deprecated, so it should be reworked using new features. So I commented out custom title and set background "the new way" in mainmenu_custom_defs.gui: //stgatilov #5323: custom title image is deprecated! //#define MM_SHOW_CUSTOM_MAINMENU_TITLE 1 //stgatilov #5323: use new way of setting background instead //since image has parchment imbued, override only main page background #define MM_BACKGROUNDS_MAINMENU_NOTINGAME BackgroundCustomHareSnare #define MM_BACKGROUNDS_EXTRAMENU_NOTINGAME BackgroundCustomHareSnare Note that the background image has parchment graphics in it (because otherwise custom title hack would hide parchment). For that reason: I cannot set it on briefing and difficulty selection pages. I cannot even set it for in-game menu, because objectives screen will look broken. This I had to retain custom background only on the out-of-game main menu. Added mainmenu_background_custom.gui with: windowDef BackgroundCustomHareSnare { rect 0, 0, 640, 480 background "guis/assets/hits1_menu" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomHareSnare) } With new TDM, the mission looks nice, custom background shows on the initial page + various settings/new game/load game pages. I clicked through various screens, and did not find anything looking bad. In TDM 2.09, default background in shows everywhere in the main menu.
  20. Mission "A good neighbor" by @Amadeus It overrides mainmenu_background.gui in order to set custom background. Removed this file. Then added lines to mainmenu_custom_defs.gui //stgatilov #5323: set custom background for main menu #define MM_BACKGROUNDS_META_ALLSIMPLE BackgroundCustomGoodNeighbor Added mainmenu_background_custom.gui with: windowDef BackgroundCustomGoodNeighbor { rect 0, 0, 640, 480 background "guis/assets/custom_title" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomGoodNeighbor) } The updated FM works properly in the new TDM, custom background is visible in main menu. TDM 2.09 shows default background, as expected.
  21. New dev build is available: dev16330-9508 And I forgot to announce the previous dev build too : dev16325-9462 Note that subtitles support should work now, but the way how subtitles are specified will most likely change.
  22. I think it should be one setting, so that the font letters remain proportional (at least approximately). As far as I remember, there is already a way to open console for 1/3 of screen or even 1/4. I don't see any need to make another shortcut for 2/3, especially if you are going to allow reducing font size. No way. The whole engine uses 8-bit characters, Unicode will break just everything.
  23. Mission "Volta 1: The Stone" by @kingsal. Overrides: mainmenu_background.gui (for custom background) mainmenu_briefing_video.gui (for removing empty briefing page) mainmenu_main.gui (no changes here) tdm_objectives.gui (squeeze 6-th objective, don't close by click) tdm_objectives_core.gui (squeeze 6-th objective) tdm_objectives_defs.gui (squeeze 6-th objective) So I removed all these files. Then added the following to mainmenu_custom_defs.gui: //stgatilov #5323: disable briefing state #define ENABLE_MAINMENU_BRIEFING 0 //stgatilov #5323: set custom background #define MM_BACKGROUNDS_META_ALLSIMPLE BackgroundCustomVolta And some code for background into mainmenu_background_custom.gui windowDef BackgroundCustomVolta { rect 0, 0, 640, 480 background "guis/assets/mainmenu/volta_menu_background" BACKGROUND_DEFAULT_BEHAVIOR(BackgroundCustomVolta) } The updated FM works nicely in the new TDM. Of course, custom sizes of objectives are lost, now there are 5 objectives without scrolling. Also, the parchment on difficulty selection screen looks dirty (old texture), I guess FM overrides it. In TDM 2.09, the mission plays properly, but main menu has default background. Also, the empty briefing page is displayed after video --- as expected.
  24. I think that's the reason why Entity-Component-System architecture became a popular replacement for object-oriented approach with inheritances.
×
×
  • Create New...