-
Posts
17.611 -
Joined
-
Last visited
-
Days Won
559
Everything posted by Stan`
-
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 ?
-
Hello, Thanks for the report. Looking at the call stack I'd say this is the GLSL bug again. Try disabling GLSL and postprocessing in the game's option, and try to launch a game. That should work. For further reference here is the call stack. > pyrogenesis.exe!PerformErrorReaction(ErrorReactionInternal er=ERI_BREAK, unsigned int flags=0, volatile int * suppress=0x00000000) Line 426 C++ Symbols loaded. pyrogenesis.exe!debug_DisplayError(const wchar_t * description=0x007dd798, unsigned int flags=0, void * context=0x007ddfa8, const wchar_t * lastFuncToSkip=0x016a3f38, const wchar_t * pathname=0x007ddcb0, int line=0, const char * func=0x007dc790, volatile int * suppress=0x00000000) Line 483 C++ Symbols loaded. pyrogenesis.exe!wseh_ExceptionFilter(_EXCEPTION_POINTERS * ep=0x007dde1c) Line 289 C++ Symbols loaded. pyrogenesis.exe!CallStartupWithinTryBlock() Line 365 C++ Symbols loaded. msvcr120.dll!60bd2aa5() Unknown Non-user code. Cannot find or open the PDB file. [Frames below may be incorrect and/or missing, no symbols loaded for msvcr120.dll] Unknown No symbols loaded. msvcr120.dll!60bd2b33() Unknown Non-user code. Cannot find or open the PDB file. pyrogenesis.exe!_except_handler4(_EXCEPTION_RECORD * ExceptionRecord, _EXCEPTION_REGISTRATION_RECORD * EstablisherFrame, _CONTEXT * ContextRecord, void * DispatcherContext) Line 91 C Non-user code. Symbols loaded. pyrogenesis.exe!CShaderProgramGLSL::Link() Line 380 C++ Symbols loaded.
-
Why chose Javascript for scripting
Stan` replied to Potter's topic in Game Development & Technical Discussion
Thanks @Wijitmaker, @elexis and @(-_-) it will be useful for my presentation, when I get to work on it again...