Page 2 of 2

Re: Diary of an insane man

Posted: 06 Mar 2019, 04:58
by MasterBel
At this point I'm more concerned about Spring running on Mac. Helping with SL will probably come later, probably when I need a break from getting nowhere. But yes, that's a possibility. I'll keep it in mind.

Also, ivand successfully convinced me to start with OpenGL instead of Vulkan.

Re: Diary of an insane man

Posted: 07 Mar 2019, 00:06
by malric
Maybe share the arguments he used to convince you to go for OpenGL instead of Vulkan?

Re: Diary of an insane man

Posted: 09 Mar 2019, 21:54
by MasterBel
malric wrote: 07 Mar 2019, 00:06 Maybe share the arguments he used to convince you to go for OpenGL instead of Vulkan?
Sure
Well, it turns out that Vulkan is well-known to require a tonne of boilerplate code

i.e. when you're learning, learning Vulkan gets in the way of learning 3D gfx. Makes sense. Then it might make further sense to go to an additional abstraction layer (ivand sent me a link to a video about DilligentEngine), but that opened up too many options for me, and I can't find something pointing which way. Settling with OpenGL for now.

I have worked a little bit through the tutorial – I'm following this one: https://learnopengl.com/Getting-started/OpenGL which is said to be "the best" but all I've done so far is get a window appearing, Business appeared and I've had to postpone progress. Hoping to find some time soon.

Re: Diary of an insane man

Posted: 27 Aug 2019, 07:43
by MasterBel
I couldn't sleep last night so I decided to solve this problem for once and for all. Using lldb backtrace I discovered that all I needed to do to get Spring running was comment out a few lines of code – and it works for both Develop and Maintenance. Oh, and on Maintenance I also forced OpenGL 2.1 … but that may not be necessary. I can't remember.

I'll push the changes up to github in a bit and link to them.

@kloot: Apart from all the failing shaders (which don't really impede playability that much), LoS mode and f4 metal map appear to be broken for maintenance: LoS mode does absolutely nothing, and f4 metal map simply renders a white map. I'm going to look into these things myself, but if you could give me a pointer that would be absolutely awesome.

Regards,
~MasterBel2

Re: Diary of an insane man

Posted: 27 Aug 2019, 15:06
by Silentwings
Iirc the metal and los views are done by shaders.

Re: Diary of an insane man

Posted: 27 Aug 2019, 16:05
by Kloot
I also forced OpenGL 2.1 ... failing shaders
The modern info-texture (metal/los/etc) shader overlay system requires GL3, you voided your warranty.

Re: Diary of an insane man

Posted: 27 Aug 2019, 23:49
by MasterBel
Silentwings wrote: 27 Aug 2019, 15:06 Iirc the metal and los views are done by shaders.
Kloot wrote: 27 Aug 2019, 16:05 The modern info-texture (metal/los/etc) shader overlay system requires GL3, you voided your warranty.
Thanks for making it clear. :)

Re: Diary of an insane man

Posted: 01 Sep 2019, 10:09
by LAN4
I would be super happy to see a working MAC build for XTA and TA play. Please don't give up. I might also be able to help as I know how to code. Please send me an update where you are now.

Re: Diary of an insane man

Posted: 02 Sep 2019, 02:56
by MasterBel
LAN4 wrote: 01 Sep 2019, 10:09 I would be super happy to see a working MAC build for XTA and TA play. Please don't give up. I might also be able to help as I know how to code. Please send me an update where you are now.
Hi LAN4, thanks!

I'm rather stuck on the LoS/f4 metal map issue on the Maintenance build. The drawing for both is handled by the rts/Map/InfoTexture/Legacy/LegacyInfoTextureHandler::Update (LegacyIfoTextureHandler.cpp), and applied in SMFRenderStateFFP::Enable (rts/Map/SMF/SMFRenderState.cpp) For all InfoTextures it's drawing, it appears to have no effect on the render process. The white metalmap comes about something in SMFRenderStateFFP::Enable which is working perfectly as expected - it just creates a faulty picture because of the failure of the LegacyInfoTexture, I believe. Both these areas of legacy code have hardly been touched and are verified to work 100% as-expected on Windows (many thanks to Ivand for checking that).

