-
Posts
18.245 -
Joined
-
Last visited
-
Days Won
594
Everything posted by Stan`
-
Why chose Javascript for scripting
Stan` replied to Potter's topic in Game Development & Technical Discussion
Won't be unless I reuse the presentation. But I might release the slides I couldn't load the meeting nor find it in the archive server. It matters a bit. Always nice to know the why especially when you can back it up. I'm happy they chose JavaScript -
For the record what file was it ?
-
Why chose Javascript for scripting
Stan` replied to Potter's topic in Game Development & Technical Discussion
I'm falling a bit short of arguments, while there were extensive discussions, it feels a bit like that the decision was rushed by one's skill and not motivated by hard facts. I believe that's because the two languages both did the job so it ended up being a matter of preference. @Wijitmaker can you give me your light on that ? Here are the three slides that will be integrated in the 40+ other slides presenting 0AD. Why JavaScript.pptx -
I committed them at the beginning of the A24 dev IIRC. However I'm still hoping for Farsi voices from @dmzerocold and @Itms
-
Mmmh I guess something else displays the barter panel using the list of resources files.
-
So what was resolved by @Hannibal_Barca ?
-
The patch was abandoned because it didn't work So it isn't likely to either work or be fixed
-
Well the menu is populated automatically, I'm not sure but I think my fix would prevent them from being displayed at all That's an interesting concept
-
Without the resource files I would assume you forgot to set all resources to be tradable or not. Example: { "code": "stone", "name": "Stone", "description": "Mine from rocks, stone quarries or ruins.", "order": 3, "subtypes": { "rock": "Rock", "ruins": "Ruins" }, "truePrice": 100, "aiAnalysisInfluenceGroup": "sparse" } if (data.tradable == "true") Would trigger an error because there is no tradable property. So either set it to false where you don't need it or add if (data.tradable && data.tradable == "true") Also not that it's likely that there is some cast occuring there data.tradable == true <=> data.tradable == "true" but not data.tradable === "true" In the json, you can write true without quotes. That's a luxury you do not have in XML. I guess this would come from Player.js ? Player.prototype.SetTradingGoods = function(tradingGoods) { let resCodes = Resources.GetCodes(); let sumProba = 0; for (let resource in tradingGoods) { if (resCodes.indexOf(resource) == -1 || tradingGoods[resource] < 0) { error("Invalid trading goods: " + uneval(tradingGoods)); return; } sumProba += tradingGoods[resource]; } if (sumProba != 100) { error("Invalid trading goods: " + uneval(tradingGoods)); return; } this.tradingGoods = []; for (let resource in tradingGoods) this.tradingGoods.push({ "goods": resource, "proba": tradingGoods[resource] }); }; You just need to check that for (let resource in tradingGoods) { if(Resources.GetTradables().some(res => res == resource)) continue; if (resCodes.indexOf(resource) == -1 || tradingGoods[resource] < 0) { error("Invalid trading goods: " + uneval(tradingGoods)); return; } sumProba += tradingGoods[resource]; } and for (let resource in tradingGoods) { if(Resources.GetTradables().some(res => res == resource)) continue; this.tradingGoods.push({ "goods": resource, "proba": tradingGoods[resource] }); } Also i don't think I have seen any link to your mod, is it publicly hosted somewhere ?
-
Can you share the error message and/or the code maybe it's something we can fix
-
Missing the sound or the feature ? else I guess @Samulis could do it
-
@Itms I remember leper had a patch for utf8 support for the windows buid (Inari couldn't build because he had some Japanese chars in his paths) Maybe it's the same bug but on Linux.
-
Engine.QueryInterface Performance
Stan` replied to Stan`'s topic in Game Development & Technical Discussion
Sure was just wondering since I remember reading something that stated that the interactions between the two languages were slow. That would only be for things refering to this.entity True. -
Hey guys, I was wondering since we have a lot of calls that goes like this Engine.QueryInterface(component_IID, entity) if that would not be a performance gain to actually cache them in Init functions ? For some small components that might be negligible but maybe for stuff like UnitAI it could make some difference.
-
0 A.D LAG in singleplayer
Stan` replied to DutchGameNerd's topic in Game Development & Technical Discussion
How many units did you have ? How may AIS on what map. Those are all the things that hit greatly on performance. -
Actually you are capped at 4GB for 0 A.D. no matter what. The 4GB+ patch is actually a 2GB to 4GB patch. If you want to use more you have to compile for x64 and our game is not ready for that yet.
-
It's a system component in the Js code but it's not meant for AI it's only used for entities.
-
Can you attach the crashlog and crashdump ? Also were you doing something particular in DE ?
-
What if I told you... You can do it manually for now ? Copy pasting Actors in atlas puts XML code in your clipboard. Instead of Ctrl+V in atlas do so in a text editor and save the file as your pog-group.xml somewhere. Then whenever you need it open the file select all and Ctrl + C Then you can Ctrl+v in atlas If someone wants to implement it just saving XML from clipboard and allowing someone to reload it would work.
-
I wonder if you couldn't just eval JS through C# But I'm not sure any of it is worth it
-
Germans will be for part 2
-
The Kingdom of Kush: A proper introduction [Illustrated]
Stan` replied to Sundiata's topic in Official tasks
Thanks I will remind you if you forget- 1.040 replies
-
- 1
-
-
- civ profile
- history
- (and 5 more)
-
Too bad you can't call CmpTimer... It executes stuff on each frame.
-
The Kingdom of Kush: A proper introduction [Illustrated]
Stan` replied to Sundiata's topic in Official tasks
@Sundiata Do you think you could find the IPA for the Kushite specific names ?- 1.040 replies
-
- civ profile
- history
- (and 5 more)
-
@Genava55 I thought Alésia was kind of hard to locate ?
