IPhysics - Newton/Irrlicht framework

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ZeRaW
Posts: 9
Joined: Wed Dec 27, 2006 12:44 am

Post by ZeRaW »

why would you need a special node for every type of object?
the inertia can be calculated from the volume. (from any mesh). so why have different nodes?
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

I finally went over ma previous collapse and restarted work on iphysics! Now character controller is almost complete it just doesnt go over stairs! Neways am vry tired rit now, so will find a solution for the stair thingy and upload the file for you guys to enjoy!
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Do not worry about stairs too much, it is a game specific problem. (Ok maybe I am being greedy as my game doesnt require stairs :lol: )
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

BlindSide wrote:Do not worry about stairs too much, it is a game specific problem. (Ok maybe I am being greedy as my game doesnt require stairs :lol: )
*is greedy too*
Release now and then make another release with stair support :D
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

Now character controller is almost complete it just doesnt go over stairs!
hi. if the problem is that the character move correctly but when he arrive below a stair doesn't claimb it, or he goes up a bit to climb but after he goes down, I think that it would depends by the too high gravity force (I have had the same problem). this is only a suggestion. hope that this help
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

Hey, i was thinking of setting up some of the minor bugs and including climbing stairs facility before uploading it, but heres the code!

Few things about the program, my net SUCKS so i have removed the documentation cause i didnt update it and removed the Microsoft.VC80.CRT folder cause i thought it was useless, atleast for me! Secondly, u have to put the irrlicht and newton dlls in the example folder to run the examples cause i have removed them and u also need to put map-20kdm2.pk3 from irrlicht-1.2/media to the examples folder!

The link:

http://file.uploadr.com/baea

edit: Well even though i have updated the file, i saw today it has many features missing and may have some bugs, so don't think this is the final version, i am making some upgrades on this and then will upload a more complete version hopefully in some time, but do download this and tell me what you think needs to be done to this and its only 500 kb so it wont be a prob for dnlding! And one more thing, i accidently cut cameracol code from the level example, so just copy the camera part from the terrain example and paste just before the main loop in the examples folder!
kompromis
Posts: 98
Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm

newton.h

Post by kompromis »

it keeps asking for newton.h witch doesn't exist
i downloaded it from the newton website but it still gives mo five errors

Code: Select all

	

Linking...
IPhysics.lib(CPhysics.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\Documents and Settings\calle\Skrivbord\c++\irrlicht-1.2\IPhysics-1.2\examples\newton example\Debug\newton example.exe : fatal error LNK1169: one or more multiply defined symbols found
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

oops, looks like Microsoft.VC80.CRT folder was for some purpose! Here it is with the folder!

http://file.uploadr.com/bb6b
kompromis
Posts: 98
Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm

Post by kompromis »

cant you just put all files you used to compile the example in the zip.
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

All the files i needed to compile were already there even in the first zip!
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

IPhysics for MacOS X

Post by jonasled »

Hi, thanks for some great interface classes. I had some problems with the built-in Irrlicht collision detection and response functions. I don't really need an advanced physics engine like Newton, but I do need working collision detection and response. :wink:

Anyway, I have managed to put together an Xcode (MacOS X) project for IPhysics 1.2 and compiled all examples. They seem to work just fine. I know, I know it doesn't take a genius to do that or anything. Still just making it compile and getting all settings right takes some hours. I'm going to write a tutorial and if anyone is interested I could post my Xcode project to save everyone else the time. Also, feel free to include any of my stuff in the IPhysics download. I know I would have appreciated if the examples built out of the box on my Mac.

One tiny (stupid) question. I had to comment out all the "__cdecl" to make it compile. What are those for and how can we fix so the source compiles cross-platform?
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

CharacterController

Post by jonasled »

RapchikProgrammer wrote:Well even though i have updated the file, i saw today it has many features missing and may have some bugs, so don't think this is the final version, i am making some upgrades on this and then will upload a more complete version hopefully in some time, but do download this and tell me what you think needs to be done to this and its only 500 kb so it wont be a prob for dnlding!
I compiled it using Xcode on my PPC Mac. I corrected some glitches in the examples in addition to adding the camera as suggested. The camera jerks around a lot in the level example. I can't move at all in the terrain example.

Character controller is something that I really need. The NewtonSDK has a great CharacterController class in the tutorial with the same name. Porting it to IPhysics would be a good start. If I manage to understand IPhysics a little bit better I might be able to do it. However, at the moment I don't yet have a grip on everything.
Grey Lantern wrote:ok iv'e looked at the source (rather than the docs) and found that it was simple enough to add in the missing "cylinder" functionality and include the files in my test project so now I have A SPhysicsCylinder with radius and height.
So, why not share the source? I'm sure we could all use a cylinder or two!
Coolkat88
Posts: 30
Joined: Tue Oct 03, 2006 3:14 pm

Post by Coolkat88 »

You can make some code cross-platform using macros.

Code: Select all

#ifdef WIN32
   #define IPHYAPI __cdecl
#elsif
   #define IPHYAPI 
#endif

...

class CName  {
   void IPHYAPI someFunction();
}

...

void CName::someFunction()
{          }

you don't need __cdecl in the function definition but you can put it there, so if it's there you would have to replace it with IPHYAPI or whatever it is you decide to name it. If you check the Irrlicht code, Niko does this very thing will DLL imports/exports.

Code: Select all

#ifdef IRR_WIN  // i forget the name that they use at the moment
  #ifdef DLL_IMPORT
     #define IRRAPI __declspec(dllimport)
   #elsif defined(DLL_EXPORT)
      #define IRRAPI __declspec(dllexport)
    #endif
#endif
more or less that is how that one works.
kompromis
Posts: 98
Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm

Post by kompromis »

if all the files is there. why does it ask for newton.h
it works for me now but still
Last edited by kompromis on Thu Jan 04, 2007 3:49 pm, edited 1 time in total.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

You must download Newton from http://www.newtondynamics.com/ and link to it!
Post Reply