Now the dust has settled on the V1.14 release, I have found a few issues that really should be part of the V1.14 side of things, so I have spent a few days on those, and I hope you will find the time well spent (as it does subtract from AI work time). Here are the tweaks so far:
8th February 2017
Before you think I am super-human, this is not one days work, it's the tasks completed since the V1.14 was launched and includes everything from essential V1.14 fixes through to new additions and core improvements.
* Waypoint nodes no longer being edited when in EBE mode
* Fixed crash bug caused when you place an entity then immediately use UNDO
* Fixed issue of mouse wheel disabling when leave EBE for first time each session
* When EXTRACT performed, mouse now centers on Widget position, less chance for mess
* IDE now expands the Fixtures entitybank folder for one less click to get a door
* Changed the Fixtured subfolders to capital first letter to match entitybank
* Modified loading EBE from local entity library to create new instance in level
* NOTE: Above allows modifications to be retained on save/reload and protect saved EBE
* Now when delete EBE file from saved EBE, it turns into regular (uneditable) entity
* Corrected static_basic.fx to re-include the SpecularOverride constant (lightmap shader)
* Fixed lightmapper to no longer force meshes to flat-shading (now keeps smoothing groups)
* Added slider to control Lens Flare intensity, and adapted post process shader to suit
* When you hold down CTRL while EBE painting, it axis locks the initial direction
* Added slider to control Surface Sun Intensity (defeats sun influence for indoor scenes)
* Adjusted main surface and shadow shading to use Sun Surface Factor
* NOTE: The Surface Sun Intensity slider is experimental but can control DOT3 lighting
* Added credit text file to texturesource folder to credit authors as collection grows
* Added two new shaders (tree_basic.fx and treea_basic.fx) for better tree rendering
* Updated all foliage entities in core, MP1 and MP3 packs to use new tree shader
* NOTE: New shaders and FPEs above fix the transparent edge issue on trees and plants
* Fixed issue of F9/E crashing test game, was the result of new object mask flag code
* Fixed issue relating to entities that have bones in only some limbs not being mouse detected
* Fixed issue of entities stop animating if change specular to a non 100 value
* Further improvements to the shaders by Preben (improved shadows and per-object light flag)
* Tweaked all ROOF asset pieces in fixtures\roofs to avoid 'out the box' Z clash
* Added 'dontfindfloor' field to FPE to initially ignore floor finder (roof pieces)
* Added 'keyframe speed' field to GUNSPEC file to allow per-weapon anim speed control
* Created wider entity properties panel to see weapon choices better
* Fixed issue of waypoint nodes being hidden after regular entity/EBE highlighted
* Enabled ZREAD for waypoint/zone objects to get idea of where they are in scene
* Added 'PlayVideoNoSkip' to LUA commands to control a video which should not be stopped
* Added PlayVideoNoSkip to global.lua so the above command will work
* Replaced blank_N.dds from effectbank\media so legacy entities are smooth on HIGHEST
* Added hidedistantshadows field to SETUP.INI (V1.14 defauled this to 1 for ON)
* Set new hidedistantshadows to 2 to retain LARGER entity shadow for buildings
* NOTE: Above improves IDE editor view as large buildings now have shadows when high
* Improved cascade shadow mapping code by using R32F format (cards under 10 years)
* Improved cascade shadow mapping code with larger base shadow texture and bias per cascade
* Added 'realshadowresolution' to SETUP.INI (old V1.14 default was 1024), now 4096
* NOTE: New 4096 shadow resolution will be sought, but will use lower if HW not available
* Restored realtime shadows to hidedistantshadows=1 & realshadowresolution=1024 (performance)
* Added shadow depth tweak to overlay_basic.fx used by new windows entities (for shadowing)
* Entity loader will now attempt to find and load _cube.dds file if _i.dds not found
* Added spinloop.lua to scriptbank with logic to spin an entity slowly on the Y axis
* Added new Shiny Skull entity in Scenery to demonstrate new Cube Mapping capability
10th February 2017
Well, it's Friday again, and much progress made. Happy to begin the weekend with AI underway and shaders being fine tuned in the background. As you may know, good AI begins with characters that don't slide about and do silly things, so I spent a little time looking to refine a pipeline to get nicer characters into GameGuru. It will also combat the general opinion that all GameGuru graphics are from 2002. After some scouting about, I figured the quickest way to get some good custom characters was to use Fuse, Decimator and the FBX2GG tool. I quickly discovered the rules on how to do this, and also had to improve the GameGuru object loader to fix the mesh after the decimation process, but ended up with a nice enough looking model (see post on this thread). I had to create a spin-off shader which ignored tangents, and this is something I will continue to chase for a fix on, as I think the potential is huge if we can smooth the process of getting characters in from the Fuse character creator. Part of this was adding support for normal, specular and gloss map loading as part of the FBX master model data, but during the FBX2GG conversion process the normals seem to be inverted and the UVs messed up enough to make tangent/binormal calculations go nuts. This small side mission became crucial when it came time to animate and move the character, as I wanted the new AI system to have the ability for excellent, if not perfect, foot planting. It turned out that a little technique I thought of allowed me to use FBX animations (and there are hundreds of them you can use for free for you via Adobe ID) and track the 'off-center' movement of the animations and re-center them so the object collision and other concerns stayed in tact. The result, achieved late last night, was a slowly lurching female zombie that had perfect foot planting, looked great and ready for the next tasks which is more animations for different actions and path finding the player and/or key locations (such as dynamic obstacle avoidance). Anyhoo, more of this on Monday, and in the meantime here is my list from today:
* Added support for loading _normal, _specular and _gloss if multi-material object uses them
* NOTE: Above will allow Fuse Characters (via FBX2GG) to be imported with full shader effects
* Added new special value to 'smoothangle' FPE field over 101 which 'GENERATES SMOOTH' normals
* Also new special value over 101 will also seal and blend position and normal values
* Added new ai_dance.lua as the first official AI work towards V1.15
* Added new effect called character_notangents.fx to ignore corrupt tangents in models
* Added new "entitybank\user\fusecharacters" folder with material to help importers
* Modified cube_basic.fx so that cube mapping is independent of light direction
* Added new 'isspinetracker' to FPE to control new spine tracker for modern character anims
* Added MoveWithAnimation(e,v) LUA command which moves entity if v is 1 using spine tracker
* Added REALSHADOWCASCADE 0-3 to SETUP.INI for manual control of shadow mapping cascade levels
* NOTE: New cascade values are 2, 6, 18 and 75 (though reverted to old 10, 20, 50, 100)
* Fixed ragdoll and collision settings on new FuseModel FPE template
* Fixed bug so PHYWEIGHT and PHYFRICTION specified in FPE are no longer reset to 100
13th February 2017
After a nice relaxing weekend, and about five hours of playing FarCry 4, I am raring to continue my A.I adventures, starting with the basics. As many of you know, we never really got rave reviews over our Zombie creatures, and so it made sense that one of the first things I addressed was the stupidest of the characters in GameGuru. I have almost finished the scripting for a new Zombie which runs at you, sinks its teeth into your neck and prevents you from running off or shooting for a while, reacts to being shot and my work on Tuesday will extend this to allow multiple enemies to flank, crowd the player, take turns to bite to keep you almost perminantly being munched on if there are too many zombies, and finally speed up when they are hurt to make sure you finish what you start if you decide to shoot one of them. In order to achieve this, it moves me nicely onto dynamic avoidance, crowd movement and my favorite will be pathfinding upstairs and hiding in creepy EBE rooms. Really enjoying this work!
* Added three new roof pieces (thanks Belidos) to give you the option of flat-topped roofs
* Added "treea_basic.fx" awareness to switch entity to DYNAMIC if selected (for animspeed control)
* Updated with latest Preben shader tweaks with improved shadows and debugging flags
* NOTE: realshadowresolution=1536 to anything upto 4096, the bias works without changes
* Added new LUA command ID=GetPlayerWeaponID() where ID returned is the WeaponID index
* Added new LUA commands SetCameraOverride, SetCameraPosition and SetCameraAngle (main cam control)
* Added new LUA commands GetCameraPositionX,Y,Z and GetCameraAngleX,Y,Z for full set/get
* Added much needed LUA command "WrapAngle" which will save lots of LUA code to handle angles
* Created a re-usable 'module_cameraoverride.lua' LUA script to keep newer scripts cleaner
14th February 2017
Another gone-midnight today, but managed to steal a little victory and get started on the path finding elements today. The trick was always trying to find a way to sync the physical movement and the animation of the object, and it was always a win for one but never the other. Thanks to my new MoveWithAnimation idea of using the animation itself as a guide to perfect foot planting, I extended this movement style as the driver for now the AI must work, and thanks to this, I can now get rid of movement speed when the above technique is used, and the AI now follows paths entirely at the pace the animation dictates (of course you need the right kind of animation but we will get to that closer to release). It also means entities can blast along the path at high speed without losing it's way. Also discovered an AI bug related to obstacle data becoming corrupted on subsequent test game runs that 'might' account for 'many' of the issues being experienced with former versions of GameGuru. Now I am using the debug view every day, I can see this issue and fixing it will mean the AI bots will not try to walk through a solid obstacle wall any more, which is certainly the kind of thing you need when working on your game! My tasks from today:
* Reactivated support for FOOTFALLMAX and FOOTFALLx in FPE where x is the footfall index
* NOTE: Above allows entities to specify keyframes that would trigger a footfall sound effect
* Added code to the physics system to report material types to the entity footfall system
* Added sounds to new faster zombie and related AI script (ai_idlemovebitehurt.lua)
* Added AGRO logic to new AI script which alerts nearby enemies within radius of an event
* Added sound awareness to new AI script for wider agro alerts
* Added headshots to new AI script to ensure player can benefit from single shot kills
* Added new 'CharacterControlManual(e)' which forces AI to a new 'full manual mode'
* Added new LUA commands 'GetEntityPositionX,Y,Z()' in order to update AI in manual mode
* NOTE: Gives LUA scripter FULL control of how entities are handled based on AI data
* Added new LUA command 'AISetEntityTurnSpeed(obj,speed)' to help control path navigation
* Refined the AI path finding to allow for VERY fast anim-movements without delays
15th February 2017
Been a mixed day, with a big win in getting the normals, tangents and binormals working for imported Fuse characters, and the addition of a Gloss variant of the character shader, but a long drawn out agony of trying to get my AI bots not to walk through each other. I fixed the issue from yesterday so they follow the path unflinching now, but I want them to choose a path and navigate AROUND dynamic things like other AI, not go nuts in closest proximity. It's another 14 hour day though, so my mind probably needs a break. Here is today's completed task list:
* Thanks to a Rafhalzer fix, and my tweaking, imported Fuse characters now have normals
* Fixed so tangent and binormals animate properly in character shader
* Added 'character_gloss.fx' to effectbank to use illumination slot as gloss map
* Fixed big bug causing most AI obstacles to fail if depend on loading them in (EXE/TestGamex2)
* Corrected path finder so fast tracking of paths detect node quickly and moves to next
* Reactivated avoidance code (mode 1) in AI system so entity Vs entity avoidance works (Sort Of)
* Added new LUA command 'GetAnimationSpeed' to obtain the ANIMSPEED when entity first starts
16th February 2017
Another two-dayer glued into one, arg! Some good progress though, including the fixing of the capsule vs capsule collision system of the physics to use proper gravity force, so characters can walk over things and interact better against each other (good for mob zombies). Also added a great enhancement to the entity placement modes, so now by default it uses something called surface snap so you can place things on terrain floor, on entity floors, on entity and structure walls, no need for RETURN and other methods to get your entity to where you want it. As a bonus, you can now stack a cupboard full of shelves super fast now! Finally, and the crux of my goal today is the new nav mesh creation, container logic and the LUA commands that support it. As I write, about 1AM, I have my first container zone (called a Floor Zone Marker) editable, and it converts it to an inverted obstacle (essentially invalidating anything outside of the zoned area). Neat huh! Friday i continue this work and get the characters detecting their starting container zone, keeping within its borders, migrating to other zones via waypoint links and finally a first floor to connect to the ground floor. Should be lots of fun! For now, here is my meagre list of completed tasks:
* Added FIVE new Doors to Fixtures (thanks to Cesar Correa for making them freely available)
* Fixed Entity physics for characters so vertical velocity replaced with gravity force
* Two new entity physics LUA commands added FreezeEntity(e,m) and UnFreezeEntity(e)
* SurfaceSnap = created new default mode which finds any surface to place entity/waypoint
* NOTE: Above mode can be broken with use of RETURN or PGUP/PGDN keys (restoring old modes)
* NOTE: This mode is deactivated when extracting via the widget to preserve entity positioning
* Waypoints now use surface snap detection to place waypoint nodes anywhere in 3D space
17th February 2017
Where are these weeks going, is it Friday already. Well, this week was pretty nuts, 5 x 14 hour days and my brain and body feel it! Going to do some gardening on Saturday then go watch Wigan kick some rugby balls on Sunday, then return sometime Monday to continue the good fight. The zone pathfinding is getting better but not perfect and have got the AI bot to the foot of the stairs, I just need to give them a leg up now to reach the containers I have created for them. So close, but it's close to 2AM and I really should stop now. Going to upload the beta for the testers to play over the weekend, as there is much more than the AI to test out. For now, here are my completed items:
* Updated entity_basic to use variants entity_cube / cubealpha and cubeambience shader files
* NOTE: Above allows much code re-use while while maintaining extra modes for cube mapping
* Added new Floor Zone marker which can create 'navmesh' containment areas for the AI system
* Waypoints now double as floor zone (navmesh) connectors, allowing AI to move between them
* Added 'deletetxpcachesonexit=0' to SETUP.INI which deletes TXP cache for smaller HDDs
* NOTE: Above will cause TXP to regenerate each time a new EBE texture plate is required
* Changed Floor Zone from 'inverted obstacle' to 'obstacle walls' for extra-safe navmesh
21st February 2017
After a Monday of catch-up, backlog and some travelling, I was ready with a full Tuesday to get some more AI done, amongst other small additions. My zombie characters can now chase me up multiple layers of EBE building (zone and connectors are created manually for now), and really take a bite when they catch up with me. There are a few niggles I would like to smooth out, but time is a wasting and I want to get more general tasks underway so as not to get too close to a specific kind of AI. The next few days I am gong to broaden my focus to better zone and connector editing, and a soldier AI script for shooting and scripted dodging. For now, here is my list from today:
* New improved shader tweaks from Preben for shadows and cube mapping
* Added ability for characters to detect and climb stairs and ramps and ascend/decend them
* Added 'Building Editor Guide.pdf' to DOCS folder (thanks to community help and advice)
* Capsule Vs Capsule Physics can PUSH AI out of zone bounds, so replaced with maths avoidance
* View cone in AI debug now points in same direction as character facing angle
22nd February 2017
They say a change is as good as a rest, and in addition, it's good to invent ways to get a new perspective after working on the same slice of code for 2 weeks, so I switched to a task which was always planned but never quite finished off. I also knew it was not a huge task, and today has borne that out quite nicely. In the next version, you will be treated to the much-anticipated feature "Third Person Mode For All Characters", which will allow you to drop in any character from the stock library, and most of the characters you have in addition, onto the Start Marker, and turn your games into Third Person Mode games. Just finished the movement, animation and shooting. Going to finish off melee combat on Thursday and then back to AI to polish off pathfinding (no pause across multiple zones) and then update the soldier AI (the fun part).
* Added new 'disablesurfacesnap=0' to SETUP.INI to disable the 'surfacesnap' editor default
* Changed Player Start Ammo quantity from 1 to 100 so default TPP character has more bullets
* Added 'jumpmodifier' to FPE to control third person jump multiplier (wizard uses 250)
* NOTE: When set jumpmodifier to zero, it will completely disable TPP ability to jump
* Added 'jumphold' to FPE to specify which jump frame is held during fall to ground
* Added 'jumpvaulttrim' to FPE to deactivate automatic trim applied to VAULT animation
* NOTE: Above jumpvaulttrim state is on by default, allowing ALL characters better jump anim
* Added 'jumpresume' to FPE which controls when the jump anim can give over to move anim
* Wiped default VAULT animations from anim system so characters must specify them in FPE
* Added support for TPP characters to shoot all main weapons (pistol thru launcher)
* Prevented LUA scripts associated with character used in Third Person Mode (as player)
23rd February 2017
It seems that the Third Person Melee Combat mode took longer than the morning I was anticipating, and took 6 hours in fact. The good news is that all unarmed or weapon-blended characters have basic attack now, and some FPE settings to tweak the essential elements. I have also sped up the editor which had a little issue with raycasting far too much, and even found time past 3PM to continue and complete my work on polishing the path finder, which now handles multiple characters charging across multiple zones and figuring out the closest zone to reach the player, all from a single AI command. Next on my list is soldier AI and some more scripting (ideally a nice cover position and leap behavior), inspired a little by FaryCry4 enemies and their ability to find cover quickly (a game I might play a little this weekend). That said, I really want to use some of the weekend for stability work and tweaks, to make sure all these new features don't go boom! Here is my day's devlog:
* Fixed editor stutter on larger levels, now only uses 'surface snap' when holding entity
* Also engages surfacesnap in all cases when waypoint nodes being dragged individually
* Added code to deactivate melee LMB if there are no PUNCH animations in character FPE
* Modified editor opening zoom height and brush size so characters are not so small
* Remove ISTHIRDPERSON field from Wizard FPE's as not used any more
* Allowed melee action to intercept move/run so Third Person Mode can instant attack
* Added 'meleerange' and meleehitangle' to FPE to control TPP melee attack metrics
* Added 'meleestrikest' and 'meleestrikefn' to FPE to define 'deadly' melee anim frames
* Added 'meleedamagest' and 'meleedamagefn' to FPE to define range of damage per strike
* NOTE: Above commands override defaults used by stock characters that don't have them
* Refined waypoint node mouse detection for better selection of zone vs waypoint paths
* AI bots can now move across multiple-zones in one movement, no more pausing mid-run
* AI bots now detect the closest zone to the player, and make an extended path to it
* Removed code which set characters to immobile with Y position 20 units above floor
24th February 2017
I was hoping to get a full blast on the characters, levels and scripts today to get them all up to speed, but spent most of the time sorting out the finer points of effective soldier combat scripting, tuned AI pathfinding, zone editing and the introduction of door obstacles. Looks like my weekend turned into a working weekend! Here is my list so far (but plan to continue a while longer into the wee hours):
* Created new COMBATSHOOT module so can retain AI_SOLDIER.LUA placement and call new AI
* Allowed third person character script to remain in tact (for tricks involving TPP)
* Added 'tpp\\thirdperson.lua' to scriptbank for any TPP script overrides for character
* New Solider script (combatshoot module) will resort to kicking if get too close
* RotateToPlayer now updates visual object now object control decoupled from AI
* All zones now collect obstacle data to ensure good pathfinding above default ground
* Added 11 solid doors to the Fixtures folder for additional choices, thanks to Peter!
* Lowered 'fine grain' obstacle generation from 30.0 to 14.0 for better stair detection
* Ensured when place down entity, waypoint node at location not moved until first release
* Added 'forceobstaclepolysize' to FPE to allow control of 'obstacle slice' resolution
* Fixed 'door awareness' for AI, which can block path decisions for closed doors
* NOTE: An entity is a AI Door if the first 4 characters of the script is 'door'
25th February 2017
Well that's 12 hours of weekend I won't see again (but it was raining and windy so that's okay). My tasks today saw the addition of path following, cover positions and some more AI tweaks. I also made steps to ensure that my future AI scripts make maximum use of code re-use so it now uses a lot of modular design in crafting the behaviors. Hopefully Sunday I can go through the characters, levels and scripts using the stuff I have created to date and get everything tested and final tweaked. Here is my task list from Saturday:
* Corrected how door bounds are calculated to always seal door gaps in EBE structures
* Corrected rotation logic for camera override for simpler and more accurate attacking
* Added 'ForcePlayer(angle,force)' command to allow kicks to knock back the player
* Combined new AI scripts into more organised modular system to maximise code re-use
* Added missing 'AIPathGetPointY' LUA command for better control of 3D nodes
* Commented out old AI globals (will affect any scripts using old AI system)
* NOTE: To continue older script projects, you can comment global.lua OLD-AI back in
* Added 'AIGetTotalCover,AICoverGetPointX/Y/Z and AICoverGetAngle' from Cover Markers
* NOTE: Can now obtain all cover marker positions and angles within LUA script (go nuts!)
* Improved COMBATSHOOT system for path follow, kick, cover, seek and shoot
26th February 2017
Another long weekend day, more rain, storms and code. Almost ready to test everything together now, so feeling good. Need to eat and sleep now, so keeping this short. My tasks:
* Added 'IFUSED' field to Cover Zone marker and provided access in LUA using AICoverIfUsed
* Added 'AICoverIfUsed' to commands which returns the IFUSED string into script
* Added code to detect if DBO in FPE does not exist, and tries to use .X file instead
* Added 'GetAmmoClipMax, GetAmmoClip and SetAmmoClip' commands to manage character reloads
* Updated all stock characters with revised animation set for new AI scripts
* Updated all core AI scripts to new modular system
27th February 2017
Finally at the end of my monster crunch slog to get the AI rounded off, and suitably tested. It's been a little crazy, especially the hours, but I am pleased to have battled through it to produce some nice new additions to AI behavior, and most critically, opened up the system to allow much more control on the LUA side when it comes to deciding how characters behave from now on. It is by no means complete (what is complete) but it achieves the primary goal which was to decouple the AI system from the animation and movement backend, and provide a cripsy pathfinding and avoidance system to take advantage of. I've also thrown in the first stab at third person for ALL characters, even those not designated third person or especially designed for third person, and so mileage will vary here. I have one more morning of testing then I will make this update available to all. My hope is that it won't be as easy to play through some of the sample levels now, and I plan to create a few videos and perhaps a twitch showing off the oodles of features I've added but not necessarily demonstrated.
* Improved AI debug view so container zero obstacles and paths follow the terrain geometry
* Modified The Big Escape level and increased soldier aggression (i.e. some now not guards)
* The Floor Zone marker is now created as a square to better fit quick floors in structures
* Removed redundant cover zone code now we have exposed the cover zones to the LUA system
* Loading FPM levels now first clears temp folder of all EBE files and textures
* Entities marked as dynamic isimmobile=1 are now treated as obstacle creators
* Improved soldier Cover behavior to leave cover strategy if get hurt
* Tested all sample levels to ensure AI reflects improvements
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM