Ambient NPC Population

Ambient NPC Population, a continuation of an idea ...

CryENGINE 3 SDK

A Free CryENGINE SDK for everyone in August 2011? ...

Adventures In Textures

Seeing just how low you can go with the poly count by offsetting a lack of geometry with normal mapping and hand painted textures ...

UDK - Hawken

Indie development at its best ...

Unreal Engine 3 - Environments Features Overview

Gorgeous tech demo trailer showcasing the features of Unreal Engine 3 and its free counterpart, the Unreal Development Kit ...

Showing posts with label Leadwerks Engine 2. Show all posts
Showing posts with label Leadwerks Engine 2. Show all posts

Friday, 10 August 2012

Leadwerks 2.5x + DarkBasic's Dark AI [Part 3]

I thought I'd spend a little more time on this integration, using the laptop whilst watching the Olympics. The next phase was to automate the routines for NPC update and compacting the code routines. Ultimately, the idea is that after the scene is loaded, it will be parsed and flagged Dark AI objects, NPC's, Paths and Zones will be set up automatically via information taken from the relative lua scripts. Paths and Zones will be later, collision objects are done, so I was working on how to go about NPC's using this method. As some may have noticed I am using the FPSC Model Pack 53 characters.



I converted about 5 or 6 characters to Leadwerks format and all the weapons for this exercise. I will eventually convert them all but I hand "prune" the bones of the rig and that takes longer than I want to spend at any one time on this side project. The FSM is still very basic but the first goal was to derive a current Animation state with each of those states having sub-FSM's to dictate the current behaviour based on the previous state and internal and external inputs. The framework is in place for the animation state which is derived by performing Boolean logic on returned values and strings from the Dark AI runtime and some stubs are in place nested inside for some basic behavioural sub-FSM's. First though I want to able to set up the scene and then place all the Dark AI objects, NPC's, Paths and Zones directly in the editor and then use the load routines to set all that up in an automagic way inside the application. The collisional objects were easy and are done with some simple tick box flagging functionality added to their property scripts. The NPC's a little more in depth , due mainly to the large amount of usable settings! lol. But I wanted to be able to place the model and then assign it some basic attributes to be read on load, this included what weapon to attach.







So that was the basic NPC property script setup (wasn't that painful anyway). So using the test scene from Leadwerks 2.5x + DarkBasic's Dark AI [Part 2], and placing a few enemies and some friendly's to look after the player, this is the result of the current stage reached in the integration.





Tuesday, 7 August 2012

Leadwerks 2.5x + DarkBasic's Dark AI [Part 2]

After the first hour and a half I spent on this little exercise, I followed it up with another couple of hours. The basic integration now has an animation FSM. All still pretty crude and basic but a template to build on at some later date. The NPC's Entity script controls the models animation routines and gun attachment, the c++ application interfaces with the Dark AI library, and then uses messaging to communicate with the NPC Entity via lua script. Again this was just more experimentation and practice for me using c++ to build up techniques that will be beneficial later. Special thanks to Pixel Perfect for pointing out the error in my ways with regard to text strings in c++. Anyway this is the result, I just threw in some values for speed and animation blending off the top of my head just to test the FSM functionality, it will need those tweaking, thats for sure.





Thursday, 2 August 2012

Leadwerks 2.5x + DarkBasic's Dark AI = DAILE?

I am currently working with EKI One, working through its format and structure, getting to grips with the lua behavioural scripting side and trying to brush up on my c++ skills, actually brushing up on my c++ skills is an overstatement as I don't actually have any to brush up! .. lol, I have also been going through my Blitzmax code and trying to compile all the game mechanic functions and methods into a single .mod, trying to keep things tidy. Whilst going through my crap drive, I mean, my well organised storage drive, I found some DarkBasic/DarkGDK stuff, which included the Dark AI library. I have never really used DarkGDK, although I did start out a few years back with DarkBasic. So I wondered (as you do), could it be utilised in LE2.5? Having never used Dark AI (which came in a bundle, that I have never used either, but it was a bargain lol) I knew that R.T.F.M. would be in order. If it relied solely on DBobjects and inherent DarkBasic functionality then probably not. I spent half an hour looking through the commands, and an hour later had it working in an LE context. So to answer the question, it seems you can.




Its all a work in progress, and probably will remain that way as its certainly nowhere near the solution that EKI One is, but as an exercise it wasn't a bad use of a few hours. I will post a demo in the Leadwerks forum showcase later for those interested.

EDIT : Demo posted here : DAILE DEMO


Monday, 6 February 2012

Meet The Flockers.

Well, it should be more like meet the Swarmers, but you can't have as much fun with the word Swarm as you can with the word Flock. My first port of call was to do some quick research, not a good idea on a Sunday morning after a "busy" Saturday night, lets just say even plain English was reading like Egyptian Hieroglyphics ...

I found a large variety of examples on the Net, but nothing in a programming language I use or with Sunday morning syndrome could be bothered to wade through. Most, and probably all the examples I came across, were 2D, and not what I wanted. I opted for the same route I took when writing my Lua A* Scripts, just to work from a simple written definition of the rules and how they are used. With A* I used:

1) Add the starting square (or node) to the open list.
2) Repeat the following:
a) Look for the lowest F cost square on the open list. We refer to this as the current square.
b) Switch it to the closed list.
c) For each of the 8 squares adjacent to this current square …
If it is not walkable or if it is on the closed list, ignore it. Otherwise do the following.
If it isn’t on the open list, add it to the open list. Make the current square the parent of this square. Record the F, G, and H costs of the square.
If it is on the open list already, check to see if this path to that square is better, using G cost as the measure. A lower G cost means that this is a better path. If so, change the parent of the square to the current square, and recalculate the G and F scores of the square. If you are keeping your open list sorted by F score, you may need to resort the list to account for the change.
d) Stop when you:
Add the target square to the closed list, in which case the path has been found (see note below), or
Fail to find the target square, and the open list is empty. In this case, there is no path.
3) Save the path. Working backwards from the target square, go from each square to its parent square until you reach the starting square. That is your path.
 
