Thursday, 19 June 2014

Characters Now Spawn

The cool news from today's coding is that characters can now be spawned at will from automated and custom scripts.  That is, you can place a character in your level but set it's property 'Spawn At Start' to NO. You can then rename the entity to something memorable such as 'bob' and then proceed to place a few of them around the scene. You can then create a second entity such as a zone, gate or key, and add 'bob' to the field called IF USED. As soon as you collect the key, open the door or walk over the trigger zone and the entity specified will be activated, in this case 'bob'. An automated benefit of activating an entity is that if the entity has not yet spawned, spawn it. With the above logic in place you can now hide the majority of your characters until you want them too leap out at the player.  A typical scenario used in many FPS games is to place two characters at either end of a tunnel and place a trigger zone in the middle of the corridor which spawns the characters at the psychological moment, scaring the stuffing out of the unwitting player.

Also improved the terrain painter and save/load system so that you no longer get I call 'terrain slide', the result of the colour pixels not exactly going back where they were painted from the previous level load. I have now done away with the baggage that tried to get top performance and now relying on a slightly slower but much more reliable image data manipulation approach which to totally preserves the previous pixel colour data.

In the A.I camp, Ravey has been making sterling progress with the new character cover system, which is designed to allow soldiers to move from one cover position to another, getting ever closer to the player but not exposing themselves to a direct shot.  Early demos look good and hopefully I will have something playable and solid by the end of Friday.

Once more the sun is shining in Wales and I have hole digging and dog walking duties to perform.  I was hanging around for some last minute check-in stuff, but it's now 17:36PM and the deadline has passed. Will return later tonight when I am fed, watered and slightly sun bleached ;)


  1. Very cool!

    In the future I wonder if it will be possibly to drop items from an inventory and see them spawn in the front of the player on the ground?

  2. does this apply to characters only or can we spawn any entity, i.e weapons and such, also is the character able to respawn after a certain amount of time has passed after death?, question for respawn also applies to all entities so we could have respawnable ammo drops and such

  3. Great stuff
    +1 regardong item/weapon drop!
    We need to be able to spawn entitys as well
    Like dropping weapons/ items and to be able to recollect those dropped items/ weapons again.