Page 1 of 1

Shadowgrounds & SGS Linux/Mac source

Posted: Mon Jun 06, 2011 3:02 pm
by fb_joel
Hi guys,

After a long wait we can finally share the Linux/Mac source code for Shadowgrounds and Shadowgrounds Survivor. Sorry for the delay.

So here we go.

For the moment, please don't upload this to GitHub or anywhere else - let's wait a few days.

This includes both Linux/Mac and Windows sources, however the Windows version differs from the one that was already released. Shouldn't be anything major but if you run into any trouble, it's worth checking both.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Jun 06, 2011 6:57 pm
by Urfoex
fb_joel wrote:For the moment, please don't upload this to GitHub or anywhere else - let's wait a few days.


Why wait?

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Jun 06, 2011 10:36 pm
by fb_joel
Yeah should've clarified that - I did some file deleting in the package so I just want to see everything is a-ok before spreading this further. I shouldn't have messed anything up but who knows. :)

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Fri Aug 05, 2011 8:22 pm
by vayerx
I've uploaded source code to GitGub.
I found no 'chat' directory and there is a weird error:
$ TOPDIR=`pwd` make -f module.mk
module.mk:32: shadowgrounds/chat/module.mk: No such file or directory
shadowgrounds/sound///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
...
//////////////////////////////////////////////////////////////////////
module.mk:7: shadowgrounds/sound//////////////////////////////////////
//////////////////////////////////////////////////////////////////////
...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
module.mk: File name too long

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Sat Aug 06, 2011 3:56 am
by fb_joel
Ah okay. And yeah I removed the chat folder I think, it didn't contain anything useful (same as Windows source). Probably messed up the makefile in the process though, sorry about that!

The sound one I have no idea about...

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 11:39 am
by alt_turo
vayerx wrote:I've uploaded source code to GitGub.
I found no 'chat' directory and there is a weird error:
$ TOPDIR=`pwd` make -f module.mk
module.mk:32: shadowgrounds/chat/module.mk: No such file or directory
shadowgrounds/sound///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
...
//////////////////////////////////////////////////////////////////////
module.mk:7: shadowgrounds/sound//////////////////////////////////////
//////////////////////////////////////////////////////////////////////
...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
module.mk: File name too long


The source distribution appears to be broken, required directory binaries/ is missing. It contained the useful stuff for compiling. I'll fix it. Will put stuff on github sometime today or tomorrow.

fb_joel wrote:Ah okay. And yeah I removed the chat folder I think, it didn't contain anything useful (same as Windows source). Probably messed up the makefile in the process though, sorry about that!

The scripting thing references chat so you have to dummy those out if you remove it. You also need to remove reference to it from top-level module.mk

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 12:22 pm
by vayerx
alt_turo wrote:The source distribution appears to be broken, required directory binaries/ is missing. It contained the useful stuff for compiling. I'll fix it. Will put stuff on github sometime today or tomorrow.


Thanks. I've added hardcore Cmake build meanwhile.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 2:57 pm
by vayerx
I'm getting several backtraces:
applyFVF: ptr(32) != size(40)
shadowgrounds(_Z15igios_backtracev+0x1f)[0x883d53]
shadowgrounds(_Z8applyFVFim+0x297)[0xb1aed7]
shadowgrounds(_ZN22Storm3D_ParticleSystem9RenderImpEP13Storm3D_Sceneb+0x4a8)[0xb36588]
shadowgrounds(_ZN22Storm3D_ParticleSystem6RenderEP13Storm3D_Sceneb+0x2c)[0xb360d2]
shadowgrounds(_ZN13Storm3D_Scene15renderRealSceneEbbP15Storm3D_Texture+0xcda)[0xa9c160]
shadowgrounds(_ZN13Storm3D_Scene21RenderSceneWithParamsEbbbbP16IStorm3D_Texture+0xd75)[0xa9b477]
shadowgrounds(_ZN13Storm3D_Scene11RenderSceneEb+0x799)[0xa9eee9]
shadowgrounds(_Z10renderfuncP14IStorm3D_Scene+0x28)[0x6e2d3c]
shadowgrounds(main+0x2c82)[0x6e69c6]

