a way to have no lag in screen when following main character

For problems with creating games or for reporting bugs of the Tool.
User avatar
theswitch
PaC-DK Newby
Posts: 41
Joined: 11 Apr 2007, 15:50
Location: north of Toronto

a way to have no lag in screen when following main character

Post: #75565 theswitch
09 Apr 2010, 13:32

I am useing grid movement for my character useing keyboard and was wondering if their is a setting to turn off the screen lag when my character instantly moves from once step/grid to another, as I have made him do this, I would like it like to have the screen ALSO jump instantly to follow in some sort of sync, as right now it has a kind of acceleration deacceleration funtion buit into the screen code or what not

is this possible, yea it may sound a bit unclear.

by the way I still love this app, it is very well designed, yes coming from an amiture of engineering I guess

User avatar
Baelavay
PaC-DK God
Posts: 1168
Joined: 04 Jun 2006, 19:24
Contact:

Post: #75582 Baelavay
09 Apr 2010, 18:28

I think the reason for the snatchy look of the walking is the function you have scripted the keyboard control in. The buttons are queried from walkmap field to walkmap field. When the character has stepped to the next field, it is queried if a button is hit and if so, the next step is done. This causes the lag you described, I guess. What you needed to script is: When a button is pressed, the character starts walking into that direction until the button is released again. Instead of querying the buttons from walkmap field to walkmap field.

How that's done? There is a on(release) for the mouse, but not for keyboard buttons, so I don't know. There's if_keypressed(), maybe ifnot_keypressed() parallels key released. Then you could make your character start walking on if_keydown() and stop on ifnot_keypressed() via script.

User avatar
theswitch
PaC-DK Newby
Posts: 41
Joined: 11 Apr 2007, 15:50
Location: north of Toronto

Post: #75612 theswitch
13 Apr 2010, 05:42

sorry for no update, yea I solved my problem, their is a simple command to change scroll-rate for the screen

I also played with creating a screen change system like 2D Zelda series, as my game is topdown view

User avatar
Baelavay
PaC-DK God
Posts: 1168
Joined: 04 Jun 2006, 19:24
Contact:

Post: #75615 Baelavay
13 Apr 2010, 15:27

Oh, I didn't see the only problem you had was the camera not moving smoothly.


Return to “Problems and Bugs”

Who is online

Users browsing this forum: No registered users and 1 guest