Forgive me if I'mTo answer the first half of your laymen's terms question, it is a program/script that uses a different renderer than regular df, and thus offloads graphics-related computations entirely onto the GPU (From what I can get out of it, anyways)a littlevery suspicious what with your one post and gibberish username. In layman's terms, what is this and how have you done it?
Traceback (most recent call last):
File "C:\df_opengl\t3.py", line 422, in <module>
loader = FrameLoader(sys.argv[1])
IndexError: list index out of range
what?The error you encountered means that it expected an argument (three actually) but did not get one.Thanks, and the information is nice to know, I suppose :P
usage: ./t3.py <screendump-filename> <desired-fps> <start_frame>
It also expects texdump0002.png and shaders in the current directory.
A screendump and texdump are supplied, erm, were supplied in previous version (forgot it this time), so get it and try running it like :
./t3.py screendump 10 0
screendump was generated by dumping every 4th or 5th frame, so playback is jerky.
Controls: mouse wheel - zoom, left mouse button and space - pause/unpause, right mouse button drag - panning, esc - quit
textures::clone_texture() is an internal df function that gets called from core game, so the question was directed more at people familiar with code we don't get to see, i.e. Toady.
Would you be able to make it so that zooming only affects the world view and not the menus?
EDIT: just to be sure: my dream is for the interface to be displayed at 16x16 px (can be downscaled 32x32px, I don't mind) while the world view would be displayed at 32x32px (and using 32x32px icons, not upscaled 16x16 ones).
EDIT: just to be sure: my dream is for the interface to be displayed at 16x16 px (can be downscaled 32x32px, I don't mind) while the world view would be displayed at 32x32px (and using 32x32px icons, not upscaled 16x16 ones).I have separating map and interface zoom and fonts in plans - see the readme file for what exactly I do plan.
However, I'm no artist, someone would have to actually draw tile/graphics sets in resolutions you want.
./dfI am using Ubuntu 11.04 32bit with a Nvidia GeForce 8600M GT and the Nvidia drivers.
textures::load(): data/art/Phoebus_16x16.png 256x256 16x16 16x16
textures::load(): data/art/Phoebus_16x16.png 256x256 16x16 16x16
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
Segmentation fault
<...>
Windows builder and testing are needed.
<...>
This does not work for me. This is what happens.This is most likely a bug in code that gets shader code. Version I uploaded today has this part reworked, please try it. Zoom is still erratic, but F10 will get you out of trouble most of the time.Quoteset_mode(): SDL_GL_DOUBLEBUFFER: 1
Segmentation fault
How exactly are you compiling this program?
I can try to get a working 64bit version if you can walk me through it.
#!/bin/sh
DF_DIR=$(dirname "$0")
cd "${DF_DIR}"
export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
#export SDL_VIDEO_CENTERED=1 # Centre the screen. Messes up resizing.
gdb -ex r -ex bt --args ./libs/Dwarf_Fortress $* # Go, go, go! :)
Unless I misunderstood something i have bad news. Windows DF version is using different way to include graphics lib, it's built into df itself AFAIK. So only linux can have a nice separate lib.
lxnt@bigbox:~/00DFGL/dfa_linux$ ./df
textures::load(): data/art/Phoebus_16x16.png 256x256 16x16 16x16
textures::load(): data/art/Phoebus_16x16.png 256x256 16x16 16x16
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 1
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
Using embedded vertex shader code.
Using embedded fragment shader code.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
handed off cats with 0 tiles. (0x0).
Resetting textures
texdumpst::init(): allocating 368x368 limit=529 (16x16 cells)
handed off cats with 513 tiles. (23x23).
accepted font texture (name=1): 368x368px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=1 snap=1
reshape(): final grid 80x25 window 1280x400 viewport 1280x400 Psz 16x16
makegrid(): 80x25
set_viewport(): got 1280x400 out of 1280x400
Returning input:
8: STANDARDSCROLL_UP
8: CURSOR_UP
8: A_MOVE_N
Returning input:
Enter: SELECT
Enter: CLOSE_MEGA_ANNOUNCEMENT
Enter: WORLD_PARAM_ENTER_VALUE
Enter: SETUPGAME_SAVE_PROFILE_GO
Enter: D_BURROWS_DEFINE
Enter: D_MILITARY_ALERTS_SET
lxnt@bigbox:~/00DFGL/dfa_linux$
I'm using Eclipse+CDT (http://www.eclipse.org/cdt/) to build it. Project files and stuff are supplied, though only debug build is configured.I got it to build in Ubuntu 11.04 32bit but I had to add the path /usr/lib/i386-linux-gnu/glib-2.0/include and remove /usr/lib/glib-2.0/include to get glibconfig.h due to the install location changing.
There is no sense to compile a 64bit version of it, because there's no 64bit version of game itself, or at least I never heard of it.Your version is built against the 32bit version of libGLEW so it does not work in 64bit Ubuntu 11.04 (may work in 11.10 because it has more mutiarch support).
./dfPutting the 32bit libGLEW.so.1.5 in df_linux/libs is not enough because this happens.
./libs/Dwarf_Fortress: error while loading shared libraries: libGLEW.so.1.5: wrong ELF class: ELFCLASS64
Fortunately, trying out Ubuntu nowadays is a question of a thumb drive and some downloading.
Please try 20112011 version out, and post whatever it prints after set_mode() lines.Heres what I get on the 32bit computer.
[VERTEX_SHADER:somewhere/some.file]
[FRAGMENT_SHADER:somewhere/another.file]
//vec4 c_color = mix(crea_color*cf_color, cb_color, 1-crea_color.a);
to vec4 crea_color = mix(crea_color*cf_color, cb_color, 1-crea_color.a);
gl_PointSize = pszar.z;
to
gl_PointSize = 16;
Okay, scratch that. I pushed the fix that should help and also uploaded new binary.
./df
./libs/Dwarf_Fortress: symbol lookup error: /df_linux/libs/libgraphics.so: undefined symbol: _binary____vertex_shader_end
Notice the green line in this screenshot that is left when maximizing the window. (no fullscreen Dwarf Fortress uses both of my monitors for some reason).The green line is a part of background, which is intentionally drawn green to see how much of the window is used.
Also unit graphics do not appear to be working correctly.
And then there is this thing with the cursor (X) that sometimes happens when you move over units.
Notice the three yellow X's right next to each other the right two are dwarves, the Mayor who is in jail and the liason who is trying to meet with him.
I tried building the new verison myself to see if that made any difference but I get this when I run Dwarf Fortress.Code: [Select]./df
./libs/Dwarf_Fortress: symbol lookup error: /df_linux/libs/libgraphics.so: undefined symbol: _binary____vertex_shader_end
I tried building the new verison myself to see if that made any difference but I get this when I run Dwarf Fortress.Code: [Select]./df
./libs/Dwarf_Fortress: symbol lookup error: /df_linux/libs/libgraphics.so: undefined symbol: _binary____vertex_shader_end
Hm. Might be because objcopy lacks some architecture parameter. Check out build settings - artifacts - pre-build step, I think it's there.
objcopy -I binary -B i386 -O elf32-i386 ../vertex.shader vs.o ; objcopy -I binary -B i386 -O elf32-i386 ../fragment.shader fs.o
It is the same as when I built the old version and that ran with the glsl errors and did not have this error.
Right now this is what it looks like.Code: [Select]objcopy -I binary -B i386 -O elf32-i386 ../vertex.shader vs.o ; objcopy -I binary -B i386 -O elf32-i386 ../fragment.shader fs.o
It is the same as when I built the old version and that ran with the glsl errors and did not have this error.
Next milestone reached : zoom now works acceptably. Please test it.Yes the zoom works much better now.
dpkg-deb -x libglib2.0-0_2.28.6-0ubuntu1_i386.deb glib32There is no file glibconfig.h found in libglib2.0-0_2.28.6-0ubuntu1_i386.deb are you sure this is where you got it from?
and put the glibconfig.h from glib32 somewhere. Then point Eclipse
(project->properties->C/C++Build->Settings->GCC C++ Compiler->Includes)
there.
Here is the full console output of the build. Maybe that will help.
./df
./libs/Dwarf_Fortress: symbol lookup error: ~/Dwarf_Fortress/Test_Fortress/gputest/df_linux/libs/libgraphics.so: undefined symbol: _binary____vertex_shader_end
Here is the full console output from the build in eclipse. Maybe that will help you identify the problem.As far as building in Ubuntu 11.04 64bit I ran into a problem in this part of your instructions.I put the wrong package name there. The one that contains glibconfig.h is libglib2.0-dev_2.28.6-0ubuntu1_i386.deb.Quote from: README.glsldpkg-deb -x libglib2.0-0_2.28.6-0ubuntu1_i386.deb glib32There is no file glibconfig.h found in libglib2.0-0_2.28.6-0ubuntu1_i386.deb are you sure this is where you got it from?
and put the glibconfig.h from glib32 somewhere. Then point Eclipse
(project->properties->C/C++Build->Settings->GCC C++ Compiler->Includes)
there.
No improvement in building in Ubuntu 11.04 32bit.
I still get this error when I use the result.Code: [Select]./df
./libs/Dwarf_Fortress: symbol lookup error: ~/Dwarf_Fortress/Test_Fortress/gputest/df_linux/libs/libgraphics.so: undefined symbol: _binary____vertex_shader_end
New version uploaded.It now builds correctly in Ubuntu 64bit it seems much smoother than the built in renderers. Here is a screenshot using 20x20 pixel tiles.
Objcopy is no more. Hopefully this will avoid problems with _binary_crap missing.
I turned off the tile-under-creature tracking for the moment, so it should draw map exactly as PRINT_MODE:STANDARD does, only faster.
I implemented embedded shader-sets. There are two now, 'standard' and 'cbr_is_bold'. The difference is in the interpretation of screentexpos_cbr array.I tried both shaders and they both work. Here is a screenshot using cbr_is_bold.
The standard one behaves as all other renderers (maybe except for the TEXT one) do: it interprets values from this array as background colors for the creature.
(see renderer::screen_to_texid(), enabler.cpp:45)
The other one behaves as the previous attempt on shader renderer does: it takes cbr for a bold/bright bit for the foreground color from the screentexpos_cf array.
(see data/shader.vs:42 and data/shader.vs:48)
I don't know enough of DF graphics and coloring to make a decision on which is the right way. From what I've seen in creature draw data dumps (see README for an option that turns this on), cbr is always either 0 or 1, so I tend to think that it's a bug in standard renderers. Opinions?
Colors are primarily defined using the [COLOR:x:y:z] or [DISPLAY_COLOR:x:y:z] tokens. The three arguments are:I do not know what the source for this is though. I would read the whole page it goes into more detail than that.
Foreground color [0-7]
Background color [0-7]
Brightness of the foreground color [0 or 1]
The brightness of the background color is always 0.
I think that for testing purposes some large-size tileset would be nice, combined with some simplistic graphics set, the only requirement of which is that creature graphics have lots of transparent space.
Well, a large tileset could be just a matter of resizing a small tileset, right?If you want to test different tileset sizes you can use my Tileset Resizer (http://www.bay12forums.com/smf/index.php?topic=87196.0) Octave functions to resize tilesets.
I have found a strange bug you should know about.
PRINT_MODE:SHADER works for a few days (more than 2 less than 5) but then SHADER mode starts crashing with a Segmentation Fault. Other modes (VBO, etc.) keep working.
Here is a backtrace of the crash.
Found and fixed a bug in vertex shader which was causing fun (and all shader fun is hidden). Please download new version of http://dffd.wimbli.com/file.php?id=5122 .Assuming I put every thing in the correct place as there were no installation instructions other than the python dependencies it does not work.
./runme.sh
texture 0 data loaded
FrameLoader(): 18 frames indexed
vendor: NVIDIA Corporation
renderer: GeForce GT 240/PCI/SSE2
version: 3.3.0 NVIDIA 270.41.06
GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS: 16 needed:7
GL_MAX_VERTEX_UNIFORM_COMPONENTS: 4096 needed:7
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS: 2048 needed:6
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: 32 needed:1
GL_MAX_TEXTURE_IMAGE_UNITS: 32 needed:1
GL_MAX_VARYING_FLOATS: 60 needed:20
GL_MAX_TEXTURE_COORDS: 8 needed:5
GL_POINT_SIZE_MIN: 0 needed:-4
GL_POINT_SIZE_MAX: 63 needed:63
GL_MAX_RECTANGLE_TEXTURE_SIZE: 8192 needed:2048
GL_ARB_texture_rectangle: supported
Compiling shaders:
4varying.vs
4varying.fs
Traceback (most recent call last):
File "testbed.py", line 623, in <module>
r = rednener(stuff, pa.vertex_shader, pa.fragment_shader)
File "testbed.py", line 181, in __init__
self.shader_setup()
File "testbed.py", line 239, in shader_setup
compileShader(file(self.vs).read(), GL_VERTEX_SHADER),
File "/usr/lib/pymodules/python2.7/OpenGL/GL/shaders.py", line 162, in compileShader
shaderType,
RuntimeError: ('Shader compile failure (0): 0(22) : error C7532: global type sampler2DRect requires "#version 140" or later\n0(22) : error C0000: ... or #extension GL_ARB_texture_rectangle : enable\n0(62) : error C7531: global function texture2DRect requires "#extension GL_ARB_texture_rectangle : enable" before use\n', ['#line 1 0\n#version 120\n#ifndef GL_ARB_texture_rectangle\n#extension GL_ARB_texture_rectangle : require\n#endif\n#pragma optimize(off)\n#pragma debug(on)\n\n/*\n row-major order.\n idx, rows, columns\n\n column = fract(idx/columns)*columns (aka mod(idx, rows))\n row = floor(idx/columns)\n\n nc_t = column/columns = fract(idx/columns)\n nc_s = row/rows = floor(idx/columns)/rows\n*/\n\nconst float ANSI_CC = 16.0; // ansi color count \n\nuniform sampler2DRect txco;\nuniform vec4 txsz; // { w_tiles, h_tiles, tile_w, tile_h }\nuniform vec2 viewpoint;\t\t\t\nuniform vec3 pszar; \t\t\t// { parx, pary, psz }\n// Total 7 float values, 1 sampler\n\nattribute vec4 screen; // { ch, fg, bg, bold } \nattribute float texpos; // tile_tex_idx \nattribute float addcolor;\nattribute float grayscale;\nattribute float cf;\nattribute float cbr;\nattribute vec2 position; // almost forgot teh grid\n// Total 7 attributes = 13 float values \n\nvarying vec4 ansicolors; // tile: computed foreground and background color indexes for tile and creature\nvarying vec4 tile; \t// creature: offset into font texture and tile size\nvarying vec4 creature; // tile: offset into font texture and tile size\n\n// Total 6 texcoords = 24 varying floats\n\nvec2 ansiconvert(vec3 c) { // { fg, bg, bold }, returns {fg_idx, bg_idx}\n vec2 rv;\n float bold_factor = 0.0;\n if (c.z > 0.1)\n bold_factor = 8.0;\n\n rv.x = mod(c.x + bold_factor, ANSI_CC);\n rv.y = mod(c.y, ANSI_CC);\n return rv;\n}\n\nvec4 idx2texco(float idx) {\n vec4 tile_size;\n vec2 tile_coords;\n vec4 rv;\n \n rv.x = txsz.x*fract( idx / txsz.x ) * txsz.z; // pixel coords \n rv.y = txsz.w*floor( idx / txsz.x ); // txsz.y; // into font texture - "offset"\n\n tile_size = texture2DRect(txco, rv.xy);\n rv.zw = tile_size.xy * 256.0; // pixel size of the tile = "tilesize"\n \n return rv;\n}\n\nvoid main() { // precomputes whatever there can be precomputed\n \n ansicolors.xy = ansiconvert(screen.yzw);\n tile = idx2texco(screen.x);\n \n vec2 defaultcolors = vec2(0.0, 15.0);\n if (texpos > 0.1) {\n\tcreature = idx2texco(texpos);\n\tif (grayscale > 0.1) { \n\t ansicolors.zw = ansiconvert(vec3(cf, screen.z, cbr));\n\t} else if (addcolor > 0.1) {\n\t ansicolors.zw = ansicolors.xy;\n\t} else {\n\t ansicolors.zw = defaultcolors;\n\t}\n } else {\n\tcreature = vec4(0.0); // size of 0 = no creature.\n\tansicolors.zw = defaultcolors;\n }\n \n vec2 posn = pszar.xy*position*pszar.z - viewpoint;\n \n gl_Position = gl_ModelViewProjectionMatrix*vec4(posn.x, posn.y, 0.0, 1.0);\n gl_PointSize = pszar.z; \n}\n'], GL_VERTEX_SHADER)
Okay, I got rid of graphic tile size limitation, the only remaining is the aspect ratio one. New lib uploaded.Does not work with the Nvidia drivers (and probably any drivers other than the one you are using that does not update libstdc++) if you follow the instructions in your readme.
It also should work on i965 (Intel Sandy Bridge chipset) machines.Do you mean that it will work with the built in graphics in the sandy bridge chipset?
Here's the question: If one uses, say, 8x14 font with half 32x32 graphics, other half being, say, 12x24 : what should the code do?
Or the other way around: 32x24 font, 16x16 and 8x12 graphics. and some 48x54 ones just for fun.
Does not work with the Nvidia drivers (and probably any drivers other than the one you are using that does not update libstdc++) if you follow the instructions in your readme.
Also tiles are not rendered in the correct size and the screen is not filled when first loading a save file.
This can be worked around by playing with the zoom until it looks right (or using an old screenshot to be sure its right).
Do you mean that it will work with the built in graphics in the sandy bridge chipset?
OpenGL renderer: Mesa DRI Intel(R) Sandybridge Desktop x86/MMX/SSE2
OpenGL version: 2.1 Mesa 7.12-devel
lspci:
Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
dmidecode:
Base Board Information
Manufacturer: Intel Corporation
Product Name: DH67BL
Version: AAG10189-204
Here you go.Also tiles are not rendered in the correct size and the screen is not filled when first loading a save file.
That one is strange. Can you please post output from the console?
./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=7
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=6
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=1
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=2
GL_MAX_VARYING_FLOATS=60, needed=12
GL_MAX_TEXTURE_COORDS=8, needed=3
GL_POINT_SIZE_MIN=0, needed=4
** GL_POINT_SIZE_MAX=63, needed=64
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1600x500 viewport 1600x500 Psz 20x20
set_viewport(): got 1600x500 out of 1600x500
reshape(): got grid 96x51 window 1920x1025 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1920x1025 viewport 1920x600 Psz 24x24
gps_allocate(80, 25)
set_viewport(): got 1920x600 out of 1920x102
Does not fix it. It looks like this after pressing F10.This can be worked around by playing with the zoom until it looks right (or using an old screenshot to be sure its right).
Try the reset-zoom hotkey, F10, it should reset zoom so that tiles are drawn pixel-for-pixel.
/df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=7
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=6
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=1
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=2
GL_MAX_VARYING_FLOATS=60, needed=12
GL_MAX_TEXTURE_COORDS=8, needed=3
GL_POINT_SIZE_MIN=0, needed=4
** GL_POINT_SIZE_MAX=63, needed=64
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1600x500 viewport 1600x500 Psz 20x20
set_viewport(): got 1600x500 out of 1600x500
reshape(): got grid 96x51 window 1920x1025 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1920x1025 viewport 1920x600 Psz 24x24
gps_allocate(80, 25)
set_viewport(): got 1920x600 out of 1920x1025
reshape(): got grid 60x32 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x32 window 1920x1025 viewport 1920x768 Psz 24x24
gps_allocate(80, 32)
set_viewport(): got 1920x768 out of 1920x1025
Here is the result of playing with the zoom until it is correct.andrew@The-Hammer:/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux$ ./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=7
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=6
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=1
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=2
GL_MAX_VARYING_FLOATS=60, needed=12
GL_MAX_TEXTURE_COORDS=8, needed=3
GL_POINT_SIZE_MIN=0, needed=4
** GL_POINT_SIZE_MAX=63, needed=64
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1600x500 viewport 1600x500 Psz 20x20
set_viewport(): got 1600x500 out of 1600x500
reshape(): got grid 96x51 window 1920x1025 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
reshape(): got grid 0x0 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1920x1025 viewport 1920x600 Psz 24x24
gps_allocate(80, 25)
set_viewport(): got 1920x600 out of 1920x1025
reshape(): got grid 60x32 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x32 window 1920x1025 viewport 1920x768 Psz 24x24
gps_allocate(80, 32)
set_viewport(): got 1920x768 out of 1920x1025
reshape(): got grid 83x44 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 83x44 window 1920x1025 viewport 1909x1012 Psz 23x23
gps_allocate(83, 44)
set_viewport(): got 1909x1012 out of 1920x1025
reshape(): got grid 87x46 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 87x46 window 1920x1025 viewport 1914x1012 Psz 22x22
gps_allocate(87, 46)
set_viewport(): got 1914x1012 out of 1920x1025
reshape(): got grid 83x44 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 83x44 window 1920x1025 viewport 1909x1012 Psz 23x23
gps_allocate(83, 44)
set_viewport(): got 1909x1012 out of 1920x1025
reshape(): got grid 80x42 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x42 window 1920x1025 viewport 1920x1008 Psz 24x24
gps_allocate(80, 42)
set_viewport(): got 1920x1008 out of 1920x1025
reshape(): got grid 76x41 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x41 window 1920x1025 viewport 1920x984 Psz 24x24
gps_allocate(80, 41)
set_viewport(): got 1920x984 out of 1920x1025
reshape(): got grid 83x44 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 83x44 window 1920x1025 viewport 1909x1012 Psz 23x23
gps_allocate(83, 44)
set_viewport(): got 1909x1012 out of 1920x1025
reshape(): got grid 87x46 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 87x46 window 1920x1025 viewport 1914x1012 Psz 22x22
gps_allocate(87, 46)
set_viewport(): got 1914x1012 out of 1920x1025
reshape(): got grid 91x48 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 91x48 window 1920x1025 viewport 1911x1008 Psz 21x21
gps_allocate(91, 48)
set_viewport(): got 1911x1008 out of 1920x1025
reshape(): got grid 96x51 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_viewport(): got 1920x1020 out of 1920x1025
reshape(): got grid 101x53 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 101x53 window 1920x1025 viewport 1919x1007 Psz 19x19
gps_allocate(101, 53)
set_viewport(): got 1919x1007 out of 1920x1025
reshape(): got grid 106x56 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 106x56 window 1920x1025 viewport 1908x1008 Psz 18x18
gps_allocate(106, 56)
set_viewport(): got 1908x1008 out of 1920x1025
reshape(): got grid 112x60 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 112x60 window 1920x1025 viewport 1904x1020 Psz 17x17
gps_allocate(112, 60)
set_viewport(): got 1904x1020 out of 1920x1025
reshape(): got grid 120x64 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 120x64 window 1920x1025 viewport 1920x1024 Psz 16x16
gps_allocate(120, 64)
set_viewport(): got 1920x1024 out of 1920x1025
reshape(): got grid 112x60 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 112x60 window 1920x1025 viewport 1904x1020 Psz 17x17
gps_allocate(112, 60)
set_viewport(): got 1904x1020 out of 1920x1025
reshape(): got grid 106x56 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 106x56 window 1920x1025 viewport 1908x1008 Psz 18x18
gps_allocate(106, 56)
set_viewport(): got 1908x1008 out of 1920x1025
reshape(): got grid 112x60 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 112x60 window 1920x1025 viewport 1904x1020 Psz 17x17
gps_allocate(112, 60)
set_viewport(): got 1904x1020 out of 1920x1025
reshape(): got grid 106x56 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 106x56 window 1920x1025 viewport 1908x1008 Psz 18x18
gps_allocate(106, 56)
set_viewport(): got 1908x1008 out of 1920x1025
reshape(): got grid 101x53 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 101x53 window 1920x1025 viewport 1919x1007 Psz 19x19
gps_allocate(101, 53)
set_viewport(): got 1919x1007 out of 1920x1025
reshape(): got grid 96x51 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_viewport(): got 1920x1020 out of 1920x1025
reshape(): got grid 91x48 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 91x48 window 1920x1025 viewport 1911x1008 Psz 21x21
gps_allocate(91, 48)
set_viewport(): got 1911x1008 out of 1920x1025
reshape(): got grid 96x51 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_viewport(): got 1920x1020 out of 1920x1025
reshape(): got grid 91x48 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 91x48 window 1920x1025 viewport 1911x1008 Psz 21x21
gps_allocate(91, 48)
set_viewport(): got 1911x1008 out of 1920x1025
reshape(): got grid 96x51 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_viewport(): got 1920x1020 out of 1920x1025
reshape(): got grid 101x53 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 101x53 window 1920x1025 viewport 1919x1007 Psz 19x19
gps_allocate(101, 53)
set_viewport(): got 1919x1007 out of 1920x1025
reshape(): got grid 96x51 window -1x-1 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_viewport(): got 1920x1020 out of 1920x1025
The biggest problem with all this is that game icons are, by necessity, pixelart. This means that any resizing other than upscaling them by increments of 2 is a murder on the piece of work that they are- seriously decreasing not only their looks but most of all their readability.
Here you go.Also tiles are not rendered in the correct size and the screen is not filled when first loading a save file.
That one is strange. Can you please post output from the console?
Thank you. New version is up. Does work with standard libstdc++ too.Tile size is wrong at startup but F10 works now.
./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=7
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=6
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=1
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=2
GL_MAX_VARYING_FLOATS=60, needed=12
GL_MAX_TEXTURE_COORDS=8, needed=3
GL_POINT_SIZE_MIN=0, needed=4
** GL_POINT_SIZE_MAX=63, needed=64
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 80x25 window 1920x1000 viewport 1840x575 Psz 23x23
set_viewport(): got 1840x575 out of 1920x1000
Frame drawn in 2 msec
reshape(): got grid 96x50 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 0 msec
Since forcing interface text to the same size as the game tiles is not convenient on modern monitors, it is a project goal to make the interface drawn separately from the world view, preferably with vector fonts.I would suggest you add a [MENU_TILESET:] to the init file where the tileset/font/vector font used for drawing the interface can be specified.
Okay. Since I think that the policy on supported tile resolution/aspect ratios and such should be simple, let's limit it to this:
- Game is intended to be played without scaling/stretching or otherwise mutilating the graphics.
- Zoom is intended to be used to get a rough overview of the map, not a pretty one.
- Aspect ratio is defined by the font, that is, the floor tileset.
- If some graphics are of different aspect ratio, then they are uniformly scaled to fit inside the floor tile, centered. Resulting ugliness is the user's fault.
Since forcing interface text to the same size as the game tiles is not convenient on modern monitors, it is a project goal to make the interface drawn separately from the world view, preferably with vector fonts.
Zoom and scaling in my code is implemented by adjusting point sprite size in 1-pixel increments. Thus it is trivial to force scaling to exact integer multiple of pixels in the graphic.
Filtering is either GL_NEAREST or GL_LINEAR. While it's possible to implement some insanely complex scaler in the fragment shader, I don't think it's worth it due to the policy point 1.
How does this sound?
Tile size is wrong at startup but F10 works now.
I would suggest you add a [MENU_TILESET:] to the init file where the tileset/font/vector font used for drawing the interface can be specified.That's what I planned to do.
I would be careful with anything involving drawing vectors as it has the possibility to make the menus draw very slowly.
EDIT: Since I've been waiting for pretty much years for this, I just wanted to make sure: is this what you're hoping to achieve?
http://mayday.w.staszic.waw.pl/~mayday/upload/yesplease.jpg
Tile size is correct at startup now.Tile size is wrong at startup but F10 works now.
Thank you. New version is up. It also tries to set 1:1 zoom if resizing upwards from a size that did not allow 1:1 zoom while keeping 80x25 grid (i.e. too small a window).
I switched to gcc-4.5 on my home machine, please test if this version works with stock libstdc++ on Natty.
Tile size is correct at startup now.
Works on my 32bit 11.04 (natty) computer which has the stock libstdc++.
This is a direct replacement of any other renderer - it draws stuff identically or as close to as is sensible. It is also faster, easily beating 500 graphic FPS on pause (on my r4850), and not biting off much time out of game engine when in action - but make sure you cap G_FPS at something low and enable SINGLE_BUFFER.[SINGLE_BUFFER:YES] in [PRINT_MODE:SHADER] is unusable for me as the game looks like this
[SINGLE_BUFFER:YES] in [PRINT_MODE:SHADER] is unusable for me as the game looks like this
...
The dark triangle jumps up and down the screen and blinks on and off rapidly while changing size.
This also happens when using [PRINT_MODE:VBO] but not in other modes.
I see no FPS improvement between [SINGLE_BUFFER:YES] and [SINGLE_BUFFER:NO]. FPS appears identical between these two settings in a 21 year old fort.
I am actually seeing the opposite of you when I test with a three season old fort.
Okay. Look at the console output, the code prints time spent drawing a frame every 5 seconds. If it's about 16-17 ms, your GL driver forces vertical refresh sync at 60Hz.It is 0-1 ms no matter what settings I use. My graphical FPS never climbs above its cap when paused. Game engine FPS climbs rapidly either to its cap or to a very large value when paused.
The whole point of this is to leave G_FPS capped by the game, not by the GL drivers. This way frame is drawn as fast as possible, and the rest of time is spent elsewhere,
not in drivers waiting for the vertical refresh.
If it's about 1-2 ms, then renderer does not waste time. This is visible in game when you pause and graphics FPS starts to climb to about the same value as game engine FPS.
./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 2 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
reshape(): got grid 96x51 window 1920x1025 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
Frame drawn in 0 msec
[SINGLE_BUFFER:YES]./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=1.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 0
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 2 msec
reshape(): got grid 96x51 window 1920x1025 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=1.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 0
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
Frame drawn in 0 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 1 msec
Frame drawn in 0 msec
The reason I quoted 500 FPS is that I capped game engine FPS to 500 and on every pause graphics FPS would climb to 500 in several seconds (this gradual rise has something to do withYou should tell us if you have capped your FPS. My FPS always hits a cap like that no matter what print mode I am using when paused.
how graphics FPS is calculated).
That said, I'm reading the code that communicates between rendering and game engine threads. There might be some deficiences whose removal can benefit game engine FPS.
lxnt, I just felt I should mention, it's actually not possible to make Stonesense to work in SDL, due to SDL limitations.
Listen guys I really would like to help with testing the project but I'd need help setting up a proper environment (usb ubuntu plus learning how to compile). If you think it's worth your trouble- shoot!Instructions on how to make a Ubuntu usb boot drive can be found here. (http://www.ubuntu.com/download/ubuntu/download)
GTK+ 2+
SDL 1.2+
SDL_image
libgl
libglu
There is one more needed in Ubuntu but I don't remember what it is. hg clone https://dwarftherapist.googlecode.com/hg/ dwarftherapist
with hg clone https://code.google.com/r/shishimar-dwarftherapist/ dwarftherapist
to use the version I recommended.is the Russian regime opposing development of this patch??
Hello, fellow Dwarflings.
As i tried to use this shader, i ran into some problems. I am pretty new to linux, in fact i only just set up a debian system as i read that this shader is available for linux only. So after i finally taught myself how to install all the necessary libraries and got the basic Dwarf Fortress application to run, i tried setting the [PRINT_MODE] to SHADER. Sadly, all i got wasSpoiler: this (click to show/hide)
After fiddling with the settings in the init.txt, all i managed to do was to turn the screen blue, which despite being pretty didn't help me an awful lot.
Does anyone know, what could be responsible for this?
Each tile was being rendered as a single pixel, it was caused by the way the Nvidia drivers optimize GLSL code.Spoiler (click to show/hide)
The Terminal's output on the default settings is just "Frame drawn in x miliseconds" every ~300ms
after enabling the dumping, it looks like this:Spoiler (click to show/hide)
I am using the version i got from the front page about 3 days ago.
The green screen is exactly what my blue one looked like. I could even see the cyan pixels where the fps counter was.
If this can be about Nvidia drivers i will look into that, as im pretty sure this machine uses some Nvidia card (I'm visiting my parents for christmas, so i dont have access to my own pc).
Thanks for the help, i will let you know if it helped.
Code: [Select]./df
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GT 240/PCI/SSE2
OpenGL version: 3.3.0 NVIDIA 270.41.06
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 2 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
Frame drawn in 0 msec
reshape(): got grid 96x51 window 1920x1025 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x51 window 1920x1025 viewport 1920x1020 Psz 20x20
gps_allocate(96, 51)
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
set_viewport(): got 1920x1020 out of 1920x1025
Frame drawn in 0 msec
./df
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
SDL_SetVideoMode: Couldn't find matching GLX visual
SDL initialization failure: Couldn't find matching GLX visual
I think i just made everything become worse. I tried installing the nvidia drivers, but lost internet connection half way through the installation. Additionally i've had to switch to a pc using an intel graphics chip.
Now all i can get is this:Code: [Select]./df
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
textures::load(): data/art/Chickentiles_Smoothed.png 192x192 16x16 12x12
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
SDL_SetVideoMode: Couldn't find matching GLX visual
SDL initialization failure: Couldn't find matching GLX visual
Any help?
Now all i can get is this:Code: [Select]SDL initialization failure: Couldn't find matching GLX visual
If I understand it right, the main incentive for this utility was increasing FPS by offloading the graphics to the GPU (but with neat consequences like the SHADER mode)?This was the original motivation, and in fact the speedup provided is noticeable, although not quite significant on latest hardware.
Can it draw multiple tiles (from the tileset) + characters (from the characters set), or just 1 tile and 1 character.
I think it would be interesting to be able to draw multiple tiles on top of each other (f.e. the floor tile + the rope lying on top of it). I think it would probably need specially designed tilesets, but you already have Mayday's interest.
And if you ever allow for different-size icons, it could be neat for the supposedly 3-tile wide wagons and forgotten beasts that currently look rather underwhelming.
>>> import memxml as mx
>>> mx.init()
...
>>> mx=reload(mx)
>>> mx.init()
>>> for crea in mx.crea_vector:
... if crea.contents.name.has_name:
... print crea.contents.name.first_name
...
iden
dastot
zulban
ilral
edem
id
tulon
>>>
[TILE_PAGE:pagename]
[FILE:page/name.png]
[TILE_DIM:16:16]
[PAGE_DIM:16:16]
[DEF:cactus:10,6]
[DEF:cheap_ore:132]
[DEF:cheap_gem:168]
[DEF:best_ore:9,12]
[DEF:cage:1,3]
[MAT:DEFAULT]
[WALL:SOLID]
[CEL:pagename:8,3]
[WALL:ROUGH]
[CEL:pagename:8,3]
[WALL:ROUGH:NS]
[CEL:pagename:11,13]
[MAT:GOLD]
[VEIN]
[BLIT:best_ore]
[BLEND:FFD700]
[KEY:24]
[BLIT:best_ore]
[BLEND:AF8700]
[KEY:48]
[CAGE]
[BLIT:cage]
[BLEND:FFD700FF]
[KEY:24]
[BLIT:cage]
[GLOW:FFD70080]
[KEY:48]
[MAT:SILTY_CLAY]
[DEFAULT]
[BLEND:FBEC5D]
{ "smooth stone wall RD2", WALL, STONE, VAR_1, TILE_SMOOTH, "--SS--E-" },
{ "smooth stone wall R2D", WALL, STONE, VAR_1, TILE_SMOOTH, "--S---EE" },
{ "smooth stone wall R2U", WALL, STONE, VAR_1, TILE_SMOOTH, "N-----EE" },
{ "smooth stone wall RU2", WALL, STONE, VAR_1, TILE_SMOOTH, "NN----E-" },
{ "smooth stone wall L2U", WALL, STONE, VAR_1, TILE_SMOOTH, "N---WW--" },
{ "smooth stone wall LU2", WALL, STONE, VAR_1, TILE_SMOOTH, "NN--W---" },
{ "smooth stone wall L2D", WALL, STONE, VAR_1, TILE_SMOOTH, "--S-WW--" },
{ "smooth stone wall LD2", WALL, STONE, VAR_1, TILE_SMOOTH, "--SSW---" },
{ "smooth stone wall LRUD", WALL, STONE, VAR_1, TILE_SMOOTH, "N-S-W-E-" },
{ "smooth stone wall RUD", WALL, STONE, VAR_1, TILE_SMOOTH, "N-S---E-" },
{ "smooth stone wall LRD", WALL, STONE, VAR_1, TILE_SMOOTH, "--S-W-E-" },
{ "smooth stone wall LRU", WALL, STONE, VAR_1, TILE_SMOOTH, "N---W-E-" },
{ "smooth stone wall LUD", WALL, STONE, VAR_1, TILE_SMOOTH, "N-S-W---" },
{ "smooth stone wall RD", WALL, STONE, VAR_1, TILE_SMOOTH, "--S---E-" },
{ "smooth stone wall RU", WALL, STONE, VAR_1, TILE_SMOOTH, "N-----E-" },
{ "smooth stone wall LU", WALL, STONE, VAR_1, TILE_SMOOTH, "N---W---" },
{ "smooth stone wall LD", WALL, STONE, VAR_1, TILE_SMOOTH, "--S-W---" },
{ "smooth stone wall UD", WALL, STONE, VAR_1, TILE_SMOOTH, "N-S-----" },
{ "smooth stone wall LR", WALL, STONE, VAR_1, TILE_SMOOTH, "----W-E-" },
each wall tile can be connected two any out of four directions.
{ "smooth stone wall LRUD", WALL, STONE, VAR_1, TILE_SMOOTH, "N-S-W-E-" }, for example, is a + shaped wall.
{ "smooth stone wall RU2", WALL, STONE, VAR_1, TILE_SMOOTH, "NN----E-" },
does it really provide much of a performance boost?
Wow! So... all the mentioned features are already implemented??
What's this talk of tile aliases?
[00:00:00] - {Day changed to Wed Feb 15 00:00:00 2012}Sounds like a good idea! Thing is, I'd like it to still work with the stock precompiled libgraphices just like it works now...
[00:30:27] <lxnt> peterix, _Q: I'm working on separating angavrilov's generator and supporting code from dfhack into a standalone lib so as to not be forced to link whole dfhack into libgraphics.so.
[00:30:50] <lxnt> peterix, _Q: any objections?
[00:31:13] <lxnt> peterix, _Q: (to merging this ofc)
It is most certainly my intention to not disrupt dfhack operation in any way.
Sounds like a good idea! Thing is, I'd like it to still work with the stock precompiled libgraphices just like it works now...
From the technical point of view, you still need a good chunk of DFHack, as it needs to init some stuff - it needs to determine the version of DF and load up the appropriate version info (really an extension of DF's symbol table) from an xml file. All you'd be cutting out is the console and the plugin API, which are rather minimal anyway. The modules are helpful too, providing some abstractions on top of DF's structures...
class essentials {
public:
virtual std::string readClassName(void *) = 0;
virtual void lock() = 0;
virtual void unlock() = 0;
virtual std::map<std::string, void *>& getVtable() = 0;
virtual void *getGlobal(const char *name) = 0;
};
On the other hand, the hackish way DFHack interfaces with DF's execution could be much improved. Right now, DFHack hooks some SDL calls, which isn't exactly ideal. It would be nice to be able to paint into DF's window and sync with the graphics thread for example. Or have libgraphics directly call Core methods.
Anyway, more details could certainly help.
# lxnt has created fgtestbed , a lump of python code
# all masterwork is of dubious quiality.
# it is studded with bugs
# it is encrusted with bugs
# it menaces with spikes of bugs
# it smells of bugs
# a picture of giant bug is engraved on its side
# ...
# lxnt cancels Debug: interrupted by bug
Gonna set up some portable Ubuntu and try this today.
Don't get your hopes up, I'm terrible at setting up a proper software environment.
from o import cx as glnames
line in fgtestbed.pyruntime error concerning casting int as uint in a gl function.
./fgtestbed.py bigdump
--
Also, those dumps you posted gives the same error for me.
blend = vec4(insn.z >> 8, insn.z & 0xffu, insn.w >> 8, insn.z & 0xffu) / 256.0;
blend = vec4(insn.z >> 8u, insn.z & 0xffu, insn.w >> 8u, insn.w & 0xffu) / 256.0;
Ok, the program works now but it looks like a mess of pink letters.
Am I supposed to look at something here?
lxnt@bigbox:~/00DFGL/fgtestbed$ ./fgtestbed.py ../dfa_linux/ smalldump
353 mats 13071 defined tiles, assembling...
hashtable 4096K code 206K
font: 128x3 16x16 tiles, 2048x48, 384K
A replacement for DF's default drawing method- a sort of 2D visualizer?See the top post for this.
Would it be possible for you to show us some images with one of the tilesets thats avaibable (ironhand , mayday etc)?
Would it be possible for you to show us some images with one of the tilesets thats avaibable (ironhand , mayday etc)?
They ain't that great, in fact liquids are plain ugly, though translucent, and most tiles aren't drawn at all as of last working version. And there isn't any working version left.
I wound up having to implement material template instantiation for the plant materials, that's why it's taking longer than anticipated, DF raws format being quite peculiar. Can only tremble in horror thinking of what it would take for creature-derived materials. But it should be possible to define unique graphics for any item/base material/quality/encrustions and enscriptions combination in the end.
./fgtestbed.py ../df_linux ./fugr.dump ./fgraws/
I imagine that perspective will be a cakewalk, eh?
I imagine that perspective will be a cakewalk, eh?In fact, yes. But I want to make it work as is first.
For this project to move on I think we need a base tileset to work off of. Its tile size (16x16? 20x20? 24x24?) should be decided upon right now, and a standard (16x16 tiles) tileset (tilepage) should be made available asap.
Then as I move on to implementing buildings and items, I will need their definitions - that is how to draw them.
After that is some drawable shape, a decision must be made on how creatures are drawn - are they smaller than tiles, and if that's the case where to draw them on the underlying tile.
I also haven't got an idea on how to draw heaps of body parts lying around and pools of blood/vomit/whatnot that result from pounding a 'force of darkness' with couple of squads of marksdwarves and a catapult battery, and then releasing a butcher squad to finish them off.
But first let's decide on base tileset and its dimensions.
Are you planning on having more context sensitive tiles that work like walls currently do? It would be great for things like this.
I you're going to obliterate the 80 tile minimum,
As soon as we decide on the dimensions, I'm ready to produce any graphics you need.
1. python 2.7.2 32-bit msi http://python.org/download/releases/2.7.2/
2. numpy-1.6.1-win32-superpack-python2.7.exe http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/
3. Python Imaging Library 1.1.7 for Python 2.7 http://www.pythonware.com/products/pil/index.htm
4. pygame-1.9.1.win32-py2.7.msi http://pygame.org/download.shtml
5. setuptools-0.6c11.win32-py2.7.exe http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
6. c:\python27\scripts\easy_install.exe -i http://c.pypi.python.org/simple PyOpenGL PyOpenGL-accelerate
I'm not sure if this dimensions questions for the first fg-set it that much an issue as I thought. So please go ahead with 32x32 and give me a 16x16 tile standard fontpage, and graphics for up/down stairway for a start. (I sure hate those X-es instead of stairways).I understand the tilepage is supposed to be for vanilla raws? Am I to place the up/down stairway icon on the tilepage (at 'X') or should it be separate?
Then, I think, the driftwood tile can be redrawn, and maybe more diversity in tree tiles can be injected. A good example of simple animationI'd hold off on animation until we've got all the static graphics working, but if you want to test it, I'll animate a tree, np.
would be trees' leaves and branches swinging with the wind.
Also I'm not quite sure how to draw river tiles - as opposed to ocean/lakes which are just open space with 7/7 water, these are dedicated tiletypes with direction (see tilesets.txt). I think some animation can be put there too, or at least, some graphics differing by direction.Animating a river with proper directions is somewhat out of my area of expertise (I'm actually a noob when it comes to pixelart) but we'll see about it!.
I understand the tilepage is supposed to be for vanilla raws? Am I to place the up/down stairway icon on the tilepage (at 'X') or should it be separate?
I'd hold off on animation until we've got all the static graphics working, but if you want to test it, I'll animate a tree, np.
BTW, I'm on 64bit Win7, will there be any trouble? SHould I have installed 32bit Python?
Animating a river with proper directions is somewhat out of my area of expertise (I'm actually a noob when it comes to pixelart) but we'll see about it!.
But wait, is the main tileset supposed to be just ASCII then? Pure text symbols?
This sounds fantastic. Are you planning on having more context sensitive tiles that work like walls currently do? It would be great for things like this.
(http://i12.photobucket.com/albums/a226/Figgin/Misc/2DEdgeTileExample.png?t=1251254698)
You could then have ore that looks like it sits within the rock around it or even have rough stone walls overhang into open tiles.
Nice to hear. It makes things look a lot more natural when used right.Are you planning on having more context sensitive tiles that work like walls currently do? It would be great for things like this.Um. Haven't thought about this aspect. It would require some preprocessing, but I guess in the worst case I can make a hotkey to turn it off if FPS is hurt. Otherwise, I see no problem with this.
Nice, I wasn't aware. I'm sorry to say that despite having started pixeling doing isometric stuff it's not my favourite perspective for gaming so I've not greatly looked into Stonesense. It seems like a lifetime ago that I did anything isometric. Here's the last building I did (http://i40.tinypic.com/4l2jy8.gif), it's a little cringeworthy looking through my old stuff; I think I could do a lot better now.This sounds fantastic. Are you planning on having more context sensitive tiles that work like walls currently do? It would be great for things like this.
Image (http://i12.photobucket.com/albums/a226/Figgin/Misc/2DEdgeTileExample.png?t=1251254698)
You could then have ore that looks like it sits within the rock around it or even have rough stone walls overhang into open tiles.
Stonesense does have a limited version of this, but it only detects things like open space, ramps, walls, and stairs, so you can't have grass borders, but you can have platform borders.
Man, this makes me want to make a version of stonesense that has the same view as DF. it wouldn't be hard, and you'd be able to have lots more stuff shown.I'd love something like that. From what I've read this will end up somewhat like that when it's done.
You could do the same as default Minecraft. Have a nice animated texture and scroll it.Animating a river with proper directions is somewhat out of my area of expertise (I'm actually a noob when it comes to pixelart) but we'll see about it!.
I thought about something to show which direction the water is flowing, in a translucent way. No idea how to do it though.
LX, I've just had a pretty good idea on textures+tinting- when there's a graphic tile and you want only some parts of it to receive tint (like a stone bookshelf- only the shelves should be tinted, not the books), could you try making it so that only pixels with 0 saturation (R=G=B) get tinted, while others are left unchanged?
Another question: thinking of the avarage noob like me here- once the project is done, will you be able to include all the necessary libraries in the download so that installing any additional stuff isn't necessary? (well, except maybe for Python itself).
I'm looking at the changes you did within dfhack, libgraphics and df-structures to get this working and it's clearly the path forward. I'm not sure how well, or even if it will merge properly at this point, because the development in master branches of dfhack and df-structures moved ahead quite a bit since 31.25 support was dropped.
With the latest commit I'm getting:
C:\Users\Alamar\Desktop\fgtestbed-7a>fgtestbed.py 31.25 31.25/raw/
C:\Users\Alamar\Desktop\fgtestbed-7a>fgtestbed.py 31.25 dump\brook0.dump
where dump/brook0.dump is a dump from here (http://dffd.wimbli.com/file.php?id=5692).implicitly delimited PLANT_OIL_TEMPLATE in BUSH_QUARRY
implicitly delimited PLANT_SOAP_TEMPLATE in BUSH_QUARRY
Could be I've installed the dependencies wrong?
Trees, boulders and such, like drifwood have a problem - they are tiles themselves, so I have no data to draw floor under them, and if I don't force alpha to 1.0, lower levels become visible, which is ugly.
Something needs to be invented.
I think I found the bug.
Try adding a dummy tileset at the end of the tilesets.txt, something like:
[tileset:dummy]
libgraphics.so with integrated dumper for 3125 is at http://dffd.wimbli.com/file.php?id=5763 (http://dffd.wimbli.com/file.php?id=5763) Press F12 to dump.I tried this and it crashes in fortress mode.
./dfbacktrace
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux/libs/Dwarf_Fortress...(no debugging symbols found)...done.
Starting program: /media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux/libs/Dwarf_Fortress
[Thread debugging using libthread_db enabled]
[New Thread 0xf477db70 (LWP 25952)]
[New Thread 0xf3f7cb70 (LWP 25953)]
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GTX 560 Ti/PCIe/SSE2
OpenGL version: 4.2.0 NVIDIA 295.20
OpenGL GLSL version: 4.20 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=124, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
GL_ARB_sync: supported
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 0 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
reshape(): got grid 96x50 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
set_viewport(): got 1920x1000 out of 1920x1000
Program received signal SIGSEGV, Segmentation fault.
0xf7a91c94 in __gnu_cxx::new_allocator<df::unit*>::construct (this=0x10086c18,
__p=0xffffffff, __val=@0xffffca3c)
at /usr/include/c++/4.6/ext/new_allocator.h:108
108 { ::new((void *)__p) _Tp(__val); }
#0 0xf7a91c94 in __gnu_cxx::new_allocator<df::unit*>::construct (this=0x10086c18,
__p=0xffffffff, __val=@0xffffca3c)
at /usr/include/c++/4.6/ext/new_allocator.h:108
#1 0xf7a912fc in std::vector<df::unit*, std::allocator<df::unit*> >::push_back (
this=0x10086c18, __x=@0xffffca3c) at /usr/include/c++/4.6/bits/stl_vector.h:830
---Type <return> to continue, or q <return> to quit---
#2 0xf7a90f77 in _bicache::update (this=0xffffd0d8, a=..., b=...)
at /home/lxnt/00DFGL/PMS/print_shader/fugr_dump.cc:172
#3 0xf7a8f7eb in fugr_dump () at /home/lxnt/00DFGL/PMS/print_shader/fugr_dump.cc:388
#4 0xf79be297 in renderer_glsl::reload_shaders (this=0x9969928)
at /home/lxnt/00DFGL/PMS/print_shader/renderer_glsl.hpp:570
#5 0xf79c0c67 in renderer_glsl::update_all (this=0x9969928)
at /home/lxnt/00DFGL/PMS/print_shader/renderer_glsl.hpp:951
#6 0xf79b2b14 in enablerst::eventLoop_SDL (this=0x8c3e600)
at /home/lxnt/00DFGL/PMS/print_shader/enabler.cpp:463
#7 0xf79b316c in enablerst::loop (this=0x8c3e600, cmdline=...)
at /home/lxnt/00DFGL/PMS/print_shader/enabler.cpp:600
#8 0xf79b3bb8 in main (argc=1, argv=0xffffd3b4)
at /home/lxnt/00DFGL/PMS/print_shader/enabler.cpp:795
#9 0xf751ce37 in __libc_start_main () from /lib32/libc.so.6
#10 0x0804c951 in ?? ()
(gdb) q
A debugging session is active.
Inferior 1 [process 25949] will be killed.
Quit anyway? (y or n) y
I made your tileset work, all stuff is in git. It expects the two png files in the '32px' subdirectory where fgtestbed runs - see proto.txt for celpagedefs.You made this change in git but did not add the 32px folder or png files that are needed after this change so it just crashes unless the user fixes this themselves.
I tried this and it crashes in fortress mode.Crap. I blame C++ ABI. :(
Here is a backtrace for the crash.
You made this change in git but did not add the 32px folder or png files that are needed after this change so it just crashes unless the user fixes this themselves.
I think I fixed that one. Please test.libgraphics.so with integrated dumper for 3125 is at http://dffd.wimbli.com/file.php?id=5763 (http://dffd.wimbli.com/file.php?id=5763) Press F12 to dump.I tried this and it crashes in fortress mode.
Here is a backtrace for the crash.
It still crashes when F12 is pressed.I think I fixed that one. Please test.libgraphics.so with integrated dumper for 3125 is at http://dffd.wimbli.com/file.php?id=5763 (http://dffd.wimbli.com/file.php?id=5763) Press F12 to dump.I tried this and it crashes in fortress mode.
Here is a backtrace for the crash.
./dfbacktrace
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux/libs/Dwarf_Fortress...(no debugging symbols found)...done.
Starting program: /media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux/libs/Dwarf_Fortress
[Thread debugging using libthread_db enabled]
[New Thread 0xf477cb70 (LWP 2503)]
[New Thread 0xf3f7bb70 (LWP 2504)]
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GTX 560 Ti/PCIe/SSE2
OpenGL version: 4.2.0 NVIDIA 295.20
OpenGL GLSL version: 4.20 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=124, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
GL_ARB_sync: supported
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 1 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
reshape(): got grid 96x50 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
set_viewport(): got 1920x1000 out of 1920x1000
Program received signal SIGSEGV, Segmentation fault.
0xf7a909dd in std::vector<df::unit*, std::allocator<df::unit*> >::push_back (
this=0x10063754, __x=@0xffffca0c) at /usr/include/c++/4.6/bits/stl_vector.h:828
828 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
#0 0xf7a909dd in std::vector<df::unit*, std::allocator<df::unit*> >::push_back (
this=0x10063754, __x=@0xffffca0c) at /usr/include/c++/4.6/bits/stl_vector.h:828
#1 0xf7a9040e in _bicache::update (this=0xffffd0b8, a=..., b=...)
at /home/lxnt/00DFGL/PMS/print_shader/fugr_dump.cc:174
#2 0xf7a8ea7b in fugr_dump () at /home/lxnt/00DFGL/PMS/print_shader/fugr_dump.cc:390
#3 0xf79bd527 in renderer_glsl::reload_shaders (this=0x9969928)
---Type <return> to continue, or q <return> to quit---
at /home/lxnt/00DFGL/PMS/print_shader/renderer_glsl.hpp:570
#4 0xf79bfef7 in renderer_glsl::update_all (this=0x9969928)
at /home/lxnt/00DFGL/PMS/print_shader/renderer_glsl.hpp:951
#5 0xf79b1da4 in enablerst::eventLoop_SDL (this=0x8c3e600)
at /home/lxnt/00DFGL/PMS/print_shader/enabler.cpp:463
#6 0xf79b23fc in enablerst::loop (this=0x8c3e600, cmdline=...)
at /home/lxnt/00DFGL/PMS/print_shader/enabler.cpp:600
#7 0xf79b2e48 in main (argc=1, argv=0xffffd394)
at /home/lxnt/00DFGL/PMS/print_shader/enabler.cpp:795
#8 0xf751be37 in __libc_start_main () from /lib32/libc.so.6
#9 0x0804c951 in ?? ()
(gdb) q
A debugging session is active.
Inferior 1 [process 2497] will be killed.
Quit anyway? (y or n) y
Question: Am I correct in asserting that this is only for Linux (specifically Ubuntu at the moment) and not working on Windows yet? Can I compile it for Windows, or is it just flat out not supported?
Both of them or just the first one?
- the dumper crash arclance experienced - fixed.
Both of them or just the first one?
- the dumper crash arclance experienced - fixed.
You have not had me test anything after I posted the second backtrace so I don't know how you confirmed it is fixed?
To anyone who tests - how large is the practical performance improvement?From hardly noticeable to insignificant unless you have some real slow but recent hardware.
Does this alleviate the FPS death problem of many forts?No. It gives you warm fuzzy feeling that you did as much as possible in this aspect.
Will it work with Phoebus tileset?It was developed while using it.
I think this is a wonderful project, simply being able to get past the tileset limitations will completely transform this game for me.
I think this is a wonderful project, simply being able to get past the tileset limitations will completely transform this game for me.
Yea, but we need Linux to run it. :-\ However I read somewhere that you don't even have to install Linux, it runs from DVD too?..or something like that.
You almost certainly will need to install some dependencies of Dwarf Fortress for it to work so you would need to use a USB Boot Drive instead of a CD/DVD if you don't install the OS to a hard drive.I think this is a wonderful project, simply being able to get past the tileset limitations will completely transform this game for me.
Yea, but we need Linux to run it. :-\ However I read somewhere that you don't even have to install Linux, it runs from DVD too?..or something like that.
Yes most major linux distro supply "Live CDs" that basically let you boot from the CD. It's becoming the common installation method of the Operating System actually, boot into the OS and then install the OS from within the OS. If you're interested try http://www.linuxmint.com/download.php
Even more so, many distributions let you install Linux alongside Windows very easily and even resize partitions for you. So if you wana have Linux installed, its really not that hard.
I tried it and it works until you press F12 and then it crashes. (CrunchBang 10 64bit BPO)Both of them or just the first one?
- the dumper crash arclance experienced - fixed.
You have not had me test anything after I posted the second backtrace so I don't know how you confirmed it is fixed?
It was a manifestation of "c++ insanity-inducing initialization". Valgrind complains no more so I'm quite sure it's gone.
You can try it, I uploaded latest version here (http://dffd.wimbli.com/file.php?id=5763). Better redirect the output, it may spew some megabytes of debugging output.
I noticed I accidentally the offscreen renderer, so trying to export world map crashes it. Phew.
./df
/usr/share/themes/statler/gtk-2.0/gtkrc:86: error: unexpected identifier `border_shades', expected character `}'
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.4
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GTX 560 Ti/PCI/SSE2
OpenGL version: 4.1.0 NVIDIA 275.36
OpenGL GLSL version: 4.10 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
GL_ARB_sync: supported
makeansitex(): 2.
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
gps_allocate(80, 25)
Resetting textures
texdumpst::init(): allocating 2048x288 (max 64x9 32x32 cells)
accepted font texture (name=1): 2048x288px oa
accepted txco texture (name=3): 64x9px oa
reshape(): got grid 0x0 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
gps_allocate(96, 50)
set_viewport(): got 1920x1000 out of 1920x1000
Frame drawn in 5 msec
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/dorfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/humans.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/goblins.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/elfs.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/Beefmo/koboldz.png 240x500 12x25 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_birds.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_domestic.png 440x120 22x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/creature_large_mountain.png 100x120 5x6 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/animals.png 240x600 12x30 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/water.png 80x140 4x7 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/gibbon.png 80x180 4x9 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/beasts.png 120x80 6x4 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/mans.png 240x340 12x17 20x20
textures::load(): data/save/region60-2_phoebus_2_2/raw/graphics/mayday/newbeasts.png 120x160 6x8 20x20
Resetting textures
texdumpst::init(): allocating 2048x2656 (max 64x83 32x32 cells)
accepted font texture (name=1): 2048x2656px oa
accepted txco texture (name=3): 64x83px oa
Frame drawn in 0 msec
Embedded shader set 'rect'
Embedded shader set 'cbr_is_bold' x
Using embedded vertex shader code from 'cbr_is_bold'.
Using embedded fragment shader code from 'cbr_is_bold'.
GL_COMPILE_STATUS: true
GL_COMPILE_STATUS: true
GL_LINK_STATUS: true
GL_VALIDATE_STATUS: true
makeansitex(): 2.
reshape(): got grid 96x50 window -1x-1 tile 20x20 texture_ready=1 stretch=0 snap=0
reshape(): final grid 96x50 window 1920x1000 viewport 1920x1000 Psz 20x20
set_viewport(): got 1920x1000 out of 1920x1000
Segmentation fault
But now when I try to get a backtrace it crashes at startup../dfbacktrace
GNU gdb (GDB) 7.3-debian
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux/libs/Dwarf_Fortress...(no debugging symbols found)...done.
Starting program: /media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader/current/df_linux/libs/Dwarf_Fortress
[Thread debugging using libthread_db enabled]
/usr/share/themes/statler/gtk-2.0/gtkrc:86: error: unexpected identifier `border_shades', expected character `}'
[New Thread 0xf4ac4b70 (LWP 9704)]
[New Thread 0xf42c3b70 (LWP 9705)]
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.4
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce GTX 560 Ti/PCI/SSE2
OpenGL version: 4.1.0 NVIDIA 275.36
OpenGL GLSL version: 4.10 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
GL_ARB_sync: supported
Program received signal SIGSEGV, Segmentation fault.
0xf32cce21 in ?? ()
#0 0xf32cce21 in ?? ()
#1 0x0c244c8b in ?? ()
#2 0xfd70908b in ?? ()
#3 0x448b0004 in ?? ()
#4 0x808b0824 in ?? ()
#5 0x000000e0 in ?? ()
#6 0x04244c89 in ?? ()
#7 0x0c244489 in ?? ()
#8 0x1024448b in ?? ()
#9 0x08244489 in ?? ()
#10 0x00000c1c in ?? ()
#11 0x0b74c985 in ?? ()
---Type <return> to continue, or q <return> to quit---
#12 0x04538942 in ?? ()
#13 0x41ff42c6 in ?? ()
#14 0x4204538b in ?? ()
#15 0x5389f089 in ?? ()
#16 0xc6072404 in ?? ()
#17 0x0cc1ff42 in ?? ()
#18 0x04538be8 in ?? ()
#19 0x04538942 in ?? ()
#20 0x89ff4288 in ?? ()
#21 0x04438bfa in ?? ()
#22 0x04438940 in ?? ()
#23 0x8bff5088 in ?? ()
#24 0x8b10245c in ?? ()
#25 0x8b142474 in ?? ()
#26 0x8318247c in ?? ()
#27 0x90c31cc4 in ?? ()
#28 0x0026748d in ?? ()
#29 0xe8240489 in ?? ()
#30 0x006249c8 in ?? ()
#31 0xeb04538b in ?? ()
#32 0x906690a0 in ?? ()
#33 0x892cec83 in ?? ()
#34 0x89202474 in ?? ()
#35 0x24448bc6 in ?? ()
#36 0x247c893c in ?? ()
#37 0x8bd78924 in ?? ()
---Type <return> to continue, or q <return> to quit---
#38 0x89382454 in ?? ()
#39 0x8b28246c in ?? ()
#40 0x8934246c in ?? ()
#41 0x891c245c in ?? ()
#42 0x8b102444 in ?? ()
#43 0x89302444 in ?? ()
#44 0x89142454 in ?? ()
#45 0x8b182444 in ?? ()
#46 0x463b0446 in ?? ()
#47 0x41830f08 in ?? ()
#48 0x83000001 in ?? ()
#49 0x0c7f07ff in ?? ()
#50 0x18247c83 in ?? ()
#51 0x218e0f07 in ?? ()
#52 0x90000001 in ?? ()
#53 0x0c1c968b in ?? ()
#54 0xd2850000 in ?? ()
#55 0x0096850f in ?? ()
#56 0x83400000 in ?? ()
#57 0x468907e7 in ?? ()
#58 0xfd1c8d04 in ?? ()
#59 0x00000000 in ?? ()
(gdb)
(gdb)
(gdb) q
A debugging session is active.
Inferior 1 [process 9701] will be killed.
Quit anyway? (y or n) y
./dfbacktrace
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/Data_9/Programs/Transfer/df_linux/libs/Dwarf_Fortress...(no debugging symbols found)...done.
Starting program: /media/Data_9/Programs/Transfer/df_linux/libs/Dwarf_Fortress
[Thread debugging using libthread_db enabled]
[New Thread 0xb4192b70 (LWP 10683)]
[New Thread 0xb3991b70 (LWP 10684)]
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
textures::load(): data/art/Phoebus_20x20.png 320x320 16x16 20x20
Loading bindings from data/init/interface.txt
textures::load(): data/art/mouse.png 32x32
set_mode(): requesting vsync=0 and singlebuf=0.
set_mode(): SDL_GL_SWAP_CONTROL: 0
set_mode(): SDL_GL_ACCELERATED_VISUAL: 1
set_mode(): SDL_GL_DOUBLEBUFFER: 1
set_mode(): SDL_FULLSCREEN: 0
GLEW: 1.5.2
OpenGL vendor: NVIDIA Corporation
OpenGL renderer: GeForce 8600 GTS/PCIe/SSE2
OpenGL version: 3.3.0 NVIDIA 295.33
OpenGL GLSL version: 3.30 NVIDIA via Cg compiler
GL_MAX_VERTEX_ATTRIBS=16, needed=7
GL_MAX_VERTEX_UNIFORM_COMPONENTS=4096, needed=9
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS=2048, needed=11
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS=32, needed=0
GL_MAX_TEXTURE_IMAGE_UNITS=32, needed=3
GL_MAX_VARYING_FLOATS=60, needed=8
GL_MAX_TEXTURE_COORDS=8, needed=2
GL_POINT_SIZE_MIN=0, needed=4
GL_POINT_SIZE_MAX=63, needed=48
GL_ARB_sync: supported
Program received signal SIGSEGV, Segmentation fault.
0xb2bd6de0 in ?? ()
#0 0xb2bd6de0 in ?? ()
#1 0x0c244c8b in ?? ()
#2 0x0820908b in ?? ()
#3 0x24448bc6 in ?? ()
#4 0x247c893c in ?? ()
#5 0x8bd78924 in ?? ()
#6 0x89382454 in ?? ()
#7 0x8b28246c in ?? ()
#8 0x8934246c in ?? ()
---Type <return> to continue, or q <return> to quit---
#9 0x891c245c in ?? ()
#10 0x8b102444 in ?? ()
#11 0x89302444 in ?? ()
#12 0x89142454 in ?? ()
#13 0x8b182444 in ?? ()
#14 0x463b0446 in ?? ()
#15 0x41830f08 in ?? ()
#16 0x83000001 in ?? ()
#17 0x0c7f07ff in ?? ()
#18 0x18247c83 in ?? ()
#19 0x218e0f07 in ?? ()
#20 0x90000001 in ?? ()
#21 0x0c1c968b in ?? ()
#22 0xd2850000 in ?? ()
#23 0x0096850f in ?? ()
#24 0x83400000 in ?? ()
#25 0x468907e7 in ?? ()
#26 0xfd1c8d04 in ?? ()
#27 0x00000000 in ?? ()
(gdb)
(gdb)
(gdb) q
A debugging session is active.
Inferior 1 [process 10649] will be killed.
Quit anyway? (y or n) y
Other rendering modes than SHADER still work on the 32bit computer.
You almost certainly will need to install some dependencies of Dwarf Fortress for it to work so you would need to use a USB Boot Drive instead of a CD/DVD if you don't install the OS to a hard drive.I think this is a wonderful project, simply being able to get past the tileset limitations will completely transform this game for me.
Yea, but we need Linux to run it. :-\ However I read somewhere that you don't even have to install Linux, it runs from DVD too?..or something like that.
Yes most major linux distro supply "Live CDs" that basically let you boot from the CD. It's becoming the common installation method of the Operating System actually, boot into the OS and then install the OS from within the OS. If you're interested try http://www.linuxmint.com/download.php
Even more so, many distributions let you install Linux alongside Windows very easily and even resize partitions for you. So if you wana have Linux installed, its really not that hard.
This way you can test/play Dwarf Fortress in a live session without installing anything to your hard drive.
I wrote a post about getting Dwarf Fortress working in linux that should help people get the dependencies set up before. (http://www.bay12forums.com/smf/index.php?topic=94528.msg2763192#msg2763192)
It is a little more complicated if you are using a 64bit OS.You almost certainly will need to install some dependencies of Dwarf Fortress for it to work so you would need to use a USB Boot Drive instead of a CD/DVD if you don't install the OS to a hard drive.I think this is a wonderful project, simply being able to get past the tileset limitations will completely transform this game for me.
Yea, but we need Linux to run it. :-\ However I read somewhere that you don't even have to install Linux, it runs from DVD too?..or something like that.
Yes most major linux distro supply "Live CDs" that basically let you boot from the CD. It's becoming the common installation method of the Operating System actually, boot into the OS and then install the OS from within the OS. If you're interested try http://www.linuxmint.com/download.php
Even more so, many distributions let you install Linux alongside Windows very easily and even resize partitions for you. So if you wana have Linux installed, its really not that hard.
This way you can test/play Dwarf Fortress in a live session without installing anything to your hard drive.
I wrote a post about getting Dwarf Fortress working in linux that should help people get the dependencies set up before. (http://www.bay12forums.com/smf/index.php?topic=94528.msg2763192#msg2763192)
Nice! Thanks for the help guys!
GTK_PATH="/usr/lib32/gtk-2.0"
to the launch script (./df) since the multilib stuff in Debian/Ubuntu to tell it where the 32bit gtk-2.0 is located.
I tried it and it works until you press F12 and then it crashes. (CrunchBang 10 64bit BPO)
...
But now when I try to get a backtrace it crashes at startup.
...
It also crashes at "GL_ARB_sync: supported" (same place as the 64bit backtrace) even without trying to get a backtrace on my 32bit computer (doesn't work at all). (Ubuntu 11.04 32bit).
...
Other rendering modes than SHADER still work on the 32bit computer.
lxnt, have you ...
lxnt, this looks awesome!
This will work for 34.07, right? Also, does it work for windows?The update to 34.07 is in progress or soon to be started.
Since I managed to broke the dumper too, current focus is on porting it to 34.07, but first my forks of df-structures and df-hack (aw, dependencies).There is no windows version because we only have the source for the graphics interface for the linux version.
I don't mean it would be simple, I mean it would take maybe a week's work ...
It's because on linux, the graphics rendering code is separate, and can be changed.
On windows, it's not.
It's because on linux, the graphics rendering code is separate, and can be changed.
On windows, it's not.
But couldn't the DF dev himself correct this? I mean, supply an optional .exe with this rendering method included?
Surely that would be possible to get it to work in windows? If he cared, that is.
The word-of-mouth and youtube PR alone from a graphics rewrite like this must be more than enough incentive for getting this to work on windows..
Heck, i'd pay for an updated DF if this shader is as awesome as it sounds like it's gonna be.
But couldn't the DF dev himself correct this?The rules of the game are that Toady makes it as hard as possible to deviate from his ascii curse, and the players have to think of ingenious ways to get it looking decent. And lxnt's is pretty ingenious. Personally I'm waiting for the lazy noob pack to bundle it with a unix stick install :)
Then again, i have no clue how DF is developed or what the future concept for it is. But from a new players perspective it seems as if the modders have to hijack any sliver of possibility for the most basic of graphics. I'm still surprised that the main DF website itself still boasts ASCII in the background and screenshots. If anything, it should show a selection of tilesets.
It is such a wonderful game in terms of gameplay that it is a real shame to see true opportunity NOT being siezed, just letting it crawl in the mud as modders desperately try to find ways to improve upon it. It also feels a bit arrogant, to ignore such potential for the sake of "must be old-school, cuz i say so".
The day when an ambitious indie comes along and actually flat out copies Dwarf Fortress, but does so with a proper context sensitive logical interface and basic rudimentary graphics that at least show enemies from hostiles, grass from mud, DF won't have a chance. He's lucky it's been relatively unhindered by any competition so far. Just look at what happened with Infiniminer compared to Minecraft.
When a competitor finally shows up, with the same game concept as DF, but with a better presentation and mod friendly support, it's over for Toady. I'd think he'd wanna cherish any advantage to evolve the game he could get.
Rant over, i apologize.
Status update.The dumper does not crash for me anymore.
- lwapi (https://github.com/lxnt/df-structures) doesn't enrage gcc or valgrind any more.
- Dumper sort of works. Please see if it crashes for you. http://dffd.wimbli.com/file.php?id=6210 (http://dffd.wimbli.com/file.php?id=6210).
- fgtestbed updated to work with 3407, converted to Python 3.
The dumper does not crash for me anymore.Great.
What should I expect to see if I feed the dump to fgtestbed?It should look something like that, since shaders themselves haven't been debugged yet.
It looks like this right now, though I am using python 2.7 since I don't have any python3 packages for PyOpengl.
Also is the dumper the only thing you updated to 34.07 or did you also update the old SHADER mode as well?
Kudos, and this makes me want to make a USB stick mini-linux distro just to try it. Is is working for 34.07 yet?No not yet, lxnt did not update the old shader code for the 0.34.X series.
I did not port the old shader code.
(http://img.ie/images/38963_thumb.png) (http://img.ie/38963.png.html)Looks good, last time it tried it only water and magma showed up.
./fgt -dfdir ../df3410 dumps/driftwood.dump raw/fakefloors
Code drop.What exactly is in those downloads?
These archives contain working-for-me code, a set of three map dumps and a set of libraries needed to run it.
You will need - Ubuntu Precise (12.04) 64bit or Oneiric (11.10) 64bit, Python 3.2, python3-yaml, working OpenGL drivers, and a bunch of libs that libsdl depends on.
oneiric: http://dffd.wimbli.com/file.php?id=6445 (http://dffd.wimbli.com/file.php?id=6445)
precise: http://dffd.wimbli.com/file.php?id=6446 (http://dffd.wimbli.com/file.php?id=6446)
typical launch:Code: [Select]./fgt -dfdir ../df3410 dumps/driftwood.dump raw/fakefloors
Known problems:
- AMD/ATI drivers are crap and do not work.
- Low framerate, about 15 fps with debug off (press ~ to turn off)
- Tested only with 34.10 raws so far.
- Minecart rails are not there.
- Graphics for most tiles from HFS levels are missing.
What exactly is in those downloads?
Is there something else in there as well?
Is there an already generated dump to test on or is a dumper included?
These archives contain working-for-me code, a set of three map dumps and a set of libraries needed to run it.Dumps from older dumpers won't work due to a subtle format change.
I'm not using Ubuntu anymore, I switched to Debian (specifically #!).I don't think it'll be any great problem as long as library versions more-or-less line up.
I checked and I can install python3.2 and python3-yaml, did you get rid of all the other modules you were using before or do I need python3 versions of them as well?Latest PyOpenGL, latest patched pygame2 and libsdl2 are included in the archives. Other than that and yaml, it's all python3 standard library.
Is the user supposed to install the PyOpenGL, latest patched pygame2 and libsdl2 from the archive or is the code statically linked to the ones in the archive?I checked and I can install python3.2 and python3-yaml, did you get rid of all the other modules you were using before or do I need python3 versions of them as well?Latest PyOpenGL, latest patched pygame2 and libsdl2 are included in the archives. Other than that and yaml, it's all python3 standard library.
Is the user supposed to install the PyOpenGL, latest patched pygame2 and libsdl2 from the archive or is the code statically linked to the ones in the archive?
Ah yes, I forgot. The path to the HUD font is hardcoded, and ubuntu-specific. That one will have to be edited. I'll make it configurable or something.I program in python, tell me where it is hardcoded and I can change it while you are working on making it configurable.
Also, on FPS numbers.
25 is without show_hidden, with zeddown = 4 (6 z-levels drawn every frame) and without debug (which draws another z-level).
All this on a subpar box with intel E2140 1.6Mhz and nvidia GT218. Should look better on contemporary hardware.
I will try the oneric first that should be closest to my systems setup as far as fgtestbed is concerned.Is the user supposed to install the PyOpenGL, latest patched pygame2 and libsdl2 from the archive or is the code statically linked to the ones in the archive?
I tried to make it runnable without installing anything but python3.2 and python3-yaml.
./fgt -dfdir ../df3410 dumps/driftwood.dump raw/fakefloors
Traceback (most recent call last):
File "./fgtestbed.py", line 43, in <module>
from raw import MapObject, Designation
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric/fgtestbed/raw.py", line 32, in <module>
import lxml.etree
ImportError: No module named lxml.etree
I will see if there is a module missing that might be installed by default in Ubuntu but on #!.
I program in python, tell me where it is hardcoded and I can change it while you are working on making it configurable.fgtestbed.py:316
I think I found it, line 316?
I gotCode: [Select]./fgt -dfdir ../df3410 dumps/driftwood.dump raw/fakefloors
I will see if there is a module missing that might be installed by default in Ubuntu but on #!.
Traceback (most recent call last):
File "./fgtestbed.py", line 43, in <module>
from raw import MapObject, Designation
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric/fgtestbed/raw.py", line 32, in <module>
import lxml.etree
ImportError: No module named lxml.etree
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 143 (XInputExtension)
Minor opcode of failed request: 46 ()
Value in failed request: 0x12
Serial number of failed request: 99
Current serial number in output stream: 102
What version of libsdl do you have?I already got python3-lxml.
But now I getCode: [Select]X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 143 (XInputExtension)
Minor opcode of failed request: 46 ()
Value in failed request: 0x12
Serial number of failed request: 99
Current serial number in output stream: 102
What version of libsdl do you have?
I can install a slightly newer version if yours is different that mine.
Do you know what libsdl submodules are needed I don't have them all installed.
I replaced the archive here (http://dffd.wimbli.com/file.php?id=6445) with one having sdl with XInput crap compiled out. It now peacefully segfaults in fglrx on my precise box, which means the XInput problem should be no more.I now get
./fgt -dfdir ../df3410 dumps/driftwood.dump raw/fakefloors
INFO:fgt.sdl_init:SDL_GL_DOUBLEBUFFER requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MAJOR_VERSION requested 3 got 3
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MINOR_VERSION requested 2 got 2
INFO:fgt.sdl_init:SDL_GL_CONTEXT_PROFILE_MASK requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_FLAGS requested 2 got 2
INFO:fgt.raws._parse_raws:yamnomnom done.
Traceback (most recent call last):
File "./fgtestbed.py", line 778, in <module>
main()
File "./fgtestbed.py", line 770, in main
dump_dir = None)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 1643, in __init__
self._parse_raws(dfprefix, fgraws, dump_dir)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 1667, in _parse_raws
fontpath, colortab = InitParser(dfprefix).get()
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 589, in __init__
self.parse_file(init, self.init_handler)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 428, in parse_file
data = open(fna, encoding=enc).read()
IOError: [Errno 2] No such file or directory: '../df3410/data/init/init.txt'
It crashes right after the window opens../fgt -dfdir /media/Linux_Data/Dwarf_Fortress/Vanilla_Games/df_34_10_linux/df_linux dumps/driftwood.dump raw/fakefloors
INFO:fgt.sdl_init:SDL_GL_DOUBLEBUFFER requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MAJOR_VERSION requested 3 got 3
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MINOR_VERSION requested 2 got 2
INFO:fgt.sdl_init:SDL_GL_CONTEXT_PROFILE_MASK requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_FLAGS requested 2 got 2
INFO:fgt.raws._parse_raws:yamnomnom done.
INFO:fgt.raws._parse_raws:init.txt done.
Traceback (most recent call last):
File "./fgtestbed.py", line 778, in <module>
main()
File "./fgtestbed.py", line 770, in main
dump_dir = None)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 1643, in __init__
self._parse_raws(dfprefix, fgraws, dump_dir)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 1671, in _parse_raws
boo.eat(stdraws)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 490, in eat
self.parse_file(f, self.parse_token)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgt-oneiric2/fgtestbed/raw.py", line 433, in parse_file
raise RuntimeError("File '{}' is neither utf8 nor cp1252".format(fna))
RuntimeError: File '/media/Linux_Data/Dwarf_Fortress/Vanilla_Games/df_34_10_linux/df_linux/raw/objects/language_ELF.txt' is neither utf8 nor cp1252
I will see what resaveing that file in utf-8 does../fgt -dfdir /media/Linux_Data/Dwarf_Fortress/Vanilla_Games/df_34_10_linux/df_linux dumps/driftwood.dump raw/fakefloors
INFO:fgt.sdl_init:SDL_GL_DOUBLEBUFFER requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MAJOR_VERSION requested 3 got 3
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MINOR_VERSION requested 2 got 2
INFO:fgt.sdl_init:SDL_GL_CONTEXT_PROFILE_MASK requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_FLAGS requested 2 got 2
INFO:fgt.raws._parse_raws:yamnomnom done.
INFO:fgt.raws._parse_raws:init.txt done.
INFO:fgt.raws._parse_raws:df material templates done.
INFO:fgt.raws._parse_raws:df materials done.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Waterfall no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Chasm no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Fire no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Void no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/MurkyPool no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/GlowingBarrier no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/OpenSpace no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Campfire no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/EeriePit no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/MagmaFlow no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/GlowingFloor no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/RampTop no cels defined.
DEBUG:fgt.raws.InflateFrameseq:len(keyframes) = 5
INFO:fgt.raws._parse_raws:compile done, 13088 code units.
INFO:fgt.raws._parse_raws:Pageman(): 2 pages 512 tiles, font 352K; findex 4K; surface: rgba_surface(size=2048x44, SDL_PIXELFORMAT_ABGR8888, do_free=True)
INFO:fgt.raws._assemble_blitcode:13088 code units emitted, maxframes=24 codedepth=24
INFO:fgt.raws._assemble_blitcode:tileflags: 699x1x1; 2K
INFO:fgt.raws._assemble_blitcode:dispatch: 478x699x1; 1305K
INFO:fgt.raws._assemble_blitcode:blitcode: 115x115x24; 4959K
WARNING:fgt.CArrray:65536 extra bytes
INFO:fgt.mapdata:loaded 192x192x144 81M
INFO:fgt.renderer.init:GridVAO(size=Size2(w=166, h=72) num=11952)
INFO:fgt.renderer.init:Size2(w=1280, h=800)
Trying to move with the arrow keys crashed with this error.Traceback (most recent call last):
File "./fgtestbed.py", line 778, in <module>
main()
File "./fgtestbed.py", line 774, in main
rednr.loop(pa.choke)
File "./fgtestbed.py", line 691, in loop
boost = 10 if ev.mod & 3 else 1
AttributeError: 'SDL_Event' object has no attribute 'mod'
Wow.I did it by reflex and because there is no controls readme so I just tried things.
It worked.
Cleaning up bits and pieces, like fonts, stale keybindings now.
Edit: you see, since I fixed right-mouse-button panning, I never used arrow keys.
It's all fixed in git now.I tried git and got this error
For the record, to use the git (latest) code, you clone the repository (https://github.com/lxnt/fgtestbed (https://github.com/lxnt/fgtestbed)), then do git submodule init ; git submodule update there to fetch the df-structures, then move in lib and dumps directories from the code drop.
I don't expect libraries being updated much once they're working.
Traceback (most recent call last):
File "./fgtestbed.py", line 779, in <module>
main()
File "./fgtestbed.py", line 772, in main
hudfont = a_mono_font(pa.hudfont, 18)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgtestbed_git/py3sdl2.py", line 943, in a_mono_font
ttfname, unused = findafont(pref)
File "/media/Linux_Data/Dwarf_Fortress/Test_Fortress/printmodeshader3/fgtestbed_git/py3sdl2.py", line 932, in findafont
return (path, None)
UnboundLocalError: local variable 'path' referenced before assignment
def findafont(subnames = []):
stuff = subprocess.check_output("fc-list : style family file".split())
leest = []
for l in stuff.decode('utf-8').split("\n"):
try:
path, fam, style = l.split(':')
leest.append((path, fam, style))
except ValueError as e: # <---------
print(str(e))
pass
for subname in subnames:
for path, fam, style in leest:
if subname.lower() in fam.lower():
print(path, fam, subname)
return ( path, subname)
else:
print(subname.lower(), fam.lower(), style, "fail")
return (path, None)
Errorstoo many values to unpack (expected 3)
...
too many values to unpack (expected 3)
too many values to unpack (expected 3)
too many values to unpack (expected 3)
too many values to unpack (expected 3)
need more than 1 value to unpack
The problematic entries (all of them) look like this/usr/share/fonts/type1/gsfonts/b018015l.pfb: URW Bookman L:style=Demi Bold:file=/usr/share/fonts/type1/gsfonts/b018015l.pfb
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book:file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
/usr/share/fonts/X11/Type1/p052003l.pfb: URW Palladio L:style=Roman:file=/usr/share/fonts/X11/Type1/p052003l.pfb
path, fam, style = l.split(':')
to path, fam, style, file_test = l.split(':')
or path, fam, style = l.split(':')[0:3]
makes it work.
^
Changing line 921 in py3sdl2.py fromCode: [Select]path, fam, style = l.split(':')
toCode: [Select]path, fam, style, file_test = l.split(':')
makes it work.
Thank you. I went another way and just used a fixed output format for the fc-list. Just pushed.Your welcome.
Font selection is hacky and crude, but there's a -hudfont option if you don't like what it decides to use.
INFO:fgt.mapdata:loaded 768x768x206 1854M
OpenGL.error.GLError: GLError(
err = 1285,
description = b'out of memory',
baseOperation = glDrawArrays,
cArguments = (GL_POINTS, 0, 4816)
)
Stress test : a 16x16 embark dump.Let me try it I have 8GB of ram and a 2GB graphics card, I want to see how much slower it runs.Code: [Select]INFO:fgt.mapdata:loaded 768x768x206 1854M
failed.Code: [Select]OpenGL.error.GLError: GLError(
err = 1285,
description = b'out of memory',
baseOperation = glDrawArrays,
cArguments = (GL_POINTS, 0, 4816)
)
:(
DF ate 3.6G of memory while embarking. SSD sure helps with swap. Gzipped dump file is 52M.
I need an upgrade.
What is most depressing is that this same stress test worked before. Might had less z-levels, but still.
./fgt -dfdir /media/Linux_Data/Dwarf_Fortress/Vanilla_Games/df_34_10_linux/df_linux ../16x16x206.dump raw/fakefloors
INFO:fgt.sdl_init:SDL_GL_DOUBLEBUFFER requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MAJOR_VERSION requested 3 got 3
INFO:fgt.sdl_init:SDL_GL_CONTEXT_MINOR_VERSION requested 2 got 2
INFO:fgt.sdl_init:SDL_GL_CONTEXT_PROFILE_MASK requested 1 got 1
INFO:fgt.sdl_init:SDL_GL_CONTEXT_FLAGS requested 2 got 2
INFO:fgt.raws._parse_raws:yamnomnom done.
INFO:fgt.raws._parse_raws:init.txt done.
INFO:fgt.raws._parse_raws:df material templates done.
INFO:fgt.raws._parse_raws:df materials done.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/RampTop no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Void no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/GlowingBarrier no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Campfire no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Fire no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/MurkyPool no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/OpenSpace no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Chasm no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/Waterfall no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/MagmaFlow no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/EeriePit no cels defined.
INFO:fgt.raws.RawsCart.compile:nonmat/NONEMAT/GlowingFloor no cels defined.
DEBUG:fgt.raws.InflateFrameseq:len(keyframes) = 5
INFO:fgt.raws._parse_raws:compile done, 13088 code units.
INFO:fgt.raws._parse_raws:Pageman(): 2 pages 512 tiles, font 352K; findex 4K; surface: rgba_surface(size=2048x44, SDL_PIXELFORMAT_ABGR8888, do_free=True)
INFO:fgt.raws._assemble_blitcode:13088 code units emitted, maxframes=24 codedepth=24
INFO:fgt.raws._assemble_blitcode:tileflags: 699x1x1; 2K
INFO:fgt.raws._assemble_blitcode:dispatch: 957x699x1; 2613K
INFO:fgt.raws._assemble_blitcode:blitcode: 115x115x24; 4959K
WARNING:fgt.CArrray:65536 extra bytes
INFO:fgt.mapdata:loaded 768x768x206 1854M
/home/arclance/.fonts/ubuntu-font-family-0.80/UbuntuMono-B.ttf
INFO:fgt.renderer.init:GridVAO(size=Size2(w=166, h=72) num=11952)
INFO:fgt.renderer.init:Size2(w=1280, h=800)
I takes a good 10-20s to load the dump.It works though it's using 3.50GiB of ram (and very little gpu ram) the gfps is still 60!Wow. The driver must me mapping system memory in rather than copying. Entire dump is used as a single texture.
I takes a good 10-20s to load the dump.
I don't know if something is wrong with the dump or if fgtestbed can't handle a map this large but the tileset seems to only be applied to water.
It's only using about half my ram so it did not bog down my computer.It works though it's using 3.50GiB of ram (and very little gpu ram) the gfps is still 60!Wow. The driver must me mapping system memory in rather than copying. Entire dump is used as a single texture.
I was sure it was the surface because there is a brook about 10z down from that screenshot.I takes a good 10-20s to load the dump.
I don't know if something is wrong with the dump or if fgtestbed can't handle a map this large but the tileset seems to only be applied to water.
Hm. Grey are the hidden tiles, that is, not revealed. Water was revealed obviously, since it's ponds at the surface. Green is the fill color, meaning nothing was drawn there. At zeddown=4 lots of it is to be expected since I deliberately chose a mountanious area.
Anything else not being drawn might have something to do with unusually high number of materials present - 957, where typical number is about 450. However it should've been able to handle at least 1024.
Framerate not dropping might be due to nothing being actually drawn.
Well. I'm going to try integrating this into libgraphics now (so that it draws current view is a separate window).
I'm quite lost on how to submit building data for drawing, maybe that way I'll stumble on some ideas.
[SKY:178:3:0:0]
[CHASM:250:0:0:1]
I went up until the whole screen was green and everything was "unrevealed grey" or "water blue".I recognized the gl "nothing here" green color, is it possible to make that color respect these settings in d_init.txt?Code: [Select][SKY:178:3:0:0]
[CHASM:250:0:0:1]
For buildings are you able to tell where they are (what tiles they take up)?
If you are you could just read their raws to determine what each tile should be.
Getting material based colors right would be more difficult though.
Have you looked at how buildings work in stonesense?
I know they get building locations but I don't know how they chose what color their sprites are shaded.
Yes, I know all that df-structures project, and, by extension, DFHack and Stonesense can know about structures. I also do parse DF raws, since that's where the material colors and default tile graphics come from.You could use an array that defines what to send to the gpu.
Problem is, each building tile is (at least) 44 bits of state not counting position, and this is plainly too much to use a 1 to 1.5 -level lookup, as is done with map tiles. On the other hand I don't want multiple rendering passes if I can help it, and certainly not an unbounded number of render passes per frame, like it would be if I draw each building separately. I want to upload something once per frame, and then tell the GPU to draw it all, like it's done now with the map.
^ The CArray class looks interesting but I don't have the time to think through how it works right now.It's a bytearray posing as a 3D array of structs (binary data, see struct module).
What dimensionality did your arrays end up being?
I could see them being 4D or 5D depending on how you structured the data.
Buildings can be transparent (the floor tile shows through), so that means an additional layer of data, not a replacement.Certainly. Question is how to format this data so that work is offloaded to the GPU as much as possible, but without bogging it down.
One way to do it is by adding 3 additional fields to the map data: building (which building), building coordinate (ie which of the nine tiles of a workshop to use), and building material.
Another way to do it would be to have a list of buildings with coordinates. This is a sparse array. The GPU can merge it with the dense array of map data or render it as a second pass.The 3 fields are the same.
Also remember that you can use two textures if 1 texture has more than 32 bits of data per location. I don't know if that's your problem, but you mentioned 44 bits of building data being an issue.
Also worth remembering that mods can include their own workshops of up to 31x31.One way to do it is by adding 3 additional fields to the map data: building (which building), building coordinate (ie which of the nine tiles of a workshop to use), and building material.
That's 10 bits for material, 5 bits for tile number (trade depot and siege workshop are 5x5), and 7 bits for building type. Note how this lacks open/closed spinning/stopped, build stage, orientation for pumps/waterwheels, etc state. Which add up to 44 bits by my estimation. Now that I got those 44 bits onto the gpu, what do I do with them? Somehow they must ultimately be mapped to graphics, and this is my main problem.
(not to mention bridges, stockpiles, civzones and rooms, their arbitrary dimensions is an entirely separate problem I haven't even thought about)
So as I understand it, you need to have the building lookup as 1 step, but the look up index can only be 32 bits. So as a solution, you'd have to separate the material data, which determines the color, from the other data that determines the tile shape. Look up the shape on one texture, and the colors on another texture. You might want a separate texture for each of the color involved (foreground and background for building and floor), so that you can have full color materials. Then overlay or otherwise merge the color and shape info.One way to do it is by adding 3 additional fields to the map data: building (which building), building coordinate (ie which of the nine tiles of a workshop to use), and building material.
That's 10 bits for material, 5 bits for tile number (trade depot and siege workshop are 5x5), and 7 bits for building type. Note how this lacks open/closed spinning/stopped, build stage, orientation for pumps/waterwheels, etc state. Which add up to 44 bits by my estimation. Now that I got those 44 bits onto the gpu, what do I do with them? Somehow they must ultimately be mapped to graphics, and this is my main problem.
(not to mention bridges, stockpiles, civzones and rooms, their arbitrary dimensions is an entirely separate problem I haven't even thought about)
No, it's all one sparse array, not several z levels of textures. So it's implemented as vertex data instead of a texture. So you have each building location as a vertex, the the data identifying that vertex contain the building data. That gets transformed into vertexes for each tile, so each workshop is transformed from 1 vertex to 9. Then the tile gets mapped to the actual graphic. All in parallel.Another way to do it would be to have a list of buildings with coordinates. This is a sparse array. The GPU can merge it with the dense array of map data or render it as a second pass.The 3 fields are the same.
That would result in the GPU having to walk this list for each tile drawn. Not a very big deal in itself, but I expect to draw 4-6 z-levels, fake floors under trees and such require up to 8 texture lookups, and yet undetermined algorithm to apply stencils to tile borders will eat who knows how much gpu ticks. So brute-force methods don't cut it.
The building list would have to be sortied or indexed the list on the CPU, each game engine frame. But what sort of index? It has to be suitable for craetures and items too.
Also worth remembering that mods can include their own workshops of up to 31x31.
So as I understand it, you need to have the building lookup as 1 step, but the look up index can only be 32 bits.No, I don't exactly require single-step lookups, in fact splitting them into multiple steps help reduce needed memory for the indices.
No, it's all one sparse array, not several z levels of textures. So it's implemented as vertex data instead of a texture. So you have each building location as a vertex, the the data identifying that vertex contain the building data. That gets transformed into vertexes for each tile, so each workshop is transformed from 1 vertex to 9. Then the tile gets mapped to the actual graphic. All in parallel.
It's been a while since you last posted.
Have you made any progress on the memory corruption problem?
Might be he thought of drawing a circle with those restrictions as a linear programming (http://en.wikipedia.org/wiki/Linear_programming) problem of maximizing a function like f(x,y)=1/(x*x+y*y - r*r) where r is the circle's radius. Might be he did not in fact realize how he was seeing it. It was cruel of him none the less.I doubt it this was a Programing 101 class, which I was disappointed to find out no longer taught C or C++, which I wanted to learn, but was Python 2.7 instead.
def drawCircle(snowMan, circCenterX, circCenterY, radius, lineWidth): # draw a circle with a line width of approximately lineWidth
snowMan.up() # stop drawing
for x in xrange(int(circCenterX - radius - 1),int(circCenterX + radius + 1)): # loop over all pixels in x that the circle could be in
for y in xrange(int(circCenterY - radius - 1),int(circCenterY + radius + 1)): # loop over all pixels in y that the circle could be in
distance = math.sqrt(((x-circCenterX)**2) + ((y-circCenterY)**2)) # find the distance from the circles center to the current x,y position
if int(distance) == radius: # check if the current distance is the radius of the circle
x2 = x+(lineWidth-1) # add linewidth to x point to get second point to draw current outline point
y2 = y+(lineWidth-1) # add linewidth to y point to get second point to draw current outline point
snowMan.move(x,y) # move to current found edge point of circle
snowMan.down() # start drawing
snowMan.move(x2,y2) # move in towards center to draw edge
snowMan.up() # stop drawing
#endif
#endfor
#endfor
#enddef
It's slow enough that you can see it paint the circle on an old computer.
PSMy way gets you down to 1px accuracy in the circle but has a minimum line width of 2px because I draw the line from the outside edge towards the center.
I thought the convention in Turtle is to draw many-sided polygons to represent circles. Maybe the tutor didn't expect you to push the number of sides to minimise side length right down to a guaranteed 2px.
First stage would be a (fully functional, of course) libgraphics.so which instead of containing all the PRINT_MODE and musicsound implementations, will dynamically load them.
So the only thing left that depends on SDL is some hardcoded part of the worldgen code you can't change?
If so that sounds frustrating.
cd /tmp
7zr x life.7z
./life . ncurses
Sounds like you are making good progress.
If you need someone to test anything you are working on just let me know.
If you are using a current Ubuntu (or I think Fedora) I would have to compile it myself though since it is using a newer version of glibc than Debian.
The glibc version in Debian is 2.13 right now (http://packages.debian.org/sid/eglibc-source), I don't expect that to change in the next few months since they are in a package freeze/bugfixing period as they prepare for their next stable release.Sounds like you are making good progress.
If you need someone to test anything you are working on just let me know.
If you are using a current Ubuntu (or I think Fedora) I would have to compile it myself though since it is using a newer version of glibc than Debian.
Thanks.
Build system is in shambles, unfortunately, custom paths hardcoded everywhere, binaries looking for stuff in obscure places, etc. This also needs some attention, or a readme at least.
I'll be building "releases" in a VM, since fgtestbed development kept pushing me onto the bleeding edge because of Mesa GL3 support. I currently build 32bit builds with gcc-4.5, the version that df3411-linux seems to be built with, but for the libc, and various SDL's dependencies it ain't that simple. Is ubuntu 12.04 a good choice? 11.10 might be possible, but beyond that I'm afraid it'll get hairy.
It looks like 11.10 should work, it looks like it is using glibc 2.13 (http://packages.ubuntu.com/oneiric/eglibc-source).
You might be able to build in Debian unstable/Sid if that does not work for you.
Most of the packages you would be interested in are about the same version as in a current Ubuntu release, glibc is just an annoying exception to that.
2>..\modules\glue.cpp(42): fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
when I try to build glue.cpp.Okay it starts building if I remove "-Wextra -Werror" from the CMakeLists.txt file but fails atChangingCode: [Select]2>..\modules\glue.cpp(42): fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
when I try to build glue.cpp.
Looking at the code it seems your check for Windows compilers is not working.
#if defined(__WIN32__) || defined(__CYGWIN__)
to#if defined(_WIN32) || defined(__CYGWIN__)
gets it farther but it fails as an unsucessful build.Build started 12/26/2012 9:18:08 PM.
1>Project "C:\Users\arclance\Documents\Print_Mode_Shader\rendumper_2012-12-26_2\build\test-life.vcxproj" on node 3 (build target(s)).
1>InitializeBuildStatus:
Touching "test-life.dir\Debug\test-life.unsuccessfulbuild".
CustomBuild:
Building Custom Rule C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/CMakeLists.txt
CMake does not need to re-run because C:\Users\arclance\Documents\Print_Mode_Shader\rendumper_2012-12-26_2\build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /I"C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/include" /I"C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/common" /nologo /Wall /WX- /O2 /Oy- /D "DF_MODULES_PATH=\"C:/Program Files/dfmodules/lib/dfmodules\"" /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"test-life.dir\Debug\\" /Fd"C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/build/Debug/test-life.pdb" /Gd /TP /analyze- /errorReport:prompt ..\modules\tests\life.cpp -std=c++0x -fvisibility-inlines-hidden -fvisibility=hidden -ggdb3
1>cl : Command line warning D9002: ignoring unknown option '-std=c++0x'
1>cl : Command line warning D9002: ignoring unknown option '-fvisibility-inlines-hidden'
1>cl : Command line warning D9002: ignoring unknown option '-fvisibility=hidden'
1>cl : Command line warning D9002: ignoring unknown option '-ggdb3'
life.cpp
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stdint.h(105): warning C4668: '_INTPTR' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\cstdint(36): warning C4668: '_HAS_TR1_DECLARATIONS' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
1>c:\users\arclance\documents\print_mode_shader\rendumper_2012-12-26_2\modules\include\itypes.h(72): warning C4480: nonstandard extension used: specifying underlying type for enum 'DFKeySym'
1>c:\users\arclance\documents\print_mode_shader\rendumper_2012-12-26_2\modules\include\itypes.h(321): warning C4480: nonstandard extension used: specifying underlying type for enum 'df_input_event_t::ev_type'
1>c:\users\arclance\documents\print_mode_shader\rendumper_2012-12-26_2\modules\include\itypes.h(322): warning C4480: nonstandard extension used: specifying underlying type for enum 'df_input_event_t::but_num'
1>c:\users\arclance\documents\print_mode_shader\rendumper_2012-12-26_2\modules\include\itypes.h(328): warning C4820: 'df_input_event_t' : '3' bytes padding added after data member 'df_input_event_t::reports_release'
1>C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/include\iplatform.h(70): warning C4820: '<unnamed-tag>' : '2' bytes padding added after data member '<unnamed-tag>::wParam'
1>C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/include\iplatform.h(77): warning C4668: 'and' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
1>C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/include\iplatform.h(77): warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>C:/Users/arclance/Documents/Print_Mode_Shader/rendumper_2012-12-26_2/modules/include\iplatform.h(77): warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>..\modules\tests\life.cpp(55): error C2470: 'blse' : looks like a function definition, but there is no parameter list; skipping apparent body
1>..\modules\tests\life.cpp(63): error C2470: 'twentyfive' : looks like a function definition, but there is no parameter list; skipping apparent body
1>..\modules\tests\life.cpp(70): warning C4510: 'lfidxntry' : default constructor could not be generated
..\modules\tests\life.cpp(70) : see declaration of 'lfidxntry'
1>..\modules\tests\life.cpp(70): warning C4512: 'lfidxntry' : assignment operator could not be generated
..\modules\tests\life.cpp(70) : see declaration of 'lfidxntry'
1>..\modules\tests\life.cpp(70): warning C4610: struct 'lfidxntry' can never be instantiated - user defined constructor required
1>..\modules\tests\life.cpp(74): error C2065: 'blse' : undeclared identifier
1>..\modules\tests\life.cpp(75): error C2065: 'twentyfive' : undeclared identifier
1>..\modules\tests\life.cpp(196): warning C4820: 'gofsim_t' : '3' bytes padding added after data member 'gofsim_t::tor'
1>..\modules\tests\life.cpp(203): warning C4365: 'argument' : conversion from 'int' to 'size_t', signed/unsigned mismatch
1>..\modules\tests\life.cpp(204): warning C4365: 'argument' : conversion from 'int' to 'size_t', signed/unsigned mismatch
1>..\modules\tests\life.cpp(352): error C2146: syntax error : missing ')' before identifier 'and'
1>..\modules\tests\life.cpp(352): error C2065: 'and' : undeclared identifier
1>..\modules\tests\life.cpp(352): error C2143: syntax error : missing ';' before '!'
1>..\modules\tests\life.cpp(352): error C2146: syntax error : missing ';' before identifier 'and'
1>..\modules\tests\life.cpp(352): warning C4552: '!' : operator has no effect; expected operator with side-effect
1>..\modules\tests\life.cpp(352): error C2065: 'and' : undeclared identifier
1>..\modules\tests\life.cpp(352): error C2146: syntax error : missing ';' before identifier 'event'
1>..\modules\tests\life.cpp(352): error C2059: syntax error : ')'
1>..\modules\tests\life.cpp(352): error C2143: syntax error : missing ';' before '{'
1>..\modules\tests\life.cpp(352): warning C4553: '==' : operator has no effect; did you intend '='?
1>..\modules\tests\life.cpp(367): error C2065: 'not' : undeclared identifier
1>..\modules\tests\life.cpp(367): error C2146: syntax error : missing ';' before identifier 'paused'
1>..\modules\tests\life.cpp(368): error C2181: illegal else without matching if
1>..\modules\tests\life.cpp(405): warning C4365: '=' : conversion from 'int' to 'uint32_t', signed/unsigned mismatch
1>..\modules\tests\life.cpp(408): warning C4365: '=' : conversion from 'int' to 'uint32_t', signed/unsigned mismatch
1>..\modules\tests\life.cpp(416): warning C4365: '=' : conversion from 'int' to 'uint32_t', signed/unsigned mismatch
1>..\modules\tests\life.cpp(431): warning C4365: 'argument' : conversion from 'uint32_t' to 'int', signed/unsigned mismatch
1>..\modules\tests\life.cpp(431): warning C4365: 'argument' : conversion from 'uint32_t' to 'int', signed/unsigned mismatch
1>..\modules\tests\life.cpp(434): warning C4242: '=' : conversion from 'int' to 'unsigned char', possible loss of data
1>..\modules\tests\life.cpp(434): warning C4365: '=' : conversion from 'int' to 'unsigned char', signed/unsigned mismatch
1>Done Building Project "C:\Users\arclance\Documents\Print_Mode_Shader\rendumper_2012-12-26_2\build\test-life.vcxproj" (build target(s)) -- FAILED.
Build FAILED.
Time Elapsed 00:00:00.21
Why does an ASCII game need a shader mod? lol
... valiant efforts ...
Anyone got a win32 compiler other that mingw32msvc or i686-w64-mingw32? Preferably something from MSVC series.I can get Microsoft Visual Studio 2012, and try this out.
The time has come to test if the modularization works across different C/C++ runtimes.
I can get Microsoft Visual Studio 2012, and try this out.
It has better C++11 support btw.
If you want to stick this into DFhack (which can be done, actually) the only MSVC you need is 2010.
Dfhack has the abillity to replace the renderer used by DF, which is exactly what you need. Not to mention giving full access to the internals of the game
This is why you use VS 2010 and not something else for things like this and dfhack.I can get Microsoft Visual Studio 2012, and try this out.
It has better C++11 support btw.
Thank you.
I made it to compile and run with VS 2010 Express since. Any extra testing is always very welcome of course.
Note that if you're going to write a plugin, you must compile it with VS2010 - VS2012 will not work because it'll use the wrong C runtime (msvcr110 instead of msvcr100) and thus use the wrong heap (for malloc/free and operator new/delete).I did not know the actual reason before.
It might appear to work for simple tasks such as "reveal", but if the plugin tried to allocate memory and DF then tried to free it (e.g. with the "trigger siege" sample I just posted earlier), it would cause the game to crash.
It seems this has gone missing from DFFD... Or is it available some otherway and I missed the post?
./libs/Dwarf_Fortress
for the ttf + opengl3,
./libs/Dwarf_Fortress sdl2gl2
for opengl2 version, or
./libs/Dwarf_Fortress ncurses
for the pure text version.
EDIT: Also did anybody contact Toady about this. I saw a comment by him recently (possibly the June report) about not being able to implement something because he did not know how the graphics system worked. Could be that all this awesome work might be something he would like to pick up?
Quote from: arkhomethaToady, how hard do you think it is to implement the fourth thing the in eternal suggestion voting (Full graphics support) and how high is it in your priority list?Quote from: CLAWill we be able to use graphic sheets for plants like we can with creatures at some point?
As far as I know, implementing things like item or map tiles won't work without multiple texture atlases, or something, and I don't know how to do that in the new graphics code.
EDIT: Also did anybody contact Toady about this. I saw a comment by him recently (possibly the June report) about not being able to implement something because he did not know how the graphics system worked. Could be that all this awesome work might be something he would like to pick up?
I think you refer to this:
...[snip]
The most straightforward way would be for the game code to draw the map using internal tile types, plus supply some kind of material color, or code, and maybe have a default translation table from tile types to font/tileset characters somewhere in the raws,
or give it somehow to the graphics code. Then leave actual translation to the renderer plugin, which will be free to load additional graphics and whatnot.
Currently it does that conversion from tile types to characters internally, which results in the limits that can only be overcome with dfhack methods, and that would be slow and cumbersome.
In fact, there's a prototype of just such renderer I wrote before starting work on this modular stuff. Link's in the signature.
The hardest part I think would be persuading Toady that he doesn't need to do everything himself, and that he won't lose any control that way.
The whole idea with pluggable renderers is to separate game from graphics, so that Toady can be sure that no matter what he changes in the game, he won't need to touch graphics side, and existing graphics code will continue to work, and on the other hand, that graphics code can be updated without any need for Toady's attention, much less for recompiles or, Armok forbid, any modifications to the game code.
He may be open to having somebody else work on the graphics code. It's worth sending him an e-mail, if you haven't already. If memory serves he's expressed confusion over the graphics code several times now, and if the status quo is to wait for Baughn to reappear, then perhaps he'd be similarly open to having yourself look at things, given that you've already demonstrated the desire and ability to do so.
I just dropped by to see how this is going, since SDL2 came out.
TODO list: Wow, looks complicated.
> show fps+averaged times on an overlay. maybe do a graph ala eve online
Well, it would be somewhat useful to have a "DwarfMark" - a Dwarf Fortress save that has 200+ Dwarves, lots of items and some liquid flows, then unpause it on different computers, look at average uncapped FPS over a minute and have a benchmark for which one seems to be the fastest.
BTW, this thread should be moved to Modding/Tilesets and Graphics. It may get more visibility that way.
I just saw "fps+averaged times" in your TODO notes and it resonated with something I'd find useful. Play till an old fort runs out of FPS, then run it on a new computer and it's playable again, except there is no hard data on it, just an approximation from looking at fluctuating FPS. I didn't want to compare renderers or find ways to kill FPS, I wanted to compare which computer handles my forts better and by how much exactly.
Good luck with your project. Especially if you manage to take Baghun's place.
SDL2 is in Debian Testing & Unstable. (http://packages.debian.org/sid/libsdl2-2.0-0)I just dropped by to see how this is going, since SDL2 came out.
It did, but there isn't much sense in reacting to that until SDL2 gets into major distributives. And that may take some SDL2 point releases to happen.