Can we use fglayer in select screen ?

ABK

Well-known member
24bit png background causes some major trouble for me when i use alphamask for frames , but bglayer and fglayer do not have this issue, theres weird fringe around character when its on top of background type image thats 24bit png.

Is only hope to create fake select screen ? Any simplest examples ?
Ok i used it in he-man and its pretty much it:
skipselect

select data/select.txt

oops, were not allowed to have bglayers and fglayers in fake select screens
 
Last edited:
@bWWd

only thing i can think of is to spawn an entity and use parameters to make the entity appear behind select screen sprites using a setlayer type trick, or spawnbind layer/sprite negative order...
 
Last edited:
Ok... thats a good idea, i have to spawn 4 entities in waiting animation that will represent RGBA channels each and i will get probably no fringe... i have to test this
 
ok success, but the damn layers are very taxing on fps , alpha channel is killing the speed
other option would be videos, but is it even possible to have the video have a set layer or layer order?
can videos have alpaha channel?


are the layers you want going to be in front of the characters too? like cloud effects in front and in the back?

you know how spawn commands on leve.txt files

"spawn creature"
in some cases can be replaced with script, i wonder if script could be put in place of the animation line, and thus force FGlayers instead.
whatever thechonique that might be, it would be DC's level script and probably something to update.c or similar
select.txt:

Code:
music       data/music/menu.bor 1
@script etc etc"

or

Code:
music       data/music/menu.bor 1
aniamation @script etc etc"

@bWWd read your first post again,
i had pictured a different thing... like a select screen where we have layers of rain. on an alley with 4 doors, and characters wold step put of the doors and get back in if not selected...

on the forefront trashcans on the back city, multiple layers of rain drops or mist...

in escence it would look more like a level with multiplane stuff...
 
Last edited:
24bit png background causes some major trouble for me when i use alphamask for frames , but bglayer and fglayer do not have this issue, theres weird fringe around character when its on top of background type image thats 24bit png.

Is only hope to create fake select screen ? Any simplest examples ?
Ok i used it in he-man and its pretty much it:
skipselect

select data/select.txt

oops, were not allowed to have bglayers and fglayers in fake select screens
@bWWd

Are you trying to create animations using 24 bit images or a static one would solve the problem? Because if yes, you can manage layers in the select screen using screens.
With this method you can capture the 24 bit png background and put it in front of other images or entities using an additional screen. In the example below, my portraits are a single 24 bit png background but moved to appear in front of the city (entity).


1703972457765.png
Here's the script.
C:
void selectScreen_24bit()
{//Allow to use 24-bit png images on the select screen with an adjustable layer position
    void vScreen    = openborvariant("vscreen");
    float x            = 0;
    float y            = 0;
    float z            = 0;
    float layer        = -25;

    //CREATE A SCREEN AND SAVE IN A VARIABLE
    if(getglobalvar("allocScr_selectScreen") == NULL()){
        setglobalvar("allocScr_selectScreen", allocscreen(openborvariant("hResolution"), openborvariant("vResolution")));
    }

    //CLEAR ANY PREVIOUS SCREEN VALUE
    clearscreen(getglobalvar("allocScr_selectScreen"));

    //DRAW EVERYTHING TO THE SCREEN
    drawspriteq(getglobalvar("allocScr_selectScreen"), 0, openborconstant("MIN_INT"), openborconstant("MIN_INT"), 0, 0);
    changedrawmethod(NULL(),"reset", 1);
    changedrawmethod(NULL(),"enabled", 1);
    changedrawmethod(NULL(),"transbg", 1);
    drawscreen(getglobalvar("allocScr_selectScreen"), x, y, layer);
    drawspriteq(vScreen, 0, openborconstant("MIN_INT"), openborconstant("MAX_INT"), 0, 0);
    clearspriteq();
}

Then you can call the script in the updated.c at the select screen event.
C:
if(openborvariant("in_selectscreen")){
    selectScreen_24bit();
}
 
24bit pics dont go well with alphachannel frames , theres fringe around character when 24bit png and 8bit gif alpha channel collide, the only way fringe wont happen if i have separate RGBA images, so its what im doing.

Pretty much 24bit images in openbor dont get along when you use them with 8bit images and alpha effects
 
Back
Top Bottom