Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 16,707 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Movement Slowdown in Fullscreen Mode #252580
02/19/09 02:51
02/19/09 02:51
Joined: Feb 2009
Posts: 3
J
JackParsons Offline OP
Guest
JackParsons  Offline OP
Guest
J

Joined: Feb 2009
Posts: 3
Greetings:

I'm relatively new to A7, and have encountered a problem with a brief movement function I wrote to move the camera on a key press:

------------------

function motion1()
{
while(1)
{
if(key_v)
{
camera.x+=1;
}
wait(1);
}
}

--------------

This function works perfectly well in windowed mode, and moves the camera at the same rate in every resolution size A7 offers. However, whenever I switch to fullscreen mode, movement becomes incredibly slow.

Has anyone encountered this problem before, or know how I might go about amending this function so that movement is at the same rate in both windowed and fullscreen modes?

Regards,

J. Parsons.

Re: Movement Slowdown in Fullscreen Mode [Re: JackParsons] #252581
02/19/09 02:53
02/19/09 02:53
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
add *time_step to it its because there is probably a significant change in fps in full screen v windowed.


"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Re: Movement Slowdown in Fullscreen Mode [Re: GamerX] #252582
02/19/09 02:56
02/19/09 02:56
Joined: Feb 2009
Posts: 3
J
JackParsons Offline OP
Guest
JackParsons  Offline OP
Guest
J

Joined: Feb 2009
Posts: 3
Thanks, GamerX! That did the trick.

I really appreciate it.

Regards,

-J. Parsons.

Re: Movement Slowdown in Fullscreen Mode [Re: GamerX] #252583
02/19/09 02:58
02/19/09 02:58
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
usually the fps rate is slower in fullscreen mode than windowed mode. u can press F11 to get the details while running the application. u can compare then. for a more smooth motion, use time_step as GamerX mentioned above.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: Movement Slowdown in Fullscreen Mode [Re: delinkx] #252614
02/19/09 09:01
02/19/09 09:01
Joined: Feb 2009
Posts: 3
J
JackParsons Offline OP
Guest
JackParsons  Offline OP
Guest
J

Joined: Feb 2009
Posts: 3
Thanks again. Out of curiosity, I assume the sleep() function is already tuned to adjust to the frame rate? Or, do I have to do sleep(1*time_step) also to ensure that my pause periods are the same on all systems?

Re: Movement Slowdown in Fullscreen Mode [Re: JackParsons] #252618
02/19/09 09:31
02/19/09 09:31
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
sleep() is no more used. we use wait() now. see manual for more details.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: Movement Slowdown in Fullscreen Mode [Re: JackParsons] #252619
02/19/09 09:32
02/19/09 09:32
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
use fps_max wink and time_step of course smile


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1