And from the written description I then coded the AStar Script. I felt using this approach again would enhance the learning potential. For this new exercise I used the descriptions of the three rules Craig Reynolds uses to take this approach.


Cohesion: steer to move toward the average position of local flockmates

Alignment: steer towards the average heading of local flockmates

Separation: steer to avoid crowding local flockmates


From Conrad Parkers website :


Boids try to fly towards the centre of mass of neighbouring boids.

Boids try to keep a small distance away from other objects (including other boids).

Boids try to match velocity with near boids.

It was also my interpretation that the rules when performed on an individual boid had a limiting radial area when looking for its neighbours, which if I correctly understood was the factor that changed the overall behaviour. I took this to be the case given the graphic representations on Craigs boids page:




So my rules ended up as:


Boids try to fly towards the average position of local flockmates in a given radial volume of 3D space


Boids try to keep a small distance away from other local flockmates in a given radial volume of 3D space


Boids try to match velocity with other local flockmates in a given radial volume of 3D space

Actually I also implemented a 4th rule, which is a mathematically described harsh confinement volume, by harsh I mean zero tolerance, which currently means the boids "bounce" off an imaginary wall belonging to the volume in the same way the ball bounces in the game breakout. However when time permits I will redefine the confinement parameters to coax the boids into staying within the confinement volume as opposed to bluntly preventing them leaving the defined area. Of course, when a boid ricochets of the imaginary wall this repositioning should have a knock on effect through its neighbours and in turn their neighbours and so forth, well that was my thinking.

So 3D vector math was the first thing on the new to do list, I made a new math class to allow all the calculations to be done by a boid type, I decided to simply store all generated boids in a TList, which then could be looped through to adjust the vectors of each one. These I called my Non-corporeal boids, simple mathematical ghosts, without shape or form. Using an Entity array the physical form was generated as a copy of a mesh, in this case a cube. Thus in the draw cycle the Non-corporeal boids have their respective vectors updated based on the stipulated rules and a corresponding pre created body is then assigned to its co-ordinates.

 
Currently this is just an exercise I am using to find out more about this field of AI. It has practical game applications, one could be "wildlife" volumes, like birds in the sky over a scene. But as with all things the first part is to find out how and why it "ticks" and to try and get it working.

This is a slow motion video capture of how the rules effect the behaviour:




Demo Application Can Be Found Here

References:
http://www.red3d.com/cwr/boids/
http://www.kfish.org/boids/

Thursday, 19 January 2012

Revamping A Modular Asset Idea.

I have dabbled with modular construction for 3D scenes, my last efforts where for a sci-fi based corridor which was essentially to test out some texturing methods with heavy use of bump mapping.




From Blog Entry Scale to the Chief
From Blog Entry Bumping ..... Adventures in Textures

Now, I have recently built a new Development PC so most of my development code and "stuff" is on storage drives that I am currently going through. Whilst doing this I came across some of my very first modelling and texture tests.




From Blog Entry Textures

 Kind of makes me shudder although I don't think I have improved that much with time, but it got me thinking about assets I will need and the different workflows I could use. The original "Jetty" was a place holder model created in 3DWS to try out some textures I had made from photographs. It was also my very first attempt at a modular asset, which did not go so well in the area of "snap to gridability". So using this original concept for an asset, I decided that the place to start would be with a base model, which would be kept as simple as possible in regard to geometry and from which the higher and lower level of detail models would be derived. Also, I decided that the individual sections of the model should also inherit this modular aspect.

I started by modelling a basic revamp of the original jetty design.




Then I added more detail, but still keeping the poly count low and the geometry simple.





I managed to get good grid snapping with some careful modelling constraints on the overall volume of the piece and careful placement of the centre of origin.

Now what I can do in Silo is to save segments/objects out, such as posts, planks and roof types, to use as custom primitives and from there simply "blockout" ideas for different things:





So for a few hours work I think I have a fairly good work flow going to at least assemble a modular Bridge/Docks/Jetty "construction kit".




Wednesday, 4 January 2012

Quick 3rd Person View Character Test.


Ok, its been a while since the last post, took me a while to regain access to my blog after Blogger was taken over, seems Google had some issues in the "not so smooth change over". Anyhow happy new year.

This was a quick test of a character I purchased from a relatively new 3D asset company, 3dFoin, currently they are having a new year 40% off sale so I though I'd check out one of their character models. I have recently built a new PC so most of my development code and "stuff" is on storage drives that I still need to go through, so I quickly coded a script for "her" and a 3rd person collision cam rig off the top of my head to try "her" out. I made some alterations to the textures and made a few adjustments here and there in UU3D. Overall, I think "she" was worth the money. I may have to try out some more of their wares before the sale is over.



I only set up three of the animation's that come with "her", walk, run and idle. I did not bother with animation blending, or smoothing out the turning when moving from stationary/vanity cam mode, this was just a simple temporary rig. The "level" was just some assets quickly thrown together for effect.

You can find 3dFoin here:

http://3dfoin.com/

The other assets are from several sources that include:

Michael, over at Pure3D:

http://pure3d.de/en/index.php

Steve, at Arteria3D:

http://arteria3d.corecommerce.com/

and the boys over at Dexsoft:

http://www.dexsoft-games.com/

As soon as I locate the 3rd person rig I used here ....



I will test "her" out fully. But on the whole I am very pleased with the purchase and will be keeping an eye on their products in the future.

Monday, 29 August 2011

Colourful Behaviour.

Currently I am working on the second phase of the MapData generator, which is to scan the map for scene objects and then adjust the walkable/unwalkable data accordingly. The basics are working fine from a simple AABB check per collision type. Although I am only using the x and z returns at the moment, a more "honest" check would also require y0 and y1 with reference to terrain elevation to be taken into account, but for now this will do as I have another system in mind to further "refine" the AABB space check. 

I also integrated a version of my Blitzmax A* system, and have a test "AI Bot" that can path the generated data in the editor and traverse the loaded map. Debugging is currently paramount, especially with regard to the data generated and co-ordinate conversion between the different ways arrays and tables within Blitzmax and lua store data and the co-ordinate system of an .sbx file. On smaller maps I simply drew a small coloured cube at the grid position, and made use of LE's view range to "cull out" an area surrounding the cameras position. A physical pick test which did not rely on any generated data would then tell me if the system was aligned correctly. At the moment I am confident that the formulas I have derived are working fine. 

The issue with this type of debugging is it is only practical on small maps, whilst alignment will (should) remain the same regardless of map size, drawing check cubes for every grid tile is a non starter once the map goes over a certain size, as it eats up the available memory to a point when the application will simply crash whilst generating or indeed with very large maps simply crash on start. The map in the videos is "128 x 128" or more precisely 129 x 129 with an MpT of 2 this equates to 66,049 "tiles" which would require 66,049 check cubes to be created. Whereas a "1024 x 1024" with an MpT of 2 equates to 4,198,401 "tiles" which would require 4,198,401 check cubes to be created and a "4096 x 4096" with an MpT of 2 equates to 67,125,249 "tiles" which would require 67,125,249 check cubes to be created. So my solution was to write a function for both the camera and the AI Bot that would create, on the fly, a set sized area of check cubes around the respective focal points.





