Jump to content
  • Facebook
  • Twitter
  • Youtube

Developer microblog

Recommended Posts

Dont Lure    69

Its been awhile since last update... what's being worked on now?





  • Like 1

Share this post

Link to post
Share on other sites
Adam1343    158
4 hours ago, Dont Lure said:

Its been awhile since last update... what's being worked on now?





I believe he is now reworking Npcs that they will look a lot better and also Brand New Bosses coming :D

  • Like 2

Share this post

Link to post
Share on other sites
Pb600    1,310

Okay I'll take some time now to log the current updates.


The NPC system is being reworked from SCRATCH | ZERO | NOTHING, the old system was totally removed.


I've designed scripting tools to assist me on heavily testing every NPC function and exploring it's limits, it can be used at any other game feature.


I have created so far full NPC walking, following, teleporting, facing.


My point on reworking on NPCs is to ensure that all basic functionalities will work as expected, and provide very clear set of features to handle NPC behaviors, that way we can develop custom NPCs in a much shorter time, with precise results, that will allow us to make very dynamic NPCs that requires quite some Strategy to be defeated.


Later on all current bosses will have to be reworked using the new system, as result drop rates may have to be adjusted. In essence I'm planning to keep current bosses as they currently work, as from my experience players do not accept changes very well, so I'll keep news to other bosses while current ones may remain as players are used to.



Those support:
 - Smarter random walking withing a given area. (At world 1, we can only define the max distance that NPC can walk, now we can keep a NPC walking inside a building only).

   Currently at world 1, npcs walk tile by tile on random directions, at RS they walk to random long distances: http://i.imgur.com/TRuKWm9.gifv that's how it was created on new system as well: http://i.imgur.com/h2lOrhB.gifv


 - NPCs will collide with other NPCs, Map, Players when attempting to walk. 

   Sample: http://i.imgur.com/82skI71.gifv


 - Whenever a NPC get stuck (being blocked by entities) for too long, it will teleport to original position automatically.

 - In case a NPC follow a player to outside its walking area, in case the NPC stop following that player, it will trace a route to inside it's walking area. (Usually NPCs doesn't perform trace-routes which are quite processing costy, they walk based on target-direction delta, that's why it's possible to get NPCs stuck behind a wall, as they are not smart enough to turn around the wall to reach the target, however not using a traced-route to its original position, could result in NPCs getting stuck outside their walking area by not finding a way back).




 - NPCs can follow players and other NPCs, the movements are efficient, as the game calculate shortest spot to position the NPC within a perpendicular position in relation to target, while still considering collision with entities and map objects, whenever a player goes behind this NPC, rather than move to random positions until find a spot get outside player location, it will find a shortest valid spot to surround the player instead.

Sample: http://i.imgur.com/RpnFwMg.gifv

Sample: http://i.imgur.com/ciOqLEv.gifv



 - Teleport system was created, originally on 317 RS Client jagex didn't add support for NPC teleporting, what we do on world 1 to bypass this issue, is remove the NPC from scene and add-back on it's new location, while it results in the expected effect, it causes overheat by removing and adding NPCs to the scene, and a period that NPC remains invisible (For not being added back to scene).

- Teleport system allow to teleport NPCs to other entities surroundings, that's actually trickier than it seems as when we are talking about NPCs, they have dynamic size, and that size must be taken in account when surrounding an entity, and when the target entity is another NPC, both NPCs size should be considered.

That's illustrated here: 


As you see, the NPC position is always the south west corner, rather than NPC center (Both are highlithed), so once position is set, everything should be translated in order to place the NPC center in that position, while still avoiding collision. (Look at ghost rectangles and lines that points to proper position)

Seems complicated? Imagine now NPC > NPC following, where both entities sizes should be calculated...




 > That would be used on Pest Control where NPCs teleport, Abbyssal Demon that occasinally teleport to players's surrounding.


- Teleport system calculates whether NPC can be placed at given position or not, which in some cases, such as familiars, the players will receive the message ("This NPC is too big to fit in this position.")


- Facing system was also created, it's very basic, basically we are able to make NPC face a position|direction|entity for a certain amount of time, and automatically return to it's original facing direction, nothing big here.

Sample: http://i.imgur.com/rhqBg5i.gifv


- NPC updating system is a hundred more times efficient and dynamic and easier to modify than old one by avoiding a lot of redundancies.


Basically the things done above, are the most complicated aspects of NPC system (Interaction with map and other entities), everything runs more efficiently than on world 1, which is good as NPCs are the biggest overheat on the server, as there are over 2K of spawned NPCs being processed every cycle (600ms), even tho random walking performance should still be improved.


Once npc's decide to walk on a direction, it should first check all surrounding NPCs, then test collision of the destine position on those surrounding NPCs, imagine thousands of NPCs doing that in a cycle, the main solution to this issue is just make NPCs walk once there are any player close, however it still requires to for each one of 500+ (walk-able npcs only) NPCs to check if there's a Player close, which also involves quite a lot of heavy math, but still faster than check for collision with other NPCs when there's nobody there to see they walk around.


There are still a few things to be done, but I expect to face less issues than I've faced with above updates.


- Damage System

The damage system should be worked, NPCs should be able to receive damage and be poisoned, which will affect its health and occasionally result on its death.

Nothing new here, as shouldn't differ much from original system.


- Instancing

Each game entity should have a instance in the world, each instance would have a defined policy such as: 'See NPCs from other instances', 'See Players from main instance', meaning that instances should be added to Ground Items, Spawned Objects (some).

