Grid Sage Forums

Grid Sage Forums

  • November 21, 2024, 05:48:39 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Author Topic: Layer transparency  (Read 5279 times)

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Layer transparency
« on: March 01, 2016, 06:40:07 PM »

I needed to do some UI design lately and I gave REXPaint a shot. Very nice, but it would be useful if layer transparency was supported.

Specifically, I would like the behavior to be as follow. Suppose layer 1 is the bottom layer and layer 2 is the top layer. Further suppose that layer 2 has a transparent background (255, 0, 255). Then, layer 1 should be rendered, then layer 2 should be rendered on top (instead of erasing it) where the background is transparent.

That would allow the floor features to be visible below creatures (that could look nice for Cogmind, too).
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Layer transparency
« Reply #1 on: March 01, 2016, 07:42:16 PM »

Hey Decker, didn't know you were using REXPaint :). What kind of UI design are you doing with it?

I'm not quite sure what you're describing here that's different from the current behavior, since layer transparency is already supported. (At least based on your middle paragraph.)

On closer inspection, though, are you perhaps referring to superimposing foreground glyphs across multiple layers? (The engine is optimized on the premise that only one glyph and one hue can be used per cell.)
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Layer transparency
« Reply #2 on: March 01, 2016, 09:11:52 PM »

Quote
On closer inspection, though, are you perhaps referring to superimposing foreground glyphs across multiple layers? (The engine is optimized on the premise that only one glyph and one hue can be used per cell.)

Correct. Think about power lines laid out on the ground. If a robot standing on them isn't totally opaque, it'd be nice if the power lines were visible beneath it.

Quote
Hey Decker, didn't know you were using REXPaint :). What kind of UI design are you doing with it?

This is kind of embarrassing. For several years, I worked on a little roguelike (I made some prototypes with OpenGL) that I ultimately abandoned because my ideas (mechanics) were not good enough.

One of the thing I enjoy most about games (probably even more than playing them!) is figuring out optimal builds. That was the main focus of my game: figuring out builds to be able to survive each level, in a rich tactical environment.

Cogmind reminds me of the game I was developing, so I have a particular affinity for it.

Recently, I thought about it some more and I figured out where I went wrong.
1) 3D grid representation with heightmap -> too much work.
2) Complex mechanics are bad. Emergent complexity, not inherent complexity.
3) UI first. Not thinking about the UI experience leads to bad design. It drives everything.
4) It shouldn't be a roguelike. Controlling a party allows richer tactical interactions.
5) The story doesn't matter all that much.
6) Focus on one thing and do it right. Examples: Cogmind, FTL, Portal, Wesnoth, Defense Grid, TOME.

The party-based setup really brings out the tactical depth that I wanted but couldn't achieve with a single character. The core elements include tower defense, stealth, player-designed turrets, robots and biological horrors, and simple but rich powers: polymorph, teleport, tow, transport, mine, infect, mind-control, hack, regenerate, etc.

For a long time I didn't want to have a party, because it's a chore to move several creatures over a long distance. I would lead to a game like Wesnoth where your units are mostly limited to a small area so it's not too annoying to manage. I wanted more flexibility.

I made a radical design change to achieve this: control as a resource. You can control about 2-3 units per turn from the central AI (but most units are autonomous/immobile). As in Cogmind, time is working against you. It leads to agonizing decisions (move a unit out of harm's way, build, attack, bring in reinforcements?). You can tow/carry units and send GOTO orders to optimize time, and use power-ups to temporarily gain more control. All-in-all, I think that design could achieve both high emergent complexity and a low level of micromanagement. A bit like chess, but a lot more fluid.

I have no plan to code that game at short to middle term. I'm just documenting things every few months when I get an epiphany. I used Rexpaint to figure out some UI measurements and avoid some resolution issues that you had :P

My priorities right now are that volley simulator, and neural network/AGI development.

And that's a longer post than I had anticipated ::)
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Layer transparency
« Reply #3 on: March 01, 2016, 09:50:02 PM »

Quote
On closer inspection, though, are you perhaps referring to superimposing foreground glyphs across multiple layers? (The engine is optimized on the premise that only one glyph and one hue can be used per cell.)
Correct. Think about power lines laid out on the ground. If a robot standing on them isn't totally opaque, it'd be nice if the power lines were visible beneath it.
Okay, I thought that's what you might be referring to, but wanted to be sure before saying:

That usually looks pretty terrible, and even if it doesn't it still has a strong negative impact on readability, because you can no longer consistently identify ASCII based on shape (which is how we read it).

And that's a longer post than I had anticipated ::)
Nice wall of text there, was a good read :).

