Commit Graph

120 Commits

Author SHA1 Message Date
Benoit Bolsee
bc059cb8b2 BGE bug: crash when an object being tracked-to is deleted (bad practice anyway). Fix by creating a generic cross reference between actuators (only TrackTo uses it at the moment) and objects so that the actuator is informed when the target object is deleted 2008-04-26 20:41:25 +00:00
Benoit Bolsee
9b9359120f BGE bug: fix a crash at game exit caused by inconsistent controller map after object deletion. The bug became apparent since the memory leaks have been fixed. 2008-04-24 21:26:39 +00:00
Benoit Bolsee
bdf5c0689b BGE bug fix: crash at exit when object with Radar/Near sensor has debug properties 2008-04-19 21:15:37 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Benoit Bolsee
6bb327badc BGE fix: keep reference count consist on source object when replicating property copy actuator 2008-04-14 22:45:28 +00:00
Benoit Bolsee
88ce1c0638 Removed my own patch #8208: export SCA_ISensor::Evaluate() to Python. It was only useful for the ray sensor and the new rayCastTo() function provides better functionality 2008-04-06 19:14:04 +00:00
Benoit Bolsee
1bdc909555 BGE bug [#4839] fixed: joystick keeps working after an overlay scene is removed 2008-04-04 20:39:31 +00:00
Benoit Bolsee
51ea7645e2 Fix BGE bug: BGE will crash if objects with display debug property is deleted (bad practice anyway). The actual deletion is now postponed until end of scene 2008-04-01 20:46:20 +00:00
Benoit Bolsee
b20f6e27ff Commit patch #8724:
This patch modifies the BL_ConvertMesh method from the data conversion module in order to reduce the number of polygon
material objects that are created.

Normally, there should be only one material object for each material bucket(the group of meshes that are rendered together
with a single material). However, the number of materials that are created right now in the converter is much higher
and eats a lot of memory in scenes with large polygon counts. This patch deletes those material objects(KX_BlenderMaterial)
that are used only temporarily in the converter(and are now deleted only when the converter is destroyed, at the end
of the game).

For a cube that's subdivided 7 times(90+ k polygons) I get 200 MB usage in the game engine in 2.45 and 44 MB with a
svn build with this patch applied if the "Use Blender Materials" option is activated in the Game menu.
2008-03-23 23:12:40 +00:00
Benoit Bolsee
6615f8b74f BGE correction: AddRef() on source object of property actuator to protect against crash if the source object is deleted (bad game design anyway) 2008-03-22 14:47:42 +00:00
Benoit Bolsee
0db0f5734d Various mem leaks related to CValue reference count fixed 2008-03-01 19:46:50 +00:00
Benoit Bolsee
407b2d334d unknown property fixed in sensor/actuators 2008-03-01 19:05:41 +00:00
Benoit Bolsee
8d81e154f6 random sensor fixed (patch 8414) 2008-03-01 18:46:23 +00:00
Benoit Bolsee
13aa413361 patch 8235 8218 8211 added: various gameengine improvements, fixed windows project files 2008-02-15 23:12:03 +00:00
Joshua Leung
33f3f85235 Reverting some other changes zaghaghi made 2008-02-05 21:09:38 +00:00
Kent Mein
43bfcd70a3 Added missing include dir so it builds again.
Kent
2008-02-04 15:52:47 +00:00
Hamed Zaghaghi
5faa2e63a1 bugfix 8183, Ray sensor with material/property filter always triggers when hitting object without the required characteristic fixed by Benoit Blosee(ben2610), and some minor changes for 2d-filters. 2008-02-04 03:48:46 +00:00
Hamed Zaghaghi
af169b41fd 2d Filters updated, now you can use custom filter and write your own GLSL shader program to filter rendering result. 2007-11-06 12:16:12 +00:00
Hamed Zaghaghi
21eb3e11e0 2d-Filters feature and actuators. 2007-10-22 20:24:26 +00:00
Kent Mein
4e2143f639 This commit fixes up a bunch of svn properties to hopefully make things a little nicer for everyone.
Patch provied by gsrb3d

bug tracker #7061

Kent
2007-08-28 10:07:08 +00:00
Erwin Coumans
e820cdf6a0 fixing some issues: force needs to wake up objects, property sensor issue, island activation issue 2006-12-25 02:02:13 +00:00
Jacques Beuarain
24f4440d05 CMake lists initial submission. Documentationand further verification for different platforms will follow soon. This was just tested against current CVS on MSVC 2005 with Verse, QuickTime, OpenEXR, Player all on. 2006-11-17 02:27:12 +00:00
Erwin Coumans
ab71e2a9b5 -added basic support for GameActuator 'load game', relative paths were broken, just load file into memory and load blend from memory.
-near sensor support
- python binding for PhysicsConstraints.setNumTimeSubSteps (dividing the physics timestep to tradeoff quality for performance)
2006-05-22 21:03:43 +00:00
Erwin Coumans
337a84ee96 GamePython related: changed ordering of python destruction, and reverted some python changes (it caused problems) 2006-05-14 03:39:07 +00:00
Erwin Coumans
4a5826fa83 Patch from Charlie:
Cleared the python dictionary at the end of the game engine, should fix some issues,
also reverted the python controller changes, related to this

This should fix the following bugs:
[ #3789 ]
[ #3815 ]

possiblyy fixes:
[ #3834 ]
2006-05-13 23:31:36 +00:00
Erwin Coumans
ede20c166a - Charlie provided a work-around for some armature related crashes
- fixed some Bullet raycasting (hitfraction was not properly updated for static meshes)
- removed some cvs tags in Bullet's BMF _Font files (they keep on conflicting when duplicated in different repositories)
- set default linearsleepingtreshold explicitly
2006-05-11 17:58:23 +00:00
Erwin Coumans
55ab57519d modified behaviour of PropertySensor and MessageSensor on popular request.
Logic systems should be improved, with consistent Level and Edge triggering usage in the logic bricks.
2006-05-09 23:43:14 +00:00
Erwin Coumans
e4790aef46 Improved OpenGL Shader Language support for game engine. The python interface is much simplified. Drawback is that scripts need to be updated next release. Testfiles:
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/&file=demos-2.42.zip

patch by Charlie Carley (snailrose @ elysiun.com)
2006-02-13 05:45:32 +00:00
Nathan Letwory
ef1b7a5735 ==SCons==
+ 'scons blenderplayer' builds blender AND blenderplayer now (tested on Linux
  only, but was only linking issue, so should work on other platforms too).

  NOTE: I noticed some compileflags for GE specific libs that were left out -
  I re-enabled them in the SConscripts, but I'm going to do a test build my-
  self now, so if there are problems with them on win32, I probably already
  know about them :)
2006-02-07 21:24:36 +00:00
Nathan Letwory
3bb82a27fc == SCons ==
* This commit is all of the rewrite work done on the SCons system. For
  documentation see doc/blender-scons.txt and doc/blender-scons-dev.txt.
  Also http://mediawiki.blender.org/index.php/BlenderDev/SconsRefactoring
  contains valuable information, along with what still needs to be done.

    - linux, os x and windows compile now.
    - files are compiled to BF_INSTALLDIR (see config/(platform)-config.py)
        - NOTE: Jean-Luc P will commit sometime during the weekend proper
          appit() for OS X. For now, copy the resulting binary to an
          existing .app bundle.
    - features:
        - cleaner structure for better maintenance
        - cleaner output during compile
        - better handling of build options
        - general overall speed increase
        - see the wiki for more info

  Cygwin, FreeBSD and Solaris systems still need work. For these systems:
    1) copy a config/(platform)-config.py to ie. config/cygwin-config.py
    2) set the proper defaults for your platform
    3) mail me at jesterking at letwory dot net with you configuration. if
       you need any modifications to the system, do send a patch, too.

  I'll be giving first-aid today and tomorrow, after that it'll be all
  regular development work :)

  /Nathan
