RF and physics

Programming Reality Factory and Genesis3D.
Post Reply
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

ready for download
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

I want to remember to all the link of the RF FTP site, where the new Nout's demo is downloadable:

http://realityfactory.altervista.org/

I've added a file that I found in the Upload section with some explanation about the new features.

___________________

The physic demo is incredible!!! Nout, you are a genius!
I've added to your project folder my standard tool directory, so now i can use the new rf executables. I've added in the source directory the GameEntityDataTypes.h that I found in the source.zip archive and the Tokamak.h that i found in the Tokamak source folder (I don't know if it was necessary, but I found an include comand in the GameEntityDataTypes.h).
I've found a strange shut down of the engine while you restart the level (or exit) previewing in the Level Editor (otherwise, launching realityfactory.exe works perfectly). You have added, generously, the 3dt files, but they don't works. The editor shut down without error messages. If you try to import them, then an error message appears saying that some Spheroid Template was expected in some position. This happens with every 3dt level. No problem, however I can manually open the 3dt files with an editor and see the values you have used. Probably you could make a zip of your (probably modified?) level editor and post it here...
I've played with your scripts and some entities: WOW!
Yes, there is some problem with something but this alpha is simply fantastic. :D I see these spheres rotating on the ground and I think to all my physic scripts... :roll:

- Have you seen (I think yes) that the only box "crazy" is the one fired? the others are quite ok...

- exactly, what's the difference between twist and torque (or force)? a constant and a torque, for example?

- in the italian keyboard the [ and ] are in a strange position so I tried the vehicle with some problem. The car has a strange behaviour, but to me the problem seems to be some unexpected collision between the wheels and the chassis. Is a endless work trying to implement directly the tokamak example car (sample8)? I don't know how much work costs but I think you can... 8)

The entities that you have implemented are really a good choice and your work is really incredible ( finally all my physic dreams come true...)! :P
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

there is some way to rotate in a persistent way a physical object? I mean a "ChangeYaw" command, for example. I'm playing with the friction that a ball deploy when a torque is applied. I've put a ball and i've scripted some key command to move that ball forward and backward (or left and right) but I don't find how rotate the ball to a different orientation... applytwist rotate the ball but don't change his orientation.
Is it possible to implement all the pawn script commands in the physic script? Is it another endless work?... :D
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

i love it. great work! however, the physics seem to be in low-grav... its like everythings slow motion... the level runs at a high framerate, it just seems like its low grav for the physics object...? aslso, the stacked cubes when shot go berserk spinning like crazy. specs:

1.3GHZ Celeron M
512MB PC2700
Intel Extreme Graphics 2 for Mobile

ill try it on my desktop soon... see if its low grav there...
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

checked it on my desktop; for some reason, almost every rf demo now is almost a slideshow on it; must be something wrong with the drivers. the only demo that ran smoothely, the cardemo, ran perfectly... still seemed a bit slowmo, though not as much, leading me to believe its more framerate dependant than it should be, though i even saw that with epic's Karma physics engine... looks great... the car was buggy though, if i try to ride on it it simply sinks into the ground, and when i shoot it it sometimes falls through the ground.

great work!

specs for desktop:

Athlon XP 2500+ (1.83GHZ, performs comparably to a 2.5GHZ Pentium 4)
256MB PC2100 (i know, i know... one stick broke)
Radeon 9600pro 128MB
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

Great work nout I only got one of the levels to work for a little while before it crashed but from what I saw......... Rf is going to be great(greater I mean)
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

thats strange. it did crash once for each computewr i tested it on, i think in the second level, but interestingly enough the moment it crashed wwas when i hit the exit button (forgot to tell the physics engine to shut down and clean up...? just speculating)
Nout
Posts: 136
Joined: Tue Jul 05, 2005 5:14 pm

Post by Nout »

Some more info's:
- The new features are described in a file called something like NoutChanges.html

- The .3dt files are created by a newer version of RFeditPro, and I forgot to convert them back to the actual format. Included the .3dt files in actual RFeditpro format. They should normaly open.

- The GameEntityDataTypes.h file is default in my source directoy. If you have another setup, then you have to move this file to where you normaly have it

- RF will crash when shutting down. I know the error, but I do not know how to solve it. I hope QuestOfDreams can assist me here.
Have you seen (I think yes) that the only box "crazy" is the one fired? the others are quite ok...
You can define the force that is placed on an object when you fire it in the weapon.ini file

[pistolbullet]
type = projectile
actor = projectile\proj.act
rotation = 0 0 0
scale = 1
gravity = false
bounce = false
speed = 3000
lifetime = 1
boundingbox = 0.1
explosion = BulletExplosion
actorexplosion = BulletExplosion
showboth = false
attachactor = false
bonelevel = false
damage = 5
altdamage = 5
explosionradius = 0
explosiondamage = 1
decal = 0
impactsound = projectile\mimpact.wav
ph_impulseforce = 10
exactly, what's the difference between twist and torque (or force)? a constant and a torque, for example?


Impulse: places a force for 1 frame on an object
Force: places a force forever on an object
Twist: places a rotational force for 1 frame on an object
Torque: places a rotational force forever on an object

The car demo is not so great yet. I have to debug the code and find out what is wrong.
there is some way to rotate in a persistent way a physical object? I mean a "ChangeYaw" command, for example.
Use an ApplyTwist or ApplyTorque to make a rotation and an SetForce or ApplyImpulse to make a movement
I'm playing with the friction that a ball deploy when a torque is applied.
I've put a ball and i've scripted some key command to move that ball forward and backward (or left and right) but I don't find how rotate the ball to a different orientation... applytwist rotate the ball but don't change his orientation.
It is not clear to me what you try to achieve? What do you mean with orientation?
Is it possible to implement all the pawn script commands in the physic script? Is it another endless work?...
Pawn scripts are subject to 1 pawn.
Physics are subject to a physical object, which can be a pawn, but also a staticproxyentity, or just a scripted object.
Physical objects are controlled by the physics simulator, while pawns are controlled by RF or Genesis. You have to take care how to mix them. For example, moving a pawn by the normal highlevel script commands and stearing the same pawn by the physics engine gives a conflict
You however can take a RigidBodyEntity and put in the ActorFile the name of a pawn entity. Now the existing pawn will be controlled by the physics engine, but the pawn scripting entity still can be used to stear the same pawn.... => I've never tried what this will give, but I expect that you can use all normal pawn script commands, as long as they do not move or rotate the pawn???
however, the physics seem to be in low-grav... its like everythings slow motion... the level runs at a high framerate, it just seems like its low grav for the physics object...?
Physics are depending on dimensions. Please read the section on Physics in the a file called something like NoutsChange.html
Scaling down your world will speed up physics
Also in the PhysicsSystem Entity, you can play with constants to make the physics run faster. It's all explained in the docs.
also, the stacked cubes when shot go berserk spinning like crazy

When shooting, you apply a force on the object you shoot. You can define the force used in the weapon.ini (see earlier) + each object has a mass. Small mass objects are stronger affected then high mass objects. You can set the mas for each object or by script, or in the rigidbody entity
Attachments
Levels in V132 and V134.zip
(34.58 KiB) Downloaded 60 times
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR »

also, the stacked cubes when shot go berserk spinning like crazy

When shooting, you apply a force on the object you shoot. You can define the force used in the weapon.ini (see earlier) + each object has a mass. Small mass objects are stronger affected then high mass objects. You can set the mas for each object or by script, or in the rigidbody entity[/quote]

hmm. two things: one, alot of the time cubes went below the floor, and two, i found it odd because when you shot them, they reacted perfectly; however, when they bounced off the far wall, they started spinning through the air like tops.
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Thanks for your answer Nout.
applytwist rotate the ball but don't change his orientation.

It is not clear to me what you try to achieve? What do you mean with orientation?
I mean that i want to apply a force to an object in a direction (for example, forward) and then, using the keyboard or the mouse, I want to rotate that object mantaining the force. Like a wheel that steers.
I want to try the reations of a ball on a terrain so I want to "Run" that terrain...
revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post by revolutiongames2004 »

i forgot how to fix begin frame errors cause that is what i get from it
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman »

Very nice Nout. "Thanks for all of this!!"

Like I posted earlier, I wont be able to contribute any code :oops:
But I can point things out..( Hope it helps somewhat)

As for RF crashing when you quit the game. The only one that crashes
is the "Chain demo" All the others seem to close just fine.
I didn't notice anything else, "granted" I only had 20 min. to DL and take a peek, but thus far, thats all I noticed.

I'll be messing with it and if I notice anything else. I'll be sure to post.

Thanks again.
rgdyman
Pete
Posts: 46
Joined: Tue Jul 12, 2005 2:07 pm

Post by Pete »

>>i forgot how to fix begin frame errors cause that is what i get from it
texture size ^2?

nout thanks! i haven't had time to play with it but soon i hope!
Dysphoriac
Posts: 23
Joined: Sat Aug 06, 2005 8:50 pm
Location: United States of America

Nout deserves high honors

Post by Dysphoriac »

Nout you are a frikin Genius! I know that once these physics are completely applied and with less problems, RF will get much more respect from the public once this is fully released. I'm downloading it now and I know it's going to be great. This is a wonderful addition to the Reality Factory, and will be very beneficial for everyone.
"We revel in rebellious ways, rebellion that the media made. If you change your channel we'll smash your T.V."
revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post by revolutiongames2004 »

no no i understand fixing that kind but when i try starting the demo in the log it sez it is shunting down cause of begin frame error

Code: Select all


....
....
nitializing Armour Subsystem...
Initializing LiftBelt Manager...
Initializing CDSpotlight Manager...
Initializing CurvedSurfaces Manager...
Initializing Tokamak Physics Manager System...
Preparing to Launch Game...
CRFMenu::GameLoop() - Setup and Run Level
CRFMenu::GameLevel() - Entering Inner Game Loop
CGenesisEngine::BeginFrame failed

can ya guys help
Post Reply