wdef[id].maxVelocity -> wdef[id].projectileSpeed

wdef[id].maxVelocity -> wdef[id].projectileSpeed

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

So:

I change this:

Code: Select all

local weaponVelocity = wd.maxVelocity
Into this:

Code: Select all

local weaponVelocity = wd.projectilespeed
And get this:
Image
thanksalotkloot.jpg
(516.82 KiB) Downloaded 3 times
Anyone feel like explaining to me why projectilespeed is returning zero?
Last edited by Forboding Angel on 13 Mar 2012, 11:44, edited 1 time in total.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by jK »

I told you twice it's `projectilespeed * Game.gameSpeed`!
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

that doesn't make any sense!

I would use this???
local weaponVelocity = `projectilespeed * Game.gameSpeed`
Edit: Also, I didn't realize you were answering my question.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Google_Frog »

weapondefs_posts.lua works well too. I just plonked the value right under myGravity (which apparently isn't in the weaponDefs table).

Code: Select all

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- because the way lua access to unitdefs and weapondefs is setup is insane
--
 for _, weaponDef in pairs(WeaponDefs) do
    if not weaponDef.customparams then
		weaponDef.customparams = {}
	end
	if weaponDef.mygravity then
		weaponDef.customparams.mygravity = weaponDef.mygravity -- For attack AOE widget
    end
	if weaponDef.weaponvelocity then
		weaponDef.customparams.weaponvelocity = weaponDef.weaponvelocity -- For attack AOE widget
	end
 end
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

Oh rock on, thanks google! :-)
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by jK »

Google_Frog wrote:...
input != output (e.g. here weaponvelocity gets `processed` by the engine)
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Kloot »

Since you (FA) were too much of a fucking coward to post the relevant "discussion", the topic concerns this part of 87's changelog:
changelog wrote: remove the following Lua consts: wdef[id].areaOfEffect, wdef[id].maxVelocity & wdef[id].onlyTargetCategories
Not that I expect your mind to be capable of expanding enough to comprehend them, but the reasons (which I am not under any circumstance obligated to provide) behind this change are:

1) wdef[id].onlyTargetCategories had no function anymore such that reading it in Lua would always produce a fixed constant value, ie. it was 100% useless and any script relying on that would not have worked as intended anyway

2) wdef[id].areaOfEffect was made redundant and clearly tagged for removal after the introduction of wdef[id].damageAreaOfEffect + wdef[id].craterAreaOfEffect in 85.0 (as can be found in the changelog) so you had two whole months to prepare

3) wdef[id].maxVelocity was already marked deprecated (by guess who? yet this is the same jK who claims that
http://pastebin.com/8gwtpnaM wrote:<[LCC]jK> [removal of onlyTargetCategories] is the only change of those 3 that makes sense
) because it happened to be IDENTICAL to wdef[id].projectileSpeed * 30 and thus also redundant


Do I change things like this to "basically fuck everyone over without a reacharound", as you so eloquently describe my work on Spring? No, I push them to prevent the engine from becoming a goddamn mess of obsolete / duplicated / outright broken code and data which as a concept is obviously as foreign to you as critical thinking and nobody else even cares about anymore these days. And if that means dealing with these skyscraping piles of excrement left by ignorant assholes such as yourself time and again, so be it.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by FLOZi »

I think it's worth discussing if the lua API should provide game devs with 'convenience' fields like wdef.maxVelocity.

Essentially the argument is maintainability vs. transparency, as I see it?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

Kloot wrote:Stuff
Feel better now?

Actually, I was attempting to not call you out on it personally, but it appears that that is a moot point now. You really think I have any problem with posting a chatlog from #sy? You haven't paid much attention in the past then.

Kloot... Flozi is right.

Convenience fields are quite necessary (and probably why jk reverted your change in 85).

Kloot, you make these changes without talking to any of the other devs, without consulting gamedevs, and then you get upset and ragey when gamedevs get upset because you broke stuff.

That line in the changelog is a total joke. You should be ashamed of yourself.