2006-02-04 14:15:10 +00:00
Kent Mein
8e9222ec21 More simple fixes to cleanup warnings and what not:
extern/bullet/BulletDynamics/ConstraintSolver/SimpleConstraintSolver.h
        added newline at end of file.
 intern/boolop/intern/BOP_Face2Face.cpp
        fixed indentation and had nested declarations of a varible i used
                for multiple for loops, changed it to just one declaration.
 source/blender/blenkernel/bad_level_call_stubs/stubs.c
        added prototypes and a couple other fixes.
 source/blender/include/BDR_drawobject.h
 source/blender/include/BSE_node.h
 source/blender/include/butspace.h
 source/blender/render/extern/include/RE_shader_ext.h
        added struct definitions
 source/blender/src/editmesh_mods.c
 source/gameengine/Ketsji/KX_BlenderMaterial.cpp
 source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
 source/gameengine/Ketsji/KX_RaySensor.cpp
        removed unused variables;
 source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
        changed format of case statements to avoid warnings in gcc.

Kent
2006-01-30 19:59:33 +00:00
Erwin Coumans
2e6d576182 Sorry to break the cvs-closed status, so if you really need to make a new 2.40 build, just disable the game engine if it doesn't compile for a platform. Again, sorry if this breaks non-windows platforms, but I hope people help to get this amazing fix working for all platforms. Armature-fixing contribution from Snailrose. Also lots of cool things from Snailrose and Lagan.
Armatures are back
Split screen
Double sided lightning
Ambient lighting
Alpha test
Material IPO support (one per object atm)
Blender materials
GLSL shaders - Python access
Up to three texture samplers from the material panel ( 2D & Cube map )
Python access to a second set of uv coordinates

