Giter Site home page Giter Site logo

Comments (5)

thomasfn avatar thomasfn commented on September 26, 2024

Did you copy the files from the sample project ScreepsDotNet's output? It looks like it loaded an assembly which doesn't have the ScreepsDotNet.Program class, which could happen if you accidentally copied the output from ScreepsDotNet.API or another project that doesn't have that class.

from screepsdotnet.

ffMathy avatar ffMathy commented on September 26, 2024

I pointed Screeps Arena to the folder ScreepsDotNet\bin\Debug\net7.0\browser-wasm\AppBundle\arena, so it should run the right one. If I change the main.mjs file directly, I can see the changes applying, so I know it's using that path.

Does that look correct to you?

from screepsdotnet.

thomasfn avatar thomasfn commented on September 26, 2024

That looks like the correct path. Perhaps try a release build instead of debug? Sometimes the debug builds are large and maybe the bundle size has exceeded the limit (screeps imposes a 5mb total script size limit).

from screepsdotnet.

ffMathy avatar ffMathy commented on September 26, 2024

I tried release builds as well. That doesn't work either. Maybe something has changed? Does it still work for you if you reclone everything from scratch?

Thank you for the help so far by the way. I am at a LAN party and would love to play Screeps using dotnet, so your swift replies are much appreciated.

from screepsdotnet.

thomasfn avatar thomasfn commented on September 26, 2024

Ok I managed to reproduce this on a fresh build. I'll fix it in the repo shortly but in the meantime, you can get it to work with the following small edits to the js:

main.mjs:9 - add 'arena' as second parameter to the constructor. e.g. const dotNet = new DotNet(manifest, 'arena');
bootloader.mjs:3848-3851 - comment out lines 3848, 3850 and 3851, e.g. disable the profiling calls and logging (it was trying to making calls to the world api instead of the arena api) - all that should be left is the assignment statements to wasmPrevAttemptBytes, wasmPrevAttemptModule and compiledModule

from screepsdotnet.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.