My personal theory, given the evidence, is that the extensive changes to PBO/VBO have possibly broken this on Mac – I haven't had time to look into where else they're used and whether they seem to be consistently broken – if not, it's probably something else. So first step in fixing this is just going to be working out what's going wrong.

I never got to pushing my changes to achieve a working biuld up to github, so I'll do that now, and post details when that's done.

Regards,
~MasterBel2

Re: Diary of an insane man

Posted: 02 Sep 2019, 03:14
by MasterBel
Current changes + explanation (in the commit messages) published to https://github.com/MasterBel2/spring/tr ... t-creation. Let me know if you have any questions.

Re: Diary of an insane man

Posted: 09 Sep 2019, 01:55
by MasterBel
Kloot wrote: 27 Aug 2019, 16:05
I also forced OpenGL 2.1 ... failing shaders
The modern info-texture (metal/los/etc) shader overlay system requires GL3, you voided your warranty.
Does it change anything if I mention that Mac never used the modern info-texture system, only the legacy system? This system has not changed since 103 and works perfectly fine on 103.

Again – do you have any unhelpful ideas what might be going wrong, so I can see if I can work out a private hack around it? Or where I could look to see if I could find whatever's going wrong?

Thanks :)
~MasterBel2

Re: Diary of an insane man

Posted: 16 Dec 2019, 14:22
by AF
Some possibly helpful notes:

- The great AF exile should be lifted once a MacOS build can play the latest BAR, I honestly don't care about full graphics, I'm only really interested in it being usable
- It surprises me that if I want to render a square I have to do all the OpenGL calls myself, meaning widgets that draw on the screen and the map have to do raw OpenGL calls via lua, which usually means pinning them to the fixed pipeline, and making things awkward for engine development if backwards compat matters to you. a

Code: Select all

draw.square( coords, options)
would help here
- GitHub Actions are free for open source projects, and it has a MacOS environment with decent specs, you could set this up so that the current engine builds get tested on MacOS without anybody having to pay money or lend time/hardware

Re: Diary of an insane man

Posted: 18 Dec 2019, 06:44
by MasterBel
Thanks AF. Great time for this, as I'm in the process of making myself take a break from lobby work, hopefully to make progress again. Ivand left me with a couple pointers about debugging last time I spoke with him, hopefully I can put them to good use. My first goal is to see what I can work out; second goal is to compile the newest maintenance/develop versions and see if my changes translate forward.
Current status (as you may have read) is that VBOs are still non-cooperative. In different ways between maintenance and develop. Hopefully I can work out why.

Re openGL calls: Ivand has at least (somewhat) dealt with part of the problem by developing a widget that translates GL 2 calls to GL 4. I don't know if this is finalised, and it's only a partial solution, granted, but a step in the right direction.

GitHub Actions sounds great, as soon as I get my changes merged into the official repo. But first, it has to all work.

Kloot, if you're out there, help would be very much appreciated. A former dev is itching to be back!

Re: Diary of an insane man

Posted: 07 Feb 2021, 21:22
by MasterBel
A very late update.

I experimented with some Vulkan. Learned some C++. Did some more lobby work. Tinkered with the engine. Wrote some widgets. Did some more lobby work.

Somehow I need to pick up some more C++ and learn how to actually use the debugger. My tinkering just ended up creating (or uncovering) some arcane bug that doesn't even crash in the same place every time, and sometimes doesn't crash at all, and I'm like… what??? All I did is reorder some stuff. I know I probably broke something, but I'm used to being able to trust crash reports. But when it looks almost random... ? Can't even work out what I broke.

So anyway. I helped someone get Spring 103 working on a Mac today, and he's hoping to play a few private games. Feels good. Wish I knew enough to actually make progress on the engine.

But anyway. Hope it rains today. Maybe in another year's time I'll have better news to share :)