Fullscreen vs ChangeWindowSize

Why is that using fullscreen on, will make game twitch (especially animation of player) and when using ChangeWindowSize, game runs perfectly?(It takes so much cpu or something?)
ChangeWindowSize would be good opinion if it stretch the window size perfectly in size of the window (not in my laptop. It stretch over the edges of the screen of my laptop and under the taskbar. Please, tell me if it works good in your computer).

So is there some magic tricks that make game runs perfectly in fullscreen mode or so, that ChangeWindowSize would not stretch over the edges of the screen?

Here is example (my project I am working): https://www.dropbox.com/s/cz0fidlc3ocm3d8/FullScreen%20vs%20ChangeWindowSize.rar?dl=0
First try play the game in Fullscreen F2, then turn it off and try F1 in ChangeWindowSize.

Anyone? :cry:

I can’t test your project right now, but i have few questions :

  • is your problem related to pixel streching ? (are you making a native or html( project ?))

If you are working on a native game, there are solution and you’ll have to use just fullscreen if i’m not mistaken. But take a look on the forum, there was many many similar questions about fullscreen.

I am making native.
I have test both “keep aspect ratio yes and no” and leave it unmarked etc. No effect.
that is quite a grazy that change window size: ScreenHeight and width → game runs perfectly, but in fullscreen game is twitching and lagging a little bit… :smiley:
First I used Fullscreen on my project but I saw that it is twitching and lagging so I found out that it’s better forget the fullscreen thing and change the window size only.

Well, I don’t really experiencing “lag” in full screen. What I do experience is that the player character sometime doesn’t play the correct animation frame and it animation sort of “twitch” and it more noticeable in full screen probably because of the lower FPS but if I look carefully, I can notice the same thing also when only the window size is changed but it less noticeable maybe because of the higher FPS…

Did you actually check the FPS of your game?
In case you get low FPS in Full screen, I could be right and the “twitch” is there always but less noticeable at higher FPS.
In this case the twitch may caused by you. I suggest to check all the events affecting player animation.

In case you get the same FPS in full screen, I’m still suggesting to check all the events affecting player animation, if everything seems right it could be a bug somewhere.

Otherwise on my side, the game is running smooth, the only thing I can notice is the problem with animation of the player character.

In case you don’t know how to create an FPS counter:
You going to need a text object to display the FPS counter and a variable to count FPS and a timer to reset counter every second and update text object, so you can see the number of FPS.

It looks something like this:

Do + 1 to Counter every frame Timer = 1 second : Do = ""+ToString(Variable(Counter)) to text Reset Timer Do = 0 to Counter

Yeah that what I meant when I said twiching and lagging. I don’t see any twiching in player animation when changing the window size even I look carefully :smiley: Only in fullscreen mode.

Thanks for telling me that fps thing, very useful! Appreciate that! :slight_smile:
Fps was the same in fullscreen mode on and off (60-62 both). Checked also when changing the window size and get same results.
And player running animations was ok also.

You need to look very carefully :laughing:
Try to run in to the same direction as long as you can without jumping or punching or changing direction, do not blink and you might see it. :smiling_imp:
Seems like the character stop playing the animation for a moment sometime.

When the player collides with the enemy it also effecting it animation since it playing a sort of “knock back” animation.
It seems to me, the character playing that animation for a moment without blinking.

Did you check that?
Make sure you are using the “for each object” event to check collision with multiple instances of the same objects, this is very important otherwise GDevelop may get confused when did you collided with which instance of the object.

Hehehe, I still not seeing it :laughing: Its is veeeery little if it’s there :smiley:
Yeah that’s how it looks to me that like it stop playing the animation sometime…

There is knock back animation, I haven’t deleting it yet. It’s useless animation which was meant to be animation when player get hit. But I don’t think it’s related to this problem, or did you just mention that there is that kind of problem that animation only blink quickly?:smiley:

So how that “for each object” actually works? If there is lot of object where player collides it can check what object player touch or what?

Yes, I think for a very short period of time, just a moment of a second the character might think he is in collision and switch to knock back animation. I can be wrong, but this is my guess.

By clicking on “add” you can add a special event called “for each object”.

When you use this event, you can specify an object and the condition inside this event is going to be checked for every single instance of the specified object individually, and in case the condition is true for any of the instances, the action is going to be executed only on those instances that met the condition. This is very important.

In case you are using a standard event to simply check collision with an object, and you have multiple instances of the same object in your scene, GDevelop is going to get confused which instance did you mean to check, and in case any of the instances met the condition, GDevelop may execute the action on a wrong instance in wrong time.

It might not that obvious when you have only few instances in your scene, everything seems right even with standard event but really GDevelop is just guessing and you are just lucky if it seems right but really, it not.

By using for each object event, you can make sure conditions are checked and actions are executed individually for each instance of an object and only on those that are met the condition and only when they met the condition.

It might doesn’t solve your problem, but just in case, I strongly recommend of using this special event when you work with multiple instances of the same object.

Okay, I see. Thank you for eplanation!
Of course I do so if you recommend something, because you are way more experience with this program! :smiley:

Problem don’t go away. I got an idea and use that fps code and mod it to show me all the time what animation player uses. In fullscreen: Everytime player twich, animation flashes 0 (standing animation). But in Change window size: Animation don’t flash (that animation calculator tells me that). I watched carefully all the player animation events and try different variations and change things, but still problem is there.
So should we call it a bug or what is going oooooon? :smiley:

Edit: Now I changed animation when player is not moving to animation number 6 and yes, now when player twiches animation number 6 flashes. No problemos with change window size. So it seems to be that problem is in fullscreen thing.
Because if there is problem in my events, it should show without fullscreen?

Hahaa! Problem is solved!
I had to limit the framerate… Now it’s Min 10 and max 60 and that works. :smiley: :unamused: :laughing:

I did Celebrate too early… Problem is still there. It looked good for a while but now in the morning problem is back.

Solved again… I updated whole computer and now it works. For a while I hope. :smiley:

How you did do not get your game blur?
Sorry for the bad engllish

When I add sprite I write “No” where read “Yes” now in the attachment image :slight_smile:

It´s still a bit blur :frowning:
EDIT: And your game looks like the point filter of Unity Engine

Are you making native or html5 game? I think smoothing only works in native games :confused:


Hmm, then I can’t help :confused: I just write every image I upload to gdevelop “no” where is the option “smooth the image” (that picture which I upload as attachment). Maybe someone wiser guy can help you.