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.

AppGameKit Classic Chat / Any tips on how to move sprites super fast without weird ghosting?

Author
Message
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 12th Jul 2017 23:13
Whenever I move a sprite really fast, it leave this nasty ghosting behind it. And Since I'm trying to make a really fast game, the result is that all the visuals looks unclear.

My screen is not especially bad, so I guess it would work the same on most other computers, too. Am I the only one with this problem? Can something be done here, changing screen update settings or something?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Jul 2017 23:33
Could you post a small example with code?
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 12th Jul 2017 23:56 Edited at: 12th Jul 2017 23:58
Of course -- see attached! (Move the figure with WASD)

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Jul 2017 00:21 Edited at: 13th Jul 2017 00:22
try SetSyncRate(0,0) at the start of your proggy
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 13th Jul 2017 02:39 Edited at: 13th Jul 2017 13:36
@basicFanatic If you only see this happening in AGK2 then I don't know unless for some reason your frame-rate is very low but the suggestion @blink0k gave you should make it run at max speed I think.

You may want to check and be sure this doesn't happen in all games. For me it always happens and is much more noticeable in 2D than in 3D just the nature of the beast so to speak.

I use a laptop and the laptop displays has the pixels fade at a slow enough speed that even though a game is updating at 60 fps (or even faster) there is always a ghost trail / blur effect going on. So this could simply be your monitor.

Here is an HTML5 game I made in Unity last year: Atlantic Crisis

You can play that right in your web browser. On my laptop the torpedoes and all of the enemy subs are blurred when moving despite the game running at 60 fps. Again it is just due to my monitor refresh / pixel fade whatever rate.

If the torpedoes and subs in that game also look blurred to you then it is almost certainly just your monitor. Actually it should be very noticeable on the scroll text on the title screen. Again that should be rock steady but on my laptop is blurred.

EDIT: By the way... this ghosting / motion blur is a very common thing with LCD monitors these days. In fact, I often think many young gamers probably have no idea how us older gamers are used to seeing games running at a steady 60 fps everything super crisp and clear. These days what is seen as very sharp is probably still a bit fuzzy comparatively speaking.

Anyway, if you want to read more about it check out Blur Busters. It used to drive me crazy being used to a rock steady sharp display but over time I have come to just ignore it.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 13th Jul 2017 03:57
Once you've changed the sync rate
you could squeeze a bit more speed by using the manual update commands
to update your 2d after each movement and before any sync command which may be at the end
of your loop
fubar
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 13th Jul 2017 12:34 Edited at: 13th Jul 2017 12:37
Thanks guys! Really valuable feedback, this! As GarBenjamin said, this is a monitor issue. Saw it on his rockets too.

SetSyncRate(0,0) did wonders! Still some ghosting, though.

The one thing that truly fix it is lowering the sprite speed. Also, tiny-winy 1 pixel details gets instantly blured by ghosting. Sprites consisting of larger shapes has a greater chance of survival.

Someone said:
"LCDs actually switch between high contrast colours faster than low-contrast ones - they struggle the most with mid-grey transitions. e.g. black-to-white is faster than grey-to-grey!"
Source: https://www.gamedev.net/forums/topic/671854-moving-sprite-ghosting-anything-we-can-do/

I tried using different colors for the sprites and backgrund, but it looks like the ghosting is pretty consistent. I couldn't spot any difference with my naked eye.

Some similar threads suggest that the way the sprite is beeing moved can impact the ghosting effect:
https://forum.yoyogames.com/index.php?threads/solved-the-characters-sprite-gets-blury.5172/
https://community.clickteam.com/threads/96638-quot-Ghosting-quot-while-sprites-are-moving

Ghosting on screens can be cleaned out by printing an inverted version of the image. So, if we could create particles with a ghosting effect, but with inverted colors, this could potentially eliminate ghosting.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Aug 2017 04:14 Edited at: 17th Aug 2017 02:37
Quote: "Ghosting on screens can be cleaned out by printing an inverted version of the image"


You could try and draw the inverted image yourself behind the sprite but I haven't tried this, so not sure how well this would work

Here is a link on using draw commands underneath sprites you may find usefull not much different to draw an inverted sprite
https://forum.thegamecreators.com/thread/212556

and you may be able to modify the following


Mind you I was having problems getting it to draw the backSpr and still show the frontSpr withoutout drawing it.
Cant quite remember how that worked but it should give you something to play with.

fubar

Login to post a reply

Server time is: 2024-11-24 09:56:47
Your offset time is: 2024-11-24 09:56:47