External Exam Download Resources Web Applications Games Recycle Bin

Objects - Creation, Movement & Collision


Objects = templates (or blueprints) for instances (i.e. repeated spawns)

Create new object

Movement
#
Create
when object is instantiated (i.e. spawned), for example centering my object in the middle of the room: #
Collision
when one object touches another - for example, stopping when i hit a wall: #
Step
a loop that runs constantly (every step or moment), good for checking health (for example). note the chase action in the following step event picture, using the x and y position of my hero for the enemy to chase: #
Challenges
  1. Add a human object that i can best control with my arrow keys
  2. Add a vehicle object that uses relative speed that i can control with my WASD keys
  3. Add a collision detection with walls for both objects, so that both objects stop at barriers