Questions on external renderer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PoleaxeGames
    Rookie
    • Sep 2022
    • 5

    Questions on external renderer

    Following up on my thread "Commercial Angband fork using lib/gamedata" I would like to build Angband as a DLL. Then override the rendering system to use Unity instead, with a custom isometric tileset that I provide inside the Unity game engine.

    Should I use /* Hardcode the no graphics option */ to stop the Angband renderer? It looks like removing the tiles from tiles/list.txt would do this?

    It seems like the right place to intercept the renderer is override void redraw_stuff(struct player *p). However, a lot is happening in errr Term_fresh(void). I believe it's mapping from what the player perceives to what is drawn, and I still need that to happen. I think the final output to render is written to term->src?

    On further thought, rather than trying to figure out the code, I let it use use ASCII graphics but pipe the output as an array of characters to to Unity. I would still need to separate UI vs. tiles, and intercept keypresses and mouse clicks.

    I know this is kind of a general set of questions, but any advice on a starting point would help.
  • backwardsEric
    Knight
    • Aug 2019
    • 531

    #2
    For examples of constructing a front end to work with Angband, look at main-xxx.c (an incomplete stub for interacting with Angband) and main-gcu.c (the Angband front end for interacting which uses a terminal window through the ncurses library; main-gcu.c relies on setup done in main.c).

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