0

Hello,

I have created a game in java and I would like to insert enemies. For now I placed them on plaftforms that I made invisible.

How can I have the enemy on its own?

4
Contributors
5
Replies
7
Views
4 Years
Discussion Span
Last Post by london-G
Featured Replies
  • and after would be collision detection with the platforms when it detects the position of a platform it should stop the downward motion a good example for this is a mario game though deprecated here's a good example/tutorial I used as a base for my game a long time ago … Read More

0

I have ... no idea whatsoever you are talking about.
what do you mean by 'placed them on platforms'. also, if you've already placed them on platforms, doesn't that imply your enemy is on its own platform?

please elaborate a bit more.

0

I assume you have variables for its position and velocity that you update at regular intervals (Swing Timer) - in which case just add a fixed amount to the (downwards) vertical velocity component on each update. This will result in the downwards speed increasing steadily - just like g.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.