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 / Help with sidescrolling character control

Author
Message
Almus
12
Years of Service
User Offline
Joined: 27th Aug 2011
Location: Brasil
Posted: 22nd Oct 2011 21:01
i want to make a sidescrolling game, it is possible to control my char using box2d?, i am trying to control using force but my char dont move correctly, and using impulse to make him jump, anyone have tried?
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 23rd Oct 2011 03:35
Are you scrolling the background or moving the charactor you really dont say which. To scroll the background is quite easy just move it over. And to make something jump you can use a sprite sheet that looks like it is jumping. I don't know what you mean by impulse.

Go through yourself at a wall.
Almus
12
Years of Service
User Offline
Joined: 27th Aug 2011
Location: Brasil
Posted: 23rd Oct 2011 06:02
i am moving the character using box2d, like using force to push it and playing an walk animation, but its not very playable, im need some help, its a game like mario bros , if you have some sugestions , thanks.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 23rd Oct 2011 12:21
Skip box 2d and move it by changing its position instead.

Check the space shooter sample for how its done.
bjadams
AGK Backer
15
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 23rd Oct 2011 22:10
Box2d does not give you much control. Its good for "open worlds" type of games
Almus
12
Years of Service
User Offline
Joined: 27th Aug 2011
Location: Brasil
Posted: 24th Oct 2011 03:08
yeah, i am using kinematic mode, i have full control of my character sprite and i can move other dynamic objects , i have only one problem, i am trying to create a gravity effect on my character with setspritey command, its going very well except for detect collision with my game level, i am using GetPhysicsCollision( iSprite1, iSprite2 ) but i need to check every individual sprites, there is a way to check if my object has collided with anything in the game to stop my char moving down.
Almus
12
Years of Service
User Offline
Joined: 27th Aug 2011
Location: Brasil
Posted: 27th Oct 2011 18:51 Edited at: 27th Oct 2011 20:04
hi,I made this little code based on a tutorial I found on the internet about 2d character jump and run, ive tried to implement it in agk, my character jump very well except for one thing, after the first jump my char gets overlaped in the scene. here is my code, if someone show me the error will be grateful. thanks

obs: no media required, if someone can compile to see,

Login to post a reply

Server time is: 2024-03-28 15:58:13
Your offset time is: 2024-03-28 15:58:13