-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What will make it easier for people to help? #9
Comments
Hi. I am already continuing on my fork, cause I'm not sure you'd agree with the things I did to your code. It's compiling and when running it should be almost exactly how it was before. (Except I made the FOV wider). What I did for now:
What I was planning to do:
|
Also I removed the windows compatibility DEFINEs cause of maybe using SDL. but fails cause of lacking support of 3d textures. |
What was the rationale behind dumping the tcc? It's pretty much the only way to effectively edit and work on the map, as anything else has extremely long development cycles. Was it just to acquire more language features? I don't really see why these changes can't be dumped back into mainline other than the dropping of TCC - which it sounds like we could dump back in without too much issue. I had played with adding LUA support, but realized manually binding everything, or using one of the bindings engines was a lot more work, and much slower to work with than I expected. I gave up after about a week. I am always concerned about performance, but considering we're 100% GPU logged, I don't see any big deal there. Are you willing to consider keeping it all mainlined? |
Also, I keep forgetting OpenGL 3 is now the standard >.< |
Mostly to make it easier to read for me, I thought it would be easier to not drag it along with my changes and rather add it again afterwards if necessary. I also think compiling c++ is not really a permanent solution for levels. I added ChaiScript yesterday for testing, only took a few hours (and mostly because I had a bug in CellUpdate -.-). This is all I had to change. |
I am glad you agree that compiling C++ is not a permanent solution. Chaiscript looks acceptable. Though I am a C guy, if you're up for working together with it, I would be more than happy to abandon my current path for a C++/Chaiscript direction. I'll give a whirl at building this tonight. |
Also, what was your rationale behind using CMake instead? I've always found it to only be useful on /really/ big projects. Aaand oh my it does take a long time to compile! |
Sorry, just one more comment -- On the room with the game of life - any idea what could be making it 1/2 the speed? All the other rooms feel okay, but that one, when looking at a wall is 18 FPS, while on my version it's 35... |
Mostly for finding the include paths and library names dynamically (e.g. Yes, the compile time with Chai is terrible. Also nobody else seems to care about it, I can find nobody who has the same problem, even though it should not be hard make it an external file. I actually reconsidered using C for scripting instead of Chai.. I readded it.
Did you compile with -O2? Cause I didn't have that in, it might be the reason. Otherwise I have no idea, I don't think I changed anything in that code yet. |
I figured out what the problem is: tcc compiles structs in some other way than other compilers making it impossible to transfer the vec3 objects into/out of the scripts. (example). Not sure how to proceed, maybe keep c (if it works in windows). Currently looks like this |
I prefer your solution to splitting apart the scripts to my old solution, of an all-inclusive script. I would keep it C. Binding the vec3 object to TCC should be easy. The only real difference I would expect is the C++ vtable at the beginning of the structure. So, if you pass the vec3 as (&myVec3.x), it should be fine. I'm trying to figure out how to add -O2... still dinking with it. I do not mind putting in effort to make things windows compliant, myself. I do have access to a windows PC periodically. |
Got -O2 working, it looks like that was the main offender. |
Look at the stack overflow example: http://stackoverflow.com/questions/26536367/compatibility-of-compiled-gcc-and-tcc-structs It also happens with an almost empty struct and only c, so I don't think it's a vtable.. sizeof() also reports 12 on both.. (I don't actually know anything about c/c++ compilers though) |
|
Might be because the other files are not copied to the build directory anymore (removed it so they aren't duplicated. |
I am getting this now: /usr/bin/ld: //usr/local/lib/libtcc.a(libtcc.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' Also, I am going to tinker with your Vec problem. |
You could also run I had that too... don't know what I did to fix it though. Do you have the latest git pull? with -ldl and -ltcc? |
I got the TCC problem working. You can check out the post I made on stack overflow. Also, here is my new compile line: Linking CXX executable noeuclid |
That exact line works for me. So it's probably something else.. Maybe try rm -rf build/* and cmake again? Hu, that was fast.. I spent a while printing random memory to try and find out what the hell happens. Nice |
AH! Apparently the order of -ldl and -ltcc matter. -ltcc must be first. |
Apparently not for me. But I had that same error once and somehow it stopped. Fuck C/++ compilers, lets port to java. |
Considering my side of the repo has the most watching and where I'm making these issue tags - do you mind merging back and working from my mainline? If for other reasons you would prefer not to treat mine as mainline, that is okay. On the java end: I did make a dumber version of this that ran in WebGL. There's just a lot of very difficult to get around restrictions :( |
Apparently WebGL 2 has some nice additions - maybe then. Yes, we should merge back. |
The last I remember seeing was a discussion about supporting more than 4 textures, or was it 3D textures... I can't remember, one of the two, and everyone in the thread unanimously agreed that it was not going to happen any time soon... Maybe no time soon has come? |
I committed two small things to my build. I fixed the library order for me and updated the mouse sensitivity. |
I did not see this above room 4 even in your older build (but I think I removed the relevant code) |
It was in the common "run every time" code in test.c |
Yes, it's this, right? But how did that "say what block you are standing on? |
It was this code here: if( IsPlayerInRange( 2, 40, 63, 16, 16, 4 ) ) |
https://github.com/cnlohr/noeuclid/blob/master/GameMap.cpp#L190-193 still there. Never saw it when running |
You and your snazzy syntax. I can't do anything more on it tonight - good luck debugging. |
:D What do you mean? How I put every vector in {} or how I did some weird c++11 lambda stuff that makes compiler errors completely unreadable when something is slightly wrong? |
@phiresky @Bp103 @fiendfan1 - y'all have made a commit or two. I'm curious what all would be useful and/or may encourage you guys to continue to develop/commit, or if you guys were just passing through.
The text was updated successfully, but these errors were encountered: