An AGS platformer (MariVania)

Started by Calin Leafshade, Wed 04/11/2009 15:26:40

Previous topic - Next topic

Crimson Wizard

Quote from: Calin Leafshade on Sat 07/11/2009 17:22:25
Im toying with the idea of making it an entry for this months MAGS.
Heh, good luck with that, you are doing really good progress ;) It would be nice to see something uncommon on MAGS.
(I was thinking about making a turn-based strategy for "Breaking in" MAGS, but then decided to postpone this crazy idea  :D)


Guyserman82

Can't wait for the source code on this.

Calin Leafshade

Oh yeah!

Sorry, slipped my mind. I'll up it in an hour or soe after cleaning it up.

Calin Leafshade

#64
i release this on the condition that neither Monkey nor Khris download it.. they will shout at me for very very messy coding.

I cant 100% remember how the code works but if there are any parts which you dont quite understand just post and i'll see if i can help.

I wouldnt recommend using this as a base but rather an idea on how platformers work

http://www.thethoughtradar.com/AGS/PlatformerSrc.zip

Guyserman82

Okay, quick question: I wanted to put a platforming minigame in my next game, but I can't figure out how to get gravity to work in a room. I think I've taken everything out of the global script that I took out of the room script, and the one with the global script still works. Any ideas?

Calin Leafshade

Im not 100% sure what you mean. Do you mean you only want gravity to work in certain rooms?

The gravity part of the code is very very simple. Movement itself is not difficult. The difficult part in AGS is the damn collision detection.

The gravity literally works like this:

1)set the player acceleration to whatever input is require (jumping, running etc)
2)set the vertical acceleration to the input (jumping usually, which would be a negative force remember) plus the effects of gravity (which would be a positive force).
3)once the player has left the ground the effects of the jumping force would no longer be there so now we just set the vertical acceleration to whatever gravity is and allow that to chip away at the players vertical speed until it becomes positive and then the player will begin to fall.

Guyserman82

Quote from: Calin Leafshade on Mon 08/02/2010 01:54:46
Im not 100% sure what you mean. Do you mean you only want gravity to work in certain rooms?

The gravity part of the code is very very simple. Movement itself is not difficult. The difficult part in AGS is the damn collision detection.

The gravity literally works like this:

1)set the player acceleration to whatever input is require (jumping, running etc)
2)set the vertical acceleration to the input (jumping usually, which would be a negative force remember) plus the effects of gravity (which would be a positive force).
3)once the player has left the ground the effects of the jumping force would no longer be there so now we just set the vertical acceleration to whatever gravity is and allow that to chip away at the players vertical speed until it becomes positive and then the player will begin to fall.
Just to clarify: I copied all code from your global script into my room script. There were parts of my room script that didn't apply, so I removed them (I need no enemies, and no particles). Once I got the original script modified to the point so that the game could run it, gravity wasn't working. Any idea as to why?

SinSin

Only just spotted this thread    CALIN LEAFSHADE =  force to be reckoned with   good job dude ;D
Currently working on a project!

SMF spam blocked by CleanTalk