Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: vsync issue  (Read 3967 times)

0 Members and 1 Guest are viewing this topic.

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
vsync issue
« on: September 24, 2012, 05:54:48 PM »

Hi

I know that this issue was already discussed but it didn't help me. I got problem with vsync. My adventure is fully 2d poin't and click. In full screen mode my game is working much slower than without full screen mode. I am one hundred percent sure that this is vsync problem.

In fullscreen mode Wintermute works with vsync on and in window mode vsync is off. I know that there is no control of vsync from scripts.

What can I do?? This is huge showstopper for me. With this issue I can't finish my open demo.

Sorry for my english.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: vsync issue
« Reply #1 on: September 24, 2012, 06:01:10 PM »

Why is it such a big problem? With vsync the game runs typically at 60 FPS. That's not enough for you?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #2 on: September 24, 2012, 10:25:44 PM »

Of course it should be enough. Therefore it's strange that in fullscreen mode game is much slower.

People who played my closed demo complained about the actor comes slowly and the screen scrolls slowly. There were issues about "vibration" of actor when screen is scrolling.

However in window mode this problems doesn't exist.

I know it's vsync because when I told my friends to turn off vsync in graphic drivers this problems disappeared.

I love this engine but this only thing is what I'm worried about. I need find a solution but I ran out of ideas.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #3 on: September 24, 2012, 11:01:26 PM »

Hey I know it's not only my problem. Maybe together we could find some solution once and for all.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: vsync issue
« Reply #4 on: September 24, 2012, 11:05:52 PM »

it's quite usually bound to bad scripting. Constructions like Sleep(1); and the likes. You should always count with some FPS to boot and adjust wait cycles accordingly. Then you don't have this problem.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #5 on: September 24, 2012, 11:09:37 PM »

Quote
You should always count with some FPS to boot and adjust wait cycles accordingly.

Could you develop this idea?
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #6 on: September 25, 2012, 12:09:25 AM »

Alright, I have started new project (just for test) with template "bacis project". I've changed only two things.
First: Instead of loading molly I'm loading my actor. My actor walk.sprite has delay 40 ms, move by 10 and has 30 frames.
Second: Changed resolution from 800 x 600 to 1280 x 720.

Everything else is the same as in template. So in window mode my actor walks with desired speed but in full screen actor walks much slower. Then just to be sure I turned off vsync in graphic driver settingns and this helped. Of course this is not solution. What is wrong? I don't believe that there is no solution. And this is not bad scripting because it's template. I didn't do any scripting.
« Last Edit: September 25, 2012, 12:17:50 AM by hubertMichael »
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1454
  • Lamp dog!
    • View Profile
Re: vsync issue
« Reply #7 on: September 25, 2012, 12:55:10 AM »

Unfortunately this is caused by the many frames of the character and the difference of monitor's speed (60hz usually) and delay (40ms) of your frames. It's a known issue for 2D graphics when v-sync is enabled (not related to wme). Check the paragraph V-Sync of this page. Yes I know it mentions video but it's valid for moving 2D. You either have to remove many of the character frames or instruct the players to disable v-sync. Best option would be if you could disable v-sync through scripting which is not possible in current wme. But even that wouldn't be a universal solution as gpu drivers have options to always have v-sync no matter what a game asks.
Logged
fl*p

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #8 on: September 25, 2012, 01:22:46 AM »

Thanks for your answear. Now I'm felling that I'm lost. Could you give me some tips how I could set delay in my walk.sprite, how many frames and how to set move by? I don't want exactly number because it depends on my actor but what are the optimistic sets? I need some tips according to I will redo animations.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1454
  • Lamp dog!
    • View Profile
Re: vsync issue
« Reply #9 on: September 25, 2012, 08:29:34 AM »

I'm afraid you'll have to do some testing but you won't need to redo graphics for it. Just use the frames you currently have and start with 15 frames.

As a desperate measure there is a third party mod of wme which ads the ability to disable v-sync through scripting. But using this version has some differences. It's LGPL only so you'll need to comply with it (please ask if you need for info), it's not as tested as official version and last we offer no support for it in those forums (you'll have to ask the developer of this version if you get a problem not available in official wme).
Logged
fl*p

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #10 on: September 25, 2012, 07:28:23 PM »

s.belov: Thank you. I've tried but this crashes my computer. I will stick to orginial wme version.
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: vsync issue
« Reply #11 on: September 25, 2012, 09:19:39 PM »

Finally I have found solution.

It is very crazy I know but it works. Now my actor in full screen walks much better then in window mode before.

I doubled animation frames. So I had 30 frames per walk now I got 60 frames. I didn't add new frames. Simply in SpriteEdit I added a double each frame. This allowed me to reduce delay from 40 ms to 15 ms.

Works like a charm :D :D
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

Krosad

  • Anate Studio
  • Occasional poster
  • **
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 97
  • anatestudio.com
    • View Profile
    • Anate Studio Web site
Re: vsync issue
« Reply #12 on: October 08, 2012, 01:59:55 PM »

hubertMichael, I had same problem. As you advised I made actor animation with 60 frames and "vibration" of actor disappear.
Also I added this code "if (Game.WindowedMode == false) Scene.ScrollPixelsX = 2;".

thank you very much.
« Last Edit: October 08, 2012, 02:02:44 PM by Krosad »
Logged
 

Page created in 0.15 seconds with 24 queries.