Author Topic: BearLibTerminal: a pseudo-terminal window library for roguelike  (Read 26539 times)

Serin Delaunay

  • Acolyte
  • *
  • Posts: 13
  • they/them/their
    • View Profile
    • itch.io
Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« Reply #225 on: May 25, 2017, 09:58:25 AM »
If you have two kinds of display elements, their grid spacings are coprime, and you don't want to use a 1x1 cell size, then you can draw one kind of display element (text) grid-aligned using print() and the other kind (graphics) all at (0,0) with composition and pixel offsets.
I don't think there are any benefits to making text and graphics so mismatched in a terminal game, though.

Zireael

  • Protector of the @
  • *****
  • Posts: 597
    • View Profile
Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« Reply #226 on: June 18, 2017, 07:12:40 PM »
Is there a way to get FPS when using Bearlib?

(I'm redoing Veins in Python as an exercise and Pygame performance sucks when partially transparent pictures are involved, such as isometric tiles).

Also is there a list of games using bearlib anywhere? So far I only know of unlichtwesen...

Avagart

  • 7DRL Reviewer
  • Protector of the @
  • *
  • Posts: 513
    • View Profile
Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« Reply #227 on: June 18, 2017, 08:13:43 PM »
I know about Jan's (so, that guy who created Unlichtwesen) adaptation roguebasin python+libtcod tutorial to BearLibTerminal. This archive is sometimes detected as virus, but I'm pretty sure it's false positive. If you want to be 100% sure, you'd need to delete executable file that is detected as malware, python files are clean.

7DRL Poarchers will be decapitated also use BLT for display, but the official link is invalid. So, I reuploaded binaries via dropbox.

There is also small game Tiny Gatherer that use BLT; it's written in Go.
« Last Edit: June 18, 2017, 08:18:56 PM by Avagart »

AgingMinotaur

  • Protector of the @
  • *****
  • Posts: 727
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« Reply #228 on: June 18, 2017, 08:17:40 PM »
(I'm redoing Veins in Python as an exercise and Pygame performance sucks when partially transparent pictures are involved, such as isometric tiles).
You're not forgetting to run Surface.convert_alpha() after loading the tiles, are you? (Probably not, but I'll mention it just in case.) In my experience, python+pygame can get a bit slow, but I never had any trouble related to just loading and blitting sprites.

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Cfyz

  • Bishop
  • ***
  • Posts: 186
    • View Profile
    • Email
Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« Reply #229 on: June 19, 2017, 07:21:14 PM »
Quote from: Zireael
Is there a way to get FPS when using Bearlib?
Well, since BearLibTerminal uses explicit refresh (does not draw continuosly by itself, only redraws if necessary) I did not thought much about displaying FPS. Values like 0.1 would look weird =). Essentially, how frequent you call terminal.refresh() would be the FPS.
Though I do calculate it in the 'speed' entry of the SampleOmni and so does the Python port of the sample. Note that vsync is enabled by default and you need to disable it (the 'output.vsync' option) if you want more than 60-80 FPS.

Zireael

  • Protector of the @
  • *****
  • Posts: 597
    • View Profile
Re: BearLibTerminal: a pseudo-terminal window library for roguelike
« Reply #230 on: June 21, 2017, 07:55:00 AM »
Rolling along happily with BLT+Python.

One report:
Quote
The default tile alignment is “center”
(from the wiki page) doesn't seem to be true anymore, at least for the version I have via pip. I was having the tiles offset until I explicitly centered all of them.