Newton 2.0x Archemedia Open Beta

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Newton 2.0x Archemedia Open Beta

Postby FlemMonk » Thu Jul 02, 2009 9:31 pm

Julio, I completely understand, I was not trying to rush you, just eager to make use of the PlayerController but dont know what each of the variables are for.

For example:
CreateCustomPlayerController (const dFloat* pins, const NewtonBody* player, dFloat maxStairStepFactor)
CustomPlayerControllerSetPushActorCallback (NewtonUserJoint* playerController, PlayerCanPuchThisBodyCalback callback);
CustomPlayerControllerSetVelocity (NewtonUserJoint* playerController, dFloat forwardSpeed, dFloat sideSpeed, dFloat heading);

What is the pins vector/matrix?
How are SetPushActorCallback & SetVelocity meant to be used? Is the callback function to be used to SetVelocity each call?
FlemMonk
 
Posts: 14
Joined: Tue May 26, 2009 5:18 pm

Re: Newton 2.0x Archemedia Open Beta

Postby JernejL » Fri Jul 03, 2009 5:44 am

Pin is usually the vector by which the body is constrained in some way, for example the upvector joint has a pin by which the body can rotate, but not in any other directions except the upvector joint's pin.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0x Archemedia Open Beta

Postby mauro78 » Sat Jul 11, 2009 2:51 am

Hi Julio, for first congratulation and thanks for giving us Newton Library, It helps indie & small teams developer bring real physics in games.

I currently use Newton 1.53 with a custom made Physics Based Character Controller (CC).
But I'd like to test the new Character Controller in Newton 2.0 (and also switch to Newton 2.0)

So looking in to the forums I've seen that those are the new functions for CC:

// player controller functions
JOINTLIBRARY_API NewtonUserJoint *CreateCustomPlayerController (const dFloat* pins, const NewtonBody* player, dFloat maxStairStepFactor);
JOINTLIBRARY_API void CustomPlayerControllerSetPushActorCallback (NewtonUserJoint* playerController, PlayerCanPuchThisBodyCalback callback);
JOINTLIBRARY_API void CustomPlayerControllerSetVelocity (NewtonUserJoint* playerController, dFloat forwardSpeed, dFloat sideSpeed, dFloat heading);
JOINTLIBRARY_API void CustomPlayerControllerSetMaxSlope (NewtonUserJoint* playerController, dFloat maxSlopeAngleIndRadian);
JOINTLIBRARY_API dFloat CustomPlayerControllerGetMaxSlope (NewtonUserJoint* playerController);
JOINTLIBRARY_API const NewtonCollision* CustomPlayerControllerGetVerticalSensorShape (NewtonUserJoint* playerController);
JOINTLIBRARY_API const NewtonCollision* CustomPlayerControllerGetHorizontalSensorShape (NewtonUserJoint* playerController);
JOINTLIBRARY_API const NewtonCollision* CustomPlayerControllerGetDynamicsSensorShape (NewtonUserJoint* playerController);

so my question are:
    Any chance to have a simple example code for how to use CC functions?
    The Character controller is Physic or Kinematic based?
    When will Beta 2.04 be out (I've read that you're rewriting CC for that release)?

Best Regards

Anceschi Mauro, Sr. Graphics Engineer
Narcotic Games Inc.
http://www.narcoticgames.com
mauro78
 
Posts: 13
Joined: Mon Feb 16, 2009 5:40 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Sat Jul 11, 2009 9:13 am

Yes I am making a serieus of tutorisla usin te hC iteface only.
They will include teh Player controller and teh Ray cast cars.
The firs package is already on te hwikki an dnow I am doin gteh Raycast car and Player.

The Player is much, much better than thr one in 1.53 and 2.00
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Svenstaro » Sun Jul 12, 2009 1:25 am

Can you try to improve the quality of the Linux releases? I don't mean offense, but so far the Linux packages were rather disappointing. For example, where do the additional libraries belong and where should the Newton.h header itself be installed to?
If Newton.h goes into /usr/include/newtonSDK/Newton.h, do the additional libraries go to /usr/include/newtonSDK/dAnimation/, for example?
How are they supposed to be compiled and why is there no makefile provided? Should the source files in dAnimation/ be linked into one single static library dAnimation.a? Why are there separate libraries to begin with? Can't everything be put into the main Newton library and header file?

I'm not just willing to complain I'm actually willing to help. I have plenty of experience packaging and compiling on Linux in case you need a hand.
Svenstaro
 
