SGI: Development

Danger from the Deep! - Page 1

Just hoping to arouse some interest from the programming wizards:

http://www.dangerdeep.net/

Looks pretty cool, may be usable on our precious-but-matured polygonpushers as ships don't require super-high framerates :)
It's done in Scons though, i vaguely remember Jarndyce muttering about that while compiling Blender ;)

*aWOOhaa! aWOOhaa! Dive! Dive!* :D
-= I reject reality, and substitute my own =-

1 Indigo R3k-33 32MB XS24-Z;
1 Indy R5k-180 256MB XZ;
1 Indy R4k-175 64MB XL;
2 Indigo2 R10k-195 512MB MaxImpact;
2 Indigo2 R4k-200 256MB (XL+Extreme);
2 Octane Dual R12K-300 1024MB (MXI+V6).
Hi,
It seems like an interesting game. :)
I don't know scons or GL, but I've managed to hack it enough that it compiles (patch below). It doesn't link (errors below) and I somehow think this was a bit too easy (there are lots of warnings too, most of which I disabled). scons does some strange things, but it does finish eventually. Running it a second time (after it fails) shows the command used to link (which needs -lm added to it).
Linking fails with the following symbols undefined: fftw_execute (which is in /usr/nekoware/lib/libfftw* but those don't get linked for some reason), glActiveTexture, fftw_plan_dft_c2r_2d, fftw_destroy_plan, glBindProgramARB, glProgramLocalParameter4fARB, glLockArraysEXT, glUnlockArraysEXT, glClientActiveTexture, glGenProgramsARB, glProgramStringARB, glGetProgramivARB, glDeleteProgramsARB.
That's after adding -lm manually. Anyone know what these symbols are and if they're usable on IRIX? Google didn't seem to be of much help (although I didn't search for all of them). I think the fftw things shouldn't be too hard to fix, but I don't know what to do with the gl ones.
Patch 5329 may be needed (it was for me).

This is also at http://rafb.net/p/RRqjNE41.html but that will expire after 24 hours. That should work if copying the following doesn't apply cleanly.

Code: Select all

diff -ur dangerdeep-0.2.0//SConstruct dangerdeep-current//SConstruct
--- dangerdeep-0.2.0//SConstruct   Fri Oct 13 03:44:44 JST 2006
+++ dangerdeep-current//SConstruct   Sat Dec 30 19:14:41 JST 2006
@@ -118,12 +118,12 @@
else:
print "Compiling for Unix/Posix/Linux Environment"
env = Environment(ENV = os.environ)
-   env.Append(CPPPATH = ['/usr/include/SDL', '/usr/include/GL'])
+   env.Append(CPPPATH = ['/usr/nekoware/include','/usr/nekoware/include/SDL','/usr/include/GL'])
libpath = ['/usr/X11R6/lib']
gllibs = ['GL', 'GLU']
sdllibs = ['SDL', 'SDL_image']
-   ccflags = '-Wall `sdl-config --cflags` `pkg-config --cflags x11`'
-   env.Append(LINKFLAGS = '`pkg-config --libs-only-L x11`')
+   ccflags = '-Wall `sdl-config --cflags`'
+   env.Append(LINKFLAGS = '-lm -L/usr/nekoware/lib -lGL -lGLU -lX11 -lXext')
if (debug >= 3):
ccflags += ' -g -pg -O3'   # profiling
elif (debug == 2):
@@ -139,7 +139,8 @@
elif (debug == -3):   # special g++4.0+ auto vectorization
ccflags += ' -g -O3 -march=athlon64 -mfpmath=sse -mmmx -msse -msse2 -m3dnow -ftree-vectorize -ftree-vectorizer-verbose=2'
else:
-      ccflags += ' -g -O2' # debug symbols will be stripped by the linker for a debian package
+      ccflags += ' -O3 -mips4 -n32 -woff 3649,3625,3201,1209,1174,1201,3554,1171 -I/usr/nekoware/include'
+
if (useefence >= 1):
extralibs += ['efence']
print 'Linking to ElectricFence library!'
@@ -146,17 +147,18 @@
if (cvedit == 1):
env.Append(CPPDEFINES = ['CVEDIT'])
# check for mmx/sse support
-   cpuinfof = open('/proc/cpuinfo', 'r')
-   cpuinfol = cpuinfof.readlines()
+#   cpuinfof = open('/proc/cpuinfo', 'r')
+#   cpuinfol = cpuinfof.readlines()
mmxsupported = False
ssesupported = False
-   for i in cpuinfol:
-      if i.startswith('flags'):
-         m = Split(i)
-         if 'mmx' in m:
-            mmxsupported = True
-         if 'sse' in m:
-            ssesupported = True
+#   for i in cpuinfol:
+#      if i.startswith('flags'):
+#         m = Split(i)
+#         if 'mmx' in m:
+#            mmxsupported = True
+#         if 'sse' in m:
+#            ssesupported = True
+   usex86sse = 0
if (usex86sse == 0) and (mmxsupported and ssesupported):
usex86sse = 1
if usex86sse >= 1:
@@ -174,7 +176,7 @@
print 'Using x86 SSE/MMX optimizations.'
env.Append(CCFLAGS = ccflags)
datadir = '/usr/local/share/dangerdeep'
-   build_dir = 'linux'
+   build_dir = 'irix'
# check for broken libGL, ignore undefined symbols then
if (os.system('grep glBindProgram /usr/include/GL/gl*.h > /dev/null') == 0):
gllibdirs = ['/usr/X11R6/lib/', '/usr/lib/', '/usr/local/lib/']
@@ -190,8 +192,8 @@
if (os.system('grep glBindProgram '+gllibdir+'libGL.so > /dev/null') != 0):
print 'GL headers declare glBindProgram, but libGL.so has no such symbol! Ignoring all undefined symbols...'
# I'm not sure which option will hopefully fix the problem... so i use both...
-         env.Append(LINKFLAGS = '--unresolved-symbols=ignore-all')
-         env.Append(LINKFLAGS = '-Xlinker --unresolved-symbols -Xlinker ignore-all')
+#         env.Append(LINKFLAGS = '--unresolved-symbols=ignore-all')
+#         env.Append(LINKFLAGS = '-Xlinker --unresolved-symbols -Xlinker ignore-all')

