Author Topic: V5 Animal/Monster Spawning  (Read 4241 times)

0 Members and 1 Guest are viewing this topic.

Offline Mickey Kudlo

V5 Animal/Monster Spawning
« 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.
You may have conquered my worlds, but I destroyed them!

Offline Mongo

  • Sr. Member
  • ****
  • Posts: 449
  • Attack: 91
    Defense: 91
    Attack Member
  • Karma: 16
  • Gender: Male
  • My Loony Bun is Fine
    • View Profile
    • Email

  • Total Badges: 29
    Badges: (View All)
    Sixth year Anniversary 10 Poll Votes Fifth year Anniversary
Re: V5 Animal/Monster Spawning
« Reply #1 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?
Shoop!

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #2 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.
You may have conquered my worlds, but I destroyed them!

Offline Axeman

Re: V5 Animal/Monster Spawning
« Reply #3 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?

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #4 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.
You may have conquered my worlds, but I destroyed them!

Offline Roarion

Re: V5 Animal/Monster Spawning
« Reply #5 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.
Asylum - lvl 33 Thrower
Pyramid - lvl 40 Scythe
Dementia - lvl 69 Spear
Nexus V2 - lvl 61 Stealth
Rebirth - lvl 72 Bow
Ganymede - lvl 56 Mage
Hex - lvl 1000 Admin
Future - lvl 1000 Admin
Retired - Unless V6 pulls a miracle

Offline Axeman

Re: V5 Animal/Monster Spawning
« Reply #6 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.  ???

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #7 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?
You may have conquered my worlds, but I destroyed them!

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #8 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 :)
You may have conquered my worlds, but I destroyed them!

Offline Axeman

Re: V5 Animal/Monster Spawning
« Reply #9 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.

Offline Greatest

  • Hero Member
  • *****
  • Posts: 1330
  • Attack: 161
    Defense: 91
    Attack Member
  • Karma: 9
  • Gender: Male
  • I'm better than you!
    • View Profile

  • Total Badges: 38
    Badges: (View All)
    Linux User Mobile User Tenth year Anniversary
Re: V5 Animal/Monster Spawning
« Reply #10 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
why does Fox keep cancelling good shows?

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #11 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.
You may have conquered my worlds, but I destroyed them!

Offline Mongo

  • Sr. Member
  • ****
  • Posts: 449
  • Attack: 91
    Defense: 91
    Attack Member
  • Karma: 16
  • Gender: Male
  • My Loony Bun is Fine
    • View Profile
    • Email

  • Total Badges: 29
    Badges: (View All)
    Sixth year Anniversary 10 Poll Votes Fifth year Anniversary
Re: V5 Animal/Monster Spawning
« Reply #12 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.
Shoop!

Offline Greatest

  • Hero Member
  • *****
  • Posts: 1330
  • Attack: 161
    Defense: 91
    Attack Member
  • Karma: 9
  • Gender: Male
  • I'm better than you!
    • View Profile

  • Total Badges: 38
    Badges: (View All)
    Linux User Mobile User Tenth year Anniversary
Re: V5 Animal/Monster Spawning
« Reply #13 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 :-\
why does Fox keep cancelling good shows?

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #14 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.
You may have conquered my worlds, but I destroyed them!

Offline Mickey Kudlo

Re: V5 Animal/Monster Spawning
« Reply #15 on: January 28, 2014, 10:16:20 am »
I got this fixed finally and can now move on to other features.
You may have conquered my worlds, but I destroyed them!

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1785 Views
Last post December 31, 2005, 08:50:52 am
by Grinch
2 Replies
1053 Views
Last post October 08, 2007, 09:51:20 pm
by Jon The Great
3 Replies
1538 Views
Last post May 03, 2012, 01:32:40 pm
by Tokoshoran
9 Replies
2223 Views
Last post May 19, 2012, 02:46:44 am
by Mickey Kudlo
4 Replies
2468 Views
Last post February 21, 2013, 10:46:19 am
by Roarion