So, whilst "playing" around with different ways to save and retrieve the data generated for a map, I tried the Portable Network Graphics (.png) image format, mainly to see a pictorial representation of the walkable and unwalkable areas of a map, but also as another way of storing the data, where the red and green channels act as the 1's and 0's stored in the .dat .txt and .lua files. It then dawned on me that an extra "cost" per walkable tile could be embedded in the green channels value, such as the slope of the tile, the flatter the tile, the easier the route. Writing a small routine to determine the slope of a walkable tile (along the same lines used to determine walkable/unwalkable) the value written to the green channel was adjusted a set amount for a particular slope range. The result can be seen below.





I then wrote a small function to read the png's pixel data on the fly and display its ARGB values.


This set me thinking, why just store slope data and walkable and unwalkable logic. Of course, you can change the value of the map data stored as values in .dat .txt and .lua files, for instance, instead of 1 meaning unwalkable, the value 0 could be used with walkable tiles having a value ( 1,2,3,4....) which reflects extra cost. But using the .png format this can be done using only two channels of the single (co-ordinate) pixels returned ARGB value.

But channels A and B are left unused, both of which can contain a value 0-255 (00-ff). So why not use them to reference area specific AI behaviour. One scenario might be, a town crier NPC, areas where that NPC is required to "do his stuff" could be defined by a certain value stored in either the A or B channels of the single (co-ordinate) pixels returned ARGB value, this value would only be recognised by that particular NPC class, so other NPC types would simply ignore it. The AI behaviour routines would be encapsulated into the lua control scripts for that class, simply waiting to be triggered. Of course it maybe required that an "area" should have several AI behavioural aspects associated with it, currently I can think of a way to attach three behavioural aspects to a single grid tile using the colour information from a single pixel, but I have a few other ideas on a way to increase that. Those ideas will have to wait as I am trying not to do what I always do and get side-tracked, but they are on the to do list.


This approach would also fit in well with my ideas about Ambient NPC Populations, where the vast majority of control resides in the hands of the "map".

This is all still very much a WIP, but shows potential.

Tuesday, 23 August 2011

A* Pathfinding MapData Generator.

The Alpha of my MapData Generator, this is the first phase where the terrain is interrogated and using pre-defined criteria an external .dat file is created containing the walkable and unwalkable grid information for a loaded map. This information can then be fed into either my Blitzmax/Leadwerks A* solution:

A* Pathfinding Using Blitzmax And Leadwerks Engine

or my Lua/Leadwerks A* Solution:

AI, Waypoints, A* Pathfinding, Lua & Leadwerks.

Of course this is only one way to create the node graph data for A* pathfinding. But for current tests using my Lua A* Library this approach will do just fine. The editor currently has only hard coded settings which in the demo video also checks to see if a grid square is below the waterplane and mark it unwalkable.



Wednesday, 17 August 2011

AI, Waypoints, A* Pathfinding, Lua & Leadwerks.

Over the last few days I have been getting into Lua script. A few days ago, I bounced an idea off of Macklebee about path nodes and waypoints, and things kind of took off in all directions. A special thanks to Macklebee for authoring the random visible node selection routine and other scripts and Lua snippets in this joint venture. Between us over the last few days we now have a small arsenal of different waypoints, path nodes and pathing techniques including a Lua scripted A* solution, which can use pre-calculated map data or be dynamic. Mack is currently working on another interesting idea along this route, and I have more functionality to code for some other ideas I have in this venture, from NPC behavioural information exchanges to waypoint 3D A* pathing, amongst other tweaks and new AI functionality.

Anyway, here is a short video of just some of the things we have put together entirely in Lua over the last few days. The video was shot inside the Leadwerks Engine Editor with the Lua scripts running in real-time.






Previous entries for AI and A* Pathfinding:

Oh how I hate AppTime() and the randomness of it all.

Attack of the Killer pathfinding butterflies!

A* Pathfinding Using Blitzmax And Leadwerks Engine

The Way Forward ... Making Blitzmax Trax ...

On The Right Path, A* Pathfinding In Leadwerks.

Don't you just hate it when that happens?

OOP I did it again ...

Wednesday, 27 July 2011

3rd Person Movement & Animation Control Rig Test

This is a video showing a simple test of a 3rd person view Movement & Animation control rig. Features include camera collision, movement to animation synchronisation and skeletal bone spatial position reference routines as demonstrated here with the throwing of grenades. Written in Blitzmax and using the Leadwerks Engine this is the simple base code off of which a more robust solution will be created. The test also utilises a Blitzmax module that I created to take the game mechanic aspects from Furious Frank and have them readily available for other projects, in this case the explosion system and particle FX were used. The grenade object/model Lua script is a hybrid of two scripts written by Macklebee for a grenade launcher and ammo, which is used in Furious Frank.

Character model is by Arteria 3D





Also in HD

Sunday, 5 June 2011

Ambient NPC Population, a continuation of an idea.

Last September I mused about the concept of what I call Ambient NPC populations, I spent a lot of time researching (read playing) certain games that have what I call an ambient NPC population. This is specifically those NPC's that reside in the background and generally have no real or very limited interaction with the player, but may have some limited interaction with each other or the surroundings.

I felt a new approach would be needed to sort through what was and was not required to achieve a similar environment in LE, I decided first to create the environment and to then set about, at different levels, adding in the ambient NPC population, the thought behind this was it would be easier to visualise what I wanted to see taking place, if it took place ... in place ... not the best description but I hope you will understand what I mean.

So the first step is to create a small village environment and then to start adding in the population.

Test/concept scene (test application screenshot) : The Village of Swanwyck





The important thing with this small test village level will be the roads/paths, as the first tier of the population will basically be simple "walkers".

Even now, I am still formulating the different types required from "walkers" to simple "static actors" and how to implement some of those types to have different interaction levels. I will be utilising several different methods to allow the NPC's to navigate Swanwyck, from a simple "follow node" approach to predefined path data and on the fly A* navigation.

I did have some very good results with A* pathfinding already, which can be read about here:

A* Pathfinding Using Blitzmax And Leadwerks Engine

Hopefully I can find the time to get "Swanwyck" up to a usable standard, and get the first tier of the "walking" population up and running.

Friday, 8 April 2011

Oh how I hate AppTime() and the randomness of it all.

Actually I don't hate AppTime() I just don't like using it in some instances. Its extremely useful and from what I can tell a more accurate mechanism to use than AppSpeed().

Whilst working on Furious Frank, one thing I noticed and it always caught my eye, was what I term “Chorus Line Syndrome” where using the basic AppTime() frame incrementing code for looping animations results in a regimented animation playback for like models/characters. I have ignored this issue thus far as it was not such a big deal in the early stages. However I decided it needed to be sorted, rather than just left as this issue will no doubt crop up again and its always handy when problems do arise again to have a basic template solution. First I took the lua entity script for the bug and removed all dependence on AppTime() completely using AppSpeed() to adjust for running speed variations. This worked fine but still broke down under high stress tests. The only way I can simulate high stress is to run some background applications and Fraps. Of course some breakdown would come about when the stress is heavy. I then switched to using a mechanism that relied on AppTime() as the base, but not in the same way that it was used for the basic AppTime() frame incrementing code for looping animations. There was still some breakdown under heavy load but not as much as the AppSpeed() based script.

Utilising this script with other aspects to add extra randomness to same type character animation playback I made a few tests. The results are in the video below, in the first part the “Red Bugs” are running the original script and the “Blue Bugs” the new one. In the second half of the video I applied the template to some “Fast Horde” zombie AI I had been working on previously:






Some synchronisation still occurs but that's just inevitable given the constraints of the character models used, that is, how many frames per loop are used in a cycle of animation and indeed how many animation types per action there are. Even slightly interrupting the “Chorus Line Syndrome” has much nicer results. I added some small mechanisms to the “Fast Horde” zombie script to continually mix things up over time. But all in all I am much happier with the results than not having addressed it. There is still some translational movement patterns, like the "flying V" the Zombies exhibit in the video now and again, but I already have a solution involving types of same entity types to add a few extra parameters to help limit the occurrence.

As for Furious Frank, I'd like to say a big thank you to Paul Thomas for his contribution to this little side project. Paul kindly integrated into Furious Franks source code one of his older basic cloud and ToD (Time of Day) systems. It will need tweaking for the project but it was most generous. Heres a little look at the current stage of integration:






When more time is permitting I will continue with working toward a release of Furious Frank V0.03

The current version of Furious Frank can be found here:

