I'm trying to make a scrolling scene which has two images. One contains blocks, coins and the ground (foreground, I suppose); and the other one contains the background ( clouds, trees ).
I have understood that the TRUE black color ( RGB 0,0,0) represents the transparency and I got this in the part of the foreground that there won't be nothing.
The problem is that the black color is still there and I can't see the background. I've just downloaded the TimTool program in order to try to make the black "transparent", but it persists.
Any solutions? Or I must have just one background in my game? My images are in PNG.

Donate & Support PSXDEV.NET
We have been operating since 2012 providing users with a place for free information, free downloads & zero ads.
It has always been a safe and clean forum with no spam for other members interested in the PlayStation 1 to meet and make new friendships.
It's a place for those who are interested in learning about programming, reverse engineering and experimenting with hardware/software for the console.
We have never asked for donations before but it has reached the point where the server costs are becoming too much for us.
We would like to politely ask that if you use this site that you donate any amount you can to show your support to assist with the hosting fees in order to keep PSXDEV.NET alive.
Users who donate will be rewarded with a new profile rank on their account badge
Just be sure to include your handle/alias when sending the donation or message me here with your BTC address.
Bitcoin: 1GqS7rr8jYPzT4Lp9Uua3D5thUH8ZnWyD8
Thank you for your contribution
We have been operating since 2012 providing users with a place for free information, free downloads & zero ads.
It has always been a safe and clean forum with no spam for other members interested in the PlayStation 1 to meet and make new friendships.
It's a place for those who are interested in learning about programming, reverse engineering and experimenting with hardware/software for the console.
We have never asked for donations before but it has reached the point where the server costs are becoming too much for us.
We would like to politely ask that if you use this site that you donate any amount you can to show your support to assist with the hosting fees in order to keep PSXDEV.NET alive.
Users who donate will be rewarded with a new profile rank on their account badge

Just be sure to include your handle/alias when sending the donation or message me here with your BTC address.
Bitcoin: 1GqS7rr8jYPzT4Lp9Uua3D5thUH8ZnWyD8
Thank you for your contribution


Foreground with transparent color over background
Foreground with transparent color over background
You do not have the required permissions to view the files attached to this post.
If you can't figure out what is wrong, then yes, you must use only one background.
Some things that look wrong...
Your png doesn't seem to contain transparent pixels, any half-decent png-to-tim converter would thus convert the solid black png pixels into solid near-black tim pixels. But anyways, you must really use a hex editor and look what you have in the tim file. The pixels (or palette entries) are 16 bit RGBA, not RGB as you seem to think. (Or sorts of RGBA, the alpha flag in bit15 has meaning A=1=SemiTransparent, which unrelated to the the solid and fully-transparenct pixels that you are looking for, so make sure that you have A=0 in all pixel colors).
It wouldn't be wrong if you could provide some basic info, what rendering commands and rendering attributes you were using, and what kind of textures with how many bpp.
Some things that look wrong...
Your png doesn't seem to contain transparent pixels, any half-decent png-to-tim converter would thus convert the solid black png pixels into solid near-black tim pixels. But anyways, you must really use a hex editor and look what you have in the tim file. The pixels (or palette entries) are 16 bit RGBA, not RGB as you seem to think. (Or sorts of RGBA, the alpha flag in bit15 has meaning A=1=SemiTransparent, which unrelated to the the solid and fully-transparenct pixels that you are looking for, so make sure that you have A=0 in all pixel colors).
It wouldn't be wrong if you could provide some basic info, what rendering commands and rendering attributes you were using, and what kind of textures with how many bpp.
I'm using this command: img2tim -bpp 8 -tcol 0 0 0 -plt 0 0 -org 0 0 level1a.png -o level1a.tim
and got this in several cases:
and got this in several cases:
You do not have the required permissions to view the files attached to this post.
Your main problem is communicating with other people and general problem solving, work on improving that skills! Nobody could help you if you post numerous png files instead of posting your actual tim file, and all that without allowing people to see your source code.
But, in this post, viewtopic.php?f=51&t=4053&p=22258#p22258 you appear to have drawn a "foregrounf sprite" with transparent pixels, drawing a bigger "foreground layer" with transparent pixels is just the same.
If you think about it, I hope that you will realize that you are currently acting exceptionally stupid about trying to solve a problem that you had already solved some months ago. Good luck, and please reconsider if you could have solved such problems on your own.
But, in this post, viewtopic.php?f=51&t=4053&p=22258#p22258 you appear to have drawn a "foregrounf sprite" with transparent pixels, drawing a bigger "foreground layer" with transparent pixels is just the same.
If you think about it, I hope that you will realize that you are currently acting exceptionally stupid about trying to solve a problem that you had already solved some months ago. Good luck, and please reconsider if you could have solved such problems on your own.
PS. From what I remember about what you had posted in the other thread, you did display the backgrond by uploading it from cpu (or cdrom?) to vram, such transfers are usually intended for initializing texture memory, you could also use them to initialize the framebuffer background in each frame (though that's rather unusual, and you should do such things only if you really know what you are doing, and have a good reason for doing it that way).
If you are using the same upload function for drawing the foreground layer, that won't work, it will simply overwrite the background. For foreground images you must always use rendering commands (like sprite/rect) to transfer foreground tiles from texture memory to framebuffer.
There is a size limit for rectangles, so if you want to display something like 320x224 bitmaps then you must split them into smaller snippets (although that huge bitmap idea is also something that you aren't doing right, most or all real games are using a background map with background tiles, and then display those background tiles one oafter another instead of displaying a single huge bitmap).
If you are using the same upload function for drawing the foreground layer, that won't work, it will simply overwrite the background. For foreground images you must always use rendering commands (like sprite/rect) to transfer foreground tiles from texture memory to framebuffer.
There is a size limit for rectangles, so if you want to display something like 320x224 bitmaps then you must split them into smaller snippets (although that huge bitmap idea is also something that you aren't doing right, most or all real games are using a background map with background tiles, and then display those background tiles one oafter another instead of displaying a single huge bitmap).
Who is online
Users browsing this forum: No registered users and 1 guest