ActorResource or duplicate ActorLife?

If you have a module that you'd like comments on or would like to know how to create your very own module, post here

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

ActorResource or duplicate ActorLife?

#1 Post 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!
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: ActorResource or duplicate ActorLife?

#2 Post 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 :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: ActorResource or duplicate ActorLife?

#3 Post by darkgod »

Oh and welcome to TE4 ! :)

A zombie fallout ? That sounds neat :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: ActorResource or duplicate ActorLife?

#4 Post 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
<DarkGod> lets say it's intended

Post Reply