Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Mayedl10

6
Posts
2
Topics
1
Following
A member registered Jan 08, 2023 · View creator page →

Creator of

Recent community posts

[disclaimer: I already asked this question before at the last 1-bit jam, but didn't get any answers, so I'm asking again]

If I have my background a colour A, and a second colour B, can I render text with colour A and then add a "shade" with colour A, but A's alpha channel is halved? Is that allowed?

meaning: the background is rendered as (for example) 0xFF00FF with alpha = 255. Then I render text with a second colour as (for example) 0x00FF00 with alpha = 255. Can I add a "shade" to the text if I use the same colour but different alpha? (in this example, 0x00FF00 with alpha = 128)
This would be what it looks like.

code for this would probably be something like this:


(5 edits)

If I have my background a colour A, and a second colour B, can I render text with colour A and then add a "shade" with colour A, but A's alpha channel is halved?

example

// background colour is #292b30
auto fontS = new Font(win, "res/gameFont.ttf", 12, {0xCF, 0xAB, 0x4A, 0xFF});
auto fontT = new Font(win, "res/gameFont.ttf", 12, {0xCF, 0xAB, 0x4A, 0x7F});

fontS->renderAt({10, 10}, msg.c_str());
fontT->renderAt({11, 11}, msg.c_str());

The game makes my graphics card go brrrrrr


I have a 3060ti ._.

Yeah, I was kinda in a rush because my family had a vacation planned for the 3rd day and the 2nd day was also pretty stressfull. I think this is also reflected in my code quality. (Please don't touch-a the spaghetti)

Yeah, it doesn't have a lot of content. And the duration of a "playthrough" is never the same. The game could end after a short time, or after a long time. (If you look at the "advance" function that advances the gamestate, you'll see that there is always a 5% change that it jumps to the end screen.)