Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 15 16 [17] 18 19 ... 23

Author Topic: [PRINT_MODE:SHADER]  (Read 85241 times)

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #240 on: June 07, 2012, 03:14:54 pm »

I already got python3-lxml.
But now I get
Code: [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.
« Last Edit: June 07, 2012, 03:20:22 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #241 on: June 07, 2012, 03:33:09 pm »

I already got python3-lxml.
But now I get
Code: [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

Aw. I think it has to do with trunk sdl2 trying to use XInput2.

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.

Like I said, the trunk, since SDL 2.0 haven't had anything resembling a release yet.

 libSDL2, libSDL2_image with png support, libSDL2_ttf are required.






lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #242 on: June 07, 2012, 03:49:20 pm »

I replaced the archive here 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.

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #243 on: June 07, 2012, 04:02:57 pm »

I replaced the archive here 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
Code: [Select]
./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.
It looks like you did not include the 0.34.10 raws in the archive.

After changing the command to point to the v0.34.10 raws I get.
Code: [Select]
./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.

After resaveing the elf and dwarf language files in utf-8 it worked.
Code: [Select]
./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.
Code: [Select]
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'

I am getting a gfps of 60-62 with a vanilla v0.34.10 install.
I will take some screenshots after I install a tileset, probably tomorrow.
« Last Edit: June 07, 2012, 04:20:53 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #244 on: June 07, 2012, 05:06:14 pm »

Wow.

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.
« Last Edit: June 07, 2012, 05:09:37 pm by lxnt »
Logged

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #245 on: June 07, 2012, 05:17:55 pm »

Wow.

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.
I did it by reflex and because there is no controls readme so I just tried things.
There is a controls list box but it goes away the first time you do anything.
Unless you read it before you try something you won't know to press F1 to get it back.
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #246 on: June 07, 2012, 05:36:39 pm »

It's all fixed in git now.


For the record, to use the git (latest) code, you clone the repository (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.
« Last Edit: June 07, 2012, 05:44:07 pm by lxnt »
Logged

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #247 on: June 07, 2012, 05:48:55 pm »

It's all fixed in git now.


For the record, to use the git (latest) code, you clone the repository (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.
I tried git and got this error
Code: [Select]
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

Doing this reveals the problem.
Code: [Select]
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)
Errors
Code: [Select]
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)
too many values to unpack (expected 3)
need more than 1 value to unpack
The problematic entries (all of them) look like this
Code: [Select]
/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
« Last Edit: June 07, 2012, 07:01:54 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #248 on: June 07, 2012, 07:02:05 pm »

^
Changing line 921 in py3sdl2.py from
Code: [Select]
            path, fam, style = l.split(':')
to
Code: [Select]
            path, fam, style, file_test = l.split(':')
or
Code: [Select]
            path, fam, style = l.split(':')[0:3]
makes it work.
« Last Edit: June 07, 2012, 07:09:54 pm by arclance »
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #249 on: June 07, 2012, 07:07:21 pm »

^
Changing line 921 in py3sdl2.py from
Code: [Select]
            path, fam, style = l.split(':')
to
Code: [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.
Font selection is hacky and crude, but there's a -hudfont option if you don't like what it decides to use.


arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #250 on: June 07, 2012, 07:22:26 pm »

Thank you. I went another way and just used a fixed output format for the fc-list. Just pushed.
Font selection is hacky and crude, but there's a -hudfont option if you don't like what it decides to use.
Your welcome.
I looked at what you did in git, it probably uses a little less cpu/memory since you don't make more variables or call a subset of the split output.

Yes it's a little hacky, from what I see it's basically doing "here are some decent fonts, try to use those. If all else fails use a monospace font".
But it should let people see if it works without having them find the file for a font they like themselves just to test fgtestbed.
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #251 on: June 07, 2012, 07:40:26 pm »

It's not that I care for optimizing a half-baked, run-once piece of code, it's just that I didn't expect fc-list output formats to differ between debian flavours.

arclance

  • Bay Watcher
    • View Profile
Re: [PRINT_MODE:SHADER]
« Reply #252 on: June 07, 2012, 07:59:17 pm »

It might be caused by a version difference actually.
Most of my system is Debian stable/backports but certain things are from unstable (ubuntu current or +1 equivalent).
My kernel, graphics card drivers, and certain programs are from unstable for bugfixes or to get a current version.
It works better than the when I used Ubuntu but it requires more user input than Ubuntu for everything to work smoothly.
Logged
I think that might be one of the most dwarfen contraptions I've ever seen the blueprints of.
The Bloodwinery v1.3.1 | Dwarven Lamination v1.5 | Tileset Resizer v2.5 - Mac Beta Tester Needed
Sigtext

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #253 on: June 08, 2012, 05:18:51 am »

lxnt

  • Bay Watcher
    • View Profile
    • pm:full_graphics
Re: [PRINT_MODE:SHADER]
« Reply #254 on: June 08, 2012, 12:52:47 pm »

Stress test : a 16x16 embark dump.

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.
Pages: 1 ... 15 16 [17] 18 19 ... 23