Furious Frank V0.03

Previous entries for this project:

MAGIA .. Monday

MAGIA .. Monday ... and a little bit.

MAGIA .. Monday .. a little bit .. and beyond

Friday, 1 April 2011

MAGIA .. Monday .. a little bit .. and beyond

Furious Frank V0.01 came about from my requirement to have a simple application in which to test code in my code archives from the last year. It What was supposed to be a simple cleaning out the harddrive exercise got a little side-tracked. This version was achieved in about 14 hours on a Monday.

MAGIA .. Monday

MAGIA .. Monday ... and a little bit

Furious Frank V0.02 is the 10 or so hours I have worked on it since. With the prospect of a whole 3 days ahead with nothing to take up my time, I wanted to get Furious Frank V0.02 uploaded and start on Furious Frank V0.03. It has so far taken the best part of 3 hours to wrestle out that which was required for this demo from my oh so tidy development folder.

I have coded the settings to make this still an easy "game", but as its still in development with feedback on the functionality and performance being more important, if you died in a few seconds then there would be nothing to report, except maybe "its too hard ".

When you die you die, so keep that health topped up.

Not had anytime yet to code and develop a spawning system for the Bugs so I kind of just drop them in on the player, so, wear a hat.

Showcase Page & Download Link Here.

Monday, 28 March 2011

MAGIA .. Monday ... and a little bit

Just a little update, I have managed only to grab a few hours here and there to spend on this since last Monday, and its now looking like it will not be until thursday when I can get into it like I did last monday. So heres a quick low quality video of how it stands at the moment.

Have a good week all.

I hope to get V0.02 uploaded by the end of the week.




Tuesday, 22 March 2011

MAGIA .. Monday

Feeling the need to finally start sorting through my storage HDD's I came across my Blitzmax code library. I needed to test the code snippets and sort through what was worth keeping and what was broken. I found a FPS framework I had been working on but the code got broken with the release of 2.32, so before I binned it I thought I'd have yet another go at getting it at least to run. This was about 6.00 am monday morning, well I did have the whole of the day to myself, quite a rare occurrence. At around 11.00 am it was up and running, took an hour to locate all the assets it utilised lol. Still full of bugs and problems, I thought what the ... Heck .. and sat down with a gallon pot of coffee and tinkered with it ... and tinkered.. and tinkered a little more .. by the afternoon I was down to two issues, both to do with parenting objects in the transparency world. I left this and started looking through other code and slowly began to add different proof of concepts I had worked on over the last year or so...

Don't you just hate it when that happens ...

OOP's I did it again ....

I continued to tweak and tinker and add ..at around 10pm .. I had an Idea how to tackle the original transparency/parenting problem whilst chatting with Paul. At around 11.30pm I realised, the makings of a game had been born ... that game is currently known as:

Furious Frank


Well, its quite an easy "game" at the moment with infinite ammo and infinite life even if the HUD is telling me its running down .. but not a bad days work I felt .. hopefully next monday I can wrangle some more time and tweak it and add to it.

If I get time today, I will upload a demo to the showcase under the title, MAGIA Monday (as I Dont have time to spend a month on it).

Thursday, 10 February 2011

I'll Take What's Behind Door Number 3

Time is proving to be a most scarce commodity at the moment. So having a few hours spare I set myself some tasks and as usual did something completely different :rolleyes: I started work on a room and ended up on a new 90 degree section, corridor doorway section (with separate reusable door frame / doors and simple placeholder keypad switch box all to need textures), a few WIP scripts for the doors and some hashed together sound FX for them to and a short corridor "Door Plug" section to allow the standard sections to fit the door frame. Part of the plan for this modular approach to the level is that as many sections/parts as possible will be able to "plug" into each other. I also wanted to test out some new base metal textures to try and break up the "monotone" look. The door keypad switch would also require some sort of 3rd person object interaction functionality which was hastily coded and again as with everything else, still very much a WIP.


Simple keypad switch prop:


Development in Silo PRO:



A quick medium resolution video to show the "worksite" test scene. I can't take credit for the blue and yellow textures they are curtesy of Paint.NET's floodfill tool..






Hopefully next week I will be able to free up more than only a few hours to get fully back into this "adventure", but I was not unhappy with the progress I made in only two hours.

Saturday, 5 February 2011

Scale to the chief