See http://www.elysiun.com/forum/viewtopic.php?t=58057
2006-01-06 03:46:54 +00:00
Erwin Coumans
701b9c21fd more preparations for bullet physics, and some eol issues with SCA_Joystick* 2005-07-18 05:41:00 +00:00
Kester Maddock
6c4ae1eb54 Patch: [ #2439 ] Makes objects react properly to deformations after a mesh replacement call.
from brian hayward (bthayward)

Detailed description:
 Currently, when an armature deformed object's mesh is replaced by the ReplaceMesh actuator, the new mesh fails to deform to the armature's movement.

 My patch fixes this by properly replacing the deform controller along with the mesh (when appropriete).

 For instance, if one had an animated character using any of the standard deformation techniques (armature, ipo, RVK, or AVK), that character's mesh would currently be prevented from changing mid-game. It could be replaced, but the new mesh would lack the controller which tells it how to deform. If one wanted to dynamiclly add a hat on top of the character's head, it would require storing a secondary prebuilt character (mesh, armature, logic, ect...) on another layer FOR EACH HAT the character could possibly wear, then swapping out the whole character when the hat change was desired. So if you had 4 possible hat/character combos, you would have 4 character meshes, 4 armatures, 4 sets of logic, and so on. I find this lack of flexibility to be unresonable.

 With my patch, one could accomplish the same thing mearly by making one version of the character in the main layer, and adding an invisible object atop the character's head (which is parented to the head bone). Then whenever it becomes desirable, one can replace the invisible object's mesh with the desirable hat's mesh, then make it visible. With my patch, the hat object would then continue to deform to the character's head regardless of which hat was currently being worn.

 *note 1*
 for armature/mesh deformations, the new mesh must have properly assigned vertex groups which match one or more of the bones of the target armature before the replaceMesh call is made. Otherwise the vertices won't react to the armature because they won't know how. (not sure if vertices can be scripted to change groups after the game has started)

 *note 2*
 The added processing time involved with replacing the object's deform controller is negligible.
2005-04-18 11:44:21 +00:00
Chris Want
6275dd5b14 Clean up for Makefiles: some of the directories were being printed
wrong (e.g., "/Fuzzics" and "/Joystick", and some of  the solid stuff).
This was particularly noticable during "make clean".
2005-04-09 22:40:34 +00:00
Kester Maddock
c844aa265a Big patches:
Erwin Coumans: Abstract the physics engine
Charlie C: Joystick fixes
Me: Moved the ray cast (shadows, mouse sensor & ray sensor)
2005-03-25 10:33:39 +00:00
Jean-Luc Peurière
3ca88c4e7f ome more warnings cleaning 2005-03-14 20:10:22 +00:00
Jean-Luc Peurière
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
Simon Clitherow
4d17f9797c - updated MSVC 6 projectfiles.
-  removed 'using namespace std;' from SCA_Joystick.h
     (gave compile error on VC6).
2005-01-30 15:41:59 +00:00
Kent Mein
1b1ff7ea92 Fixed the Makefiles so the Joystick stuff works.
Kent
2005-01-24 16:16:50 +00:00
Kester Maddock
d21b9be9a8 Don't delete the Python Controller's private dictionary between frames. 2005-01-23 01:38:41 +00:00
Kester Maddock
a1f0f165e4 Added Joystick sensor (from snailrose) 2005-01-23 01:36:29 +00:00
Kent Mein
f13bff1588 The non scons specific stuff for bug tracker bug #2131
Basically removed #include <iostream.h>
from some files that didn't need it (and I'm assuming it caused problems)

I'll leave the scons stuff for someone else to look at since I don't really
use it.

