Page 1 of 1

ActorResource or duplicate ActorLife?

Posted: Tue Jul 13, 2010 7:56 pm
by yufra
I am developing a module based loosely on Zombieland and Fallout and one of the game concepts is "viral load" (VL), the amount of zombifying virus in an Actor. I initially coded VL as an ActorResource, but a zombie attack will give both physical (HP) and viral (VL) damage, and once the VL gets too high the Actor will "die." This started me thinking that VL would benefit from being a modified ActorLife and have since created a mod.class.interface.ActorLife for implementing this behavior. Has anyone else dealt with two variables handling life/death, or have thoughts on my implementation? Thanks!

Re: ActorResource or duplicate ActorLife?

Posted: Tue Jul 13, 2010 7:59 pm
by darkgod
IMO it really depends on the needed complexity of it.
In ToME I have air level as a ressource because even though you can die from it it's rare and the process is simple.

Both methods are valid :)

Re: ActorResource or duplicate ActorLife?

Posted: Tue Jul 13, 2010 7:59 pm
by darkgod
Oh and welcome to TE4 ! :)

A zombie fallout ? That sounds neat :)

Re: ActorResource or duplicate ActorLife?

Posted: Tue Jul 13, 2010 8:11 pm
by yufra
Thank you DG for such a great engine! I originally started writing this game using libtcod, but at the time there were issues with my main development platform (Mac) and my main development language (Python). I started playing through ToME 4 and thought "why not learn Lua?" I admit it is still a little confusing to me. :)

I hadn't thought about looking at the air resource in ToME. I will take a look at that, thanks!

P.S. I posted a few short patches (http://forum.t-o-m-e.net/viewtopic.php?p=86143#p86143), and just wanted to give another plug for color-blind friendly colors. :D