The instancing system will calculate whether the other entity is view-able from its current instance, then render that entity (NPC, Player) on the scene or skip entities from different instances.

Basically this will allow us to have multiple bosses spawned and multiple players fighting those bosses in a same room, at different instances.


- Dynamic invisibility

Basically a system that allow us to define whether a NPC should be visible or invisible on a scene based on it's stats, such as location. (Used for familiars whenever they should be invisible)


- Speech Script

(Already started) -> A Chat script system, that holds a collection of messages mapped to NPCs possible actions (Iddle, Fight, Spawn, Death) and make NPCs chat those random messages based on current NPC state, so whenever a NPC die, it would get a random message from 'death' script. Iddle and Fight speeches are cast each period of time.


- Weakness

NPCs should have weakness types (Fire, Water, Each, Air spells, Crush, Stab, Slash, Thrownables, Bolts, Arrows, etc) which will affect opponent's accuracy and damage boost upon this NPC once it's weakness are being exploited.


- Respawning

Yeh, that's actually a part of the system, once a NPC dies it doesn't get removed from the game, it just become inactive until it's ready to be respawned, except for the cases where NPCs doesn't re-spawn, actually the whole NPC stage system should be define (Was already). (Alive, Dying, Dead, Respawning)


Now it becomes mainly combat aspects.


- Attacking

Ability to set a target to be attacked, either a player or another NPC. (There are cases where we would like to have NPCs being able to attack others, such as God Wars, Pest Controll, Familiars)

That's the core of NPC combat system, it's nowhere near as complicated as Players combat, don't worry it will not take years xD


- Aggression

Aggression system defines behavior of aggressive NPCs, those who start attacking other entities around, that system will take in account target level, there will be a max combat level to be aggressive against, and a period of time that this NPC will behave aggressively upon an entity, which resets once entity walks far away from this NPC.

There will be a tolerance system (started) that defines aggression tolerance, that means that once it's defined that a respective entity is tolerant to this NPC aggression, this NPC will ignore that (player | npc), such as in God Wars, where you may not be attacked by zamorak minions when using any zamorak equipment, meaning that they are tolerant to you.



- Area analyzer

The purpose of this system is to easily pick players around based on criterias and random aspect, allowing to select an amount of players around to be atacked, or just select players who are attacking the NPC, etc. It's an important part of combat system that allows to make dynamic fights.


- Protection Prayers

NPCs are supposed to be able to use protection prayers, those protection prayers will have an absorption percentage, meaning that will absorb a given amount of damage type being protected.

In the other hand, there will be a penetration percentage, which determines how much this NPC can penetrate on other entities prayer protection, meaning that this NPC has 50% prayer penetration, and you are protecting melee, this NPC will still damage 50% of it's original hit as melee on you.


- Poisoning

NPCs should be able to poison other players based on probabilities and starting poison damage, pretty simple.


- Life Staging

NPCs should be able to relive, transform and avoid death.

To have dynamic bosses that transform or have multiple lifes, those functions are required.


- Loot rewarding

Calculates who dealt most damage and reward the loot, occasionally a different approach is implemented and could allow us to reward players who have dealt over a percentage of damage.


- Kill time calculation

Just like we already have


- Task progressing

It's in the list to avoid forgetting to re-implement current tasks.


- Projectile casting

Simple system that allow us to easily make NPC throw a projectile upon an entity or direction.


- Prayer disabling

Ability to disable target prayers are an important feature.


- Player teleporting | freezing and stunning

Same as above.


- Minion Handler

Some bosses may have minions, and just re-spawn once those minions are dead, or as I've made on Nazastarool that only dies once all minions are killed, otherwise it would suck minions life to himself.


Those are the main things, occasionally new things appear to the list, but those are the main ones to have a really great system that will allow us to make awesome bosses, we already have a good combat system, now NPC then skilling and minigames and I'm sure that we will be doing great! I have much faith in GS.


  • Like 13

Share this post

Link to post
Share on other sites
Pb600    1,310

The NPC system is pretty much done, just require a few adjustments, while it I'm reworking all bosses using the new system.


Now players will also absorb NPC damages! And player's protection prayers will also work agains't NPCs (which didn't happen), and now players defence will affect NPC's accuracy (unlike atm which is your attack affecting NPCs accuracy, duh...)



Just to keep you tunned!



Tarn was almost left as it was (since lots of players dislike changes), just made it a bit more professional by reworking wrong graphic effects, etc...









  • Like 8

Share this post

Link to post
Share on other sites
J A I Z    213

Nice work pb, excited for the release of this update.

Share this post

Link to post
Share on other sites
Adam1343    158

I cannot make a useless thread with 2 fixes that it may be boring.


The Fixes to suggest is:

- Make Darkmeyer Outfit untradeable

- atleast 50 minutes of combat that has been used before using Blood money, because of Creating accounts and transferring to their Main Account.

  • Like 1

Share this post

Link to post
Share on other sites
D a m i n    68

I'm very excited for this!
Thanks again for the epic up coming update PB.

Share this post

Link to post
Share on other sites
Pb600    1,310

Guys a few more sneak peaks!




  • Like 6

Share this post

Link to post
Share on other sites
Adam1343    158

Looking good Updates Pb. Nice Work (y) 

  • Like 1

Share this post

Link to post
Share on other sites
Pb600    1,310


  • Like 5

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now