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 / sprite flicker

Author
Message
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 29th Oct 2011 00:26
Hi all, I'm from Russia, and I apologize for my bad English. I have a problem.
In my project the camera (view) moves with a bullet, as in Angry Birds. construction is the following:
first we get a shot in the right direction:
setSpritePhysicsImpulse (2, getspritex (2), getspritey (2) + getspriteheight (2) / 2, 50 * cos (getSpriteAngle (1)), -60 * sin (-getSpriteAngle (1)))
2 - Bullets ID
then we attach the camera
do
bla bla bla..
setViewOffset (x, y)
loop
where x and y - coordinates of bullet in the flight. so we following the bullet in the center of the screen and so flew around the world)) But the problem is that the sprites by which we fly start to flicker quite! Why does this happen? Long drawn and the problem with the backbuffer or something? I am using PC,windows

yeea
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 29th Oct 2011 07:44
Also, in example ScrollingSprite sprite is flicking sometimes! Whats a pity! Is it possible to remove this ??
Anyway im making black box in the center of screen and write
do
x=x+1
setViewOffset ( x, 0 )
loop

and when veiw goes image start flicking!

sometimes it stand rightly and sometimes it begin to shaking!

yeea

Attachments

Login to view attachments
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 29th Oct 2011 17:43
you need to add the SYNC command!!!!!!!
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 29th Oct 2011 19:41
oh my god, do you think that im so stupid???
of couse i used it.

please try to make sprite , and in main loop

write

setview..(x,0)
x=x+1

and you will see that sprite flicking while moving how can i remove it???

yeea
Hubdule
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 29th Oct 2011 21:00
Check the driver version of your graphics card. It often helps to install the latest drivers. I saw flickering often when using older driver versions.

Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 29th Oct 2011 23:58
Im already have got latest drivers!!!

yeea
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 29th Oct 2011 23:58
Sandidro,
Don't take offense, looking at your code initially I thought the same thing since I didn't see it at the bottom of loop which brings me to my question.
Where is Sync() at in your code. You can get the same thing if you are using Sync() in multiple calls.
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 30th Oct 2011 00:48
Sync() in the end )

you can make your own game with 1 sprite in center of screen
you make sprite, then

do
setViewOffset ( x, y )
x=x+1
sync()
loop

you will see that sprite is flicking sometimes

yeea
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 30th Oct 2011 15:45
Im using graphics media accelerator 3150 and my friend have got nvidia geforce gt 540m .
at both computers sprites sre flicking
and sprites from AppGameKit scrolling examples are flicking too

try sprites- fire -in this example most.

This problem is beginning to bother, why not see it
in trial version ...
to give all the new drivers and the most powerful graphics card to all buyers of 15 mb 2d game ... a bad idea

yeea
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 30th Oct 2011 17:51
Amazing that it begin to flick only while moving/rotating sprites

it is impossible to understand WHY!!!

yeea
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th Oct 2011 21:44
On my Win7 Pc and Iphone 3gs the mentioned examples don't flicker at all. I am using Tier2 though.
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 31st Oct 2011 01:50
At Tier 2 I saw this effect too.
I have got XP professional my friend win7

but all of us saw this terrible effect((

yeea
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 31st Oct 2011 08:34
Is the sprite flickering happening in the Examples or code that you wrote? I am not getting the flickering at all as you have described.
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 31st Oct 2011 13:27
Sprite flickering anywhere!!! I saw it in sprite fire and in sprite scrolling.

yeea
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 31st Oct 2011 14:33
WE need help))
Somebody must find acer aspire one
and run AppGameKit exampels(scrolling sprite, sprite fire) on it, and he will see this terrible bugs))

Note: Sprites do not flick always while moving, this happining sometimes, it looks like slow updating image line going from up to the end of sprite and it looks terrible!

I will give you a video soon

yeea
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 31st Oct 2011 16:14
Got two Acer M3300 computers here. Sprites are smooth as a baby's bottom.

-- Jim
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 31st Oct 2011 17:30
Can you email me the project and I'll take a look. There is a fix in the engine that deals with the problem you mentioned but it is only applied in certain cases.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 31st Oct 2011 23:36
Thanks for sending the source. It appears to be caused by vsync, but only when in fullscreen mode. I'll add a command to set vsync on, but we did notice vsync to be noticeably erratic if using a scrolling screen (we originally were going to have this but replaced it in favour of SetSyncRate, as it kept the frame rate smoother)
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 1st Nov 2011 00:56
ooh... I dont think so)