With the basic texture workflow pretty much sorted for the modular level design (see here), I have turned my attention to getting a scale I am happy with. When this is done then after each section is modelled and then UV mapped it should be just a simple case of converting to .gmf format (famous last words). Scaling seems to be an issue that crops up across all the engines I use. But truthfully it matters not what others scale to, but that the relative scaling used in a scene is consistent for all static and animated meshes from props to scene to characters. LE has a scale of 1 unit is about 1m, I simply use 1 unit as 1m, therefore a character needing to be 6 foot tall would simply be a "metric" 6 foot.. or 1.8 units. This is the rule of thumb I use for all scenes and corresponding code. But sometimes its also good to check how it looks by eye. In a 3rd person situation its not just the scale of the level and the characters but having to remember the camera offset and how this would be effected. I normally do two tests, a simple static scene with characters and props placed to get a simple overall picture of the scaling.


And I like to knock up a quick app with a basic 3rd person collision cam and have a quick walk through (HD available):






So far I am happy with the results which means when time permits I can get on with creating the rest of the sections/rooms ect. I have also checked the scaling to make sure I can easily "block out" the level and run it through my pathfinding mapdata generator app which I had some success with in earlier tests of A* pathfinding (see here).

Wednesday, 8 September 2010

Next.. Ambient NPC population

Working on two principles K.I.S.S. (keep it simple stupid!) and more for less.

I spent a lot of time researching (read playing) certain games that have what I call an ambient NPC population. This is specifically those NPC's that reside in the background and generally have no real or very limited interaction with the player. Two such areas of research included Assassins Creed and Fable 2. Although both of these games have a far more complex general NPC population than what I am setting out to create, but the "research" was most enjoyable.

First Step:

Machine Intelligence "Kinda Almost":

Machine Intelligence "Kinda Almost", simply gives an illusion that there is intelligence at work but there is not, sort of like, the lights are on but no ones home. There are several subsets to this group but the obvious one is simple animation. Also this can include proximity reaction behaviour, a posh and complicated way of saying when the player is near, stop what you are doing, and do this instead. But that's as far as interaction goes for those NPC's in this group. This simple ambient NPC type could also use lua scripts, loaded with the level and be left to attend to themselves.

For example, just two chaps having a chat:



Having a chat is basically all they do, its simple per character animation's controlled by lua scripts. The purple block volume is the walkable area that would be utilised by more "advanced" ambient NPC's, typically those that move about, particularly those that would use Pre-Loaded and Pre Calculated path routes for this particular level. The purple block volumes are simply required by the application I wrote to generate the route node data for the pathfinding tools I created and have demonstrated here. Not that this is a level just something thrown together for testing but I think I should unarchive some of my GMF format models and put together a small town/Village for testing this, rather than another simple "BlocksVille".

There are obvious limitations to consider with this approach to the first tier of the Ambient NPC population for a "busy" town/village. The NPC's need animation's, most come with maybe 15 animation's (if you're lucky). My intention is to surmount this by adding animation's to them, primarily Mo-Caps. This will require a little work but will be the bedrock for the construction of this "tier". There are some very good applications on the market for achieving this. For me I prefer Fragmotion, there is also a free alternative that I also use on occasion called Pacemaker. But don't be fooled though, none of these applications will do it all "for you", you will need to skin the mesh to the correct rig for the plethora of free to use Mo-Caps, or indeed ones that can be purchased. It will all depend on budget and or requirement.

This is still only a very basic outline for this "packing" stage, it will still require a lot of work but my goal is to get the impact of it at runtime to an almost negligible effect even when including proximity reaction behaviour.

Monday, 30 August 2010

Attack of the Killer pathfinding butterflies!

Just a little bit of fun with A* pathfinding using Blitzmax and Leadwerks, and some Butterfly/Insect AI I had been working on.


Sunday, 29 August 2010

A* Pathfinding Using Blitzmax And Leadwerks Engine

Following on from:

On The Right Path, A* Pathfinding In Leadwerks.

The Way Forward ... Making Blitzmax Trax ...

I decided to give the testing a few more hours. First off I wanted to create a new NPC Type which would have its own control flags and most importantly its own path storage buffer.

After a little thinking (a little thinking is what I excel at lol) and a few hours of coding and tweaking, I managed to get 32 new NPC Types all pathfinding their individual way around "BlocksVille".





For those interested I will try and get a demo.exe up later onto the showcase thread:

Pathfinding With A*

Demo now added: Hide And Seek Demo 2

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites