Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, 7th_zorro, alibaba), 913 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | chip programmers | 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