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!

Antti



Registered
  28/06/2003
Points
  8
29th June, 2003 at 13:42:26 -

Yeah I got it... FALLING is not down, its DOWN + LEFT/RIGHT and JUMPING is not up, its UP + LEFT/RIGHT. =

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

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
4th July, 2003 at 09:26:24 -

hy stupid guys that makes everything uneccesary hard just check if the chars. animation is jumping or falling!(no offence)

 
Beware of life ...so far noone have survived it.......

Daniel[Crazy_Productions]

Possibly Insane

Registered
  29/12/2002
Points
  2505
4th July, 2003 at 09:28:47 -

oh! and the only tip that works in this post is rpg player 2003's (but you should detect if the player is falling while the detector collides with the enemy)

 
Beware of life ...so far noone have survived it.......

RPG Player 2003



Registered
  27/06/2003
Points
  248
4th July, 2003 at 17:43:05 -

I still think that my theory is better, cause if you're falling you can hit from everywhere : left, right and maybe even down!!!

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

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

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
4th July, 2003 at 19:51:41 -

i could make an engine in 5 minutes.
wait here.

 
.

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
4th July, 2003 at 20:35:12 -

here you go!

http://www.geocities.com/alcpcemu/tutbo own.zip
its only 7k and very basic graphically but it does what you ask i hope

 
.

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
4th July, 2003 at 20:37:22 -

what the hell happened to that post!?

http://www.geocities.com/alcpcemu/tutbo own.zip

is the link

 
.

LegendaryMMSX



Registered
  05/07/2002
Points
  165
4th July, 2003 at 21:24:59 -

hey..your link thing has taken over your post.

For decideing directions I use flags.......but not that many people here like flags . Sometimes I use hidden counters for deciding left and right.

Ok....im lost now... what do you mean falling is not down.......are you talking about the direction of the animation, or the animation itself?


 
Im the RTS and TBS coder. Expect some games to come out from me later after I finish my Engine tests.
PS: Dont expect the best graphics.

LegendaryMMSX



Registered
  05/07/2002
Points
  165
4th July, 2003 at 21:27:36 -

Oh i see.......never mind that post....I had to re read it a couple of times

 
Im the RTS and TBS coder. Expect some games to come out from me later after I finish my Engine tests.
PS: Dont expect the best graphics.
   

Post Reply



 



Advertisement

Worth A Click