[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-devel] Map moving objects control
From: |
Alexandre Courbot |
Subject: |
[Adonthell-devel] Map moving objects control |
Date: |
13 Mar 2002 12:03:08 +0100 |
I'd like some comments on the map moving objects control scheme I plan
to implement.
As you know, moving objects can move in any direction. North, East,
West, South, but also NE, SE, NW, SW, and also any other direction -
this makes controlling as we used to do (go_north(), go_south(), ...)
impossible.
The method map_moving::move would take 2 floats as arguments: the x and
y velocity. a move(-1.0, 0.0) would make your object move 1 pixel left
per cycle, move(1.0, 1.0) would move your object to SE, and of course
you could come with weird combinaisons like move(1.0, 0.2).
For characters, who have a limited speed, this function would be
overloaded to block them to their maximum speed.
This method seems to me to be the most usuable. It allows moves to any
direction, but of course, is less handy than go_left() and so on. What
do you think about this?
Alex.
--
http://www.gnurou.org
- [Adonthell-devel] Map moving objects control,
Alexandre Courbot <=