Spring RTS Game Dev

390 Members
Spring RTS Game Develop room25 Servers

Load older messages

18 May 2022
@_discord_214258385531568128:springrts.comScary le Poo maybe that isn't what you mean 05:47:12
@_discord_214258385531568128:springrts.comScary le Poo evo examples are a little old but I can show what I mean 05:47:39
@_discord_214258385531568128:springrts.comScary le Poo https://github.com/EvolutionRTS/Evolution-RTS/blob/master/Units/eorb.lua
@_discord_214258385531568128:springrts.comScary le Poo https://github.com/EvolutionRTS/Evolution-RTS/blob/master/Units/eorb_up1.lua 05:48:30
@_discord_214258385531568128:springrts.comScary le Poo These three share the same basedef 05:48:55
@_discord_214258385531568128:springrts.comScary le Poo which is 05:48:58
@_discord_214258385531568128:springrts.comScary le Poo https://github.com/EvolutionRTS/Evolution-RTS/blob/master/Units-Configs-Basedefs/basedefs/eorb_basedef.lua 05:48:59
@_discord_214258385531568128:springrts.comScary le Poo I dunno if this is helpful at all, but perhaps you get what I'm going at 05:49:18
@kakolainen:matrix.orgkakolainenthe building user interface is pretty hard coded into the engine but I'm 15% sure you can Lua it a workaround09:26:00
@kakolainen:matrix.orgkakolainenfor example you should be allowed to send a build command what the unit isn't allowed to build and then with a synced gadget manually allow it09:29:17
@_discord_336310214410240010:springrts.combadosu Not sure what this means but most (if not all) spring games do not use the default buildmenu 10:20:01
@_discord_336310214410240010:springrts.combadosu Yeah, pretty sure you can lua it adapting the UI and sending special gadget proxy commands 10:20:34
@_discord_336310214410240010:springrts.combadosu Unless there's a way to change buildoptions per unitid natively, which is the original question anyway 10:21:17
@_discord_336310214410240010:springrts.combadosu Perhaps it's easier to make the upgraded unit a new unitdef and just morph it? 10:22:17
@kakolainen:matrix.orgkakolainenI used to know how it all worked pretty well and it's a huge spaghetti in the engine side and my conclusion was that 100% of mouse and keyboard handling should be removed from the engine and moved to LuaUI, if you disagree you are wrong10:48:38
@kakolainen:matrix.orgkakolaineneven the key repeat handling should be in LuaUI instead of engine or OS10:50:22
@_discord_935472219843334174:springrts.comYve$25 joined the room.13:49:40
@_discord_287055722502684683:springrts.comSprung yes. have the "default" set of build options the maximum set (eg. if sometimes you can build A, sometimes B, and sometimes B and C, then have the set be ABC) and lock things that aren't used https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/Gadgets/game_perks.lua 15:19:09
@_discord_336310214410240010:springrts.combadosu Oh, I don't disagree with that, I just didn't understand your sentence. If you refer to game-specific behavior that the engine supplies that only introduces complexity I'm totally onboard with you. In fact I propose deTAification of Spring often 16:49:33
@_discord_336310214410240010:springrts.combadosu As for the repeat behavior that was not a good example, but there are other better examples that get the spirit. e.g. buildunit_* checking for hardcoded keypresses in engine side and many other stuff. But the build UI itself and its interaction with the user is not the bottleneck nor correlated to the point 16:51:09
@_discord_336310214410240010:springrts.combadosu Some things can, and should be, decoupled more from engine. Not extremely basic input though 16:52:45
@kakolainen:matrix.orgkakolainenwhy input handling can't be in two places is more of theoretical automata problem for example I'm pretty sure handling double click gets horrible if you tried to do basic input handling on engine level and also support double clicking on LuaUI, Luaui is currently already broken for double cliking17:01:32
@kakolainen:matrix.orgkakolainenthe original problem I said 85% probability it's impossible to Lua it because I once tried and failed, but hacking into the engine functionality like morphing probably works for it17:03:29
@_discord_336310214410240010:springrts.combadosu I don't really understand much of what's the issue with input handling. I'm working a lot on the input receivers and can tell you it's a really thin wrapper, when you register an eventclient to it (e.g. callins). It's basically SDL straight to Lua 17:08:06
@_discord_336310214410240010:springrts.combadosu However the whole attached baggage to it (when you don't register early) is quite terrible though 17:08:33
@_discord_336310214410240010:springrts.combadosu And there are some annoyances like engine managing which eventclient has privilege for mouseinput events etc 17:09:53
@kakolainen:matrix.orgkakolainenit's not horribly bad because returning true from LuaUI mostly disables the engine functionality but I think it fails on some corner cases and looks like impossible to make it work17:11:47
@_discord_336310214410240010:springrts.combadosu Yeah, there is a lot of ancient legacy there 17:12:51
@_discord_336310214410240010:springrts.combadosu What could have failed for you either is a bug (I found some trying Keychains for example), or one of the millions of things the engine decides to have an opinion on which you didn't want to 17:14:13
@kakolainen:matrix.orgkakolainenfor double click case you can think of it like NFA so when the next click doesn't actually happen in the timeout it should backtract to the last state but if you had two input handlers it might get complicated, for example youtube player is good example how it done correctly double clicking makes it first pause then full screen then unpause17:17:15

There are no newer messages yet.

Back to Room List