views:

311

answers:

6

Related to my question here but not enough to open a new question.

I wanted to make a good tower defense game and found this site. I saw math in it and made the mental leap that it was "game physics." Maybe it's not. I don't know. I was hoping someone could tell me. If it is not what kind of game programming is it? Just math you have to know for angles and what not (they have a tutorial here.) Is this 2d game mechanics/physics?

I know nothing about the site. Just one that game up in google.

Thank you again.

A: 

No, it's trigonometry.

Domenic
+2  A: 

The first link is not physics at all; all he's doing is writing code to move triangles along a path with waypoints; the triangles are defined to move along that set path at constant velocity, and they do not interact with the world in any way. The tutorial has some trigonometry in it that is necessary for doing game physics, and you could even say that the bouncing ball demo is a simulator for perfectly-elastic collisions. However, perfectly-elastic collisions between spheres and planes is arguably one of the simplest of many interactions you'll need to model in any reasonably-interesting game.

Matt J
A: 

You can not write any game without this kind of math (trigonometry) and this much of physics to calculate collision impacts, direction changes and other simple things.

A physics based game is one like the World of Goo or like the stuff available at Physics Games where the outcome of player actions is complex physics systems.

So this does not qualify for a physics game.

TheVillageIdiot
A: 

If you don't have to do integrals and partial derivatives, then it's not worth calling 'physics' :-p

fortran
A: 

As I know Tower Defence, the enemies have "planned paths" and I believe what you need for this type of game is Game-LOGIC - not physics.

It's an interesting question though, because a "ball bouncing" can be made with simple "reverse velocity when border hit" and gravity is just a small amount of "directional speed" on your object. This could give you both gravity and wind like effects.

So what you COULD do was to invent a Tower Defence WITH physics... or something that felt like physiscs. That could be interesting. That also means that the objects should have collisions and perhaps move outside the pathways.

But to answer your question: no physics engine should not be needed to make a simple Tower Defence.

BerggreenDK
A: 

Physics is about how objects behave in the real world. Game physics is about making objects in the game behave in a way similar to how they would in the real world.

A few examples of what could reasonably be called physics would be making any of the following look reasonable or match intuition:

  • an object floating through space
  • a collision between a large and small object
  • a bouncing ball
  • a car applies it's brakes
  • a wall accrues damage when impacted
  • a tree or building is damaged at the base and falls
  • almost anything with wind or water or fire

The game you mention has very little physics.

tom10