Seems like the optimized one is around 500kb, still eating my functions though-.-
tobyas
@tobyas
Posts made by tobyas
-
RE: Difference between simulation and game.
-
RE: Difference between simulation and game.
I couldn't even execute the text messages since no code got executed in game mode. I tried to upload the code via the grunt script, which told me that the code is to large(~2,5 mb). Is there some kind of documentation for the maxiumum file size? Have to assume that there's some kind of limit which doesn't apply in simulation. Emscriten does support some kind of code optimisation and shortening which currently "eats" the function I actually want to run in JS. Got to play around with that some more. Thanks for the help though!
-
RE: Difference between simulation and game.
Seems to use the (
ENVIRONMENT_IS_WEB
||ENVIRONMENT_IS_WORKER
) case. The code runs fine in the simulation part so there shouldn't be any javascript error (I assume). Is there maybe some kind of size limit for the game mode or any other reason why no code would be executed? -
RE: Difference between simulation and game.
Nothing. As I said it works fine in simulation and does nothing in the Game mode. (Tested with survival) Doesn't print any errors. The game does not perform any action. It should aleast print some form of console message regardless of game state.
-
Difference between simulation and game.
Hi.
I have some code that works in simulation but not in the game mode. The Code is generated from c++ by emscripten. The code can be found at http://github.com/tobyas/screeps
Debugging the javascript code doesn't seem to be overly usefull. (Lots of generated code and very very long). It's just confusing that its working in the simulation and not in the normal game.