Kent
2005-01-18 14:17:44 +00:00
Nathan Letwory
333f0a29db Added #include <assert.h> so it compiles where assert() was used. 2004-10-16 18:13:00 +00:00
Kester Maddock
7b2567924b Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware.
Keyboard sensors can now hook escape key.  Ctrl-Break can be used from within blender if you've forgotten an end game actuator.

Fixed a stupid bug preventing some actuators working (like TrackTo).
2004-10-16 11:41:50 +00:00
Kester Maddock
baa2f99f07 Port Python updates from Tuhopuu2:
getType/setType to action/sound actuator (sgefant)
Use a more generic python -> math conversion.
2004-07-17 05:28:23 +00:00
Kester Maddock
4c53f38756 Minor Fixes:
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)
2004-06-26 09:15:41 +00:00
Kester Maddock
c16444e624 Python updates:
Added scene module
2004-06-07 11:03:12 +00:00
Kester Maddock
44f45894c2 Miscellaneous Fixes:
Add Python Mapping method to CListValue
Fix Bernoulli bool distribution python method for random actuator
Fix Python IpoActuator methods setProperty and force acts local
Make data objects private
Better sort method for polygon materials - much easier to understand
2004-06-04 03:00:13 +00:00
Kester Maddock
4ff321d507 Fix bug #1334: Crash with Python/GameEngine when the script has syntax errors.
When Python compile fails (eg syntax errors) skip the execute stage.
2004-06-04 02:10:58 +00:00
Kester Maddock
8253d3e041 Python fixes:
Reenabled the setScript/getScript methods for python controller bricks.
Set the ray source point to MouseFocusSensor.getRaySource works.
Added: Python -> MT_Quaternion
MT_Matrix4x4, MT_Matrix3x3, MT_Vector3, MT_Point3 -> Python

Correct transform of frustum bound sphere centre point to world coordinates
2004-05-26 12:09:17 +00:00
Kester Maddock
d5fde6c48b Added #!/usr/bin/python standard script identifier to the start of SConscript files.
Makes text editors identify SConscripts as Python, and syntax highlight properly.
2004-05-16 13:07:20 +00:00
Kester Maddock
2fd6e72851 Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
Kester Maddock
08c14c7ca0 Mouse Wheel Support for the Game Engine.
This adds "Wheel Up" and "Wheel Down" as choices to the Mouse sensor brick.
2004-05-02 23:45:03 +00:00
Nathan Letwory
00291b5cf4 [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process
[SCons] Build solid and qhull from the extern directory and link statically against them

That was about it.

There are a few things that needs double checking:

* Makefiles
* Projectfiles
* All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
2004-03-22 22:02:18 +00:00
Michel Selten
70a4ead0ae SCons updates
* Blender static now links. By default this option is disabled on all
  platforms. Simply set the option in config.opts to 'true'.
* Added the following flags to config.opts:
  - HOST_CC.    This is the C compiler for the host platform. This value is the
                same as TARGET_CC when not cross compiling.
  - HOST_CXX.   This is the C++ compiler for the host platform. This value is
                the same as TARGET_CXX when not cross compiling.
  - TARGET_CC.  This is the C compiler for the target platform.
  - TARGET_CXX. This is the C++ compiler for the target platform.
  - TARGET_AR.  This is the linker command for linking libraries.
  - PATH        This is the standard search path
  All SConscript files have been updated to reflect these changes. Now it's
  possible to change only the root SConstruct file, and all compiler specific
  variables are passed automatically to all SConscript files. Of course, this
  does not apply to makesdna because there the host and target platform is
  different from all other libraries.
  To pass a variable that applies to all platforms, all we now have to do is
  set the correct value in library_env


Note: as usual, to get the latest options in the config.opts file, first
      remove your version.
2004-02-29 21:40:48 +00:00
Michel Selten
9e238d385d SCons updates
* Almost all library settings are now available in the config.opts user option
  file.
* All platform variables had to be updated to make this possible. Things are
  much clearer now, but I only was able to test the changes on Linux. I've
  tried to update all other platform variables, but things are most likely to
  be broken. Please contact me how to resolve the issues.


Note: Before running scons, remove your existing config.opts file to get all
      new options.
2004-02-21 15:13:15 +00:00
Michel Selten
9330e553e8 SCons updates
* libraries are now generated in [BUILD_DIR]/lib
* passed the user_options to all libraries now.
  This means I could remove a couple of Export/Import lines.
* Changed the order in source/blender/src/SConscript and
  source/gameengine/SConscript.
  All libraries are now sorted alphabetically. This has no impact on the build
  process.
2004-02-15 19:25:32 +00:00
Michel Selten
2883110a54 SCons updates: (All done by jesterKing)
* Windows .exe file now includes the blender icon.
* Builds with game engine on Windows only.
  I tried building the game engine on Linux, but I get weird errors when
  building with ode. There's a dirty #include path in
  Physics/BlOde/OdePhysicsEnvironment.cpp (../ode/src/joint.h). gcc doesn't
  like this somehow.
* Other platforms need to add a couple of flags to the SConstruct:
  use_sumo, use_ode, solid_include and ode_include
2004-01-20 20:28:39 +00:00
Wouter van Heyst
57a7dfe5a5 - Revert to NaN makefiles 2004-01-05 00:06:11 +00:00
Alejandro Conty Estevez
eff07b8329 Basic initial yafray integration by Eeshlo.
Materials are exported the best we can do by now. It will look almost as in
blender except for the missing procedural textures and some minor issues.
You have to tweak normal modulation amount to get the desired result cause
is not the same in yafray.

We added a panel in render space to adjust some yafray settings (GI and so)

Also we export transparency and reflection using new raytracing settings,
but that will be changed and improved soon.

Remember that you have to set YFexport path in user defaults and yafray must
be on path (version 0.0.6)

We added the "yafray" button to activate all this stuff in the render window.
Panel and settings are only shown when checked.

So now when activated the code calls yafray export instead of the internal
renderer and finally the resulting image is loaded back into render window's
buffer. So animation is also possible and results can be saved using blender
usual scheme.
2004-01-04 22:10:36 +00:00
Wouter van Heyst
22305bc08d FreeBSD can use the exact same python includes as everyone else 2003-03-25 23:36:40 +00:00
Hans Lambermont
302399b9d0 and the other FreeBSD python locations. 2003-01-04 01:41:19 +00:00
Kent Mein
e9a7e30758 Removed another unused var and cleaned up a couple of lines of code
Here is the diff

Kent

Index: GameLogic/SCA_KeyboardSensor.cpp
===================================================================
RCS file: /cvs01/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp,v
retrieving revision 1.3
diff -u -r1.3 SCA_KeyboardSensor.cpp
--- GameLogic/SCA_KeyboardSensor.cpp    25 Nov 2002 15:29:42 -0000      1.3
+++ GameLogic/SCA_KeyboardSensor.cpp    30 Dec 2002 07:09:42 -0000
@@ -167,14 +167,14 @@
        } else
        {

-         //            cerr << "======= SCA_KeyboardSensor::Evaluate:: peeking at key status" << endl;
-               const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) m_hotkey);
+       //              cerr << "======= SCA_KeyboardSensor::Evaluate:: peeking at key status" << endl;
+               const SCA_InputEvent & inevent = inputdev->GetEventValue(
+                       (SCA_IInputDevice::KX_EnumInputs) m_hotkey);

-               //              cerr << "======= SCA_KeyboardSensor::Evaluate::
status: " << inevent.m_status << endl;
+       //              cerr << "======= SCA_KeyboardSensor::Evaluate:: status: " << inevent.m_status << endl;

                if (inevent.m_status == SCA_InputEvent::KX_NO_INPUTSTATUS)
                {
-                       int i=4;
                } else
                {
                        if (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED)
2002-12-30 07:13:26 +00:00
Kent Mein
f1c4f705a1 Removed the config.h thing from the .h's in the source dir.
So we should be all set now :)

Kent
--
mein@cs.umn.edu
2002-12-27 13:11:01 +00:00
Kent Mein
209a2ede2c Last of the config.h mods...
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

added to these files.

Kent
--
mein@cs.umn.edu
2002-11-25 15:29:57 +00:00
Kent Mein
b9a19f1ea7 Did all of the .h's in source
(adding)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

also the Makefile.in's were from previous patch adding
the system depend stuff to configure.ac

Kent
--
mein@cs.umn.edu
2002-11-25 11:16:17 +00:00
Kent Mein
01bff70383 fixed spacing in the headers to get rid of some warnings and some other
little minor spacing issues.
2002-10-30 02:07:20 +00:00
Erwin Coumans
b8c8715c20 moved KX_Python_... files from ketsji to expressions
(ketsji was a very wrong location because it caused circular dependencies between expressions, gamelogic and ketsji)
expressions and game logic are not dependent on ketsji anymore (only the other way around)
also removed circular includes in makefiles and projectfiles
2002-10-21 19:23:52 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00