Product Chat (Early Access) / My second behavior for GameGuru MAX (version 2021-11-19)

Author
Message
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 14th Dec 2021 14:41 Edited at: 18th Dec 2021 09:19
Hello,

Today after having tested the Physics Engine of GameGuru MAX with a lot of trials and errors, I was endly able to write a basic funny script to animate objects interacting with that Physics Engine.

In the level created for my experiment, I placed a car (my Lamborghini model) and a few of its tires.
Each object has specific parameters with which they could interact (or not) differently with the Physics Engine.


Please note that the term "rotating" could be confusing. In fact it is the orientation of the object on the Y axis that is modified.
Good to know : don't activate the setting "isImmobile" for a simulation interacting with the Physics Engine. <- Wrong ! I am sorry.

According to my experiment with this behavior, when the following settings are applied to an object :
"Static mode" = Physics on + "isImmobile" enabled ,
then the object won't move if it is collided by another object interacting with the Physics Engine. It will stay as stable as a rock and the object colliding with it would have no other choice than trying to find another direction to continue its movement.




And here is a screen capture of the scene :




Thank you for your interest in this thread.

(my new rating : 2 points on a scale of 100)



Edited a few hours later : Corrections of two bugs in the script :
The Prompt message contained a wrong information concerning the X position of the objects controlled by the behavior.
I replaced this command "MoveBackward(entityId,moveY)" by this one "MoveBackward(entityId,moveX)".

I now understand why I had so many difficulties to bring back the car towards the immobile tyre.
Updated script posted in my next comment.

A better video clip (and it is a small one : 20 MBytes = 14 seconds) :

Attachments

Login to view attachments
PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 14th Dec 2021 19:01 Edited at: 15th Dec 2021 13:37
How is it possible to make so many mistakes in a little script ? It is pitiful.
And my comment relative to the "isImmobile" setting was also wrong.
Indeed that setting must be enabled is we need the immobility of an object if this one may not move when it is collided.

(I think that the little part of my brain where there was some ability for programming has been replaced by ... by what ? )

I hope that this new version of the script is the good one :




Edited on 2021-December-15th (1:40pm gmt+1) :

I had a serious doubt about the length of a GameGuru MAX unit in a level.
In my script I commented that "1000 GameGuru MAX units = approximately 50 centimeters ( I hope it)".

And today I tried to take some measurement in a experimental project.
Workflow :
1) Creation of a cube-shaped model in my modeller which has a feature to accurately take measurements on a 3D mesh.
2) The model has these dimensions ( Height 100 meters , Width 50 meters and Length 75 meters).
3) Before exporting that model, I rescale it to 1/20th of its first version, because according to many experiments with the export of meshes created with my modeller I found that this scale's conversion was correct.
To verify that assumption, I tested some small models imported in GameGuru MAX and I compared them with one of the characters included in the packs of GameGuru MAX. For the tests I assumed that the height of a character could be evaluated between 1.70 meter and 2 meters).
4) The high cube-shaped model is then imported in GameGuru MAX and it is placed on a flat surface of a terrain.
5) Another object is placed at the top of the cube-shaped model.
6) The difference in GameGuru MAX units between the Y position of the two objects is compared to the rescaled original model.
7) In this way I found a difference of approximately 5,000 GameGuru units between the Y positions of the two objects.
8) I divided the original height of the cube-shaped model ( 100 meters) by those 5,000 GameGuru units and it gave a result of approximately 0.02 meters = 2 centimeters.
9) According to that result found in that experiment I assumed that 1,000 GameGuru MAX units is equal to 20 meters.

But now the question that I am asking myself is the following : "Could the length of a GameGuru MAX unit remain constant if the terrain where it was calculated has a specific dimension ( a square of 2 kilometers or another one of 5 kilometers) ? ". Anyway I don't remember how I previously calculated that 1,000 GameGuru MAX was equal to 50 centimeters.

But why did I feel so concerned by the length of a GameGuru MAX in this experiment with the Physics Engine ?
Simply because I noticed that the car and the tyre to which the behavior was applied were moving very fast each time that I pressed the key [1] or the key [2].
And the car was nearly flying like a dead leaf blown by the wind.
Of course a few other settings have an incidence on the way the car is interacting with the Physics Engine, mainly these two ones : the parameter "Weight of Object" and "Object's Friction".

I tested the behavior with this line of code (comment is also modified) :



and I noticed that the car is a little bit more stable on the surface of the terrain when it is moved forward or backward.

I hope that my trials and errors could motivate some seekers to discover the best settings to move an engine in a GameGuru MAX project.

PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 27th Dec 2021 16:37 Edited at: 6th Jan 2022 21:45
I wrote a new simple lua script attached to a GameGuru MAX's behavior.



The structure of the code could probably be simplified but currently the purpose of my experiments is to examinate how far it is possible to add some simple scripts beside the available collection included in GameGuru MAX's behaviors.

What I learned with the creation of that script :
- The command "CollisionOn - Off" and "GravittyOn -Off" are useful to move an asset or a character while preserving its ability of interaction with the Physics Engine.
- The Object's property "Weight" has a real incidence on the way an asset is interacting with that Physics Engine.
- Currently I cannot find a method to define some Velocity strength to an asset.

Beside that script I can see that the Terrain Editor with its new importer is particularly interesting when using pictures in .png format.
Furthermore it seems that finetuning the values of the "Noise" and "Fractal" settings offers the possibility to reduce the texture's distortions that could appear on steep slopes.




(ambient sound in the game is recorded -> for that purpose I recorded the video in OpenGL mode and the quality is good). Size 64 MBytes = 37 seconds (uploaded on my free Vimeo's account).


2022-01-06 : A new experiment relative to the collisions (one of the most powerful features of GameGuru MAX with low poly meshes).
Good to know : https://forum.unity.com/threads/about-collisions-failing-on-high-speed.184158/

PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 14th Jan 2022 14:20 Edited at: 14th Jan 2022 14:22
I spent a few hours on the creation of a new script tested with GameGuru MAX alpha 2022-01-07.

With that script, the player can walk through the water while the upper part of its body stay above the water's surface.
For that purpose the player is placed on an object (the surfboard) having specific physics' properties.

When the player is walking on a place of the terrain the level of which is higher than the water's level, then it can rise into the air when the key '1' of the numpad stays pressed. When that key is relaxed then the player gently lands.

That script also adjust the player's position ( Y) when it detects that it would be beneath the terrain's surface.

This is the script :



Here is a link to a video clip (HD format) (384 MBytes = 1 minutes 22 seconds) posted on Vimeo :


There you can see the player "walking" in the water. An interesting experiment with water's collisions in also shown In that video.





PM
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Jan 2022 19:23
Interesting experiments you’ve got going on there

Dave
Windows 10 Pro 64 bit
AORUS B550 Master Motherboard
GeForce RTX™ 2070 GAMING OC 8G
AMD Ryzen 9 5950X 16-Core Processor 3.40 GHz
128 GB DDR4 RAM
3840 x 2160 ,60 Hz
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 14th Jan 2022 20:13 Edited at: 14th Jan 2022 20:16
Nice work. Coincidentally- I was thinking of experimenting with very closely the same idea.
MAX will definitely need a method to cross water before March release-- Just drowning 10 feet from shore is just not gonna cut it for anyone. This goes to show that a rudimentary swimming 'place-holder' effect is not hard to put together.

So the perfect solution is (just as you supplied)- to provide the player with a flotation device and if the developer puts the object in the game-- you get swimming. No device-- no swimming. Spot on. This would be a behavior that users could select for. I'm sure general swimming and diving will evolve soon after.

I was gonna try your script in GGClassic since it's just so much faster to get on the map and tinker with map making and scripting-- so much cleaner and clearer for that purpose. But oddly enough just when I need water to appear- it's gone! I guess the historic version I am on is having a water issue, but loading an older map the water is there on that one -- strange behavior. This issue popped up a while back, but searching the forums is not working for me at the moment. Maybe a 'verify files'? Moving the water slider didn't even help this time.
PM
mikeven
12
Years of Service
User Offline
Joined: 31st Dec 2011
Location:
Posted: 15th Jan 2022 10:54 Edited at: 17th Jan 2022 09:11
Hello Granada (Dave) and GubbyBlips,

Thank you for your comments.

I still consider myself as a newbie in Lua scripting and I may not assert that my scripts don't contain errors.
I never coded a script for GameGuru Classic Edition therefore I cannot say if a script specifically written for GameGuru MAX could work with GameGuru Classic.

Here are a few commented pictures with which the logic of the script (the Behavior) is explained :









PM

Login to post a reply

Server time is: 2024-12-22 04:56:54
Your offset time is: 2024-12-22 04:56:54