Posts: 16
Joined: Mon Aug 04, 2008 1:38 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Sun Jul 12, 2009 9:11 am

You can put them anywhere you want.
The problems is that with Linux there is not consensus for deployment of non open source code.
If I set it one way, I get users with other Linux distribution given me hard time,
Not only they do not use it, the make public statement on oteh Linux forum to tell people not to use Newton an dinstaead sopport other open source competitors.
base on the fact that newton is not open source. So I decided to leave it in the local folder.

All of the functions in the Linux and Mac Package are compiled as part of the application,
you can modify the Make file and have it deploye libraries to any system directory you want.

Newton is not well received in the Linux community because it is not open source, we solicited entry in places like SourceForge,
and some popular databes for code distribution so that more people can participate on the development of the SDK, but they all had denied our applications.
Some allegete we are not open source and other allocate we do not have good license.
Never mind that they do have other non open souce apps and appl with diffrent licence like LPG, ZIP or other of these alphabetic license.

My guess is that there are othe forces at work, Like I was told when I tryed to be part of Collada, They told me They do not want less matured apps making waves.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Svenstaro » Sun Jul 12, 2009 11:35 am

Portalized is a closed source project as well and we use Newton quite successfully. Sadly, Newton isn't packaged in a way that would make redistribution easy and I'm not talking about its closed source nature. The way you currently build Newton, it could be very easily integrated into any standard Linux distribution: Just install the static library (.a) to /usr/lib/libNewton.a and put the header files to /usr/include/Newton. Sadly, the SDK is a bit inconsistent here and that's why I would like to fix this right in upstream and not in my distribution's package only so that everyone may benefit from it.

If you want to, we can get together on IRC/MSN/ICQ/Jabber/Mail and I can help you fix up the package, you don't even need to supply me with the sources.
Svenstaro
 
Posts: 16
Joined: Mon Aug 04, 2008 1:38 pm

Re: Newton 2.0x Archemedia Open Beta

Postby JernejL » Sun Jul 12, 2009 11:53 am

What are you talking about difficult redistribution? all you need is to link the .libs into your executable or use the external library, which goes with the main executable of the game / app.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0x Archemedia Open Beta

Postby Svenstaro » Mon Jul 13, 2009 8:38 am

I'm talking about the difficulty of creating a Linux package, not about actually linking your application statically against Newton. First of all, there is no Makefile. How are the additional directories like dMath supposed to be distributed? Are the source files in there compiled into one static library? Had you created a Makefile that put everything to the required standard location this would have been clear.
Svenstaro
 
Posts: 16
Joined: Mon Aug 04, 2008 1:38 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Mon Jul 13, 2009 9:28 am

Maybe we are looking at a different things, there is a make file that build the application, using all fiel as part of the project.

Code: Select all
#*******************************************************
#
# Newton game dynamics
# copy right by Julio Jerez 2003 - 2005
#
#*******************************************************
#
# SDK Sample tutorial:
#
#******************************************************* 


# ******************************************************
#
# project sorce files
#
# ******************************************************


# generic sdk flags
SDK_FLAGS = -O0 -c -Wall -D_LINUX_VER -g -m32 
#SDK_FLAGS = -m32 -O3 -c -Wall -Werror -D_LINUX_VER -g
#SDK_FLAGS = -m32 -O3 -c -Wall -D_LINUX_VER -g

LIBS = -L/usr/X11R6/lib -lGL -lGLU -lglut -lglui -lGLEW -lpthread



SDK_MAIN = sdkDemos
SDK_DEMOS = sdkDemos/demos
SDK_TOOLBOX = sdkDemos/toolBox
SDK_XML = thirdParties/tinyxml
SDK_MATH = ../sdk/dMath
SDK_JOINTS = ../sdk/dCustomJoints
SDK_ANIMATION = ../sdk/dAnimation
SDK_CONTAINERS = ../sdk/dContainers
SDK_NEWTON = ../sdk

# this use newton as shared or static library
#NEWTON_LIB = -lNewton
NEWTON_LIB = $(SDK_NEWTON)/libNewton.a

SDK_INCLUDE_PATH = -I $(SDK_MAIN) -I $(SDK_DEMOS) -I $(SDK_TOOLBOX) -I $(SDK_MATH) -I $(SDK_JOINTS) -I $(SDK_NEWTON) -I $(SDK_XML) -I $(SDK_ANIMATION) -I $(SDK_CONTAINERS)


SDK_MAIN_SRC = \
   $(SDK_MAIN)/OGLMesh.cpp \
   $(SDK_MAIN)/OGLModel.cpp \
   $(SDK_MAIN)/SceneManager.cpp \
   $(SDK_MAIN)/PhysicsUtils.cpp

SDK_DEMOS_SRC = \
   $(SDK_DEMOS)/ArchimedesBuoyancy.cpp \
   $(SDK_DEMOS)/BasicCustomJoints.cpp \
   $(SDK_DEMOS)/BasicFriction.cpp \
   $(SDK_DEMOS)/BasicRestitution.cpp \
   $(SDK_DEMOS)/BasicRobots.cpp \
   $(SDK_DEMOS)/BasicRagDoll.cpp \
   $(SDK_DEMOS)/BasicSphereSpin.cpp \
   $(SDK_DEMOS)/BasicStacking.cpp \
   $(SDK_DEMOS)/CompoundCollision.cpp \
   $(SDK_DEMOS)/ClosestDistance.cpp \
   $(SDK_DEMOS)/ConvexCast.cpp \
   $(SDK_DEMOS)/Jengas.cpp \
   $(SDK_DEMOS)/LegacyJoints.cpp \
   $(SDK_DEMOS)/MeshCollision.cpp \
   $(SDK_DEMOS)/PrecessingTops.cpp \
   $(SDK_DEMOS)/Pyramids.cpp \
   $(SDK_DEMOS)/RayCastCar.cpp \
   $(SDK_DEMOS)/ScaledCollision.cpp \
   $(SDK_DEMOS)/SpecialTrackJoints.cpp \
   $(SDK_DEMOS)/Towers.cpp \
   $(SDK_DEMOS)/TriggersAndForceFields.cpp \
   $(SDK_DEMOS)/UnstableStacks.cpp \
   $(SDK_DEMOS)/Walls.cpp

SDK_TOOLBOX_SRC = \
   $(SDK_TOOLBOX)/OpenGlUtil.cpp \
   $(SDK_TOOLBOX)/DGCamera.cpp \
   $(SDK_TOOLBOX)/DebugDisplay.cpp \
   $(SDK_TOOLBOX)/dRuntimeProfiler.cpp \
   $(SDK_TOOLBOX)/HeightFieldPrimitive.cpp \
   $(SDK_TOOLBOX)/HiResTimer.cpp  \
   $(SDK_TOOLBOX)/LevelPrimitive.cpp \
   $(SDK_TOOLBOX)/MousePick.cpp \
   $(SDK_TOOLBOX)/PlaneCollision.cpp \
   $(SDK_TOOLBOX)/RenderPrimitive.cpp \
   $(SDK_TOOLBOX)/ScenePrimitive.cpp \
   $(SDK_TOOLBOX)/ShaderPrograms.cpp \
   $(SDK_TOOLBOX)/SkyBox.cpp \
   $(SDK_TOOLBOX)/TargaToOpenGl.cpp \
   $(SDK_TOOLBOX)/UserHeightFieldCollision.cpp \
   $(SDK_TOOLBOX)/toolbox_stdafx.cpp

SDK_XML_SRC = \
   $(SDK_XML)/tinystr.cpp \
   $(SDK_XML)/tinyxml.cpp \
   $(SDK_XML)/tinyxmlerror.cpp \
   $(SDK_XML)/tinyxmlparser.cpp     

SDK_MATH_SRC = \
   $(SDK_MATH)/dMathDefines.cpp \
   $(SDK_MATH)/dMatrix.cpp \
   $(SDK_MATH)/dQuaternion.cpp    
   
SDK_JOINTS_SRC = \
   $(SDK_JOINTS)/Custom6DOF.cpp \
   $(SDK_JOINTS)/CustomBallAndSocket.cpp \
   $(SDK_JOINTS)/CustomCorkScrew.cpp \
   $(SDK_JOINTS)/CustomDryRollingFriction.cpp \
   $(SDK_JOINTS)/CustomGear.cpp \
   $(SDK_JOINTS)/CustomHinge.cpp \
   $(SDK_JOINTS)/CustomMultiBodyVehicle.cpp \
   $(SDK_JOINTS)/CustomPlayerController.cpp \
   $(SDK_JOINTS)/CustomPulley.cpp \
   $(SDK_JOINTS)/CustomRagDoll.cpp \
   $(SDK_JOINTS)/CustomDGRayCastCar.cpp \
   $(SDK_JOINTS)/CustomSlider.cpp \
   $(SDK_JOINTS)/CustomSlidingContact.cpp \
   $(SDK_JOINTS)/CustomUniversal.cpp \
   $(SDK_JOINTS)/CustomUpVector.cpp \
   $(SDK_JOINTS)/CustomPickBody.cpp \
   $(SDK_JOINTS)/CustomWormGear.cpp \
   $(SDK_JOINTS)/JointLibrary.cpp \
   $(SDK_JOINTS)/NewtonCustomJoint.cpp

SDK_CONTAINERS_SRC = \
   $(SDK_CONTAINERS)/dBaseHierarchy.cpp \
   $(SDK_CONTAINERS)/dContainersStdAfx.cpp \
   $(SDK_CONTAINERS)/dCRC.cpp \
   $(SDK_CONTAINERS)/dRefCounter.cpp \
   $(SDK_CONTAINERS)/dTree.cpp
   
SDK_ANIMATION_SRC = \
   $(SDK_ANIMATION)/dBone.cpp \
   $(SDK_ANIMATION)/dMesh.cpp \
   $(SDK_ANIMATION)/dModel.cpp \
   $(SDK_ANIMATION)/dPoseGenerator.cpp \
   $(SDK_ANIMATION)/dBonesToPoseBinding.cpp \
   $(SDK_ANIMATION)/dAnimationClip.cpp

      
SDK_SRCS = $(SDK_MAIN_SRC) $(SDK_DEMOS_SRC) $(SDK_JOINTS_SRC) $(SDK_MATH_SRC) $(SDK_TOOLBOX_SRC) $(SDK_XML_SRC) $(SDK_ANIMATION_SRC) $(SDK_CONTAINERS_SRC)

SDK_OBJS = $(SDK_SRCS:.cpp=.o)

COMPILER = gcc
FLAGS = $(SDK_FLAGS) $(SDK_INCLUDE_PATH)

.SUFFIXES : .o .cpp
.cpp.o :
   $(COMPILER) $(FLAGS) -o $@ $<   

# main target
NewtonDemos : $(SDK_OBJS)
   gcc -m32 $? $(NEWTON_LIB) $(LIBS) -o $@.elf

# clean all objects target
clean :
   rm $(SDK_OBJS)
   touch $(SDK_SRCS)
   
   
   



As you can see the fiel are grouped in sections. to use Newton you do no nee to use any of thsoe files, you unly need Newton.h and Newton.a
now the custum library is useful in teh way teh is has many prebuild joints,
if you want you can mody teh Make file they way you think it soudl be done.
the file for making teh joint library are these:

Code: Select all
SDK_MATH_SRC = \
   $(SDK_MATH)/dMathDefines.cpp \
   $(SDK_MATH)/dMatrix.cpp \
   $(SDK_MATH)/dQuaternion.cpp    
   
SDK_JOINTS_SRC = \
   $(SDK_JOINTS)/Custom6DOF.cpp \
   $(SDK_JOINTS)/CustomBallAndSocket.cpp \
   $(SDK_JOINTS)/CustomCorkScrew.cpp \
   $(SDK_JOINTS)/CustomDryRollingFriction.cpp \
   $(SDK_JOINTS)/CustomGear.cpp \
   $(SDK_JOINTS)/CustomHinge.cpp \
   $(SDK_JOINTS)/CustomMultiBodyVehicle.cpp \
   $(SDK_JOINTS)/CustomPlayerController.cpp \
   $(SDK_JOINTS)/CustomPulley.cpp \
   $(SDK_JOINTS)/CustomRagDoll.cpp \
   $(SDK_JOINTS)/CustomDGRayCastCar.cpp \
   $(SDK_JOINTS)/CustomSlider.cpp \
   $(SDK_JOINTS)/CustomSlidingContact.cpp \
   $(SDK_JOINTS)/CustomUniversal.cpp \
   $(SDK_JOINTS)/CustomUpVector.cpp \
   $(SDK_JOINTS)/CustomPickBody.cpp \
   $(SDK_JOINTS)/CustomWormGear.cpp \
   $(SDK_JOINTS)/JointLibrary.cpp \
   $(SDK_JOINTS)/NewtonCustomJoint.cpp


Like I mention before we do not have a way to change code since we have bing denied for all of the free code distrution data bazes like sourceforge and and the other soruce shared control.
The only way I could do tha is by creetion my own server and I do no have teh skill nor the resurces to sustain that.

If you organize the Make file then I will add it to the next Linux release.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Svenstaro » Mon Jul 13, 2009 7:29 pm

There are plenty of free services that would provide you with hosting for this project. Apart from Sourceforge, Github and Google Code immediately come to mind. Also, you are saying that hosting yourself would be unmanageable, yet it would actually be rather easy to set up, be it Subversion or Git or something different even. You surely are using some kind of version control system already while developing Newton, so you will have experience working in that environment. For this project, I'd choose GitHub because you can present parts of your projects to people, they'd be able to modify it in their own branches and you could arbitrarily merge back the branches you like into the main project.

Anyhow, as for the Makefile: Judging from the current Windows release 2.03, you have changed the structure of the package quite a bit. I will wait with the creation of the Makefile until you release 2.03 for Linux so that I don't create something useless (since the structure obviously changed). Once I get the next release, I will gladly create a Makefile.
Svenstaro
 
Posts: 16
Joined: Mon Aug 04, 2008 1:38 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Mon Jul 20, 2009 9:56 am

Ok SDK 2.04 for Mac and Linux is on.

I will check you the Google thing, maybe we can put the SDK there.

I was reading the bugs again, and I read this
Svenstaro wrote:Portalized is a closed source project as well and we use Newton quite successfully. Sadly, Newton isn't packaged in a way that would make redistribution easy and I'm not talking about its closed source nature.

why don't you just add the Newton file as part of your package, and forget get about distribution?

I find that a lot simpler that distributing an incompleted application and asking the end user to be an expert downloading and installing guzillion dependencies.
I do not know why so much emphasis in the Linux world for these kind of nom productive task of compiling and instaalling dependecies.
This is why I just add then as part of the project.

Note: I edited this post
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Svenstaro » Mon Jul 20, 2009 2:04 pm

The link for Linux32_SDK_2.04 is broken, please fix it.

I don't like the way you think insult me and the Linux community as "moronic nerds" but I will not start a flamewar over that. If that is what you truly think of me and the Linux community then so be it, I will not challenge your opinion.

You should know, though, that centralized dependencies (as in Linux) are both an advantage and a disadvantage compared to application distributed dependencies (as in Windows). The advantage is a lower memory footprint and less stuff to download, the disadvantage is that you will need a package manager to keep track of the installed dependency versions.

Additionally, it would probably be advantageous for everybody if you were a little more informed about Linux and what kinds of distributions are available. The only big source based distribution in existence is Gentoo but it certainly isn't for new users. All other big distributions are completely binary based (for example Fedora, Ubuntu, OpenSuse, Debian, Mint, etc) which means that the user will not have to compile stuff themselves. I would also imagine that people who choose to actually compile stuff themselves are open source developers and probably not as "moronic" as you think they are.

Anyhow, I will not delve any deeper into this. The only thing I'd like to ask you is to maybe be a little friendlier towards me and the open source community. Not agreeing with other people does not make them "moronic".
Svenstaro
 
Posts: 16
Joined: Mon Aug 04, 2008 1:38 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Mon Jul 20, 2009 6:27 pm

You know what you are right, It is none of my business how the Linux world do their thing.
I should not say Moronic, I apologize for that.
It is me that perhaps do not understand how way Linux work.
I am sorry for offending you. I will delete those comments

Anyway Il will fix the error in the download load, I do not know what when wrong so I just upload the download again.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Svenstaro » Mon Jul 20, 2009 10:56 pm

I'm almost done fixing the Linux64 build but I will need some additional insight as in how the additional sources are meant to be compiled. When I last asked, you referred to the samples Makefile that compiles dAnimation, dContainers, etc. right into the final executable without making them independent libraries beforehand. Is this the advised behavior? I'm curious because it would imply adding a lot of Newton source files into my main application's project and that doesn't seem right since Newton is supposed to be a compiled library.

Are dAnimation, dContainers, etc meant to be compiled to dAnimation.a, dContainers.a, etc? Should they then be appended to libNewton.a (using AR for instance)?

In the Windows distribution, you also have a compiled JointLibrary library that I see missing in the Linux release while the header file for it still exists. Does this mean that we're missing out on that one in Linux?

Will those extra source files become part of the main Newton distribution at some point? Why are there source files to begin with when Newton is actually closed source?

I'm sorry if those questions sound uninformed but I'm quite baffled as how to properly use those extra source files.

Please note that I'm still offering you my help with the Newton Linux releases and if you are willing to learn I'm also offering you my direct help with Linux itself.
Svenstaro
 
Posts: 16
Joined: Mon Aug 04, 2008 1:38 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron