jeffnz Posted March 9, 2017 Report Share Posted March 9, 2017 I'm not interested in specialised things like animation, graphics or ai. Where do I find the functions that are responsible for basic gameplay mechanics? I mean the functions that handle practical things, like unit creation/unit death, construction, and the in-game UI. What files should I look at? I can use ctrl + f in Visual Studio 2013 but it isn't very useful. Quote Link to comment Share on other sites More sharing options...
niektb Posted March 9, 2017 Report Share Posted March 9, 2017 The gameplay code is written in JavaScript and can be found data/mods/public/simulation/components/. It's explained here too: http://trac.wildfiregames.com/wiki/Finding_Your_Way_Around 2 Quote Link to comment Share on other sites More sharing options...
jeffnz Posted March 10, 2017 Author Report Share Posted March 10, 2017 (edited) Cool, 'spidermonkey' in sources is the one. "spidermonkey: Mozilla's JavaScript engine written in C/C++. JavaScript is the game's scripting language of choice (game logic, AIs, random maps, etc)" I'm so stupid I thought that Spidermonkey was written in javascript, but it's written in C/C++ and it handles javascript but it isn't javascript itself LOL Update: what files are part of spidermonkey? Is it source\scriptinterface? Update 2: "ScriptEngine scriptEngine" that looks like the initialisation of Spidermonkey and it's in main.cpp Update 3: I searched the entire VS 'solution' for references to 'ScriptEngine' and 'scriptEngine' and couldn't find very many. It doesn't seem to lead me to anything that I was looking for. Edited March 10, 2017 by jeffnz Quote Link to comment Share on other sites More sharing options...
Imarok Posted March 15, 2017 Report Share Posted March 15, 2017 (nearly?) Everything starting with JS in cpp is using spidermonkey. source\scriptinterface is probably the interface between js code and c++ (manages the Engine.foo() calls in js) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.