1) VSYNC is ON in OpenGL settings of my card

2) I have got flicking both in fullscreen and window mode

3) I have got flicking without scrolling screen too

yeea
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Nov 2011 14:04
Oh I see what you mean, I noticed this horrible effect about 2 days in to using AGK. I have wondered why other people haven't jumped on this one, I assumed no one else had seen the issue. It looks to me like a sync issue, you get a slow scan up the screen where you can literally see the screen redrawing. It is far more noticeable in fullscreen mode, even on pretty powerful pc's. But it gets easier to spot, the slower the device is, and especially when using onboard video. It is visible in ALL demos if you look closely, not just the side scroller demo. It's just way more noticeable in side scrolling stuff, as I found out with my own side scroller awhile back.
Anyone who cannot see this. Enable fullscreen mode in the setup file of your project. You will see the effect more easily. Look closely and you will notice a line moving up the screen. It reminds me of an old tv with the picture not tuned in properly causing a wave effect up the screen.
it's a hard one to describe, but it isn't just sprites flickering it is the whole display!

Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 1st Nov 2011 15:09
Can I ask the developers to remove this effect? Otherwise I'll have to stop working with this product. The fact that I look forward to a fairly simple PC audience, and the emergence of such bugs is unacceptable

yeea
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Nov 2011 16:51
If you turn vsync on and use SetSyncRate(0,0) does it still result in tearing? This is also a good test if the graphics driver is respecting the vsync setting as it should still run at 60fps
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 1st Nov 2011 17:35
hm ... when I set syncrate 0,0 , screenFPS began to fluctuate up to 120 then quickly drop to 20 and so many times in a row. The image became more antsy but sprites were flickering.

Okey, maybe I should be trying to set Vsync on in tier2 right through OpenGL? Or I need to find another driver?

yeea
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Nov 2011 17:47
Check you have the latest driver, it sounds like vsync driver setting isn't working properly so you'll still get tearing. I'll add in the VSync command for tier 1 and 2 for version 1.1
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Nov 2011 22:30
I don't think it is a driver issue as I have had this issue on several machines. Some with the latest drivers installed, and some not. All of the systems have the same problem. Faster systems hide it a little better, for instance in windowed mode you would hardly notice it, but in fullscreen it is glaringly obvious.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 1st Nov 2011 22:38
So this problem is mostly Windows related or also affects iOS ?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Nov 2011 23:17 Edited at: 1st Nov 2011 23:18
Quote: "I don't think it is a driver issue as I have had this issue on several machines."


To clarify, the flicker problem should be fixed with VSync but since that's not available in AppGameKit right now he's turned it on in the driver, that's where I think the driver is at fault. My machine has the flicker problem but it goes away when I turn on VSync.

Quote: "So this problem is mostly Windows related or also affects iOS ?"


Mobile devices automatically vsync their rendering so it should not affect them.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Nov 2011 23:57
Ah I see. I have tested forcing vsync on with my driver on my main machine, and that sorts out the problem as you suggested. Getting AppGameKit to enable it automatically will be better though, as everyone pretty much will have it set to application control as default. Still nice to see my game run in fullscreen without screen tearing now.

Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 2nd Nov 2011 00:24
Урааа)
I turn on vsync on computers and all became good)))

yes, vsync command is neccesary, becouse a lot of users have set to application control as default
Thanks!

yeea
Sandidro
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 2nd Nov 2011 01:32
when will version 1.1 ready?

yeea
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 2nd Nov 2011 19:22
PC's are creating all kinds of artifacts in AppGameKit, tested on a P4, and it were tearing the sprites, tested on an old laptop, and all sprites had white backgrounds, tested on new PC, all ok...

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 2nd Nov 2011 23:20
I tested agk on 3 pcs and all looks fine here.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 5th Nov 2011 00:47
If we have an option to set vsync on in the code, then that's fine.
I just tried this out here, and forcing vsync on my nvidia settings gets rid of some tearing I see.

Maybe I'd like to release my game on PC as well as mobile eh?

Login to post a reply

Server time is: 2024-04-20 17:15:57
Your offset time is: 2024-04-20 17:15:57