"fmt & D3DFVF_NORMAL" is the only 'false' in applyFVF(), numtexcoords = 2.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 3:27 pm
by alt_turo
32- or 64-bit build? 64-bit does not work and will require enormous amounts of work to make it so.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 4:24 pm
by vayerx
alt_turo wrote:32- or 64-bit build? 64-bit does not work and will require enormous amounts of work to make it so.

64-bit. Can you briefly describe known problem places?

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 11:13 pm
by vayerx
Shadowgrounds work somehow on 64-bit, by the way (I'll commit small hotfix tomorrow). There are certainly several quality issues but it is playable. Thanks a lot for source codes opening!

Can I upload launcher icons (Shadowgrounds.xmp and Survivor.xpm) to GitHub? They are present in installers but are absent in source code packages.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Mon Aug 08, 2011 11:42 pm
by alt_turo
vayerx wrote:64-bit. Can you briefly describe known problem places?

Uh, the whole frakking thing?

Seriously, you're in for a world of pain. All file loading code assumes it's on 32-bit little endian and needs to be rewritten. This code is all over the place but offhand I can think of at least the following:
ui/Terrain.cpp
model loading (s3d, b3d) somewhere under storm3dv2/
mission binary files somewhere under game/

You NEED to get the 32-bit build working first so you can work incrementally and test your changes.

I looked over your patches on github and left some comments. I think you broke at least one thing already purely by accident. Tells you something about this minefield...

Take a look at the Jack Claw forum here. I wrote some very useful thing there. Claw shares most of its code with Shadowgrounds.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Tue Aug 09, 2011 1:33 am
by vayerx
alt_turo wrote:You NEED to get the 32-bit build working first so you can work incrementally and test your changes.

I looked over your patches on github and left some comments. I think you broke at least one thing already purely by accident.

Thanks!
What behaviour is expected from 64-bit version? It launches at least and I'm able to start mission.
32-bit installer doesn't work for me. I've tried 'as-is' installation and several versions of 'patched' installation.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Tue Aug 09, 2011 10:46 am
by alt_turo
vayerx wrote:What behaviour is expected from 64-bit version? It launches at least and I'm able to start mission.

Last time I checked it went something like this:
In menus colors are messed up and some images are missing/flashing. In the game some textures are missing and colors are messed up. When trying to shoot the game crashed.

32-bit installer doesn't work for me.

The Humble Bundle installer? You don't have 32-bit compatibility libraries.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Tue Aug 09, 2011 12:39 pm
by vayerx
alt_turo wrote:In menus colors are messed up and some images are missing/flashing. In the game some textures are missing and colors are messed up. When trying to shoot the game crashed.

Menu is ok, however I don't know how it should look like :)
Some textures are missing. Can't say anything about colors.

alt_turo wrote:
vayerx wrote:32-bit installer doesn't work for me.

The Humble Bundle installer? You don't have 32-bit compatibility libraries.

32-bit version launches but crashes. I have following 32-bit libraries:

Code: Select all

app-emulation/emul-linux-x86-sdl
app-emulation/emul-linux-x86-baselibs
app-emulation/emul-linux-x86-gtklibs
app-emulation/emul-linux-x86-medialibs
app-emulation/emul-linux-x86-opengl
app-emulation/emul-linux-x86-qtlibs
app-emulation/emul-linux-x86-soundlibs[pulseaudio]
app-emulation/emul-linux-x86-xlibs

I tried with both shipped 'general-purpose' libraries (boost, vorbis, etc.) and with system ones in various combinations.

By the way, why Shadowgrounds "will not run on Radeon 500 series"? What is the main problem with Radeon? I suppose it isn't only shaders problem, is it?
Program received signal SIGSEGV, Segmentation fault.
#0 0x00007ffff39ac640 in __memcpy_ssse3 () from /lib64/libc.so.6
#1 0x00007fffeab1dd87 in ?? () from /usr/lib64/dri/r300_dri.so
#2 0x00007fffeab1ef5b in ?? () from /usr/lib64/dri/r300_dri.so
#3 0x00007fffea93b324 in ?? () from /usr/lib64/dri/r300_dri.so
#4 0x00007fffea9f0665 in ?? () from /usr/lib64/dri/r300_dri.so
#5 0x00007fffeaa92d9b in ?? () from /usr/lib64/dri/r300_dri.so
#6 0x0000000000b1afd3 in renderUP (fmt=1028, type=5, count=2, size=48, vx=0x7fffffffc720 "")
at storm/storm3dv2/render.cpp:117
#7 0x0000000000afb4b2 in Storm3D_TerrainRenderer::renderTargets (this=0x3bfd350, scene=...)
at storm/storm3dv2/storm3d_terrain_renderer.cpp:1743
#8 0x0000000000a9b57e in Storm3D_Scene::renderRealScene (this=0x1a48880, flip=true, render_mirrored=false, target=0x0)
at storm/storm3dv2/Storm3D_Scene.cpp:450
#9 0x0000000000a9b363 in Storm3D_Scene::RenderSceneWithParams
(this=0x1a48880, flip=true, disable_hsr=false, update_time=true, render_mirrored=false, target=0x0)
at storm/storm3dv2/Storm3D_Scene.cpp:410
#10 0x0000000000a9edd5 in Storm3D_Scene::RenderScene (this=0x1a48880, present=true) at storm/storm3dv2/Storm3D_Scene.cpp:1492
#11 0x00000000006e2d3c in renderfunc (scene=0x1a48880) at /shadowgrounds.cpp:158
#12 0x00000000006e69a3 in main (argc=2, argv=0x7fffffffdbe8) at /shadowgrounds.cpp:1503


Re: Shadowgrounds & SGS Linux/Mac source

Posted: Tue Aug 09, 2011 4:02 pm
by vayerx
vayerx wrote:Program received signal SIGSEGV, Segmentation fault.
#0 0x00007ffff39ac640 in __memcpy_ssse3 () from /lib64/libc.so.6
#6 0x0000000000b1afd3 in renderUP (fmt=1028, type=5, count=2, size=48, vx=0x7fffffffc720 "")
at storm/storm3dv2/render.cpp:117
#7 0x0000000000afb4b2 in Storm3D_TerrainRenderer::renderTargets (this=0x3bfd350, scene=...)
at storm/storm3dv2/storm3d_terrain_renderer.cpp:1743


It seems like I've found bug. I'll test and commit at the evening.

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Tue Aug 09, 2011 11:25 pm
by vayerx
vayerx wrote:
alt_turo wrote:In menus colors are messed up and some images are missing/flashing. In the game some textures are missing and colors are messed up. When trying to shoot the game crashed.

Menu is ok, however I don't know how it should look like :)
Some textures are missing. Can't say anything about colors.

Fixed. All textures are OK, colors in menu changed (correctly?), shooting works perfectly. 8)

vayerx wrote:Can I upload launcher icons (Shadowgrounds.xmp and Survivor.xpm) to GitHub? They are present in installers but are absent in source code packages.

Bump :)

Re: Shadowgrounds & SGS Linux/Mac source

Posted: Wed Aug 10, 2011 11:32 am
by alt_turo
vayerx wrote:By the way, why Shadowgrounds "will not run on Radeon 500 series"? What is the main problem with Radeon? I suppose it isn't only shaders problem, is it?

We don't have such hardware anymore and AMD has dropped support for them from fglrx. So we had no way to test it and erred on the side of caution. Technically there should be no problem.