###### optionally change install and data dirs
if ARGUMENTS.get('datadir', 0):
@@ -208,7 +210,7 @@

################ configure
conf = Configure(env)
-if (devel == 0):
+if (1 == 0):
if not conf.CheckLibWithHeader('GL', 'gl.h', 'C'):
print 'GL library must be installed!'
Exit(1)
@@ -232,11 +234,11 @@
Exit(1)
if conf.CheckLibWithHeader('fftw3f', 'fftw3.h', 'C'):
print 'fftw3 library supports float type. Using it...'
-      fftwlib = 'fftw3f'
-      conf.env.Append(CPPDEFINES = ['WITH_FLOAT_FFTW'])
+      fftwlib = 'fftw3'
+#      conf.env.Append(CPPDEFINES = ['WITH_FLOAT_FFTW'])
else:
-   fftwlib = 'fftw3f'
-   conf.env.Append(CPPDEFINES = ['WITH_FLOAT_FFTW'])   # developers always use float...
+   fftwlib = 'fftw3'
+#   conf.env.Append(CPPDEFINES = ['WITH_FLOAT_FFTW'])   # developers always use float...
env = conf.Finish()

######################### source file lists
diff -ur dangerdeep-0.2.0//src/bspline.h dangerdeep-current//src/bspline.h
--- dangerdeep-0.2.0//src/bspline.h   Fri Oct 13 03:16:09 JST 2006
+++ dangerdeep-current//src/bspline.h   Sat Dec 30 19:12:34 JST 2006
@@ -26,12 +26,12 @@
#include <vector>
#include <cmath>

-#if (defined(__APPLE__) && defined(__GNUC__)) || defined(__MACOSX__)
+#if defined(__sgi) || (defined(__APPLE__) && defined(__GNUC__)) || defined(__MACOSX__)
#include <complex.h>
#ifndef isfinite
#define isfinite(x) finite(x)
#endif
-#elseif defined(WIN32)
+#elif defined(WIN32)
#ifndef isfinite
#define isfinite(x) _finite(x)
#endif
diff -ur dangerdeep-0.2.0//src/coastmap.cpp dangerdeep-current//src/coastmap.cpp
--- dangerdeep-0.2.0//src/coastmap.cpp   Fri Oct 13 03:16:12 JST 2006
+++ dangerdeep-current//src/coastmap.cpp   Sat Dec 30 19:12:34 JST 2006
@@ -38,6 +38,10 @@
#include <fstream>
#include <list>
#include <vector>
+#ifdef __sgi
+extern double round(double);
+#pragma optional round
+#endif
using namespace std;


@@ -1190,6 +1194,7 @@

// try to connect segcls that were made from the same global cl
unsigned erased = 0;
+      vector<coastsegment::segpos>::iterator i1; /* for mipspro */
for (unsigned i = 0; i < cs.segcls.size(); ++i) {
coastsegment::segcl& cl0 = cs.segcls[i];
if (cl0.global_clnr == -1) continue;
@@ -1204,7 +1209,9 @@
ASSERT(cl0.next == -1, "strange paranoia1 next != -1");
ASSERT(cl1.next == -1, "strange paranoia2 next != -1");
//connect the segcls.
-               cl0.points.insert(cl0.points.end(), ++cl1.points.begin(), cl1.points.end());
+               i1 = cl1.points.begin();
+               i1++;
+               cl0.points.insert(cl0.points.end(), i1, cl1.points.end());
//               cl0.points += cl1.points;
cl0.endpos = cl1.endpos;
cl1.global_clnr = -1;   // mark as erased.
diff -ur dangerdeep-0.2.0//src/faulthandler.h dangerdeep-current//src/faulthandler.h
--- dangerdeep-0.2.0//src/faulthandler.h   Fri Oct 13 03:16:09 JST 2006
+++ dangerdeep-current//src/faulthandler.h   Sat Dec 30 19:12:34 JST 2006
@@ -23,7 +23,7 @@
#ifndef FAULTHANDLER_H
#define FAULTHANDLER_H

-#ifndef WIN32
+#if !defined(WIN32) && !defined(__sgi)

#include <execinfo.h>
#include <stdio.h>
diff -ur dangerdeep-0.2.0//src/global_data.h dangerdeep-current//src/global_data.h
--- dangerdeep-0.2.0//src/global_data.h   Fri Oct 13 03:16:09 JST 2006
+++ dangerdeep-current//src/global_data.h   Sat Dec 30 19:12:34 JST 2006
@@ -32,7 +32,7 @@
#include <SDL.h>
#include <string>
#include <list>
-#include <cmath>
+#include <math.h>
#include "objcache.h"

// fixme: remove this ugly crap, move to .cpp
diff -ur dangerdeep-0.2.0//src/make_mesh.cpp dangerdeep-current//src/make_mesh.cpp
--- dangerdeep-0.2.0//src/make_mesh.cpp   Fri Oct 13 03:16:12 JST 2006
+++ dangerdeep-current//src/make_mesh.cpp   Sat Dec 30 19:12:34 JST 2006
@@ -23,12 +23,12 @@
#include "make_mesh.h"
#include <cmath>

-#if (defined(__APPLE__) && defined(__GNUC__)) || defined(__MACOSX__)
+#if defined(__sgi) || (defined(__APPLE__) && defined(__GNUC__)) || defined(__MACOSX__)
#include <complex.h>
#ifndef isfinite
#define isfinite(x) finite(x)
#endif
-#elseif defined(WIN32)
+#elif defined(WIN32)
#ifndef isfinite
#define isfinite(x) _finite(x)
#endif
diff -ur dangerdeep-0.2.0//src/model.cpp dangerdeep-current//src/model.cpp
--- dangerdeep-0.2.0//src/model.cpp   Fri Oct 13 03:16:12 JST 2006
+++ dangerdeep-current//src/model.cpp   Sat Dec 30 19:12:34 JST 2006
@@ -28,12 +28,12 @@
#endif

#include <cmath>
-#if (defined(__APPLE__) && defined(__GNUC__)) || defined(__MACOSX__)
+#if defined(__sgi) || (defined(__APPLE__) && defined(__GNUC__)) || defined(__MACOSX__)
#include <complex.h>
#ifndef isfinite
#define isfinite(x) finite(x)
#endif
-#elseif defined(WIN32)
+#elif defined(WIN32)
#ifndef isfinite
#define isfinite(x) _finite(x)
#endif
@@ -259,8 +259,8 @@
meshes[0]->compute_bounds();
min = meshes[0]->min;
max = meshes[0]->max;
-
-   for (vector<model::mesh*>::iterator it = ++meshes.begin(); it != meshes.end(); ++it) {
+   vector<model::mesh*>::iterator it = meshes.begin();
+   for (++it; it != meshes.end(); ++it) {
(*it)->compute_bounds();
min = (*it)->min.min(min);
max = (*it)->max.max(max);
@@ -283,7 +283,8 @@
if (vertices.size() == 0) return;
min = max = vertices[0];

-   for (vector<vector3f>::iterator it2 = ++vertices.begin(); it2 != vertices.end(); ++it2) {
+   vector<vector3f>::iterator it2 = vertices.begin();
+   for (++it2; it2 != vertices.end(); ++it2) {
min = it2->min(min);
max = it2->max(max);
}
diff -ur dangerdeep-0.2.0//src/sonar.h dangerdeep-current//src/sonar.h
--- dangerdeep-0.2.0//src/sonar.h   Fri Oct 13 03:16:09 JST 2006
+++ dangerdeep-current//src/sonar.h   Sat Dec 30 19:12:34 JST 2006
@@ -58,8 +58,11 @@
// base^dB_val = real noise, dB = 10 * log10(real) -> dB/10 = log10(real)
// -> 10^(dB/10) = real -> (10^0.1)^dB = real,  10^0.1 = dB_base
// so dB_base^dB = real
+#ifndef __sgi
static const double dB_base = 1.25892541179;
-
+#else /* MIPSpro doesn't like initializing the static const */
+   const double dB_base = 1.25892541179;
+#endif
// limits of frequency bands in Hertz
static const double frequency_band_lower_limit[NR_OF_FREQUENCY_BANDS];
static const double frequency_band_upper_limit[NR_OF_FREQUENCY_BANDS];
@@ -79,8 +82,11 @@
static const double typical_frequency[NR_OF_FREQUENCY_BANDS];

// additional extra noise constant for cavitation, when running at full/flank speed, in dB
+#ifndef __sgi
static const double cavitation_noise = 2;
-
+#else
+   const double cavitation_noise = 2;
+#endif
static double dB_to_absolute(double dB) {
return (dB < 0) ? 0.0 : pow(dB_base, dB);
}
diff -ur dangerdeep-0.2.0//src/sonar_operator.h dangerdeep-current//src/sonar_operator.h
--- dangerdeep-0.2.0//src/sonar_operator.h   Fri Oct 13 03:16:09 JST 2006
+++ dangerdeep-current//src/sonar_operator.h   Sat Dec 30 19:12:34 JST 2006
@@ -54,11 +54,15 @@
// fixme: good idea, but a contact is reported many times then while the sub turns, fixme!
std::map<double, contact> contacts;
bool active;   // disabled, when user does the work
-
+#ifndef __sgi /* MIPSpro doesn't like initializing static const */
static const double turn_speed_fast = 6.0;   // degrees per second.
static const double turn_speed_slow = 2.0;   // degrees per second.
static const double simulation_step = 0.1;   // in seconds
-
+#else
+   const double turn_speed_fast = 6.0;      // degrees per second.
+   const double turn_speed_slow = 2.0;      // degrees per second.
+   const double simulation_step = 0.1;      // in seconds
+#endif
double last_simulation_step_time;

angle find_peak_lower_limit, find_peak_upper_limit;
diff -ur dangerdeep-0.2.0//src/system.h dangerdeep-current//src/system.h
--- dangerdeep-0.2.0//src/system.h   Fri Oct 13 03:16:09 JST 2006
+++ dangerdeep-current//src/system.h   Sat Dec 30 19:12:34 JST 2006
@@ -46,12 +46,15 @@
#endif

// a helpful macro
+#ifndef __sgi /* MIPSpro doesn't like ... in macros */
#ifdef DEBUG
#define ASSERT(a,...) {if(!(a)){sys().error(__VA_ARGS__);}}
#else
#define ASSERT(a,...)
#endif
-
+#else
+#define ASSERT
+#endif
class font;
class texture;

diff -ur dangerdeep-0.2.0//src/tone_reproductor.cpp dangerdeep-current//src/tone_reproductor.cpp
--- dangerdeep-0.2.0//src/tone_reproductor.cpp   Fri Oct 13 03:16:12 JST 2006
+++ dangerdeep-current//src/tone_reproductor.cpp   Sat Dec 30 19:12:34 JST 2006
@@ -21,7 +21,7 @@
#include "tone_reproductor.h"

#ifndef pow10
-#define pow10(x) pow(10.0, x)
+#define pow10(x) pow((float)10.0, x)
#endif

// Set some values to prevent bugs in case of bad use
diff -ur dangerdeep-0.2.0//src/water.cpp dangerdeep-current//src/water.cpp
--- dangerdeep-0.2.0//src/water.cpp   Fri Oct 13 03:16:12 JST 2006
+++ dangerdeep-current//src/water.cpp   Sat Dec 30 19:12:34 JST 2006
@@ -1068,7 +1068,7 @@
const float VIRTUAL_PLANE_HEIGHT = 25.0f;   // fixme experiment, amount of reflection distorsion, 30.0f seems ok, maybe a bit too much

// maximum height of waves (half amplitude)
-   const double WAVE_HEIGHT = std::max(double(curr_wtp->maxh), fabs(curr_wtp->minh));
+   const double WAVE_HEIGHT = std::max(double(curr_wtp->maxh), (double)fabs(curr_wtp->minh));

//   cout << "Wave height is: " << WAVE_HEIGHT << "\n";

@@ -1381,7 +1381,7 @@

// compute dynamic normals
// clear values from last frame (fixme: a plain memset(...,0 ) may be faster, or even mmx memset
-   fill(normals.begin(), normals.end(), vector3f());
+   std::fill(normals.begin(), normals.end(), vector3f());

// compute normals for all faces, add them to vertex normals
// fixme: angles at vertices are ignored yet
Linking fails with the following symbols undefined: fftw_execute (which is in /usr/nekoware/lib/libfftw* but those don't get linked for some reason),


dangerdeep 0.2 uses libfftw 3.1 while nekoware is at 3.0.1. This could be the problem here.
skip wrote: glBindProgramARB, glProgramLocalParameter4fARB, glLockArraysEXT, glUnlockArraysEXT, glClientActiveTexture, glGenProgramsARB, glProgramStringARB, glGetProgramivARB, glDeleteProgramsARB.


These are all calls to OpenGL that deal with newer type of extensions like GLSL etc. If these calls are used directly within the code it is very bad style, typically you query those as function pointers and use them only if they are defined.

Matthias
Life is what happens while we are making other plans
Brombear is right. The game used OpenGL Shading Language with IRIX graphics don't support. You'd have to whack that part of the code (for the water it looks like).
lhaza wrote: dangerdeep 0.2 uses libfftw 3.1 while nekoware is at 3.0.1. This could be the problem here.

Thanks - that seems to work okay. Linking to a static libfftw 3.1 fixes the two fftw symbols.

Brombear wrote: These are all calls to OpenGL that deal with newer type of extensions like GLSL etc. If these calls are used directly within the code it is very bad style, typically you query those as function pointers and use them only if they are defined.

squeen wrote: Brombear is right. The game used OpenGL Shading Language with IRIX graphics don't support. You'd have to whack that part of the code (for the water it looks like).

Ah, that's too bad. :( And indeed, none of them are in glGetString(GL_EXTENSIONS). Thanks to both of you - I didn't know anything about GL (but now I know one tiny thing :D ).
squeen wrote: You'd have to whack that part of the code (for the water it looks like).

(edited: I fixed the patch so it really does apply cleanly now :oops: )
I #ifdef'ed out all references to the undefined GL symbols, and the game runs now. Sound/title screen/etc seem fine. Viewing vessels works, although some of them are simple white models (the #ifdef probably broke them).
It seems to play missions now, although I don't know how to do anything. :oops:
The new patch (includes the previous ones, so this is the only one needed) is larger. It's at http://www.nekochan.net/wiki/ ... deep.patch which seems to apply cleanly. The link line needs to be manually modified again - I removed the -lfftw3 and added -lm and ../fftw-3.1.2/.libs/libfftw3.a to link a static version of fftw-3.1.2.
Performance is almost passable for me (Fuel/500/V10). The scons file says that it should be linked against an --enable-float build of fftw for performance which I haven't done yet.
I'm really off to bed now, but thanks again. :D
Let's see what's missing in detail:

glActiveTexture, glClientActiveTexture
These functions select the active texture unit for the multitexturing interface in OpenGL 1.3 IIRC (promoted from extension GL_ARB_multitexture). This is not available in any MIPS-based SGI system, you would have to rewrite the rendering to use multiple passes, one for each texture with the appropriate blending modes between the passes, in order to work correctly (if it's not used exclusively with GLSL programs see bellow).

glLockArraysEXT, glUnlockArraysEXT
This comes from GL_EXT_compiled_vertex_array, which isn't there on my VPro octane2, there is a EXT_vertex_arrays, which could be used instead I guess. Personally I haven't used either one of those, the standard these days is ARB_vertex_buffer_object (which isn't supported either).
If EXT_vertex_arrays proved inadequate or not supported on older sgi systems, you could rewrite the relevant parts to use immediate mode (glBegin/glEnd) but expect a significant performance drop. If the arrays are not modified too much your best bet would be to rewrite the code to use display lists which is a standard OpenGL 1.0 feature.

glBindProgramARB, glProgramLocalParameter4fARB, glGenProgramsARB, glProgramStringARB, glGetProgramivARB, glDeleteProgramsARB
All the above are part of the GLSL (OpenGL Shading Language) interface, as defined through the extensions ARB_shader_objects, ARB_fragment_shader, ARB_vertex_shader. (the actual OpenGL 2.0 interface for these is slightly different and does not include the ARB suffixes of course). There is absolutely no way you can approximate the shader-based rendering in a MIPS-based SGI. Only one common usage of shaders (per-pixel lighting with vertex-interpolated normals) can be done with VPro systems using the SGIX_fragment_lighting extension. But most games which use shaders for per-pixel lighting also generally modify the normals inside the shader or derive them from normal maps, neither of which can be approximated without shaders.

Your best bet is to check out if there are compile or run time switches that disable the use of shaders and multitexturing in the aforementioned game, otherwise you have a lot of rewriting to do :)
nuclear wrote: Your best bet is to check out if there are compile or run time switches that disable the use of shaders and multitexturing in the aforementioned game, otherwise you have a lot of rewriting to do :)

Wow, thanks for the details. :D Unfortunately I'm really not capable of rewriting the rendering :wink: , but there are a couple of configuration variables that can be changed. I have the following in ~/.dangerdeep/config (created the first time that dangerdeep is run):

Code: Select all

<use_shaders value="false" />
<use_shaders_for_water value="false" />
<usex86sse value="false" />

These are referenced in the code, but I haven't really read enough to make sure they're always used. But, with the patch linked above it seems basically playable. Pounding on the keyboard gets me "Crash dive!" "Engines ahead flank" and the like and then the bridge view becomes dark. 8)
(edit: I also put a binary with -O3 -mips4 -n32 at http://skipfiles.googlepages.com/dangerdeep2 as that fixes the issues with other subs/etc. But, it's noticeably slower. So that one works a bit better, but the next one is faster. 6268K)
I compiled a binary using the patch from before with -Ofast=ip27 -mips4 -n32 and put it at http://skipfiles.googlepages.com/dangerdeep if anyone would like to try it. It's 6036K.
It requires SDL, SDL_image, SDL_net, SDL_mixer, libiconv, libpng, libjpeg, libtiff, libz, libvorbisfile, libvorbis and libogg from Nekoware. It also requires the 0.2.0 data files from http://www.dangerdeep.net in the default location (/usr/local/share/dangerdeep). I -think- the binary is sufficient, everything required should be linked statically, but I only have a single machine to test on. :(
Performance is better (than the -O3 build) for me. Some things are broken, but the training missions (in historical missions), and I think all convoy battles with the VIIC (the first) sub seem to basically work. The other subs worked before, but somehow I broke them I guess. Destroyers are rather dangerous, but it's possible to hide. Some ships have become invisible and/or invincible. 8) I'd love to hear if it doesn't work at all, or if it does. Some textures look a bit odd, but morning and evening are pretty.

Anyways, happy New Year everyone (in 3 hours here :) )
I compiled a binary using the patch from before with -Ofast=ip27 -mips4 -n32 and put it at http://skipfiles.googlepages.com/dangerdeep if anyone would like to try it. It's 6036K.


Hey, thanksalot. It works here on fuel v10. I had no luck with your patch (-lm needs to be in last place, how to do that with scons??).

funny:

Code: Select all

console log: Unable to play WAV file: Couldn't open /usr/local/share/dangerdeep/objects/torpedoes/TI/standard/g7a_torpedo_color.jpg


Happy new year! Still 5hrs here...(central europe).
lhaza wrote: It works here on fuel v10. I had no luck with your patch (-lm needs to be in last place, how to do that with scons??).

I don't know how to use scons, but I run it once, wait for linking to fail, then run it again. The second time it shows the command used to link (with -lm at the start). I copy and paste that, removing -lfftw3 and adding "-lm ../fftw-3.1.2/.libs/libfftw3.a" to the end. I really need to patch SConstruct properly at some point.
I'm really glad to hear that it works. :D
funny:

Code: Select all

console log: Unable to play WAV file: Couldn't open /usr/local/share/dangerdeep/objects/torpedoes/TI/standard/g7a_torpedo_color.jpg


Haha - that is funny. I wonder if it's broken in 0.2.0 in general, or only on IRIX. Thanks for trying it. :)
Well, this sure generated some interest :D

Performance is almost passable for me (Fuel/500/V10).


Ouch! I was hoping lumbering boats wouldn't tax the system so much; apparently there's a lot of heavy stuff going on behind the scene...my Octane's gonna have a tough time with this :?
-= I reject reality, and substitute my own =-

1 Indigo R3k-33 32MB XS24-Z;
1 Indy R5k-180 256MB XZ;
1 Indy R4k-175 64MB XL;
2 Indigo2 R10k-195 512MB MaxImpact;
2 Indigo2 R4k-200 256MB (XL+Extreme);
2 Octane Dual R12K-300 1024MB (MXI+V6).
I built dangerdeep on linux a while back. 50% of the game wasn't implemented yet, and the other half crashed if you dared to sneeze. Has it improved since then? I could use another game on my Octane... :)
while (!asleep()) sheep++;
thanks for the work, but both executable crash on my octane2 (r12k and r14k)

i have the main mene, mission choice, but after had loaded the mission, it crash

the message is obscure.... "Caught exception: "

Laurent
SGI or die !!!
:O2: :Octane2: :Octane: :Indigo2IMP: :Indigo2IMP: :Indigo: :Indigo: :Indy: :PI: :Crimson: :PWRSeries: :Onyx: :O2000R:
HP proliant DL 585 Quad Opteron dual core 2.5Ghz 16Gb
UrbanHero wrote: Ouch! I was hoping lumbering boats wouldn't tax the system so much; apparently there's a lot of heavy stuff going on behind the scene...my Octane's gonna have a tough time with this :?

It's playable for me, really it's only the periscope, bridge, free 3d and UZO views that are a bit less smooth. The lead developer wrote on their forums:
System requirements in general: 1.0GhZ+ better 1.5Ghz, 256mb+ better more, a modern graphic card (DX8 or OpenGL 1.4 with shaders).

So I guess it's a bit intense.
Alver wrote: Has it improved since then?

This is the first time I've tried it - 50% of the game still isn't implemented, but the implemented half seems stable for me (in the -O3 build I linked). I haven't tried any of the official releases, but the biggest issue for me is that whacking the unsupported extensions without adding anything makes the game somewhat less pretty than the screenshots. That and I still haven't hit a moving target with a torpedo. :wink:
fzalfa wrote: both executable crash on my octane2 (r12k and r14k)
i have the main mene, mission choice, but after had loaded the mission, it crash
the message is obscure.... "Caught exception: "

Sorry about that. :(
I don't really know what would cause that (and I don't have an Octane unfortunately, they seem a bit uncommon on the secondhand market near me). When you start the mission, there should be another initialization screen (white text on black, like the startup one). If you get that far, what is the last line it shows?
lhaza posted that it worked for him, but I have the same hardware. Anyone have ideas?
There is an error posted on their forums about the Windows build (but is probably in all the builds) here that has a "Caught exception: St9bad_alloc" at startup (not mission loading) when the data files aren't installed. The data files are installed in the proper spot? (/usr/local/share/dangerdeep/convoys should exist)
Hm, it works here on Octane2 V6, r12k, IRIX 6.5.22. I tried the historical mission, one or 3-ship convoys. I have never hit a ship though...but diving etc. works.
I have put a tar.bz2 with the data at http://lhaza.com/ditd/dangerdeep-0.2-ir ... ta.tar.bz2
It is ca. 53 MB :shock: (edit: it was 105 MB including the data-zip)
run tar xvf dangerdeep-0.2-irix6-mips4.withdata.tar.bz2 as root to etract to /usr/local

It needs neko_sdl*

Image
ship on the horizon
How is the speed of the game?
I mean frames per second and program response to the user?
dangerdeep logs the fps...

the scenes around 9 fps (fuel) / 5 fps(octane2) are the freeview or telescope-views, I guess the water brings them down. (I think have seen much faster and even nicer ogl-water-simulations in pre-shader-times ...)
However one has to do alot aside from these views, it is fun to hunt and bring down BRTs...
the views were just randomly chosen....

fuel v10, r14k@600 on single ship mission:

Code: Select all

tanger 4% dangerdeep
OpenGL vendor : SGI
GL renderer : VPRO/B/32
GL version : 1.2 Irix 6.5
GL max texture size : 512
GL number of texture units : 0
GL number of lights : 8
GL number of clip planes : 6
GL maximum viewport dimensions : 3840
GL depth bits (current) : 24
Supported GL extensions :
GL_ARB_imaging
GL_EXT_abgr
GL_EXT_blend_color
GL_EXT_blend_logic_op
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_convolution
GL_EXT_copy_texture
GL_EXT_histogram
GL_EXT_packed_pixels
GL_EXT_polygon_offset
GL_EXT_subtexture
GL_EXT_texture
GL_EXT_texture3D
GL_EXT_texture_env_add
GL_EXT_texture_object
GL_EXT_vertex_array
GL_INGR_interlace_read
GL_SGI_color_matrix
GL_SGI_color_table
GL_SGI_texture_color_table
GL_SGIS_detail_texture
GL_SGIS_fog_function
GL_SGIS_pixel_texture
GL_SGIS_texture_border_clamp
GL_SGIS_texture_color_mask
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGIX_async
GL_SGIX_async_pixel
GL_SGIX_blend_alpha_minmax
GL_SGIX_convolution_accuracy
GL_SGIX_fog_offset
GL_SGIX_fragment_lighting
GL_SGIX_interlace
GL_SGIX_list_priority
GL_SGIX_resample
GL_SGIX_scalebias_hint
GL_SGIX_subsample
GL_SGIX_texture_coordinate_clamp
GL_SGIX_texture_lod_bias
GL_SGIX_texture_scale_bias
GL_SGIX_vertex_preclip

console log: $ffffffDanger $c0c0c0from the $ffffffDeep
console log: $ffff00copyright and written 2003 by $ff0000Thorsten Jordan
console log: $ff8000version 0.2.0
console log: $80ff80*** welcome ***
console log: Loading...
console log: fonts loaded (310ms)
console log: models loaded (1933ms)
console log: textures loaded (133ms)
console log: sounds loaded (306ms)
console log: background images loaded (2556ms)
console log: Music list loaded (18ms)
console log: Loading...
console log: map image loaded (116ms)
console log: image transformed (106ms)
console log: coastmap created (5323ms)
console log: coast map initialized (3ms)
console log: water rendering resolution 95 x 200
console log: wave resolution 128 (7)
console log: using subdetail: yes
console log: subdetail size 128 (7)
console log: reflection image size 512
console log: water maps inited (342ms)
console log: water height data computed (2059ms)
console log: water bumpmap data computed (19ms)
console log: user interface initialized (673ms)
console log: submarine interface initialized (6609ms)
console log: $c0fffffps 59
console log: $c0fffffps 34.8
console log: $c0fffffps 51
console log: Loading...
console log: map image loaded (120ms)
console log: image transformed (103ms)
console log: coastmap created (5311ms)
console log: coast map initialized (3ms)
console log: water rendering resolution 95 x 200
console log: wave resolution 128 (7)
console log: using subdetail: yes
console log: subdetail size 128 (7)
console log: reflection image size 512
console log: water maps inited (226ms)
console log: water height data computed (2010ms)
console log: water bumpmap data computed (22ms)
console log: user interface initialized (678ms)
console log: submarine interface initialized (6561ms)
console log: Unable to play WAV file: Couldn't open /usr/local/share/dangerdeep/objects/torpedoes/TIII/standard/g7e_torpedo_color.jpg
console log: $c0fffffps 58.6
console log: $c0fffffps 60
console log: $c0fffffps 58.8
console log: $c0fffffps 58.4
console log: $c0fffffps 58.6
console log: $c0fffffps 58.4
console log: $c0fffffps 10.6
console log: $c0fffffps 9.2
console log: $c0fffffps 9.4
console log: $c0fffffps 9.4
console log: $c0fffffps 21
console log: $c0fffffps 59.2
console log: $c0fffffps 59.2
console log: $c0fffffps 59.4
console log: $c0fffffps 14.2
console log: $c0fffffps 8.6
console log: $c0fffffps 9
console log: $c0fffffps 31.2
console log: $c0fffffps 42.8
console log: $c0fffffps 39.6
console log: $c0fffffps 43.8


Octane2 v6 r12k@400 multi ship mission

Code: Select all

draco 6# dangerdeep
OpenGL vendor : SGI
GL renderer : VPRO/A/32
GL version : 1.2 Irix 6.5
GL max texture size : 512
GL number of texture units : 0
GL number of lights : 8
GL number of clip planes : 6
GL maximum viewport dimensions : 3840
GL depth bits (current) : 24
Supported GL extensions :
GL_ARB_imaging
GL_EXT_abgr
GL_EXT_blend_color
GL_EXT_blend_logic_op
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_convolution
GL_EXT_copy_texture
GL_EXT_histogram
GL_EXT_packed_pixels
GL_EXT_polygon_offset
GL_EXT_subtexture
GL_EXT_texture
GL_EXT_texture3D
GL_EXT_texture_env_add
GL_EXT_texture_object
GL_EXT_vertex_array
GL_INGR_interlace_read
GL_SGI_color_matrix
GL_SGI_color_table
GL_SGI_texture_color_table
GL_SGIS_detail_texture
GL_SGIS_fog_function
GL_SGIS_pixel_texture
GL_SGIS_texture_border_clamp
GL_SGIS_texture_color_mask
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGIX_async
GL_SGIX_async_pixel
GL_SGIX_blend_alpha_minmax
GL_SGIX_convolution_accuracy
GL_SGIX_fog_offset
GL_SGIX_fragment_lighting
GL_SGIX_interlace
GL_SGIX_list_priority
GL_SGIX_resample
GL_SGIX_scalebias_hint
GL_SGIX_subsample
GL_SGIX_texture_coordinate_clamp
GL_SGIX_texture_lod_bias
GL_SGIX_texture_scale_bias
GL_SGIX_vertex_preclip

console log: $ffffffDanger $c0c0c0from the $ffffffDeep
console log: $ffff00copyright and written 2003 by $ff0000Thorsten Jordan
console log: $ff8000version 0.2.0
console log: $80ff80*** welcome ***
console log: Loading...
console log: fonts loaded (446ms)
console log: models loaded (2916ms)
console log: textures loaded (193ms)
console log: sounds loaded (454ms)
console log: background images loaded (3989ms)
console log: Music list loaded (27ms)
console log: Loading...
console log: map image loaded (169ms)
console log: image transformed (160ms)
console log: coastmap created (8095ms)
console log: coast map initialized (5ms)
console log: water rendering resolution 95 x 200
console log: wave resolution 128 (7)
console log: using subdetail: yes
console log: subdetail size 128 (7)
console log: reflection image size 512
console log: water maps inited (465ms)
console log: water height data computed (3050ms)
console log: water bumpmap data computed (27ms)
console log: user interface initialized (1006ms)
console log: submarine interface initialized (9924ms)
console log: $c0fffffps 52.8
console log: Unable to play WAV file: Couldn't open /usr/local/share/dangerdeep/objects/torpedoes/TIII/standard/g7e_torpedo_color.jpg
console log: $c0fffffps 54
console log: $c0fffffps 52.8
console log: $c0fffffps 23
console log: $c0fffffps 13.8
console log: $c0fffffps 25.2
console log: $c0fffffps 26.8
console log: $c0fffffps 35.4
console log: $c0fffffps 46.8
console log: $c0fffffps 48.4
console log: $c0fffffps 46.2
console log: $c0fffffps 46.8
console log: $c0fffffps 41.4
console log: $c0fffffps 6.2
console log: $c0fffffps 5.2
console log: $c0fffffps 5.2
console log: $c0fffffps 5
console log: $c0fffffps 29.8
console log: $c0fffffps 35.2
console log: $c0fffffps 5.2
console log: $c0fffffps 5.2
console log: $c0fffffps 5
console log: $c0fffffps 5.2
console log: $c0fffffps 5.2
console log: $c0fffffps 5
console log: $c0fffffps 5.2
console log: $c0fffffps 35.4
console log: $c0fffffps 53.2
console log: $c0fffffps 53.4
console log: $c0fffffps 38.8
console log: $c0fffffps 6.4
console log: $c0fffffps 6.6
console log: $c0fffffps 6.4
console log: $c0fffffps 6.6
console log: $c0fffffps 6.4
console log: $c0fffffps 6.2
console log: $c0fffffps 6.2
console log: $c0fffffps 5.6
console log: $c0fffffps 5
console log: Unable to play WAV file: Couldn't open /usr/local/share/dangerdeep/objects/torpedoes/TIII/standard/g7e_torpedo_color.jpg
console log: $c0fffffps 5
console log: $c0fffffps 5
console log: $c0fffffps 33.6
console log: $c0fffffps 53.4
console log: $c0fffffps 53.2
console log: $c0fffffps 14.4
console log: $c0fffffps 32
allways crashing with my octane2... i have the main menu, i can choose mission, watch boat 3d models , but when i start a mission.....

IRIS 33# ./dangerdeep
OpenGL vendor : SGI
GL renderer : VPRO/A/32
GL version : 1.2 Irix 6.5
GL max texture size : 512
GL number of texture units : 0
GL number of lights : 8
GL number of clip planes : 6
GL maximum viewport dimensions : 3840
GL depth bits (current) : 24
Supported GL extensions :
GL_ARB_imaging
GL_EXT_abgr
GL_EXT_blend_color
GL_EXT_blend_logic_op
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_convolution
GL_EXT_copy_texture
GL_EXT_histogram
GL_EXT_packed_pixels
GL_EXT_polygon_offset
GL_EXT_subtexture
GL_EXT_texture
GL_EXT_texture3D
GL_EXT_texture_env_add
GL_EXT_texture_object
GL_EXT_vertex_array
GL_INGR_interlace_read
GL_SGI_color_matrix
GL_SGI_color_table
GL_SGI_texture_color_table
GL_SGIS_detail_texture
GL_SGIS_fog_function
GL_SGIS_pixel_texture
GL_SGIS_texture_border_clamp
GL_SGIS_texture_color_mask
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_lod
GL_SGIX_async
GL_SGIX_async_pixel
GL_SGIX_blend_alpha_minmax
GL_SGIX_convolution_accuracy
GL_SGIX_fog_offset
GL_SGIX_fragment_lighting
GL_SGIX_interlace
GL_SGIX_list_priority
GL_SGIX_resample
GL_SGIX_scalebias_hint
GL_SGIX_subsample
GL_SGIX_texture_coordinate_clamp
GL_SGIX_texture_lod_bias
GL_SGIX_texture_scale_bias
GL_SGIX_vertex_preclip

Caught exception:



seem to have all the needed libray

ldd dangerdeep
libm.so => /usr/lib32/libm.so
libGL.so => /usr/lib32/libGL.so
libGLU.so => /usr/lib32/libGLU.so
libX11.so.1 => /usr/lib32/libX11.so.1
libXext.so => /usr/lib32/libXext.so
libSDL-1.2.so.1 => /usr/nekoware/lib/libSDL-1.2.so.1
libSDL_image-1.2.so.1 => /usr/nekoware/lib/libSDL_image-1.2.so.1
libSDL_mixer-1.2.so.1 => /usr/nekoware/lib/libSDL_mixer-1.2.so.1
libSDL_net-1.2.so.1 => /usr/nekoware/lib/libSDL_net-1.2.so.1
libfastm.so => /usr/lib32/libfastm.so
libCsup.so => /usr/lib32/libCsup.so
libC.so.2 => /usr/lib32/libC.so.2
libCio.so.1 => /usr/lib32/libCio.so.1
libc.so.1 => /usr/lib32/libc.so.1
libGLcore.so => /usr/lib32/libGLcore.so
libXsgivc.so => /usr/lib32/libXsgivc.so
libiconv.so.3 => /usr/nekoware/lib/libiconv.so.3
libaudio.so => /usr/lib32/libaudio.so
libpthread.so => /usr/lib32/libpthread.so
libpng.so.3 => /usr/nekoware/lib/libpng.so.3
libjpeg.so => /usr/nekoware/lib/libjpeg.so
libtiff.so.3 => /usr/nekoware/lib/libtiff.so.3
libz.so => /usr/nekoware/lib/libz.so
libvorbisfile.so.4 => /usr/nekoware/lib/libvorbisfile.so.4
libvorbis.so.1 => /usr/nekoware/lib/libvorbis.so.1
libogg.so.1 => /usr/nekoware/lib/libogg.so.1


Laurent
SGI or die !!!
:O2: :Octane2: :Octane: :Indigo2IMP: :Indigo2IMP: :Indigo: :Indigo: :Indy: :PI: :Crimson: :PWRSeries: :Onyx: :O2000R:
HP proliant DL 585 Quad Opteron dual core 2.5Ghz 16Gb