So how would I program sliding and jumping

For questions about using Classic.

Post » Thu Apr 23, 2009 10:23 pm

Could someone explain to me how to program in sliding and jumping in a platformer
So far I've tried making it move towards .angle when you release the key but that doesn't really work and I can't figure out jumping at all
B
1
G
3
Posts: 6
Reputation: 837

Post » Fri Apr 24, 2009 4:25 am

What's wrong with the Platform object? It does jumping automatically, and sliding could be done easily by changing the deceleration settings when you press the slide button, and changing it back when the slide is over.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Apr 24, 2009 4:44 am

[quote="deadeye":2eui30vc]What's wrong with the Platform object? It does jumping automatically, and sliding could be done easily by changing the deceleration settings when you press the slide button, and changing it back when the slide is over.[/quote:2eui30vc]
I dunno, I feel like I'm cheating when I make things using it.
B
1
G
3
Posts: 6
Reputation: 837

Post » Fri Apr 24, 2009 4:52 am

Well, don't. It's there for a reason. There is no sense in trying to reinvent the wheel, and there's no shame in using the tools that have been made available to you. The default Platform Behavior is very customizable, it should be able to do what you want for the most part.

And I would suggest that by the time you're done modding the basic Platform Behavior to do what you need (and you will) then you will probably have enough experience to tackle making a 100% custom engine if you still feel like it. Doing a custom platform engine in Construct probably (definitely) isn't a good first project, start smaller.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Apr 24, 2009 5:01 am

[quote="deadeye":3jpp66je]Well, don't. It's there for a reason. There is no sense in trying to reinvent the wheel, and there's no shame in using the tools that have been made available to you. The default Platform Behavior is very customizable, it should be able to do what you want for the most part.

And I would suggest that by the time you're done modding the basic Platform Behavior to do what you need (and you will) then you will probably have enough experience to tackle making a 100% custom engine if you still feel like it. Doing a custom platform engine in Construct probably (definitely) isn't a good first project, start smaller.[/quote:3jpp66je]
It's not really my first project, and some of the crap in my game is going to be really hard to do using the built in behavior.
B
1
G
3
Posts: 6
Reputation: 837

Post » Fri Apr 24, 2009 5:20 am

If you don't know how to solve the simple basics of a platformer, then man you're not yet ready making your own engine.. start small. because when you start big you never finish anything
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Fri Apr 24, 2009 9:06 am

[quote="AstroZombie":3r2dvs2c]It's not really my first project[/quote:3r2dvs2c]

Okay, fair enough. You can set the X and Y positions of a sprite like you would in any other game maker or programming language. They're basic actions.

You can test for overlap with the Overlap condition so you can push your player out of solids with a loop. And you can use a private variable that changes acceleration value over time to add or subtract how many pixels per cycle you should be moving your player sprite when jumping. And since you've made other projects before, I'm sure you'll have no problem translating that knowledge to Construct once you're more familiar with the interface. The methods and practices in Construct aren't any different than other game making tools... it's just a difference in "syntax," so to speak.

And though hero_bash might sound a little blunt, he's right... if you can't work out how to make a simple jump, then whatever else you need to do that "is going to be really hard to do using the built in behavior" is going to be a little out of your league at the moment.

I would recommend taking some tutorials and looking through other people's work in the uploads section so you can get a feel for the differences between Construct and whatever other environment it is that you're used to. Make some small games and experiments. Then go tackling your own custom engine if you want.

And when that time comes, you'll get a lot more help by posting your work and asking specific questions about what's wrong, rather than just asking general theory questions with no work to show.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Apr 24, 2009 11:14 am

[quote="deadeye":37se4c73][quote="AstroZombie":37se4c73]It's not really my first project[/quote:37se4c73]

Okay, fair enough. You can set the X and Y positions of a sprite like you would in any other game maker or programming language. They're basic actions.

You can test for overlap with the Overlap condition so you can push your player out of solids with a loop. And you can use a private variable that changes acceleration value over time to add or subtract how many pixels per cycle you should be moving your player sprite when jumping. And since you've made other projects before, I'm sure you'll have no problem translating that knowledge to Construct once you're more familiar with the interface. The methods and practices in Construct aren't any different than other game making tools... it's just a difference in "syntax," so to speak.

And though hero_bash might sound a little blunt, he's right... if you can't work out how to make a simple jump, then whatever else you need to do that "is going to be really hard to do using the built in behavior" is going to be a little out of your league at the moment.

I would recommend taking some tutorials and looking through other people's work in the uploads section so you can get a feel for the differences between Construct and whatever other environment it is that you're used to. Make some small games and experiments. Then go tackling your own custom engine if you want.

And when that time comes, you'll get a lot more help by posting your work and asking specific questions about what's wrong, rather than just asking general theory questions with no work to show.[/quote:37se4c73]
I've really never been able to figure out how to make jumping, so thanks. I never really put enough thought into it, I guess.
B
1
G
3
Posts: 6
Reputation: 837

Post » Fri Apr 24, 2009 11:50 am

if you cant really think of how to go about making a custom engine, you shouldnt be using/making one atm. the collision detection alone can be quite difficult. not to mention accel and decel
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Apr 24, 2009 4:58 pm

[quote="AstroZombie":987osn74]I've really never been able to figure out how to make jumping, so thanks. I never really put enough thought into it, I guess.[/quote:987osn74]

Then I'm kind of curious what other projects you've made before. You were a member at the Mario Fan Games Galaxy, yes? How was it that you made a Mario fan game without jumping?

Look, I'm not meaning to sound like an ass or anything here. It's apparent that you're new at this. As a beginner, you need to start off at a beginner's level. There's nothing wrong with that. Everyone has to start somewhere.

Go through the Ghost Shooter tutorial to get a feel for how Construct works. Then move on to my Platform School tutorial. Those will both give you a good, solid foundation to working with Construct. And when you're done with Platform School (or should I say... when I'm done :P), you should be able to make a Mario fan game. It is, after all, pretty much a template on how to make a Mario game. You can find the tutorials here: http://apps.sourceforge.net/mediawiki/c ... =Tutorials
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests