Giter Site home page Giter Site logo

Comments (16)

subsoap avatar subsoap commented on July 21, 2024 1

Changing

#include <dlib/log.h>

To

#include <dmsdk/dlib/log.h>

Makes bundling for macOS work

from defold-terrain.

JCash avatar JCash commented on July 21, 2024 1

Heh, you're brave trying to build this repo :)

For M_PI (MSDN)

#define _USE_MATH_DEFINES // for C
#include <math.h>

Not sure why it finds the 'dlib/log.h` for me, but it's probably because I use a local build server.

And, the texture shouldn't be used at all anymore, I'm going to delete the models referencing those.

The near/far thing I'm not sure about.
Since I don't use that function at all yet, we can comment it out.

from defold-terrain.

JCash avatar JCash commented on July 21, 2024 1

Well, this repo is by far not done, and I havent tested it on any platform, so there are bound to be issues.

We currently have no official thread support on web (js or wasm). Hopefully we can get to it soon.

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

Different errors when testing bundling for macOS / Linux

2021-03-11 23_10_08-defold-terrain - Defold Editor 2 0

The final comma is the problem

2021-03-11 23_12_34-JSONLint - The JSON Validator

Fixed buffer files
meshes.zip

But bundling is still not working
2021-03-11 23_14_50-defold-terrain - Defold Editor 2 0

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

I don't yet understand what to change here for building on Windows to work

/defold-terrain/src/terrain.cpp
	Line 59: expected body of lambda expression
    for (int i = 4; i--; ) near[i]      = mat[i][3] + mat[i][2];
                                        ^
	Line 60: expected body of lambda expression
    for (int i = 4; i--; ) far[i]       = mat[i][3] - mat[i][2];
    for (int i = 4; i--; ) near[i]      = mat[i][3] + mat[i][2];
    for (int i = 4; i--; ) far[i]       = mat[i][3] - mat[i][2];

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

Weird, deleting those two lines entirely allows Windows to build and run.

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

I also had to add this to terrain.cpp

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

It seems to just be complaining about the words near / far, changing them to left/right on those lines works to compile too. No clue from me.

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

2021-03-12 02_14_52-defold-terrain

Profiler screen from my machine. :)

from defold-terrain.

JCash avatar JCash commented on July 21, 2024

You need to use the 1.2.181 alpha build

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

Silky smooth now!

2021-03-12 03_39_59-defold-terrain

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

When looking around it's silky smooth in 1.2.181 alpha and while no chunks are being loaded/generated, but it does hang while chunks are being loaded/generated.

https://www.youtube.com/watch?v=LYkHSRXU5Oo

from defold-terrain.

JCash avatar JCash commented on July 21, 2024

Hard to tell from that profile. Better to list a single frame in the web profiler.
My guess it's the dmGraphics::SetVertexData the actual upload of the vertex buffer.
The patches are at a very high detail right now, and are not compressed either.
Interesting though that on my iMac it runs smooth all the way.

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

I adjusted controller.script to auto move fast and tried to capture a big frame time. If you want me to test anything I can.

function update(self, dt)
	self.input_move.z = self.input_move.z + 100
	

My CPU is quite old now and it's about time I get a new computer but at the same time I feel it's useful to hang onto it because then it's a way to quickly know in our own projects if something is very wrong. My brother on the other hand has a brand new build and we've had similar situations where it runs perfectly on his but I notice issues so we work to improve it until it works fine on mine.

2021-03-12 04_36_40-Dynamo Profiler

2021-03-12 04_38_42-Dynamo Profiler

2021-03-12 04_40_38-Dynamo Profiler
2021-03-12 04_40_46-Dynamo Profiler

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

Tried to test HTML5 build Chrome Version 89.0.4389.82

2021-03-12 04_45_14-Window

Looks like a thread issue, but shouldn't WebAssembly Threads be working now / again since a while or is this something else?

from defold-terrain.

subsoap avatar subsoap commented on July 21, 2024

https://dzone.com/articles/webassembly-threads-in-firefox

from defold-terrain.

Related Issues (1)

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.