Source changes or doable with stock build?
by Sean Brockest · in Torque Game Engine · 02/27/2007 (9:02 pm) · 10 replies
Here's some ideas i need to mull over before too long. What i need to know is if you guys can concieve of a way to do these without source changes. If not, that's no biggy, i just have to prioritize differently.
1) give trees a "health" variable, which can be modified by environmental changes (being attacked). I dont actually need it visible, the game just has to be able to use the value, similarly to the way it uses the "scale" to show it's size.
2) Allow players to cut down trees. Now, there's a double question in this one. if i wanted players to be able to dynamicaly create and destroy objects that would normally be "static" shapes, should i have the trees data stored in an SQL database, and have them generated by torquescript, or is there a way to keep them as static objects?
actually, it's late, and this is all i can think of right now.
1) give trees a "health" variable, which can be modified by environmental changes (being attacked). I dont actually need it visible, the game just has to be able to use the value, similarly to the way it uses the "scale" to show it's size.
2) Allow players to cut down trees. Now, there's a double question in this one. if i wanted players to be able to dynamicaly create and destroy objects that would normally be "static" shapes, should i have the trees data stored in an SQL database, and have them generated by torquescript, or is there a way to keep them as static objects?
actually, it's late, and this is all i can think of right now.
#2
2) Even though an object may be "static" doesn't mean it can't animate. you could simply attach an animation to the tree simulating the tree being cut down.
02/27/2007 (11:52 pm)
1) Cake.2) Even though an object may be "static" doesn't mean it can't animate. you could simply attach an animation to the tree simulating the tree being cut down.
#3
You can use SimGroups/Sets and save them out to disk when you're done, much like a (very) simple database.
02/28/2007 (2:12 am)
2) You can do this in script if you like, but I guess it depends on how you feel with digging into the source. As you said, you might have to prioritize differently.You can use SimGroups/Sets and save them out to disk when you're done, much like a (very) simple database.
#4
02/28/2007 (8:18 am)
.
#5
Seems that 2 is the point of most discussion. Here's how the system will work.
In the game, players (MMO players) will have the ability to cut down trees. This will be done by "attacking" (cutting using a skill while having a specific item equiped) the trees till the health equals 0. Should the player stop cutting before it falls, the tree will regenerate it's own health over time.
Assuming a tree is at full health, on a "tick" (probably every X minutes) the tree will Grow. This will be in the orders of .001 scale at a time, so as to never be noticed. If the tree grew by +.001 +.001 +.001 (xyz) every X minutes, it would reach full size in X days. The larger the tree when cut down, the more wood it yields. Now, if a "tick" happens when the tree is damaged (not at full health), it will regen some health instead of growing, then continue growth when full.
Now, should a player cut down a tree, i figure i'l replace the tree with a model of a stump (erasing it eventualy), and generate a new object nearby of a cut down tree. This new cut down tree model will behave differently, as the players will actually be able to do other things to it (still working on that part of the skill system)
Anyway, the reason i had thought of doing it with SQL was for the faster and dynamic access. While fully possible to do all that through flat files on the server, i just thought SQL would be better in the long run (organization)
The next task i get to attack is how to get the tree data to the players on a dynamic front. Here's some ideas.
1) Code a paging system, so that the player is only informed of a trees scale update if they're near it. Otherwise they see the tree as the same size the entire time they're in the zone. Shouldn't be a problem, if a player is in a zone for more than a few hours, without moving around it... shouldnt happen.
2) The other option is to feed the player dynamic changes to the trees. If they all "ticked" at the same time, and the client already has the current data on the trees, the client could process the tick themself.
3) the other option is to only update the client on the size of the tree when they enter the zone, or when they target a tree to cut it down. Unless the growth of the tree is quite fast (and it wont be), it shouldn't change much over a players time in the zone.
I'm open to any ideas you have.
02/28/2007 (8:22 pm)
Thank you all so much, you've got WAY above and beyond what i asked.Seems that 2 is the point of most discussion. Here's how the system will work.
In the game, players (MMO players) will have the ability to cut down trees. This will be done by "attacking" (cutting using a skill while having a specific item equiped) the trees till the health equals 0. Should the player stop cutting before it falls, the tree will regenerate it's own health over time.
Assuming a tree is at full health, on a "tick" (probably every X minutes) the tree will Grow. This will be in the orders of .001 scale at a time, so as to never be noticed. If the tree grew by +.001 +.001 +.001 (xyz) every X minutes, it would reach full size in X days. The larger the tree when cut down, the more wood it yields. Now, if a "tick" happens when the tree is damaged (not at full health), it will regen some health instead of growing, then continue growth when full.
Now, should a player cut down a tree, i figure i'l replace the tree with a model of a stump (erasing it eventualy), and generate a new object nearby of a cut down tree. This new cut down tree model will behave differently, as the players will actually be able to do other things to it (still working on that part of the skill system)
Anyway, the reason i had thought of doing it with SQL was for the faster and dynamic access. While fully possible to do all that through flat files on the server, i just thought SQL would be better in the long run (organization)
The next task i get to attack is how to get the tree data to the players on a dynamic front. Here's some ideas.
1) Code a paging system, so that the player is only informed of a trees scale update if they're near it. Otherwise they see the tree as the same size the entire time they're in the zone. Shouldn't be a problem, if a player is in a zone for more than a few hours, without moving around it... shouldnt happen.
2) The other option is to feed the player dynamic changes to the trees. If they all "ticked" at the same time, and the client already has the current data on the trees, the client could process the tick themself.
3) the other option is to only update the client on the size of the tree when they enter the zone, or when they target a tree to cut it down. Unless the growth of the tree is quite fast (and it wont be), it shouldn't change much over a players time in the zone.
I'm open to any ideas you have.
#6
02/28/2007 (10:43 pm)
.
#7
I'm not so worried about the tree showing it's damage, that part isn't really a big issue for me. MOST often, a player who starts cutting down a tree will finish the job. I just need the provision of self healing in there so that if someone does do a lot of damage, and get's distracted, we dont have some unknowing player walking around thinking he's GOD because he took one swing at a tree, 8 days later, and it fell down.
I've already got the trees i'm going to be using in the game. I've tested them from .1 scale to 3.0 scale, and they actually work out pretty well. I've got some work to do, but as far as their growth cycle, it will work on the level i need it to.
02/28/2007 (10:57 pm)
You asked why i'm interested in tree damaging. I'm not really, but it's a part of a bigger picture. I'm designing a very rich, complex, culturally based MMO, where the players will have the ability to cut down, and eventually regrow, the trees in thier world. Wood is and always will be a very necesary resource, and i want to make sure i keep plans for it all the way through.I'm not so worried about the tree showing it's damage, that part isn't really a big issue for me. MOST often, a player who starts cutting down a tree will finish the job. I just need the provision of self healing in there so that if someone does do a lot of damage, and get's distracted, we dont have some unknowing player walking around thinking he's GOD because he took one swing at a tree, 8 days later, and it fell down.
I've already got the trees i'm going to be using in the game. I've tested them from .1 scale to 3.0 scale, and they actually work out pretty well. I've got some work to do, but as far as their growth cycle, it will work on the level i need it to.
#8
03/01/2007 (7:00 am)
.
#9
03/01/2007 (7:41 am)
That certainly would be an interesting thing to try. Would add a certain definition to the game. And if i understand correctly, i could link it directly to the fall of the health value, so the client could render the entire "breaking" and "falling" animation on it's own.
#10
03/01/2007 (3:54 pm)
.
Torque Owner Tim Heldna
2) Source code alterations required. Personally I don't see the need to hook up to an SQL database.