Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-07-30BGE patch: logic optimization part 2: remove inactive sensors from logic ↵Benoit Bolsee
manager. With this patch, only sensors that are connected to active states are actually registered in the logic manager. Inactive sensors won't take any CPU, especially the Radar and Near sensors that use a physical object for the detection: these objects are removed from the physics engine. To take advantage of this optimization patch, you need to define very light idle state when the objects are inactive: make them transparent, suspend the physics, keep few sensors active (e,g a message sensor to wake up), etc.
2008-07-30Bugfixes: fix for two memory leaks related to dupligroups,Brecht Van Lommel
and a missing reference count in the trackto actuator. This showed up as leaked pose data, but actually the whole object was not being freed.
2008-07-30* making sure BGE compiles after brecht's big commit (r15867). Needed ↵Nathan Letwory
<algorithm> to compile with msvc.
2008-07-30Am teaching a GE course this week, and am finding some small issues that I'm ↵Mal Duffin
hoping to patch. This one deals with the very small default clipend value ( 100.0 ) when pressing P to run the GE from a non-camera view. ( ie if the user zooms out a bit from the default box area, the box will get clipped out of view, so it's a WFT from the user ) To see what this fixes, load up Blender default scene, go into perspective, and press P. Everything looks grand. Now, zoom out until the box is about 10 pixels high, and press P again. The box will disappear / be clipped out. I've set the clip end to the maximum ( 5000 ) as defined in Camera.h. This should be suitable for inclusion in 2.47 branch also.
2008-07-29Game Engine: alpha blending and sortingBrecht Van Lommel
======================================= Alpha blending + sorting was revised, to fix bugs and get it to work more predictable. * A new per texture face "Sort" setting defines if the face is alpha sorted or not, instead of abusing the "ZTransp" setting as it did before. * Existing files are converted to hopefully match the old behavior as much as possible with a version patch. * On new meshes the Sort flag is disabled by the default, to avoid unexpected and hard to find slowdowns. * Alpha sorting for faces was incredibly slow. Sorting faces in a mesh with 600 faces lowered the framerate from 200 to 70 fps in my test.. the sorting there case goes about 15x faster now, but it is still advised to use Clip Alpha if possible instead of regular Alpha. * There still various limitations in the alpha sorting code, I've added some comments to the code about this. Some docs at the bottom of the page: http://www.blender.org/development/current-projects/changes-since-246/realtime-glsl-materials/ Merged some fixes from the apricot branch, most important change is that tangents are now exactly the same as the rest of Blender, instead of being computed in the game engine with a different algorithm. Also, the subversion was bumped to 1.
2008-07-29BGE patch: fix support of group hidden layer in dupli group instantiation: ↵Benoit Bolsee
only the objects in layers matching the group layer mask will be instantiated. This is equivalent to the 3D view
2008-07-28Bugfix: game engine does not support non-camera type objects as aBrecht Van Lommel
camera, would crash, so disabled using the object as a camera then.
2008-07-26BGE patch: support runtime duplication of groups. Adding an object with ↵Benoit Bolsee
Dupligroup option set will cause the group to be instantiated. No special actuator is needed for this feature, just put dupligroup objects in inactive layers and add them dynamically
2008-07-26added exception messages to game engine matrix and vector conversions. also ↵Campbell Barton
removed own unneeded defines in arithb.c
2008-07-25BGE patch: approve patch #17312: Multiple material IPOs per mesh in BGE.Benoit Bolsee
2008-07-25BGE bug fix: approve patch #17297: Track To Actuator bug fixBenoit Bolsee
2008-07-24BGE patch: Add PyDoc for new logic bricks, set exception message on Py ↵Benoit Bolsee
error, remove args on Py functions that don't take any to save CPU time
2008-07-23Added NodeUpdateGS so GameObject Python api alignAxisToVect function,Campbell Barton
Otherwise the rotation isn't applied.
2008-07-23BGE patch: Add min/max parameters to orientation constraint actuatorBenoit Bolsee
The min/max parameters define a minimum/maximum angle that the object axis can have with the reference direction without being constrainted. The angle is expressed in degree and is limited to 0-180 range. The min/max parameters define a conical free zone around the reference direction. If the object axis is outside that free zone, the actuator will tend to put it back using as a temporary reference direction the vector that is exactly at min or max degree of the reference direction (depending if the axis angle is below the minimum or above the maximum) and is located in the plane formed by the axis and the reference direction. With a low damping value, this is equivalent to clamping the axis orientation within min/max degree of the reference direction. Backward compatibility corresponds to the absence of free zone: min = max = 0.
2008-07-22BGE patch: update KX_GameObject::getChildren() to use CListValue instead of ↵Benoit Bolsee
python list (allows name search keep refcount consistent)
2008-07-22== Grease Pencil ==Joshua Leung
Grease Pencil is a tool which allows you to draw freehand in some views, allowing you to annotate/scribble over the contents of that view in either 2d or 3d. This facilitates many easier communication and planning abilities. To use, simply enable it from the View menu (choose 'Grease Pencil...' and click 'Use Grease Pencil'). Then, click+drag using the left-mouse button and the shift-key held to draw a stroke. For more information, check the following page on the wiki: http://wiki.blender.org/index.php/User:Aligorith/247_Grease_Pencil
2008-07-21BGE patch: Optimization of bullet adaptation layer - part 1.Benoit Bolsee
First batch of optimizaton of the bullet adaptation layer in the BGE. - remove circular motion state update. - optimization of physic adaptation layer for bullet: bypass unecessary conversion of rotation matrix to quaternion and back. - remove double updates during object replication.
2008-07-21BGE 2dFilters some extra fixesHamed Zaghaghi
2008-07-21BGE Bug Fix:#17349, fixes some problems about 2d-filtersHamed Zaghaghi
2008-07-21BGE patch: constraint orientation actuator did not work when damping=0.Benoit Bolsee
2008-07-20GameObject functions getChildren() and getChildrenRecursive()Campbell Barton
2008-07-20BGE bug fix (for 2.47): setParent() fix, third part: set mass to 0 when ↵Benoit Bolsee
parenting. Allow loc/scale/orientation change on child object with physic controller.
2008-07-19syntax change so GCC 4.3 will buildCampbell Barton
2008-07-19BGE bug fix (good for 2.47): remove static-static collision messages on the ↵Benoit Bolsee
console since previous SetParent fix. The physical object is set to static+ghost while the object is parented. This behavior will be made optional in a future release. The DisableDynamics actuator will also make the object static except that the ghost/non-ghost flag is preserved.
2008-07-19BGE patch: Relink actuators with target within group when duplicating group; ↵Benoit Bolsee
generalize protection against object deletion for all actuators that point to objects. Certain actuators hold a pointer to an objects: Property, SceneCamera, AddObject, Camera, Parent, TractTo. When a group is duplicated, the actuators that point to objects within the group will be relinked to point to the replicated objects and not to the original objects. This helps to setup self-contained group with a camera following a character for example. This feature also works when adding a single object (and all its children) with the AddObject actuator. The second part of the patch extends the protection against object deletion to all the actuators of the above list (previously, only the TrackTo, AddObject and Property actuators were protected). In case the target object of these actuators is deleted, the BGE won't crash.
2008-07-18BGE patch: support for partial hierarchy in dupligroup instantiation; ↵Benoit Bolsee
removal of links that point to inactive objects during group instantiation. This situation corresponds to a group containing only a portion of a parent hierarchy (the Apricot team needed that to avoid logic duplication). The BGE will instantiate only the children that are in the group so that it follows the 3D view more closely. As a result, the logic links to the objects in the portion of the hierarchy that was not replicated will point to inactive objects (if the groups are stored in inactive layers as they should be). To keep the logic system consistent, these links are automatically removed. This last part of the patch is a general fix that could go in 2.47 but as this situation does not normally occurs in pre-2.47 games, it is not needed.
2008-07-18BGE bug fix (good for 2.47): SetParent actuator did not work on dynamic ↵Benoit Bolsee
objects. Dynamics will now be disabled automatically and the object will be set ghost for the duration of the parenting; this is to avoid static interaction with the parent object. The dynamic state is restored when the parenting is removed with RemoveParent actuator. This fix also applies to setParent() and removeParent() python functions.
2008-07-17BGE patch: use the Blender convention to duplicate groups in the BGE so that ↵Benoit Bolsee
the objects will be created with the location and orientation as in Blender. Note that the BGE handles scaling in a parent tree differently than Blender. To avoid discrepencies between the 3D view and the BGE, use only isotropic scaling on all your objects except the leaf objects (i.e. without children) that can have anisotropic scaling
2008-07-17BGE bug fix (good for 2.47): fix logic reconnection after replication. The ↵Benoit Bolsee
old method was matching the bricks by name assuming they are unique but it is not always the case, especially with the new dupligroup feature. The new method matches the bricks by objects and position.
2008-07-17BGE patch: fix mesh deformation errors with duplicated objects sharing the ↵Benoit Bolsee
same mesh in case of 1) armature+multiple material 2) shape drivers
2008-07-16BGE patch: DUPLIGROUP option supported in BGE.Benoit Bolsee
Blender duplicates groups in the 3D view at the location of objects having the DUPLIGROUP option set. This feature is now supported in the BGE: the groups will be instantiated as in the 3D view when the scene is converted. This is useful to populate a scene with multiple enemies without having to actually duplicate the objects in the blend file. Notes: * The BGE applies the same criteria to instantiate the group as Blender to display them: if you see the group in the 3D view, it will be instantiated in the BGE. * Groups are instantiated as if the object having the DUPLIGROUP option (usually an empty) executed an AddObject actuator on the top objects of the group (objects without parent). * As a result, only intra-group parent relationship is supported: the BGE will not instantiate objects that have parents outside the group. * Intra-group logic bricks connections are preserved between the duplicated objects, even between the top objects of the group. * For best result, the state engine of the objects in the group should be self-contained: logic bricks should only have intra-group connections. Use messages to communicate with state engines outside the group. * Nested groups are supported: if one or more objects in the group have the DUPLIGROUP option set, the corresponding groups will be instantiated at the corresponding position and orientation. * Nested groups are instantiated as separate groups, not as one big group. * Linked groups are supported as well as groups containing objects from the active layers. * There is a difference in the way Blender displays the groups in the 3D view and how BGE instantiates them: Blender does not take into account the parent relationship in the group and displays the objects as if they were all children of the object having the DUPLIGROUP option. That's correct for the top objects of the group but not for the children. Hence the orientation of the children objects may be different in the BGE. * An AddGroup actuator will be added in a future release.
2008-07-15BGE bug fix (good for 2.47): radar and near sensor did not filter correctly ↵Benoit Bolsee
the collisioning objects based on ACTOR flag when the parent object was added dynamically. This could result in a very big performance decrease.
2008-07-15Updated so things compile. (Missing includes needed)Kent Mein
Kent
2008-07-14importing the GameLogic module was being done by adding the text "import ↵Campbell Barton
GameLogic" to the start of all scripts used in the game engine, this meant every error line number was off by 1 (quite annoying). better to do this to the dictionary that the scripts run with.
2008-07-12BGE bug fix (good for 2.47): automatic detection that target object of ↵Benoit Bolsee
AddObject actuator is being deleted to avoid crash (bad game design anyway)
2008-07-12improvement of 2d-filter custom shader, Hamed Zaghaghi
some bugfixes, now you can use depth buffer and luminance buffer without any settings, also you can use object's properties in a shader
2008-07-10Adding an option for action actuator - "Continue" this means animations ↵Campbell Barton
always play from where they left off. Continue was the 2.46 operation too, so new functionality is the option to disable. When using states, an action like kick or throw can often switch out before finishing playing the action, and there was no way to play from the start frame the second time round. (even setting the actions current frame through python doesn't work work)
2008-07-10Sync with Apricot Game EngineBrecht Van Lommel
============================= * Clean up and optimizations in skinned/deformed mesh code. * Compatibility fixes and clean up in the rasterizer. * Changes related to GLSL shadow buffers which should have no effect, to keep the code in sync with apricot.
2008-07-09bugfix, vector was not checked for zero length before normalizing, closing ↵Campbell Barton
blender instantly with an assert.
2008-07-09added a factor argument for aligning to vector, this isn't correct since it ↵Campbell Barton
does linear interpolation of the vector and renormalizes. (can be improved to rotate correctly but for our use ist ok for now, would also be useful to have an argument to clamp the maximum rotation angle to get a constant rotation speed), This will used to make franky upright when falling from an angle, to track to a surface when hanging onto a ledge and setting the glide pitch. Without this rotation is instant and jerky. currently this is done with Mathutils which isnt available in Blender Player. def do_rotate_up(own): own.alignAxisToVect([0,0,1], 2, 0.1) replaces... def do_rotate_up(own): up_nor = Vector(0,0,1) own_mat = Matrix(*own.getOrientation()).transpose() own_up = up_nor * own_mat ang = AngleBetweenVecs(own_up, up_nor) if ang > 0.005: # Set orientation cross = CrossVecs(own_up, up_nor) new_mat = own_mat * RotationMatrix(ang*0.1, 3, 'r', cross) own.setOrientation(new_mat.transpose()) M source/gameengine/Ketsji/KX_GameObject.cpp M source/gameengine/Ketsji/KX_GameObject.h
2008-07-09fix for crasher with touch sensor, ben you may want to look at this, should ↵Campbell Barton
be ok since the ray sensor does NULL checks in for getNewClientInfo in a similar area.
2008-07-08bugfix - GameEngine PyObject methods did not all return when using dir(), ↵Campbell Barton
because inherited methods were ignored, This made it incredibly annoying, not only having to search a C++ file to see what functions were available. but looking up methods inherited from other C++ classes. There is still no __members__ attribute so dir() wont work at all for attributes.
2008-07-08BGE logic patch: new "Add" mode for Ipo actuator, several corrections in ↵Benoit Bolsee
state system. New Add mode for Ipo actuator ============================= A new Add button, mutually exclusive with Force button, is available in the Ipo actuator. When selected, it activates the Add mode that consists in adding the Ipo curve to the current object situation in world coordinates, or parent coordinates if the object has a parent. Scale Ipo curves are multiplied instead of added to the object current scale. If the local flag is selected, the Ipo curve is added (multiplied) in the object's local coordinates. Delta Ipo curves are handled identically to normal Ipo curve and there is no need to work with Delta Ipo curves provided that you make sure that the Ipo curve starts from origin. Origin means location 0 for Location Ipo curve, rotation 0 for Rotation Ipo curve and scale 1 for Scale Ipo curve. The "current object situation" means the object's location, rotation and scale at the start of the Ipo curve. For Loop Stop and Loop End Ipo actuators, this means at the start of each loop. This initial state is used as a base during the execution of the Ipo Curve but when the Ipo curve is restarted (later or immediately in case of Loop mode), the object current situation at that time is used as the new base. For reference, here is the exact operation of the Add mode for each type of Ipo curve (oLoc, oRot, oScale, oMat: object's loc/rot/scale and orientation matrix at the start of the curve; iLoc, iRot, iScale, iMat: Ipo curve loc/rot/scale and orientation matrix resulting from the rotation). Location Local=false: newLoc = oLoc+iLoc Local=true : newLoc = oLoc+oScale*(oMat*iLoc) Rotation Local=false: newMat = iMat*oMat Local=true : newMat = oMat*iMat Scale Local=false: newScale = oScale*iScale Local=true : newScale = oScale*iScale Add+Local mode is very useful to have dynamic object executing complex movement relative to their current location/orientation. Of cource, dynamics should be disabled during the execution of the curve. Several corrections in state system =================================== - Object initial state is taken into account when adding object dynamically - Fix bug with link count when adding object dynamically - Fix false on-off detection for Actuator sensor when actuator is trigged on negative event. - Fix Parent actuator false activation on negative event - Loop Ipo curve not restarting at correct frame when start frame is different from one.
2008-07-06GameObject rayCast and rayCastTo were not setting exception strings (causes ↵Campbell Barton
return without exception set error) Also made game state buttons only have a dot in states that have controllers in them.
2008-07-05== BUGFIX ==Andrea Weikert
- fix crash when exiting game engine (with ESC-key). - reason for crash: std::vector iterator is invalid after vector::erase
2008-07-04Made some python game engine funcs use NOARGS, getAxisVec was using wrong ↵Campbell Barton
multiplication order. Use BUT_TOGDUAL for controllers init states so you can see what the init state is for any controller without using the button to check.
2008-07-04BGE logic update: new servo control motion actuator, new distance constraint ↵Benoit Bolsee
actuator, new orientation constraint actuator, new actuator sensor. General ======= - Removal of Damp option in motion actuator (replaced by Servo control motion). - No PyDoc at present, will be added soon. Generalization of the Lvl option ================================ A sensor with the Lvl option selected will always produce an event at the start of the game or when entering a state or at object creation. The event will be positive or negative depending of the sensor condition. A negative pulse makes sense when used with a NAND controller: it will be converted into an actuator activation. Servo control motion ==================== A new variant of the motion actuator allows to control speed with force. The control if of type "PID" (Propotional, Integral, Derivate): the force is automatically adapted to achieve the target speed. All the parameters of the servo controller are configurable. The result is a great variety of motion style: anysotropic friction, flying, sliding, pseudo Dloc... This actuator should be used in preference to Dloc and LinV as it produces more fluid movements and avoids the collision problem with Dloc. LinV : target speed as (X,Y,Z) vector in local or world coordinates (mostly useful in local coordinates). Limit: the force can be limited along each axis (in the same coordinates of LinV). No limitation means that the force will grow as large as necessary to achieve the target speed along that axis. Set a max value to limit the accelaration along an axis (slow start) and set a min value (negative) to limit the brake force. P: Proportional coefficient of servo controller, don't set directly unless you know what you're doing. I: Integral coefficient of servo controller. Use low value (<0.1) for slow reaction (sliding), high values (>0.5) for hard control. The P coefficient will be automatically set to 60 times the I coefficient (a reasonable value). D: Derivate coefficient. Leave to 0 unless you know what you're doing. High values create instability. Notes: - This actuator works perfectly in zero friction environment: the PID controller will simulate friction by applying force as needed. - This actuator is compatible with simple Drot motion actuator but not with LinV and Dloc motion. - (0,0,0) is a valid target speed. - All parameters are accessible through Python. Distance constraint actuator ============================ A new variant of the constraint actuator allows to set the distance and orientation relative to a surface. The controller uses a ray to detect the surface (or any object) and adapt the distance and orientation parallel to the surface. Damp: Time constant (in nb of frames) of distance and orientation control. Dist: Select to enable distance control and set target distance. The object will be position at the given distance of surface along the ray direction. Direction: chose a local axis as the ray direction. Range: length of ray. Objecgt within this distance will be detected. N : Select to enable orientation control. The actuator will change the orientation and the location of the object so that it is parallel to the surface at the vertical of the point of contact of the ray. M/P : Select to enable material detection. Default is property detection. Property/Material: name of property/material that the target of ray must have to be detected. If not set, property/ material filter is disabled and any collisioning object within range will be detected. PER : Select to enable persistent operation. Normally the actuator disables itself automatically if the ray does not reach a valid target. time : Maximum activation time of actuator. 0 : unlimited. >0: number of frames before automatic deactivation. rotDamp: Time constant (in nb of frame) of orientation control. 0 : use Damp parameter. >0: use a different time constant for orientation. Notes: - If neither N nor Dist options are set, the actuator does not change the position and orientation of the object; it works as a ray sensor. - The ray has no "X-ray" capability: if the first object hit does not have the required property/material, it returns no hit and the actuator disables itself unless PER option is enabled. - This actuator changes the position and orientation but not the speed of the object. This has an important implication in a gravity environment: the gravity will cause the speed to increase although the object seems to stay still (it is repositioned at each frame). The gravity must be compensated in one way or another. the new servo control motion actuator is the simplest way: set the target speed along the ray axis to 0 and the servo control will automatically compensate the gravity. - This actuator changes the orientation of the object and will conflict with Drot motion unless it is placed BEFORE the Drot motion actuator (the order of actuator is important) - All parameters are accessible through Python. Orientation constraint ====================== A new variant of the constraint actuator allows to align an object axis along a global direction. Damp : Time constant (in nb of frames) of orientation control. X,Y,Z: Global coordinates of reference direction. time : Maximum activation time of actuator. 0 : unlimited. >0: number of frames before automatic deactivation. Notes: - (X,Y,Z) = (0,0,0) is not a valid direction - This actuator changes the orientation of the object and will conflict with Drot motion unless it is placed BEFORE the Drot motion actuator (the order of actuator is important). - This actuator doesn't change the location and speed. It is compatible with gravity. - All parameters are accessible through Python. Actuator sensor =============== This sensor detects the activation and deactivation of actuators of the same object. The sensor generates a positive pulse when the corresponding sensor is activated and a negative pulse when it is deactivated (the contrary if the Inv option is selected). This is mostly useful to chain actions and to detect the loss of contact of the distance motion actuator. Notes: - Actuators are disabled at the start of the game; if you want to detect the On-Off transition of an actuator after it has been activated at least once, unselect the Lvl and Inv options and use a NAND controller. - Some actuators deactivates themselves immediately after being activated. The sensor detects this situation as an On-Off transition. - The actuator name can be set through Python.
2008-07-04small changes to py funcs that can run 100s of times a second, so python ↵Campbell Barton
wont generate empty args tuple when they are not needed.
2008-07-04non user visible changes and small optimizations to the game engine pyapi as ↵Campbell Barton
well as fixing some bugs. * 2 returning errors without exception set another return None instead of NULL. * a missing check for parent relation * BPY matrix length was incorrect in matrix.c, this change could break some scripts, however when a script expects a list of lists for a matrix, the len() function is incorrect and will give an error. This was the only thing stopping apricot game logic running in trunk. Also added a function for GameObjects - getAxisVect(vec), multiplies the vector be the objects worldspace rotation matrix. Very useful if you want to know what the forward direction is for an object and dont want to use Blender.Mathutils which is tedious and not available in BlenderPlayer yet.
2008-07-03Adding GameObject setLinearVelocity(), without this interacting with objects ↵Campbell Barton
requires them to have logic bricks to apply force which doesn't work well when the character is in a seperate blend file to the levels. (its also messy to have a script & multiple motion actuators on each object you can pickup and throw). This is also needed for removing any force that existed before suspending dynamics - In the case of franky hanging, resuming dynamics when he fell would apply the velocity he had when grabbing making dropping to the ground work unpredictably. Also note in pydocs that enable/disable rigidbody physics doesn't work with bullet yet.