From: Christoph Sommer Date: Fri, 31 Mar 2006 01:41:15 +0000 (+0000) Subject: New Badguy "Will-O-Wisp": eerie light that tracks Tux and warps him to another spawnpoint X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=37f90b08b22c730ef1cd699ceb603595b7b7a716;p=supertux.git New Badguy "Will-O-Wisp": eerie light that tracks Tux and warps him to another spawnpoint SVN-Revision: 3141 --- diff --git a/data/images/creatures/willowisp/idle-0.png b/data/images/creatures/willowisp/idle-0.png new file mode 100644 index 000000000..784e50a74 Binary files /dev/null and b/data/images/creatures/willowisp/idle-0.png differ diff --git a/data/images/creatures/willowisp/idle-1.png b/data/images/creatures/willowisp/idle-1.png new file mode 100644 index 000000000..9b9b90fcc Binary files /dev/null and b/data/images/creatures/willowisp/idle-1.png differ diff --git a/data/images/creatures/willowisp/idle-2.png b/data/images/creatures/willowisp/idle-2.png new file mode 100644 index 000000000..3fa2954c0 Binary files /dev/null and b/data/images/creatures/willowisp/idle-2.png differ diff --git a/data/images/creatures/willowisp/idle-3.png b/data/images/creatures/willowisp/idle-3.png new file mode 100644 index 000000000..69b7893f2 Binary files /dev/null and b/data/images/creatures/willowisp/idle-3.png differ diff --git a/data/images/creatures/willowisp/vanishing-0.png b/data/images/creatures/willowisp/vanishing-0.png new file mode 100644 index 000000000..784e50a74 Binary files /dev/null and b/data/images/creatures/willowisp/vanishing-0.png differ diff --git a/data/images/creatures/willowisp/vanishing-1.png b/data/images/creatures/willowisp/vanishing-1.png new file mode 100644 index 000000000..b69a0d54b Binary files /dev/null and b/data/images/creatures/willowisp/vanishing-1.png differ diff --git a/data/images/creatures/willowisp/vanishing-2.png b/data/images/creatures/willowisp/vanishing-2.png new file mode 100644 index 000000000..9ecdd0c97 Binary files /dev/null and b/data/images/creatures/willowisp/vanishing-2.png differ diff --git a/data/images/creatures/willowisp/vanishing-3.png b/data/images/creatures/willowisp/vanishing-3.png new file mode 100644 index 000000000..e964eb64b Binary files /dev/null and b/data/images/creatures/willowisp/vanishing-3.png differ diff --git a/data/images/creatures/willowisp/warping-0.png b/data/images/creatures/willowisp/warping-0.png new file mode 100644 index 000000000..784e50a74 Binary files /dev/null and b/data/images/creatures/willowisp/warping-0.png differ diff --git a/data/images/creatures/willowisp/warping-1.png b/data/images/creatures/willowisp/warping-1.png new file mode 100644 index 000000000..5f5ebdeba Binary files /dev/null and b/data/images/creatures/willowisp/warping-1.png differ diff --git a/data/images/creatures/willowisp/warping-2.png b/data/images/creatures/willowisp/warping-2.png new file mode 100644 index 000000000..a00c6440c Binary files /dev/null and b/data/images/creatures/willowisp/warping-2.png differ diff --git a/data/images/creatures/willowisp/warping-3.png b/data/images/creatures/willowisp/warping-3.png new file mode 100644 index 000000000..7e77c8579 Binary files /dev/null and b/data/images/creatures/willowisp/warping-3.png differ diff --git a/data/images/creatures/willowisp/warping-4.png b/data/images/creatures/willowisp/warping-4.png new file mode 100644 index 000000000..ff2ab45eb Binary files /dev/null and b/data/images/creatures/willowisp/warping-4.png differ diff --git a/data/images/creatures/willowisp/warping-5.png b/data/images/creatures/willowisp/warping-5.png new file mode 100644 index 000000000..9224aefe0 Binary files /dev/null and b/data/images/creatures/willowisp/warping-5.png differ diff --git a/data/images/creatures/willowisp/willowisp.sprite b/data/images/creatures/willowisp/willowisp.sprite new file mode 100644 index 000000000..b7a100c0c --- /dev/null +++ b/data/images/creatures/willowisp/willowisp.sprite @@ -0,0 +1,32 @@ +(supertux-sprite + (action + (name "idle") + (images + "idle-0.png" + "idle-1.png" + "idle-2.png" + "idle-3.png" + ) + ) + (action + (name "vanishing") + (images + "vanishing-0.png" + "vanishing-1.png" + "vanishing-2.png" + "vanishing-3.png" + ) + ) + (action + (name "warping") + (images + "warping-0.png" + "warping-1.png" + "warping-2.png" + "warping-3.png" + "warping-4.png" + "warping-5.png" + ) + ) + ) + diff --git a/data/images/creatures/willowisp/willowisp.xcf b/data/images/creatures/willowisp/willowisp.xcf new file mode 100644 index 000000000..e2ec78cd2 Binary files /dev/null and b/data/images/creatures/willowisp/willowisp.xcf differ diff --git a/data/levels/test/willowisp.stl b/data/levels/test/willowisp.stl new file mode 100644 index 000000000..c40d5dfe4 --- /dev/null +++ b/data/levels/test/willowisp.stl @@ -0,0 +1,139 @@ +;; Generated by Flexlay Editor +(supertux-level + (version 2) + (name (_ "WillOWisp Test")) + (author "Marek") + (sector + (name "main") + (gravity 10.000000) + (tilemap + (layer "background") + (solid #f) + (speed 1.000000) + (width 30) + (height 30) + (tiles + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + )) + (tilemap + (layer "interactive") + (solid #t) + (speed 1.000000) + (width 30) + (height 30) + (tiles + 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 0 0 0 61 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 61 61 61 61 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 + 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 + )) + (tilemap + (layer "foreground") + (solid #f) + (speed 1.000000) + (width 30) + (height 30) + (tiles + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + )) + (camera + (mode "normal") + ) + + (background + (image "images/background/forest1.jpg") + (speed 0.500000) + ) + + (willowisp (x 700) (y 600) (sector "main") (spawnpoint "wow1")) + (powerup (x 100) (y 700) (sprite "images/powerups/egg/egg.sprite")) + (spawnpoint (name "main") (x 40) (y 700)) + (spawnpoint (name "wow1") (x 600) (y 600)) + ) + ) + +;; EOF ;; diff --git a/src/badguy/willowisp.cpp b/src/badguy/willowisp.cpp new file mode 100644 index 000000000..00f0c748c --- /dev/null +++ b/src/badguy/willowisp.cpp @@ -0,0 +1,147 @@ +// $Id: willowisp.cpp 3117 2006-03-25 17:19:54Z sommer $ +// +// SuperTux - "Will-O-Wisp" Badguy +// Copyright (C) 2006 Christoph Sommer +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. +#include + +#include "willowisp.hpp" +#include "msg.hpp" +#include "game_session.hpp" + +static const float FLYSPEED = 64; /**< speed in px per second */ +static const float TRACK_RANGE = 384; /**< at what distance to start tracking the player */ +static const float VANISH_RANGE = 512; /**< at what distance to stop tracking and vanish */ + +WillOWisp::WillOWisp(const lisp::Lisp& reader) + : mystate(STATE_IDLE), target_sector("main"), target_spawnpoint("main"), soundSource(0) +{ + reader.get("x", start_position.x); + reader.get("y", start_position.y); + reader.get("sector", target_sector); + reader.get("spawnpoint", target_spawnpoint); + + bbox.set_size(32, 32); + sprite = sprite_manager->create("images/creatures/willowisp/willowisp.sprite"); + countMe = false; +} + +WillOWisp::~WillOWisp() +{ + delete soundSource; +} + +void +WillOWisp::write(lisp::Writer& writer) +{ + writer.start_list("willowisp"); + + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); + writer.write_string("sector", target_sector); + writer.write_string("spawnpoint", target_spawnpoint); + + writer.end_list("willowisp"); +} + +void +WillOWisp::active_update(float elapsed_time) +{ + Player* player = get_nearest_player(); + if (!player) return; + Vector p1 = this->get_pos() + (this->get_bbox().p2 - this->get_bbox().p1) / 2; + Vector p2 = player->get_pos() + (player->get_bbox().p2 - player->get_bbox().p1) / 2; + Vector dist = (p2 - p1); + + if (mystate == STATE_IDLE) { + if (dist.norm() <= TRACK_RANGE) { + mystate = STATE_TRACKING; + } + } + + if (mystate == STATE_TRACKING) { + if (dist.norm() <= VANISH_RANGE) { + Vector dir = dist.unit(); + movement = dir*elapsed_time*FLYSPEED; + } else { + mystate = STATE_VANISHING; + sprite->set_action("vanishing", 1); + } + soundSource->set_position(get_pos()); + } + + if (mystate == STATE_WARPING) { + if(sprite->animation_done()) { + remove_me(); + } + } + + if (mystate == STATE_VANISHING) { + if(sprite->animation_done()) { + remove_me(); + } + } + +} + +void +WillOWisp::activate() +{ + sprite->set_action("idle"); + + delete soundSource; + soundSource = sound_manager->create_sound_source("sounds/rain.wav"); + if(!soundSource) { + msg_warning("Couldn't start WillOWisp sound"); + return; + } + soundSource->set_position(get_pos()); + soundSource->set_looping(true); + soundSource->set_gain(2.0); + soundSource->set_reference_distance(32); + soundSource->play(); +} + +void +WillOWisp::deactivate() +{ + delete soundSource; + soundSource = 0; +} + +void +WillOWisp::kill_fall() +{ +} + +HitResponse +WillOWisp::collision_player(Player& player, const CollisionHit& ) { + if(player.is_invincible()) return ABORT_MOVE; + + if (mystate != STATE_TRACKING) return ABORT_MOVE; + + mystate = STATE_WARPING; + sprite->set_action("warping", 1); + + GameSession::current()->respawn(target_sector, target_spawnpoint); + sound_manager->play("sounds/warp.wav"); + + return CONTINUE; +} + +IMPLEMENT_FACTORY(WillOWisp, "willowisp") + diff --git a/src/badguy/willowisp.hpp b/src/badguy/willowisp.hpp new file mode 100644 index 000000000..fe15b32ed --- /dev/null +++ b/src/badguy/willowisp.hpp @@ -0,0 +1,55 @@ +// $Id: willowisp.hpp 2642 2005-06-26 13:38:53Z matzebraun $ +// +// SuperTux - "Will-O-Wisp" Badguy +// Copyright (C) 2006 Christoph Sommer +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. + +#ifndef __WILLOWISP_H__ +#define __WILLOWISP_H__ + +#include "badguy.hpp" + +class WillOWisp : public BadGuy +{ +public: + WillOWisp(const lisp::Lisp& reader); + ~WillOWisp(); + + void activate(); + void deactivate(); + + void write(lisp::Writer& write); + void active_update(float elapsed_time); + void kill_fall(); + +protected: + HitResponse collision_player(Player& player, const CollisionHit& hit); + +private: + enum MyState { + STATE_IDLE, STATE_TRACKING, STATE_VANISHING, STATE_WARPING + }; + MyState mystate; + + std::string target_sector; + std::string target_spawnpoint; + + SoundSource* soundSource; +}; + +#endif +