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.

DarkBASIC Professional Discussion / How does he paste sprites so quickly...?

Author
Message
Hannibal
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 9th Sep 2024 04:12
I think we can all agree that sprites are really 3D objects...?

So, when I use a 3d object, if I want to paste it on screen many times I must use backdrop off, then position the object, then (fast) sync every time, wasting loads of time...

There must be a way to paste an object, say a plane, all over the screen, without the sync or the backdrop offf

Yours Truly,

Han
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 11th Sep 2024 17:33
I think your premise might be not correct, that Sprites are really 3D objects. I think they just share a lot of similarities.

Perhaps you are referring to the Paste Sprite command drawing to screen fast:
This command is not in practical terms a 3D object. It will paste an image (with sprite scale/color/UV applied) to the screen buffer. With an 3D object, this only happens with a SYNC command, and even then the whole scene is drawn.

Hannibal wrote: "There must be a way to paste an object, say a plane, all over the screen, without the sync or the backdrop offf"

I can offer a solution to this problem. You can convert the object into an image/sprite and then paste it that way.
The year one student way to do this is to setup a separate camera, and use SET CAMERA TO IMAGE, and camera masks, and fast sync to create an image of the 3D object intended. Then you can paste the object as an image/sprite and color key the background (default pure black).
A more advanced approach would be to use this example which preserves object transparency:
https://forum.thegamecreators.com/thread/184514
The example includes a simple command method that will create an image. It also includes an ImageKit V2 plugin version that is fast enough to animate the effect.
This method is based on the idea you can take a picture of a 3D object with a black and a white background, then compare the images to calculate the image with a transparent background.

There may also be an undocumented method of simply screen grabbing and preserving a transparent background. Some of the commands have hidden optional parameters. However it has been about 20 years and I only skimmed the details of that conversation.


Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!
Hannibal
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 12th Sep 2024 10:25
Interesting, thankyou.
My work around for now was to have many 3d objects and position(paste) them all, before the fast sync, and is good for speeding up the process a lot. The one electron universe was hellishly complex
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 11th Nov 2024 02:09

Some years ago I made a simple paint program that uses many sprites .. without a direct example of your problem, maybe this will help in some way..

https://forum.thegamecreators.com/thread/212825
Send your parents to noisy sprite demo hell... enter the D-Zone

Login to post a reply

Server time is: 2024-11-17 22:23:43
Your offset time is: 2024-11-17 22:23:43