Help for the new commands and entities.

Programming Reality Factory and Genesis3D.
Post Reply
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Help for the new commands and entities.

Post by federico » Wed Sep 21, 2005 9:02 am

Hi again, Nout! I have some question about your additions. I think that the best reward we can give to you is to beginn as soon as possible to use them in our games. However we need some further explanation.

1)Can you exactly explain the possible use poly and polyarray? They seems to open really new possibilities...

2) How can we use a sensor? What exactly a sensor is? Can you provide a pratical example?

3) Collision manager seems really fantastic but there is a wildcard name for the "world geometry" (to create a ball that "SOUNDS" when bounces?)

4) The joint entities are ok? Can you provide some example to create some basic joint structure? Something like a bike wheels and a door ... I can't understand really the orientation of the bodies, the distance, the up and down limits...

SOme examples would speed up our understanding and really would make us completely appreciate your hard work.
I don't want that you instantly create a super documentation. We can do it togheter, here in the forum, with tries and modifications. :D We are a community!
And in the same time, we can really test all the alpha features with you.

Nout
Posts: 136
Joined: Tue Jul 05, 2005 5:14 pm

Post by Nout » Fri Sep 23, 2005 11:27 pm

Code: Select all

1)Can you exactly explain the possible use poly and polyarray? They seems to open really new possibilities... 
- Do not use "Poly". It is not ready and might do very weard things.
Goal here was to create a programmable ploy, but the code is far from ready
- PolyArray allows you to create a field (3 dimensional array) of polys. So put polys is X, Y and Z direction with given distances between them. The polys will always fact the player. By this entity you for example can create a field of corn by putting many ploys in X and Z. Or hand polys with dirt on a ceiling. See also the docs I posted.

Code: Select all

2) How can we use a sensor? What exactly a sensor is? Can you provide a pratical example? 
A sensor is like an invisible ray that can interesect with a body. You can ask the sensor which body was intersected, how deep etc... It is use for example for raycasted car physics. You can also use it to detect you walk throug an open door (the player will intersect with the ray) etc...
The sensor commands are available in physics scripting. I do not have immediately an example available. Maybe in the future I can build something.

Code: Select all

3) Collision manager seems really fantastic but there is a wildcard name for the "world geometry" (to create a ball that "SOUNDS" when bounces?) 
This entity is today incomplete. It's not to complex to update, as most of the code is reused from the PhysicsForce entity. Today the code is commented out, as I was testing making sound when a specific collision is detected. The problem I have is that the sound is taking too much time to start, and becomes unsuchronized with the real bouncing. I tried different things, but was not yet able to resolve this.
This entity is indeed a very nice one, as it gives you a lot of control on what should happen if 2 bodies touch.

Code: Select all

4) The joint entities are ok? Can you provide some example to create some basic joint structure? Something like a bike wheels and a door ... I can't understand really the orientation of the bodies, the distance, the up and down limits... 
Ball and Socket + Hinge Joint should work. The idea is as follows:
You place 2 rigid bodies entities + you place the joint entity between these 2. Put everything aligned with the X-axis. The limits define how much angle you allow the joint to rotate. For example you want the joint to be flexible from -90 to +90 deg, and block at +90 or -90deg. The second limits are not used yet, but will be for other joints.
It's not so flexible, and using script commands offers you much more control of positioning the joints (as you really define relative positions). Remember that the script initorder is only read at the start. It is used to load the bodies + define the joints between them. In the startoder, you place possible keyboard commands that apply forces etc... This order is scanned every frame. The concept to put in the script is the following:
Define a rigid body
With GetBodyBBox, you can call back the geometry X, Y and Z sizes and use this to define the relative position of a joint.

Code: Select all

Some examples would speed up our understanding and really would 
I've some outdated examples, that where build with the script commands still missing a few parameters. Give me a couple of days and I make a few scripts that demo how to use a joint + a motor, maybe a sensor

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

Post by federico » Sat Sep 24, 2005 10:44 am

- i've tried the polyarray entity: great!!! I don't know if you've ever seen the standard unreal2 engine demo (where there is a corn field moving with the wind), but I think that this entity will give us the chance to get the same foliage effect. Really really nice :wink:

-ShowPicture GetGetScreenWidth() GetScreenHeight() ShowMouse(ShowIt) GetMousePosX() GetMousePosY() SetMousePos(ScreenPosX, ScreenPosY)
All the "flat" screen commands really open up new 2d possibilities for the engine and the game-making process. It would be a nice idea to create a little 2d demo to show theese new capabilities (... :( umh I need to spend my whole life time doing RF demos...)

- the ShowPicture(HUDpictureNr, IsVisible, ScreenX, ScreenY, DisplayTime, WinX, WinY); command is fantastic, as I said. Nevertheless, I have a feature request (viewtopic.php?p=2556#2556) that really will completely destroy - I think - the last genre wall raised against the RF users.

Nout
Posts: 136
Joined: Tue Jul 05, 2005 5:14 pm

Post by Nout » Sun Sep 25, 2005 7:57 pm

Read the post, and must have missed it in the past...
I think I know a way that can change the ordering and place actors in front of these pictures, but we will need both, before or behind an actor.

I'll look to it next week

And yes, I've mainly added a lot of commands to support better an RPG type of game

Post Reply