kripken / BananaBread

BananaBread is a C++ 3D game engine that runs on the web using JavaScript+WebGL+HTML
1.38k stars 347 forks source link

Can't run demo: integer result unrepresentable #67

Closed opiepj closed 7 years ago

opiepj commented 7 years ago

After build and run, I get this error in the console: Integer result unrepresentable image

Which causes the game to freeze when finished loading: image

Also the output bb.html inserts: <script async src="game/gl-matrix.js.js"></script> instead of <script async src="game/gl-matrix.js"></script>

thomaswmanion commented 7 years ago

I got the same errors too. Running on a Macbook Pro -

Build log contains a couple warnings that look troublesome - checking dynamic linker characteristics... ERROR:root:no input files note that input files without a known suffix are ignored, make sure your input files end with one of: ('.c', '.C', '.i', '.cpp', '.cxx', '.cc', '.c++', '.CPP', '.CXX', '.CC', '.C++', '.ii', '.m', '.mi', '.mm', '.mii', '/dev/null', '.bc', '.o', '.obj', '.lo', '.dylib', '.so', '.a', '.ll', '.h', '.hxx', '.hpp', '.hh', '.H', '.HXX', '.HPP', '.HH') WARNING:root:emcc: cannot find library "SDL_image" WARNING:root:emcc: cannot find library "SDL_mixer" WARNING:root:emcc: cannot find library "z"

Could these be errors instead of warnings maybe?

kripken commented 7 years ago

That runtime error was because the way wasm handles trapping in the toolchain changed. I pushed a commit with updated build flags now.

Could these be errors instead of warnings maybe?

There is an emcc option for those build warnings, but it's off by default.

opiepj commented 7 years ago

@kripken Thank you that worked! Also great project, I want to build an RTS demo based on your work. Any advice on how to get started?

kripken commented 7 years ago

Depends what you're adding - new levels, or new code, or something else?

thomaswmanion commented 7 years ago

Thanks for fixing! This is so cool. I'm very excited to make that game with @opiepj .

opiepj commented 7 years ago

New code to the game, how much of the engine would I need to modify if wanted to do something like a top-down RTS? Anything to be concerned?

kripken commented 7 years ago

I think it's more suited for FPS games. But you could ask on the Cube 2 forums, maybe other people tried to use it that way.