How about the loading screen changes? You totally fucked over my evo loadscreens. Thanks for the warning (oh wait, there wasn't any). Do you have any fucking idea how long those took to make???

Where is your head at dude? Why aren't you involved in the dev meetings?

Personally, I am getting sick and fucking tired of spending 5 or 6 hours of my day, fixing shit that the engine devs broke. I was up till 4am dealing with that crap. You embarrass and humiliate me to my small playerbase, who have no choice but to think that I don't know what the fuck I'm doing because some shit is broken every time I announce that I've updated the engine (desura).

Evo and ZK are the only games here making a serious go of it atm, but licho runs roughshod over anyone in his path (including me), and I get ignored most of the time. I don't have a licho in my arsenal, but if I did, I think I would probably do the same thing he is doing for the sake of not dealing with people like you.

Whatever, screwit. I'm tired of this dickfest and I have better shit to do atm. Have fun typing your ragey response.

User has been warned for this post. Felony 2.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Kloot »

Essentially the argument is maintainability vs. transparency, as I see it?
Those are not orthogonal concepts. More transparency (in the form of less duplication, etc.) also makes code easier to maintain, which is a _huge_ problem in Spring. A problem that apparently only I am seeing.



I was attempting to not call you out on it personally
www.peaholmquist.com/bullshit/images/bullshit_pile.jpg
Convenience fields are quite necessary
You might have come to depend on them, but necessary they sure ain't.
Kloot, you make these changes without talking to any of the other devs, without consulting gamedevs
Because 1) even if I would like to, consulting with every gamedev about every insignificant little planned change beforehand is impractical and 2) most either follow development (and spread any news on that front faster than I could) or read the changelog and know what to do without having it spelled out for them.
How about the loading screen changes? You totally fucked over my evo loadscreens
jK wrote all the code for the new loading screen, I NEVER EVEN TOUCHED IT. But whatever, please don't bother to check your facts so you can embarrass yourself further.
Personally, I am getting sick and fucking tired of spending 5 or 6 hours of my day, fixing shit that the engine devs broke
Maybe if you can't figure something out you should just ask and be done in 10 minutes, or is that too hard for you?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

As far as your work with spring goes, I happen to like your work most of the time. For example, your work with the pathfinder is imo quite excellent and I for one appreciate the hell out of you for tackling something that everyone else was afraid to touch.

What gets my goat are breaking changes without proper instructions on how to fix. I don't understand why you would do that. It's frustrating.

Edit: I got ninja'd
kloot wrote:Because 1) even if I would like to, consulting with every gamedev about every insignificant little planned change beforehand is impractical and 2) most either follow development (and spread any news on that front faster than I could) or read the changelog and know what to do without having it spelled out for them.
Forum post in game dev forum. Problem solved. It isn't hard, and as long as we know it's coming. The problem is, generally we find out too late and get stuck scrambling to fix shit.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

Kloot wrote: Maybe if you can't figure something out you should just ask and be done in 10 minutes, or is that too hard for you?
Generally takes a lot longer than 10 minutes to get a response. Sometimes I get lucky.

Edit: Also, sorry for loadscreen comment, my mistake. It was an example I pulled out quickly and accidentally attributed it to you.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by abma »

when will you learn to not make things so personally... please...
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Nobobdy expects the spanish inquisition!

Post by PicassoCT »

your willfull disregard of the center of the known universe is unforbivable abma. Repent heretic or you ll be burned.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by abma »

@PicassoCT:
i don't don't understand... please explain.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

He's making a joke and taking a stab at me, implying that I think that I am the center of the universe, and because you disregard this undeniable truth, you shall be burned unless you repent. :-)

Proof:
undeniable proof.jpg
undeniable proof.jpg (43.3 KiB) Viewed 1496 times
Last edited by Forboding Angel on 14 Mar 2012, 03:07, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by abma »

"your" was to unspecific...
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by hoijui »

i propose...
that when stuff like tags get deprecated:
  • a "convenience" thing gets added, that makes them work as they did before
  • it gets marked as deprecated in engine code (together with the date of deprecation)
  • it gets an entry in the changelog
  • a description of why it was removed, and how to fix related lua code has to be provided somewhere .. not sure where best.. probably in a comment in code, next to the @deprecated tag?
all this has to happen at the same time. this makes it most easy and least painfull for the engine dev doing the change, and most easy to track and understand later on.

at most once a year, there will be an engine release where these depreacted things get removed for real, and only those that were deprecated at least 6 months before that release.
This release will of course be announced as a special release in this sense, and a list of all removed tags with the description will be added (actually, we could theoretically just link to the one commit that removes all of them, as it also contains the descriptions that explain how to fix code, if that is in engine code as comments).

this leaves at least a chance for different engine releases to run a single version of a mod, and is therefore kind of a nessesity for multi-engine-version support too. it also means casually maintained games are less painfull to play, as once fixed, they might run for half a year on latest engine versions (in average).
game devs could decide to use newer engine versions when they please, and roll back on an older one if the new one is too buggy.

the added ugliness that "conveinence way" code adds to the engine is negliable. it is clearly marked, little, isolated code, that can be removed without doin other engine internal changes. that is the most beautiful of all the ugly code that spring has, and .. yeah it has other stuff. ;-)


i would say we vote on this proposal in the next engine dev meeting. so if you have suggestions for change, maybe just post here.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by Forboding Angel »

+9001 houjui. That would be perfect for nubs like myself.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: wdef[id].maxVelocity -> wdef[id].projectileSpeed

Post by jK »

kloot, when will understand that I don't complain about what your are doing, I complain how you do it.
(even when you have to agree that it is inconsistent now to have `areaOfEffect` on the input side and `damageAreaOfEffect` on the output one)

The thing is a stable API is just as important as a clean engine code. And when you break backward-compatibility you should provide the appropriated Lua code (e.g. add backward-comp. to the old tags in *_post.lua def-scripts or modify system.lua to readd the removed def tags) or print 1-3 months a warning on the first usages of the deprecated tag (w/o returning nil or any other invalid data).
Post Reply

Return to “Engine”