Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Very involved layer problem - Professional help needed - interesting problem

Author
Message
PeterLewis
20
Years of Service
User Offline
Joined: 27th Sep 2003
Location: South Africa
Posted: 16th Oct 2003 22:36
I have two screens that basically have the same issues.

The first screen has sprites moving up from a position off the screen at a specific velocity. I have a main graphic in BMP format that has a windows in line with where the sprite move up. I need the sprites to be displayed in these windows and not over the rest of the main graphic. Once I place the graphic by using paste image I cannot see the sprites until a setion of the game uses the paste sprite command and pastes the images correctly. Now I think that I have a solution for this one but need advise.

If I choose a colour not been used in the main graphic and paint the windows this colour. Then I use colourkey to specify the colour and then use the set sprite alpha x,255 command and convert the main image to a sprite this should make the windows transparent and the moving sprites in the background should be displayed.

The second problem may be solved by the same method when now once these screens have had their sprites pasted there are a few of the sprites that must animate. This is working but behind the main image. I cannot see the animations. The pasted sprites are displayed correctly.

Please could you give me advise on any other methods you may know of or if you agree with what I am suggesting then please let me know

Thank

Peter
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Oct 2003 23:51
Load the 'window' image into a new bitmap
Use GET IMAGE to pick the window up with transparency

Main loop - this depends on whether you want to use sprites or pasted images ...

Paste all the moving images
Paste the window image with the transparency flag set

or ...

set up all sprites for the moving images *and* the window
set the window sprite priority (SET SPRITE PRIORITY) to display the window over everything else.

I can't remember ATM whether lower or higher numbers are what you need for the window sprite, so you'll have to experiment if you use this method.
PeterLewis
20
Years of Service
User Offline
Joined: 27th Sep 2003
Location: South Africa
Posted: 17th Oct 2003 00:09
Thanks for your comments I solved the problem using a BMP ALPHA channel

Login to post a reply

Server time is: 2024-04-27 21:50:14
Your offset time is: 2024-04-27 21:50:14