dev-zzo / Spritesse

The Unlicense
0 stars 0 forks source link

Physical interactions #2

Closed dev-zzo closed 8 years ago

dev-zzo commented 8 years ago

PC needs to be restricted to certain parts of the location. Implement semi-physical collision model.

dev-zzo commented 8 years ago

Requirements... what do we want?

  1. Test whether a PC can move into the desired direction; gather any objects found within the test shape. 1.1. PCs taking damage from shots?
  2. NPCs use it to navigate the world; same as above as for API. 2.1. Provide API to enable path finding for NPCs.
  3. Triggers to execute a scripted event.

These 3 should cover all the major physical interactions with the world.

dev-zzo commented 8 years ago

Approach 1: tile based.

We remain devoted to our tiles: the physical model is based on a rectangular array with each tile marked as passable or otherwise.

Pros:

Cons:

dev-zzo commented 8 years ago

Approach 2: geometry based.

We represent each obstacle as a geometric shape (say, either a circle or an axis-aligned box), and use that information to do tests.

Pros:

Cons:

dev-zzo commented 8 years ago

Moving all the stuff to a wiki page.

dev-zzo commented 8 years ago

Well, this seems to be implemented.