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 do I get an instance of a paste image's x and y ?

Author
Message
dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 19th May 2010 19:57 Edited at: 19th May 2010 22:24
trying to get instances of x and y for one paste image.

so I can have multiple images with different locations with the same paste image command.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th May 2010 23:28
I don't understand your title or your first sentence.

In answer to your second sentence, there's nothing stopping you pasting the same image over and over in different places.

dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 19th May 2010 23:44 Edited at: 20th May 2010 00:59
trying to have more than one images on screen with different X and Y using the same one paste command.

so I can move two images on screen the same time with x starting at 320 to 0 while another starts at 640 to 0.

just like the object instance.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2010 10:17
Paste image Img, X1, Y1
Paste image Img, X2, Y2

Just call the paste image command more than once? D'Oh!

My signature is NOT a moderator plaything! Stop changing it!
dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 20th May 2010 17:45
yeah but I need 30 of them, too many there must be an syntax to use for instances.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2010 18:30
There isn't! That's what we're trying to tell you!

If you have many images to paste, store their positions in an array, and paste them in a for / next loop.



My signature is NOT a moderator plaything! Stop changing it!
dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 20th May 2010 19:05
ok, i thought there was because Blitz3d has one.

and I thought of using arrays and types.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st May 2010 13:31
Usually that would be handled with what are often called Point Sprites - where you have an array of locations and each sprite uses the same image, handy for particle effects. Sadly that's the only place that anything like that happens, and there is very little control over them.

Pasting them 1 by 1 is really the only way, or use sprites then you don't need to paste them all the time, unless they are moving in which case you have to update their position.

Remember that Blitz3D uses DX7, right before Microsoft converted all the 2D stuff to 3D - so after DX7 things get a little ropey with 2D. I know what you mean though, I use point sprites in C++ with OpenGL, damn handy for bullets and effects. I think we'd all like to see these sorts of features in DBPro, some speedier 2D stuff would be damn handy.


Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2026-07-26 05:21:31
Your offset time is: 2026-07-26 05:21:31