Paste into background issue
I have searched through the search thing but I yielded no results. I have an object that always set's its position to the X and Y of the mouse. I made it so repeat while user clicks: Paste object into background (Not an obsticle).
But if I move the mouse too fast then it pastes them like dots. It's hard for me to explain :S
Like, if I move the mouse fast around the screen while holding the mouse button it does paste them into the background but it leaves large gaps between them. I want it to be smooth and for it to not have any gaps.
If you don't understand then just create a quick app using the descriptions above and you will see what I mean ;)
Re: Paste into background issue
Mouse DPI(USB polling rate)perhaps?
Few years back in school I had to make simple paint app in Pascal and run into this problem too. Solution was that i didnt draw pixels but lines from current mouse position and use deltaX and Y from mouse movement.
Like in this
http://uloz.to/850023/draw.mfa
Re: Paste into background issue
http://www.mediafire.com/?yto0btn4yrh
Not perfect but you should get the idea..
edit:
Algul beat me to it :) ... o well take your pick (i like his better)
Re: Paste into background issue
Quote:
Originally Posted by Algul
Mouse DPI(USB polling rate)perhaps?
Few years back in school I had to make simple paint app in Pascal and run into this problem too. Solution was that i didnt draw pixels but lines from current mouse position and use deltaX and Y from mouse movement.
Like in this
http://uloz.to/850023/draw.mfa
Umm can you pleease upload it somewhere else? =\
The language is different and then I got an error link. Try using www.mediafire.com
Thanks anyway!
Also thanks seele but it looks a bit weird if you move it too fast. Like, the purpose of my game is to move the mouse as fast as possible. :)
Re: Paste into background issue
http://rapidshare.com/files/154601970/draw.mfa
added second frame
Edit: wrong link, this one should work
Re: Paste into background issue
i replied to your post on the clickteam forum re. this
Re: Paste into background issue
Thanks guys I got it now! :D
no it doesn't :(
I am using Algul's example but when I used the code in my game I only had a "limited" supply of "paint" if you know what I mean. Like it worked perfectly but after a while it just stops drawing =\
Any suggestions?
Re: Paste into background issue
Please, this is a crucial part of my game
Re: Paste into background issue
Did you paste to background or add backdrops? Added backdrops are limited.
Re: Paste into background issue
sorry but i dont follow now. Can you send example?
Re: Paste into background issue
Quote:
Originally Posted by Werbad
Did you paste to background or add backdrops? Added backdrops are limited.
Yeah I don't understand what you mean, but Algul's example is "Paste Into Background (Not an obstacle)"
Quote:
Originally Posted by Algul
sorry but i dont follow now. Can you send example?
If I move the mouse around for too long then the objects STOPS pasting itself into the background.
Re: Paste into background issue
I cant replicate this. Just now i was holding left mouse for about 5 minutes and it was working fine.
Please give me more details. How long did it work, how big is that object you are pasting,how big is your app screen...
Somethig that will help me replicate that issue.
Re: Paste into background issue
The screen is 480 x 640 (Not 640x480, don't get confused)
The object HAS an alpha channel, that might be the problem. It is 55x55 and I am NOT using Hwa.
I measured how far (in pixels) it draws until it stops and that is 505 pixels (y, I moved the mouse downward till it stopped to measure it)
Re: Paste into background issue
I am really sorry but i still can't replicate that.
make sure that you destroy right object after it is pasted into background.
505pixels means 505 objects created=possible max objects
Re: Paste into background issue
I don't know if tis willl work for you but go to the properties of the frame and go to run time and set the object limit to 10000, a few weeks ago i had aproblem like this but i was creating a trail then making it fade, but anyways i hope this helps
Re: Paste into background issue
pasting shouldn't just up and stop working since it's only a temporary effect and works differently than added backdrops, so you could literally have something pasting non-stop for a week and it'll keep going
added backdrops on the other hand are limited to the same amount as you have objects, ie with the default, you can have 500 objects and an additional 500 added backdrops
Re: Paste into background issue
Ok I have found the problem!
Yeah, I just had to set the frame properties to allow more then 500 objects.
Thanks for your help guys! :D