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 ...

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/

UDK Custom Weapon Tutorial.


Ok, the boys over at Magic Stone Studios have just released a UDK Custom Weapon Tutorial.




The tutorial series covers modeling a weapon, rigging, animating, and ends with showing you how to program your custom weapon.

The tutorial series is highly detailed with around fifteen hours of video.

I have run through this myself and it is excellent, so a big hats off to them. The tutorial is free and includes art source files and UDK packages, but for only a small donation, which I took advantage of and recommend, you get the High Resolution Skeletal Meshes, High Resolution Textures/Particles, Sound Effects, Asset Source Files and Source Code.

So many thanks for that guys and wishing you all the best and future success with your current project R.A.T.S.

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, 18 January 2012

UDK - Water with Flow Map


This is a rather impressive technique to control the direction and movement of water in UDK via shaders. This has been done by Phill Johnson, who also kindly wrote a tutorial about how to implement this in UDK, along with a downloadable example map. It uses a 2d vector field and vertex colouring.




Respect to Phill Johnson and I look forward to more UDK "watery works" from him.

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.

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites