Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarfy caster (fortress viewer)  (Read 874 times)

arfost

  • Bay Watcher
    • View Profile
Dwarfy caster (fortress viewer)
« on: May 15, 2024, 03:26:58 am »

Hi everyone,

I made a few experiments and now I have a very crude, very basic FPS fortress viewer.

I'm not sure if it can be of interest to someone but here it is.

https://github.com/arfost/dwarfy-caster

Since I'm no artist assets and graphismes are a mess with many placeholders or ill adapted free assets found on the internet, and sorry in advance for all the bugs.

Here is a screenshot of a dwarf bedroom.
« Last Edit: May 15, 2024, 05:49:45 am by arfost »
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #1 on: May 15, 2024, 10:59:43 am »

my pasture:
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #2 on: May 15, 2024, 11:00:20 am »

is there a way to increase the draw distance? I'd like to see my towering pyramid in all its glory
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #3 on: May 15, 2024, 04:33:09 pm »

You can change the draw distance with the parameters in the url, "10,5" mean 10 tiles in front and 5 tiles up/down, you can change them as you want (but it can hit perf heavily)

What sort of floor/ceilling do you have in your pasture ? So I can fix the texture choice which seems to have an issue
« Last Edit: May 17, 2024, 05:17:30 am by arfost »
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #4 on: May 15, 2024, 05:10:36 pm »

The ground is grass and the ceiling is constructed
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #5 on: May 16, 2024, 05:16:28 am »

Strange grass and construction are working on my fort. I guess there is a particularity here. All textures are failing or just this place ?
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #6 on: May 16, 2024, 12:56:42 pm »

There are quite a few errors printed on the console about missing textures:

there are too many to list, but here's a sample:
Code: [Select]
[Error: ENOENT: no such file or directory, open 'client/assets/sprites/SHEET.png'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'client/assets/sprites/SHEET.png'
}
File not found: /assets/sprites/BRANCH.png
[Error: ENOENT: no such file or directory, open 'client/assets/sprites/BRANCH.png'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'client/assets/sprites/BRANCH.png'
}

The assets/sprites directory contains:
Code: [Select]
20240516 10:55:32 [~/src/dwarfy-caster] $ ls client/assets/sprites/
ANVIL.png                BUCKET.png          DOOR.png               FIRE-MEDIUM.png              NEST.png            STEAM-HEAVY.png
BACKPACK.png             cabinet.png         DRAGON_FEMALE.png      FORGOTTEN_BEAST_DEFAULT.png  OFFERINGPLACE.png   STEAM-LIGHT.png
BAG.png                  CAGE.png            DRAGONFIRE-HEAVY.png   GOBELIN_FEMALE.png           PORCINE_FEMALE.png  STEAM-MEDIUM.png
BAR.png                  CANID_FEMALE.png    DRAGONFIRE-LIGHT.png   GOBELIN_MALE.png             PORCINE_MALE.png    table.png
BARREL.png               CANID_MALE.png      DRAGONFIRE-MEDIUM.png  MAGMAMIST-HEAVY.png          RABBIT_FEMALE.png   THREAD.png
bed.png                  CAPRINE_FEMALE.png  DRAGON_MALE.png        MAGMAMIST-LIGHT.png          RABBIT_MALE.png     TRAP/
BIN.png                  CAPRINE_MALE.png    DWARF_FEMALE.png       MAGMAMIST-MEDIUM.png         shrub.png           UNICORN_FEMALE.png
BIRD_CHICKEN_FEMALE.png  CAT_FEMALE.png      DWARF_MALE.png         MIASMA-HEAVY.png             SLAB.png            UNICORN_MALE.png
BIRD_CHICKEN_MALE.png    CAT_MALE.png        EQUINE_DEFAULT.png     MIASMA-LIGHT.png             SMALLGEM.png        VERMIN.png
BIRD_FEMALE.png          chair.png           EQUINE_FEMALE.png      MIASMA-MEDIUM.png            SMOKE-HEAVY.png     WELL.png
BIRD_MALE.png            CORPSEPIECE.png     EQUINE_MALE.png        mist-heavy.png               SMOKE-LIGHT.png     WOOD.png
BOULDER.png              DOG_FEMALE.png      FIRE-HEAVY.png         mist-light.png               SMOKE-MEDIUM.png
box.png                  DOG_MALE.png        FIRE-LIGHT.png         mist-medium.png              statue.png

the mixture of lower case and upper case files might be the cause of some of the missing textures, but at least some (like SHEET.png) don't seem to exist in any form.
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #7 on: May 16, 2024, 01:02:47 pm »

also, am I doing something wrong with the depth? increasing the parameters in the URL don't seem to change the view. I don't think I can see any further or any higher.

https://imgur.com/a/Vm6vDKc.png



« Last Edit: May 16, 2024, 01:12:46 pm by myk »
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #8 on: May 17, 2024, 05:17:04 am »

Oh you are not on windows, I couldn't test on other system, and the upper/lower case could be the issue depending on the OS.
Some assets don't exists and are replaced by placeholders when failing, but almost every texture should be there.
I'll try rename everything with correct case and publish another version, hopefully it should solve most of the textures issues.

For the depth it's probably that the DF datas are not loaded. I load them by "chunk" which are 4 z-level below/above the player position so you probably have to go up a few level to force chunk loading and then they will show up (once they have been loaded once, they will continue to show up even when leaving the chunk)

I'm currently working on a better chunk/loading system, it should be solved for the next version if I managed to do what I want to.

Thanks for the feedbacks and bug report, it help me a lot.
« Last Edit: May 17, 2024, 05:19:15 am by arfost »
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #9 on: May 17, 2024, 07:03:51 am »

Ok so it seems the upper/lower case issue is from github.
I had already renamed all files in uppercase but github don't see a difference and continue to send them as lowercase when doing a git clone.
The released version should be the same as master, but with the assets names in uppercase.

Can you tell me if it work better please ?
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #10 on: May 18, 2024, 11:29:21 am »

I believe you'd have to remove the files entirely, commit the change, then re-add them with changed filenames. There are also options you can change about case sensitivity, but removing and adding the files is probably easier.
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #11 on: May 21, 2024, 06:09:55 pm »

Yes I didn't have time to do it earlier but it's done now, git clone should send assets with the correct name
Logged

myk

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #12 on: May 24, 2024, 09:27:13 pm »

Definitely better. I can see mist, but ocean waves are mix of visible mist and non-loaded OCEANWAVE:

https://imgur.com/a/wlPOlHg.png
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #13 on: May 27, 2024, 06:48:49 am »

Ocean wave don't have sprites for now so that's "normal", I don't have time to work a lot this week but someone made a PR with sprites extracted from DF and it's way better than what I had and more complet. It's need some work for some textures that are not adapted to FPS view but the next release probably mid june, should be way more beautiful and more accurate to DF.
Logged

arfost

  • Bay Watcher
    • View Profile
Re: Dwarfy caster (fortress viewer)
« Reply #14 on: June 09, 2024, 02:59:26 am »

I'm a bad dev, can't do anything good and my ideas are stupid, so their won't be anything more done on that project since there is no point. Sorry everyone.
Logged