Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / move view with Player move

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 10th Aug 2014 10:14 Edited at: 10th Aug 2014 11:49
Hi.

I want move view when the Player move to left or right. how can do it?

I wrote this code but need better control.

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 10th Aug 2014 14:04



Hope the comments in the code are sufficient to explain what's going on

My hovercraft is full of eels
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 10th Aug 2014 14:51 Edited at: 10th Aug 2014 14:52
Thanks, but there is 2 Problems:

1- Player speed is fastest than view.I need move and stop together.
2- there is left side block at Front left ground.like attached Picture.

Attachments

Login to view attachments
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 10th Aug 2014 21:06 Edited at: 10th Aug 2014 21:15
Yes. The slower camera was an example of how to move the view offset.
Thus:
// set "wayToAdjustView" to "1" for a direct way - set to "2" to have a more fluid camera movement

Turn setPhysicsDebugOn() to see what's in the way, and figure it out

Edit:

Ok I fixed the camera movement a bit, one line added:







I don't understand problem number two, if what you want is a wall on the left or that there is one present that you don't want.

The floor I made was just an example so you can see the view move. You can have whatever you want there.

But since you are moving the view offset, the top/bottom/left/right barriers are not present any longer.

My hovercraft is full of eels
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 12th Aug 2014 18:12
Why Work with AppGameKit is very very hard? for use this Engine should 're Too professional programmer.

I know a little Programming but AppGameKit Programming is very hard, even developers can give good code.I wasted my money
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 12th Aug 2014 18:24
mkay

My hovercraft is full of eels
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 14th Aug 2014 09:16
Just dawned on me that you might believe the title "AGK Developer" over by the avatar means people who have that title develop AGK.

They don't, I don't. All it means is they have released something with AGK.

AGK programming is quite easy in my opinion, at least if you don't have formal training, in that case it might be limiting and annoying at times.

My hovercraft is full of eels
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 14th Aug 2014 22:10
I want make a platform game, but all thing is hard and can't make any game.

Login to post a reply

Server time is: 2024-04-25 09:13:29
Your offset time is: 2024-04-25 09:13:29