[Bf-committers] BGE API Proposal

Campbell Barton ideasman42 at gmail.com
Fri Feb 20 04:00:41 CET 2009


Im not satisfied with a new Module name for API changes - (will be a
mess in the API C++ code)
Or arguments for API version numbers is overkill if you only want to
change small things like how getting the name works.

Maybe we could add a function...

GameLogic.compatibility = "2.4" # to enable the prefix
... opt in/out, Im not fussed.
Or this could be a BGE option like ignore warnings.

For BPython we had Armature API rewritten a number of times Metaballs
API was redone,
NMesh -> Mesh was not that hard to update scripts for.

Im still not convinced that a few simple breaks the API is as bad as
some would make out,
Its a hard argument to make because Breaking the API is bad right?
- Id prefer feedback from people who have used the api and are aware
of its problems.

As Jose said, It means going over the scripts and making some
adjustments, Even for YoFrankie, Id expect this to take an afternoon,
which I would be happy to do. - easily less then the time I had to
work out weired behavior of the python api where I constantly needed
to use trial and error to find valid parameters keeping
KX_GameObject.cpp and friends open.

-- 
- Campbell


On Thu, Feb 19, 2009 at 12:25 PM, Toni Alatalo <antont at kyperjokki.fi> wrote:
> On Feb 19, 2009, at 12:37 PM, Roger Wickes wrote:
>
>> APIVER=248
>>  myob=camera.New(type='persp', name='CamData', apiver=APIVER)
>
> I think a better way to do this is to have the different versions of
> the API as a different module.
>
> The current BGE module is 'GameLogic' (or however the capitalization
> is) - perhaps the new could be .. 'game' or 'bge' or 'blendergame' or
> something?
>
> So old scripts could continue working as they are, per Erwin's request
> - use 'import GameLogic' and get obnames complete with the 'OB' prefix
> etc.
>
> New / ported scripts would do 'import BlenderGame' or something and get
> ob references, have .name without 'OB' prefixes etc. and all the other
> sane things.
>
> Would be clean - the old api would be just what it is, no mixing of
> such diffent behaviours for different versions etc - could be kept
> around for possible 2.49 at least as it is (possibly with bugfixes
> applied to there too).
>
> ~Toni
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list