Jump to content

wraitii

WFG Programming Team
  • Posts

    3.399
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by wraitii

  1. Aye, I expected that. Investigating: there is actually a rather old, still open ticket about this "return false"change: https://trac.wildfiregames.com/ticket/2427 . It seems to have been a hack if I'm being honest. I'm not too sure what's happening exactly, but somehow wxWidgets end up with double-events. On that specific, I feel like we should return true here. Perhaps SDL2 fixed something. It's definitely related to windows, anyways. On to "how to fix the text" -> Based on the WxWidgets doc, we will get keydown/keyUp events and also, for text, special "Char" events that contain "translated" test, i.e. shift+a returns "A" instead of "a". When a key is pressed, it ought to send both a KeyDown and a KeyChar event. What we do is skip the keydown event for chars > 256 (i.e. non-ascii) and use KeyChar instead. The pushing of event is done in ScenarioEditor.cpp, and the handling of messages here. Based on a cursory reading, this should all work, so what goes wrong? Well, the comment here seems accurate. CInput, the class responsible for input fields in the 0 A.D. GUI, also processes these "translated" events _> In fact historic_bruno did that change. But as you can see in the atlas Message handler, we do a "keydown/keyup" thing, which won't work -> the game expects a TextEditing message. Based on the SDL2 doc, it seems TEXTINPUT is when the text is "committed", i.e. should be stored, while TEXTEDITING is while text is "going on". This doesn't make much sense in English, but think Mandarin where multiple characters can merge into one glyph (actually, there's an SDL wiki page for that) It seems WxWidgets doesn't really expose this low-level stuff, so all we get is the "end" character. So I think you should be able to simulate a SDL_TextInputEvent instead of an SDL_TextEditingEvent.
  2. I think I "cmd-tab cmd tab" to get the focus back into Atlas. It's not impossible that we have some outdated settings in WXWidgets, the "return false" here is indeed rather suspect. If that also fixes the double key input it's pretty good. Can you delete text? In A23 it's also messed up. Can you input text if you "start'" the simulation? Edit -> That being said, there might be something else to do, given the fact that we are supposed to use SDL2 for events, so I don't really know.
  3. I'm assuming we don't have a window because WxWidgets is providing the window. That being said, this might now be buggy. Thanks for the investigation, I'll try and give this another look next week.
  4. I failed to read your post and found a different solution in https://code.wildfiregames.com/D2752, but I suppose people will prefer your fixes for being less disruptive. I'll make a diff with your changes too. Thanks for reporting and debugging this. I report text input as working "correctly" if launched from in-game (as in, it's broken as it is on 10.14 with the double character thing). Edit: mh, pathching wxwidgets though.
  5. Sadly that code is from @mimo and I've never looked at it. WRT to work, I invite you to post a patch on Phabricator at https://code.wildfiregames.com
  6. Two ways to fix this: - fix the purely graphical issue. This is probably easy enough to do. - make entities visible as soon as some of it is out of FOW. That's likely trickier, but I'd have to check the implementation. Either way, I don't think a flag makes too much sense, though thanks for pinging about the issue, I'd forgotten about it.
  7. The large drawback is that we'll have to rewrite a lot of the code . Other drawbacks include that we'll still pay some 'synchronous' AI cost every turn, where a perfectly asynchronous AI would not. It's micro-vs-speed basically, the there is a large speed disadvantage to copying the sim state, so as I expand on above - could work out. An alternative would be doing something like the gRPC diff on Phabricator, where we allow external AIs to plug-in the sim-state. Same architecture but slightly different realisation.
  8. Agreed. Pikemen and such, when gathering, aren't supposed to be burdened by their heavy armour anyways (since we show them not having it), so their regular walk speed should be basically identical. Only when in special 'formation' mode should they possibly be slower. Champions are a different deal.
  9. At some point we need configuration files to specify what to show directly, what to show in the tooltips, what to show in the Structure Tree.
  10. Yeah we need to rework the tooltips for sure. Adding some grid-like structure would definitely help a ton with readability, but the flexibility of the game's system make that difficult to get right. I think one thing we should do is take more vertical space, so that items are better separated, and then you can find the same info on the same vertical line. You might also note that HP is actually redundant with armour somewhat, since having more armour = having more HP for that attack type. One should find a few different cases for tooltips that are different and try and work something out that works OK for the general case.
  11. I have this idea, that I should flesh out in a mod, of having civilisations "Tiers", and only trying to balance inside intra-tier, not extra-tier. That would allow for more diversity imo, while still allowing balanced gameplay.
  12. With the phenotype system, we could have lefties and righties (probably not the best use of the system though)
  13. To be honest SVN doesn't really work that way right now + we don't really have spear-specific upgrades. This is just a good example of how your mod handles things differently.
  14. Another breaking change: rP22824 See commit message (or diff) for the changes.
  15. I did indeed - have to say I completely forgot to test techs on this diff (see 'missed an edge case' in the OP :p )... Broke all armour/attack techs pretty much I'll fix it tonight or tomorrow depending on time I have.
  16. This SVN or your mod? The incorrect animation based on position is not something I recall seeing in svn but I can't say I've tested this code a huge amount.
  17. Hello everyone, This to inform modders of a breaking change in templates following https://code.wildfiregames.com/rP22754. Capture previously looked: <Capture> <Value>5</Value> ...[Other Stuff]... </Capture> You need to change "Value" into "Capture". The reason for this is that you may now use the "Damage", "Capture", and "GiveStatus" nodes in any place where you could previously use Damage. For example, you can now have capturing splash damage, or both a Capture and a Damage node in the same attack. "Capture" is no longer hardcoded to be the only attack type that can capture. This change also affects many simulation components, so feel free to ask questions about those if needed. Let me know if anything looks odd, as again, this changed many component files and there's a chance I've missed an edge case. Please note that tooltip support is not yet committed, this will be a WIP in the upcoming days.
  18. I'm working on some trigger-bound maps to test performance of some stuffs... Some interesting results. In particular, creating a new entity is somewhat slow (200µs), so creating dozens of entities per turn can be a noticeable slowdown. The main culprits seem to be Identity and ResourceGatherer, which do caching on Init. In general it appears JS components are a bit slower than C++, which is to be expected. Not sure if anything can be done about that though.
  19. OK so it does seem like you are running from the Applications folder. Could you open a Finder window, press "cmd + ctrl + shift" simultaneously, then go to "~/Library/Application Support/0ad/" (see screenshot, in French but ought to be the same interface) Then press "cmd + i" simultaneously, and screenshot the window that opens? It should look something like this: (NB: to screenshot, press "cmd + shift + 4", then press space once, and you just click on the window you want to screenshot).
  20. This sounds vaguely like a permission problem. What folder are you running 0 A.D in?
  21. Those should just be the Idle animation of the "Gather Food" variant. But perhaps Atlas doesn't have great support for that. TBH we're pretty close to hitting some hard limit in the customisability of our actor file there, so we'll probably have to think of a better way to do this soon-ish : /
  22. I believe that's because I changed the actor format in a breaking way but didn't really communicate on it. See https://code.wildfiregames.com/rP22442 You now must use animation variants and the regular Walk/Idle formations instead of walk_testudo_front animations.
  23. @Alexandermb Yes there's been changes recently. That you need to be aware of: Formations now use animation variants, and the regular "Idle", "Walk", "Run" animations. So you need to setup your actors to have a regular variant group with idle/walk/run animations, and a formation-special variant. Also, while remaining in formation units will IDLE in formation-animation, but when that formation breaks (for whatever reason), they will revert to their usual animation. I believe there's still a few issues, but tbh the current code needs some streamlining before we fix these. Check out my changes to the testudo formation actors.
  24. Yeah, I was never quite happy with them There's that and ship trails, and a few related effects that we should have, but I think it needs a rethinking of how we handle the water a bit.
×
×
  • Create New...