enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-devel] Yin-Yang Switch Stone


From: Ivan Wick
Subject: [Enigma-devel] Yin-Yang Switch Stone
Date: Tue, 10 Jun 2008 14:16:13 -0700

Developers,
I am working with level designer Ray Wick who had an idea for a "Yin-Yang Switch Stone," i.e. a stone which when hit switches player control between the black ball and the white ball in the same way as it-yinyang.  However, in the case of a yin-yang switch stone, the switch must be activated where it is on the map rather than allowing the player to carry it-yinyang in the inventory.

This idea could make for some new and interesting Enigma levels so I implemented it.  I couldn't find a way to do it purely by Lua-scripting level objects so I made some source code changes.

My first attempt was simply to add support in the YinYang Item's class (items.cc) for a "swap" message, so that it-yinyang could be activated in the level's Lua script by other level objects like a floor switch or switch stone.

My second attempt was to create a new subclass of the switch stone which called "player::SwapPlayers()" on actor_hit, in addition to otherwise being a fully functional switch stone.  I also put together artwork for this stone and added it to the Lua model scripts where needed.

Originally I was working against the released source code for version 1.01.  I was able to replicate the behavior from my first attempt above easily in the subversion trunk, however the code for switch stones has been re-factored since 1.01 and I wasn't sure how to proceed.

So a few of questions:
- What do you think of the new idea and how do the developers decide whether to integrate new game features like this?
- Is subclassing a switch stone the best way to implement this?  I would be glad to hear any other approaches and suggestions.  What about making it-yinyang respond to a "swap" message, should this be left in?
- If this feature is to be integrated, what is the best way to submit diffs (and artwork)?

Thanks,
Ivan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]