Sounds like a lot of good ideas, and I imagine you've seen X@COM before (?), which actually plays out in a 3D environment and works pretty well, so from a representation perspective that's doable even in top-down ASCII.

Reducing the number of controllable units should go a long way towards keeping it simple but make every decision that much more meaningful.

complex mechanics are bad
You'll notice that's what I try to do with Cogmind, yeah. One of the extant exceptions is the fabrication system via schematics and whatnot, but I've recently been working on designing a more streamlined version.

Starting with REXPaint UI mockups is definitely a safer way to go, and yeah design for a grid that's not as fine as we've got in Cogmind--bad move that's tough to undo :/ (That said, a reduced grid also means less information on the main UI, and I like that there's not a ton of information hidden in submenus. This roguelike that recently showed up over in /r/roguelikedev is my kinda style :P (and the art is also done in REXPaint :) ))
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Decker

  • Cyborg
  • ***
  • Shared a Confirmed Stealth Win Bug Hunter Supported Cogmind Alpha Access 2015-2017 (Prime Tier) Weekly Seed Participant Shared a Confirmed Combat Win
  • Posts: 172
    • View Profile
Re: Layer transparency
« Reply #4 on: March 01, 2016, 10:29:24 PM »

Thanks for the kind words.

For the layer stuff: I only care about tiles, so I'm fine if it looks horrible on raw ASCII. Transparency plays nice with tiles if the tileset is a bit composable. My idea was to draw the base terrain / features / creatures on different layers so I could view each and do a quick-and-dirty rendering mock-up. A nice-to-have feature, but REXPaint is still useful to me without it.
Logged

gumix

  • Cyborg
  • ***
  • Posts: 134
    • View Profile
Re: Layer transparency
« Reply #5 on: March 02, 2016, 01:41:25 AM »

Existing layer transparency would do a better job for me if I could provide glyph priorities to RP.
Consider 2 wheel sprites composed in regular fashion and using back_slash '\' over underscore '_' priority.
Of course priorities should be taken into account on the upper layer boundary cells only.


  __       __        __
 /  \     /  __     /  \_
 \__/     \_/  \    \_/  \
            \__/      \__/
sprite    regular prioritized

« Last Edit: March 02, 2016, 04:30:12 AM by gumix »
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Layer transparency
« Reply #6 on: March 02, 2016, 09:26:05 AM »

For the layer stuff: I only care about tiles, so I'm fine if it looks horrible on raw ASCII.
Ah, I see what you mean then. Sure, blending tiles is very common, though REXPaint is an ASCII editor, not a tile editor (even though you can technically use monochrome tiles).

One of the more popular new tile-based editors I've heard of is Tiled, which you may want to check out. Not sure about its features, though. I'm sure it differs considerably from RP.

Existing layer transparency would do a better job for me if I could provide glyph priorities to RP.
Consider 2 wheel sprites composed in regular fashion and using back_slash '\' over underscore '_' priority.
Of course priorities should be taken into account on the upper layer boundary cells only.


  __       __        __
 /  \     /  __     /  \_
 \__/     \_/  \    \_/  \
            \__/      \__/
sprite    regular prioritized


RP is intended to work most optimally at the character level rather than a true multi-character sprite level, though if you're only working with a few such sprites one option is to make a copy to a higher layer and delete the cells you'd like to show through (and then you can merge the layers if/as necessary). Once familiar with the commands to do so, that's probably easier than fiddling with glyph-wise prioritization that might change from one image or instance to another.

(Nice avatar, by the way :) )
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

gumix

  • Cyborg
  • ***
  • Posts: 134
    • View Profile
Re: Layer transparency
« Reply #7 on: March 02, 2016, 11:21:12 AM »

Np at all, just sharing with you what are actualy my needs ;)
« Last Edit: March 02, 2016, 11:47:32 AM by gumix »
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Layer transparency
« Reply #8 on: March 02, 2016, 07:25:58 PM »

And thank you for sharing! Over the long term it's meaningful, since if it turns out that more and more people are requesting a certain feature, or some other feature which is somewhat related, then it might eventually be implemented. There are so many users other than myself who may take advantage of features I don't need or have experience with, so it's nice to know what those are in case there's an opportunity to add them.

Right now I'm too busy to make big new additions, though small ones I may occasionally throw together in a quick release. The next major release might come next year where I've got a lot of plans to add some cool new stuff, but need to work on keeping myself in business first :P
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon