The Daily Click ::. Forums ::. Klik Coding Help ::. Two (easy?) problems with making a platform game =(
 

Post Reply  Post Oekaki 
 

Posted By Message

Antti



Registered
  28/06/2003
Points
  8
28th June, 2003 at 14:07:55 -

I have downloaded lots of platform examples and read lots of articles but can't still find answers for these problems. Maybe they are just too easy ones or then I'm just too noob =I

1. How can I make a "box" like in Super Mario (You can get mushroom to come by hitting the box with your head from down but nothing happens if you try it from up, left or right)?

2. How can I make enemies like in Super Mario (again) (You can kill them by hitting with your legs from up but if you try to hit from left, right or down, it kills you)

Thanks if you're kind enough to answer! And sorry my bad english =(

 
If it doesn't work, try it again... Image

RPG Player 2003



Registered
  27/06/2003
Points
  248
28th June, 2003 at 14:26:25 -

For both

Create a object that looks like a horizontal line ("head line") with the size of the head, and another one with a bit less than the size of the legs ("leg line"). The programming is simple...

Always - Set position of "head line" to top of "character" AND Set position of "leg line" to below character
If "head line" collides with "box" - Create "mushroom" at "box" AND Destroy "box"
If "leg line" collides with "enemy" - Destroy "enemy"
If "enemy" collides with player - Destroy player and remove 1 life...

You get it.

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Antti



Registered
  28/06/2003
Points
  8
28th June, 2003 at 14:58:55 -

Thanks a lot = I'll try it... and if it doesn't work I try it over and over again. I'm really thankful and happy that there is still kind people in internet.

 
If it doesn't work, try it again... Image

RPG Player 2003



Registered
  27/06/2003
Points
  248
28th June, 2003 at 15:06:08 -

There are still kind people in the net, they just want your money! But, direct to the point, MY POST IS ALL IN BOLD!!!

*will send suggestion about an Edit option at the boards*
*doesn't knows how to send suggestions*
*cries*

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Santa



Registered
  19/05/2003
Points
  644
29th June, 2003 at 01:16:49 -

That wouldnt quite work, you could be traveling in any direction and still that could colide with it.... you could do a jump over the enemy and still hit the enemy with the line at the base of your player.

Perhaps try adding another condition in saying if direction is dowm, or if direction is up in the case of the mario style box.

 
SAnTA - www.atnas.com

-------------------
www.create-games.com/download.asp?id=2918

Antti



Registered
  28/06/2003
Points
  8
29th June, 2003 at 03:28:44 -

Okay. I'll try it too = Thanks

 
If it doesn't work, try it again... Image

RPG Player 2003



Registered
  27/06/2003
Points
  248
29th June, 2003 at 04:20:24 -

Santa : That won't work as it will not detect if you're falling (down + left/right). And, about what you said, that's why I told him to make the bar a little smaller than the legs.

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Antti



Registered
  28/06/2003
Points
  8
29th June, 2003 at 05:37:45 -

RPG Player 2003's tip works = From now on my game will be much better.

 
If it doesn't work, try it again... Image

Santa



Registered
  19/05/2003
Points
  644
29th June, 2003 at 05:46:31 -

hehe.... as my profile sugests Rating: Rookie Member lmao sorry

 
SAnTA - www.atnas.com

-------------------
www.create-games.com/download.asp?id=2918

Antti



Registered
  28/06/2003
Points
  8
29th June, 2003 at 06:46:58 -

No problem. Thanks for trying to help =

 
If it doesn't work, try it again... Image

RPG Player 2003



Registered
  27/06/2003
Points
  248
29th June, 2003 at 07:10:02 -

Santa : Rookie Member? At least you're better than Antti and me (Newbies)... Maybe I just have a bit more experience with Games Factory...

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2722
29th June, 2003 at 07:26:21 -

or in general we say, you know how to fix problems.

And i am sure i would have something suggested like:

while you're character in the air is jumping and his direction is up then something can pop up from the box.

and the opposite for the leggy thing,
falling instead of jumping and down instead of up.

If you've a custom movement, it's very easy to implement
this speudo code
(which means: it's telling what kind of code you need
and it's up to to you to write the code).

 
Image jenswa.neocities.org

Antti



Registered
  28/06/2003
Points
  8
29th June, 2003 at 07:43:21 -

Thanks for that tip too =D

 
If it doesn't work, try it again... Image

Antti



Registered
  28/06/2003
Points
  8
29th June, 2003 at 07:47:19 -

Or wait a minute... are you sure that the tip works? I mean if you do so doesn't it make the mushroom come out from the box even though you hit it from left or right (You are on air and your direction is up).

 
If it doesn't work, try it again... Image

RPG Player 2003



Registered
  27/06/2003
Points
  248
29th June, 2003 at 10:05:00 -

Thinking about what Jenswa said : Do you have a Custom Movement Engine? If not, then this method isn't good. And, how many times should I say, FALLING is not down, its down + left/right and JUMPING is not up, its up + left/right, so you must put many directions in it and it will turn into a pain, you will get crazy, get a pistol and shot your head fifty seven times. Got it?

 
"I see", said the blind men to his deaf wife.

Beware of the grass, don't step on the dog!
   

Post Reply



 



Advertisement

Worth A Click