Just a small update and an information why everything is progressing
so slowly with my tools.
Unfortunatly (well, not really) I'm currently full of work with my daytime job
(project deadlines, new features, etc.) that I'm currently don't have much time
to do some private programming. This weekend I have some freetime
i will spend to fix some bugs with the batch texture converter and coninue with
my work on the asset builder.
Hopefully I'm able to post some progress soon.
I've recently started to use Layers for web apps, and Outlines for Notes apps. And they give a better development speed.However, Layers have also some problems:1) They don't scale with the web browser window like tables do2) When replying with history to an Notes e-mail, layers get all screwed up, so you can only use tables in Notes, but for web apps Layers are still quite goodOutlines for Notes apps totally rock though:1) They expand vertically when you expand their entries (like with subviews)
When your NPC moves it may move at different speeds, especially if you are using some sort of steering. This presents the problem of what speed should you play your walk/run animations. My solution is to analyse the animation and see how far the foot travels from start frame to end frame and when animating play the correct amount of frame(s) for the distance.
Here’s the code:-
#include "anim.h"
void animItem::calcAnimDist( TEntity e, TEntity bone )
{
TVec3 startPos;
TVec3 newPos;
TVe
For NPC AI to work they have to have simulated vision. This is done by using raycast/linepick.
My vision system does the following:-
Takes into account head position - using head bone
Takes into account rotation of NPC spine bone (used for aiming)
Build list of enemies in view range
Takes into account FOV
It looks through each of the ememies bones to see if any part of the enemy is visible. It returns location of the first bone found. This is to make sure enemies are still seen even
Lazlo just released his managed C# Library for use with Leadwerks!
C# Headers
The Object-Oriented layout of this library is wonderfully organized, just like a game engine library should be! With this code the objects aren't stored as pointers, but classes. All of the same features are structured, and each object has related functions to the types of entities per Namespace.
Every .Net Leadwerks developer should download this library.
Their prices are more than 250% the price of a comparable PC. Even their "most expensive" laptop is using a budget GPU! So for less than half the price, you can actually get a laptop with a much better GPU!
$999:
http://www.newegg.co...=laptop%209800m
$2499:
http://store.apple.c...mco=MTM3NDcyOTc
Just for fun, I checked all the most expensive options. The grand total was $7305.35. Who spends $7000 on a laptop with a budget GPU???
I can't believe how dense their management is.
It's 12:30 in the morning, but I have the model scripts working the way I want. Thanks to "Nilium" for his tips, and to everyone who gave their feedback. I am confident in this revision. I have a lot of scripts that need to be slightly altered, but it's just a matter of adjusting the function structure, not really changing any existing code.
Here's the light_ambient script:
require("scripts/class")
require("scripts/linkedlist")
local class=CreateClass(...)
function class:Spawn(model)
lo
I've been revising the Lua design a bit. Ideally this should have been done six months ago, but I did not realize how popular it would be. During beta testing there wasn't much interest in it. That's understandable, because no one likes using beta software. As soon as it was released, suddenly there was some very advanced stuff being implemented immediately. This is great, and I can see my thoughts about how it would benefit us were correct. It also made me want to implement a single-state syste
In a previous blog entry I showed a code sample of the behaviour tree. In the code below is the code that is fired for each behaviour.
The return status mean: -
RUNNING - Keep on running the behaviour
FAILED - Exit this behaviour with error (has different effect depending on sequeance/selector/parallel node.
COMPLETE - Exit this behaviour with complete (has different effect depending on sequeance/selector/parallel node.
#include "actor/include/action.h"
#include <aliv
Here's the code that loads in the verticies to recast:-
Include:-
#ifndef MESHLOADER_SBX
#define MESHLOADER_SBX
#include "leo.h"
#include "MeshLoaderObj.h"
class rcMeshLoaderSBX : public rcMeshLoaderObj
{
public:
TEntity scene;
int vcap;
int tcap;
int nidx;
rcMeshLoaderSBX() { vcap = 0; tcap = 0; scene = NULL;};
~rcMeshLoaderSBX();
void addVertex(float x, float y, float z, int& cap)
{
rcMeshLoaderObj::addVertex( x, y, z, cap);
}
void addTriangle(int a, int b, int c, int&
I got all 3 of these functions working. I'm working on an script to show how these 3 will work.
DoSound(cr, 'abstract::hello.wav')
DoMoveTo(cr, fw.main.camera, GetEntityByName("pivot01"), .05, 1) -- moving the camera to the pivot named pivot01 at a rate of 0.5 and it'll stop when it's at a distance of 1. This move function doesn't use physics. Another function will use physics for movement.
This is my first blog and I'll be using it to document my progress with the Leadwerks engine.
ATM I am still waiting for the parts to arrive for the PC I bought to run the LWE. This will be my first real 3D capable PC and my first concerted effort at 3D game programming. In the past I've only ever used older computers with integrated video cards, as I preferred the look of pre-rendered 2D RPGs like the classic Fallout 1, or Baldurs Gate to 3D games. However after watching the awesome Leadwer
Youtube video of my AI.
Red line is path found by recast.
White text is current behaviours running in behaviour tree.
Here's what the BT looks like (yes it is C++)
alive::Node* moveToEnemy(std::string type = "walk")
{
return alive::TreeBuilder()
.execute<ActionMoveToEnemy>()
.type(type)
.end();
}
alive::Node* resetToStart()
{
return alive::TreeBuilder()
.composite<alive::SequenceNode>()
.execute<ActionCurrentMode>()
.mode("resetToStart
I was just adding wheels to my airplane, and noticed how much time the realtime LUA programming saves me when I was adjusting the positions of the wheels to their exact position. Having the airplane model positioned and zoomed on my screen, I added some code to load and position the wheels, and after each character change in code (like finding the value Vec3(0,0.125,2.01) for the front wheel), I pressed Ctrl-S and saw the result immediately on the screen.
Using C++ or any other compiled lang
So I was able to get DoWait() working. It's not 100% ideal because you have to piggy back off another entities Update() method because of the limitation of not being able to have any global values. If you would like to try it out I'll give the steps here.
1. Make a file under the /Scripts directory named cr.lua and paste this code in it:
tblWait = {}
waitID = 1
clsWait = {}
clsWait.__index = clsWait
function clsWait.create(tm, func)
local wait = {}
setmetatable(wait, clsWwait)
wait.i
People are starting to use Lua, which is good. Initially there was some confusing, but in each case it turned out to be a small misunderstanding. I spent a few hours editing the wiki to add Lua syntax to the commands. I'm going to start working on Lua demos and more high-level stuff, in addition to fixing any bugs that exist. I'm not too interested in adding new features right now. This engine has plenty of features. Tons. It's time to use them to make something.
I haven't been blogging since I started with Leadwerks so this blog will be a bit of a catchup until now. Unlike most people working with Leadwerks I thought I'd ignore all the graphic eye candy as icing on the cake and concentrate on the importing matter of making things happen ie. AI
The bacis of AI is:-
Physics
-------
Knowing whats bumped into what. This is already taken care of in Leadwerks.
Sight
-----
NPC's need to have a sense of sight, this is mimicked by doing
Well, its been almost a week since the release of 2.3 and although I have been working away at it there is still so much new functionality I have not had a chance to fully explore yet. I decided the best approach would be to go back to basics, so to speak. Investigate how the new lua scripting and other features would cross over to C++ and Framewerk, this is still on going for me, and I am mixing that aspect in with getting to grips with the new functions in the editor. All in all I am impressed
New Steam hardware survey results are available:
http://store.steampowered.com/hwsurvey
As of October 2009, 80.79% machines surveyed can run Leadwerks Engine.
Leadwerks Engine 2.3 has been released. This major update includes a new editor, Lua script integration, forest rendering, roads, and more.
Lua Script Integration: Write object scripts and write your game in any programming language, or you can write your entire game in Lua.
New Editor: Leadwerks Editor is our new tool for creating enormous terrains, placing objects, and creating worlds. You can even edit scripts and see the results instantly.
Forest Rendering: An advanced new r
Well, I have been playing with the editor, lua scripts, and integrating lua-scripted objects into a framewerk bmax program. There are some quirks that you have to work around and some modifications that need to be made to some things... First, it doesn't appear you can transfer certain aspects of lua framewerk to an external program that is using framewerk. Setting worlds appears to work but using a framewerk method in lua and expecting it to work in your external program does not.
Setting f