Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enemies and AI hooks #16

Open
mdkess opened this issue Apr 13, 2012 · 0 comments
Open

Add enemies and AI hooks #16

mdkess opened this issue Apr 13, 2012 · 0 comments
Milestone

Comments

@mdkess
Copy link
Owner

mdkess commented Apr 13, 2012

Naturally, any good game needs a solid dose of murder. The goal of this ticket is to facilitate it.

My idea for managing this was to have three separate parts:

  1. GameEntities. Eventually these will be moved to be called PhysicalEntities. These represent an object's physical state - mass, velocity, forces, etc.
  2. InputHandlers. These are given a PhysicalEntity, and their job is to manipulate the physical entity's state (by applying forces, for example) based on their internal logic. A user input handler would translate buttons/touch events into forces. An AI input handler would use its internal logic to update the physical state. Which leads us to...
  3. Sensors. This is how InputHandlers see the world. Sensors can be anything from keyboard/mouse/touch sensors (in the case of a human input handler) to rays or pressure points that the AI can see the world through. Thus, the AI can use its sensors to query the state of the world.
mdkess added a commit that referenced this issue May 8, 2012
Added double jump - the player can now jump twice! I reduced jump height
though, so it's more reasonable. Fixes #3.

Fixed the trigger system that I broke. Fixes #23.

Added simple enemies - the most basic AI walks in a straight line,
changing direction when it touches a wall. Refs #16.

Added a simple weapon/projectile system. As is par for the course,
everything explodes when things get touched. Fixes #13. I also changed the
interact button's behavior so that it acts as an attack button if there is
nothing to be interacted with. Lots more can be done here, refs #27.

Did a bit of code cleanup, but lots of work remains to be done here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant