RPGWO Forums

General => RPGWO V4 / V5 => Topic started by: Mickey Kudlo on January 13, 2014, 02:05:16 pm

Title: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 13, 2014, 02:05:16 pm
I want to explain the animal/monster spawning changes in more detail since from the players in game perspective, nothing changed.

Before:
- all animals/monsters were in game at same time, walking around and interacting with the world and players
- each one was processed about once per second
- a 1000x1000 world had about 10 per sector so 5x5x10 = 250 entities, kinda low and hard to find anything at times
- realistic and suitable for a pure simulation world

Now:
- animal/monsters moved to a animal map that is 1/10 the size, so a 200x200 sector is 20x20
- they can move around the animal map and interact with each other and generally interact with the real world map
- when a player or NPC is near, they get moved from the animal map and placed normally in the world map
- when no player/npc is near, they get moved out of world and back into the animal map
- the animal map gets processed once per v-hour instead of once per real second, thus saving tons of CPU time
- if it gets killed then it does not resurrect or go back to animal map thus player/NPCs can wipe out a population in a v-day
- once per v-day, animal/monsters counted and added back to minimum level to animal map thus re-populating the world
- still keeps a relative simulation effect but greatly reduces CPU usage and allows 10-100 times more animal/monsters to be added
- the animal/monsters you run into are now waaaay more responsive... can't catch the rabbits anymore, darn it

Planned
- animal/monster in animal map can change the world map, like eating food, knocking trees/walls over, digging, stomping crops, whatever...
- more animal map interaction like reproducing, grouping (like a pack of wolves), home creation (like a rabbit burrow), etc

I do not plan to have NPCs be controlled by this code. They will still be in world all the time but now they will have more CPU cycles.
Hopefully, I will start working on NPCs this week.
I am still thinking about some kinda fast-forward world processing for NPCs so players come to a world that has some NPC buildings and structure.
Title: Re: V5 Animal/Monster Spawning
Post by: Mongo on January 14, 2014, 02:50:31 pm
Very interesting way of dealing with this. Can you give an example of how they interact with eachother on the animal map?
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 14, 2014, 03:31:02 pm
Very interesting way of dealing with this. Can you give an example of how they interact with eachother on the animal map?

Right now:
- Everything just roams around randomly on land/water spots that they are allowed on. Like loken stay on water and rats on land.
- Rabbits will run to home spot if anything else comes close. When home they can't be killed but I haven't coded combat on the animal map yet.

That is all I have coded so far. Just getting the basics coded took a lot of work but it seems stable now so I can move forward with more interaction.
Title: Re: V5 Animal/Monster Spawning
Post by: Axeman on January 14, 2014, 03:43:32 pm
I like the roaming monsters. Makes it much more realistic. Animal interaction will be interesting to see.

P.S. how the hell do you make a mortar Mickey?
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 14, 2014, 05:18:16 pm
P.S. how the hell do you make a mortar Mickey?

Use Granite or Limestone dust on water.
Title: Re: V5 Animal/Monster Spawning
Post by: Roarion on January 14, 2014, 07:24:21 pm
I like the roaming monsters. Makes it much more realistic. Animal interaction will be interesting to see.

P.S. how the hell do you make a mortar Mickey?

I've tested roaming monsters before, people didn't like it because it's hard to train defense when magic/missle mobs will just walk away.
Title: Re: V5 Animal/Monster Spawning
Post by: Axeman on January 15, 2014, 02:21:11 am
P.S. how the hell do you make a mortar Mickey?

Use Granite or Limestone dust on water.

Ah, that makes sense.

The land feature seems a bit buggy..I claimed land, but then when attempting to create a furnace, it says I don't have rights to my own land. I gave myself land rights, and still says unable to w/out rights.

Then I unclaimed the land, and still the same problem.  ???
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 15, 2014, 01:47:27 pm
The land feature seems a bit buggy..I claimed land, but then when attempting to create a furnace, it says I don't have rights to my own land. I gave myself land rights, and still says unable to w/out rights.

Then I unclaimed the land, and still the same problem.  ???

I looked at the code and it seems fine and I have tested it often and haven't changed anything.

It checks the spot where the item will end up. Not the spot you are standing. Maybe you are just off the edge onto someone else land? So it would make sense that you could set rights and unclaim it if u on the edge.

You just have 1 account/player? Getting multis mixed up?
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 18, 2014, 03:18:20 am
Had a little bug, heh heh. It was respawning waaay to many monsters. The wolves to the south were all over the place. Good XP for me killing them all but they wondered into the plains sector where everyone starts and probably killed some newbs. *shrugs*
I think I got it fixed so we will see :)
Title: Re: V5 Animal/Monster Spawning
Post by: Axeman on January 18, 2014, 08:18:53 pm
The land feature seems a bit buggy..I claimed land, but then when attempting to create a furnace, it says I don't have rights to my own land. I gave myself land rights, and still says unable to w/out rights.

Then I unclaimed the land, and still the same problem.  ???

I looked at the code and it seems fine and I have tested it often and haven't changed anything.

It checks the spot where the item will end up. Not the spot you are standing. Maybe you are just off the edge onto someone else land? So it would make sense that you could set rights and unclaim it if u on the edge.

You just have 1 account/player? Getting multis mixed up?

Weird. I've only got one account/player. And I've tried it on multiple different land parcels. Haven't gotten enough coins again to re-claim land, but I guess that's my next step.
Title: Re: V5 Animal/Monster Spawning
Post by: Greatest on January 20, 2014, 03:20:12 pm
found it after I posted somewhere else, I don't think its an issue with landrights/ownership, you can't seem to build a furnace, you get that message every time...atleast until your mortar turns into stone ;D
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 20, 2014, 03:58:30 pm
OK, I think I figured out the Land Rights issue but have not posted a fix for it. It looks like the error code for land rights and focus item quantity is the same. I need to fix it but it looks like the real message you should be getting is "Focus quantity must be >= 10!" or something like that. So, I assume you were using just 1 brick or less than 10.

Try that and let me know.
Title: Re: V5 Animal/Monster Spawning
Post by: Mongo on January 21, 2014, 08:01:38 am
Had a little bug, heh heh. It was respawning waaay to many monsters. The wolves to the south were all over the place. Good XP for me killing them all but they wondered into the plains sector where everyone starts and probably killed some newbs. *shrugs*
I think I got it fixed so we will see :)

Yeah, I had logged in and a wolf was attacking me right away. But I punched it to death then ate its carcass.
Title: Re: V5 Animal/Monster Spawning
Post by: Greatest on January 21, 2014, 08:10:02 am
Had a little bug, heh heh. It was respawning waaay to many monsters. The wolves to the south were all over the place. Good XP for me killing them all but they wondered into the plains sector where everyone starts and probably killed some newbs. *shrugs*
I think I got it fixed so we will see :)

Yeah, I had logged in and a wolf was attacking me right away. But I punched it to death then ate its carcass.
thats funny...but I have a funnier one for you: only thing I've eaten so far are human carcasses :D

got to love a game that allows cannibalism.  honestly if you were starving why wouldn't you kill and eat a person :-\
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 21, 2014, 10:43:49 am
The animal spawns are still going bat shiaaaat crazy but at least I can reset them without a re-create. Still figuring it out I guess.
Title: Re: V5 Animal/Monster Spawning
Post by: Mickey Kudlo on January 28, 2014, 10:16:20 am
I got this fixed finally and can now move on to other features.