Scripts / ezplatform has mutated to ezentitymover

Author
Message
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 24th Nov 2016 21:01
https://vimeo.com/192976638

Disclaimer: This video is from the latest beta!

What you can see is the result of the following movement sequence: "ss5","tx90;ty90;tz90;my100;mx100","tx90;ty90;tz90;my-100;mx-100"

The mutated version has the following movement instruction set:

"mf<n>" Move forward by n units
"mx<n>" Move in x axis by n units
"my<n>" and "mz<n>" - take a guess
"tx<n>" Turn around (Entities) x axis by n degrees
"ty<n>" and "tz<n>" - take a guess
" ss<n>" Set sequence time to n seconds
"sm<n>" Set sequence time to n milliseconds
"ps<n>" Pause for n seconds
"pm<n>" Pause for n milliseconds
"af<n>" Set animation frame to n
"as<n>" Set animation sequence to n (i.e. index into animation array for Entity) and run once
"al<n>" Set animation to loop n (i.e. Index into animation array for Entity) and loop
"h" - Halt
"r" - Reset (i.e. move Entity bvack to initial position)

Still some work to do but it is looking good.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 25th Nov 2016 20:43
Here's an example of the "mf" command (or how not to attempt a landing on the moon!):

https://vimeo.com/193100927

In this case the sequence is {"sm100","tx-20;ty10;mf200"}

Script attached for those who would like to play around with it.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
Isagabe
9
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 26th Nov 2016 18:48
Amazing stuff. And very kind of you to share. Thanks.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 27th Nov 2016 17:01
A word of warning if you use this for angular changes; the angles are not relative to the object as the script comments suggest, in order to get something usable I just implemented angle changes to the Euler angles defining the entities orientation which is not the same for reasons I am not going to attempt to explain here.

I am currently working on a quaternion library in Lua which will hopefully solve this.

I am also working on some additional commands for the movement sequences which will allow simple acceleration and deceleration and looping (which is needed for the former).

Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Dec 2016 20:01 Edited at: 3rd Dec 2016 20:46
Latest version plus a simple example to play around with. Not sure if the fpm will load on versions earlier than the 1.33 Beta I used to test it though.

https://vimeo.com/194179050

Put the two lua scripts in scriptbank/Door_Test directory

I've added a loop command and a speed altering command: e.g.

"lb10","si-50","mx5","le0" This sequence will loop 10 times the two commands si-50 (alter sequence time by -50 milliseconds) and mx5 (move by 5 units in x axis). The le0 ends the loop, once it has finished looping it will continue with the next part of the sequence.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 3rd Dec 2016 20:18
Hi AmenMoses, they are so cool. I love the door, this would be great for a game like maze runner.

What would be good to see, is a top down version of the space landing pod using thrusters, the keyboard movement WASD and mouse for thrust. Then once landed back to normal FPS screen play. I would so love to see that.

Great work as always.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3

A new competition running for GG
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Dec 2016 20:44
@gd, the same idea occurred to me, when I did the torches a while back I used decals positioned relative to the torch body and had them move around together, a similar trick could be used to add "thrusters" but the tricky part is positioning them when the lander is rotated in x or z (especially for decals as they only really work if rotated to face the player). When I've got the quaternion library working I may attempt something like this but do it in a more generic way so any decal or entity can be attached to another and the two move around together.

The great thing about the ezentitymover project (which will really come alive when I get back to the pickuppable script and have them working together) is that one script (plus small control scripts where needed) can do so may cool things, the downside is that to really make the most of it you need to fully map out your level and figure out what needs to move where and get them all timed correctly.

It would be nice to see what other peoples imaginations can come up with using my scripts as I'm not really much of a level designer.

Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 3rd Dec 2016 23:08
Found a "steam jet" decal which works well with the moonlander model. The model does have an awful lot of nozzles though.

Have tested the first step on the quaternion path, can now convert Euler angles to quats and back again, next step (tomorrow hopefully) is to handle quaternion multiplication, not sure how well GG will perform doing all this heavy math (64 bit math!) in Lua, may find we can only handle a limited number of Entities/Decals before it all grinds to a standstill! (with simple x/z movements I've had 400 or so Entities whizzing about the screen but rotation brings in lots and lots of heavy math)


Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Dec 2016 14:18
https://vimeo.com/194231124

Crate rotating using quaternions, the more astute might notice it isn't actually rotating correctly yet (the intent was to rotate around the entities x axis!) but it is getting there.

Part of the problem is that whilst I can happily code the math functions I'm not actually sure how to use them to achieve a specific rotation, also it might be due in some part to the axis not passing through the centre of the entity.
Been there, done that, got all the T-Shirts!
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Dec 2016 14:36
Rotation will depend on how the model is made, and where it's origin point is set.

For an entity to rotate around its centre the origin point would need to be dead centre of the model, but almost all models will not have the origin point in the centre of the entity, simply because the origin point sits on the terrain when placed, so generally modellers will place the origin point at 0,0,0 which will be dead centre of the bottom of the model.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Dec 2016 14:47
Yep, I know that. One of the main reasons my pickuppable script isn't finished is that I have been trying to figure out a way of dealing with it, came to the conclusion it couldn't be done without quaternions so that is why I'm going down that route.

I had thought changing the offy parameter in the .fpe file would do the trick but it doesn't seem to have any effect.
Been there, done that, got all the T-Shirts!
PM
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 4th Dec 2016 15:35
Hi AmenMoses, if I remember Lee said they are not supported at this stage. They are a throw back from FPSC Classic model fpe, but he may bring them back if its needed. I think they will need to be part of the voting board as GG is not supporting offx, etc at this point in time.

I think it may have to be re-edited in blender for someone like me. lol unless you can work out the maths

I was thinking... if someone or yourself could re-edit the model to add thrust animation or make another thrust model to move with the model. Is that possible?
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3

A new competition running for GG
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Dec 2016 16:26
Well my modelling abilities are non-existent but anything is possible of course.

The model has 8 large nozzles and about 20 little ones (presumably the little ones are the ones that manoeuvre it round and the large ones are for blasting off and landing) so that would be a hell of a lot of animations to deal with. Plus how would you actually go about it without some sort of particle system?

Using the "steam jet decal" certainly looks good on screen, with some really clever coding it should be possible to scale the decals to simulate different thrust levels but the really tricky part is rotating the decals relative to both the model and the camera so they look correct.

Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 4th Dec 2016 21:11
https://vimeo.com/194262913

Blimey that was hard work!

Finally got quaternions working in all axis, smooth as the proverbial.

Next I'll work out the offset problem which I thought I'd cracked but not quite there yet.

Then I'll integrate it into ezentitymover.lua, cutscene.lua and pickuppable.lua.

Then I'll do some fun stuff like add jets to the moonlander and make an little demo to really show off what GG is capable of.
Been there, done that, got all the T-Shirts!
PM
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 5th Dec 2016 00:24
Hi AmenMoses, that's looking great I look forward to your next up date.

Me too I would love to see Physically Based Rendering support in GG.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3

A new competition running for GG
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 5th Dec 2016 19:14
Quote: "Next I'll work out the offset problem which I thought I'd cracked but not quite there yet"

fixnewy = 0, or something like that, might help, thought.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Dec 2016 20:17
The offset problem isn't simply a case of changing the Y value by a constant amount as when the entity is rotated away from vertical that Y correction now becomes a correction in all three axis. I have written a little function that rotates a vector around the 3 rotation axis (it is also used to calculate the 'forward' offset for movement) and it worked fine with simple Y offsets (or so I thought) but when I added in the X and Z offsets to handle entities that don't have the origin in the centre it starts doing weird things when the entity is inverted so I have to revisit this issue before I can go any further.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 9th Dec 2016 22:01
Sorted the offset problem:

https://vimeo.com/195039778

onto the next challenge.

Btw, the quaternion library has been released into the wild if anyone wants to make use of it.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Dec 2016 22:43
https://vimeo.com/195133807

So this is what you can do with quaternions, I know I need to tweak things a bit as the decals don't quite line up with the nozzles properly but you get the idea.

btw, Lee seems to have attempted to fix the bug where moving an entity doesn't work unless you switch off collisions .. but .. now if you do switch off collisions and then switch them back on again there is a huge performance drop! (I do mean huge, the AI slider maxes out!) I'm still experimenting to see the effect of this, it may be that it depends on the collision mode of the entity but I've been so wrapped up in weird maths recently that I haven't had time to check out how this affects all my other scripts.

Been there, done that, got all the T-Shirts!
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Dec 2016 13:40
Looks like some great work developing here.
Thanks for posting.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 13th Dec 2016 23:32
Progress report time:

A load more jets added and up and down thrust sorted out, just need to sort out the movement keys and move the camera to a more sensible position.

https://vimeo.com/195547226

Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th Dec 2016 22:50
Me proving I can't fly an LEM!

https://vimeo.com/195877458

So I've got this thing flying around (need to add camera control so I can follow it but that shouldn't be too hard) but it is almost impossible to control it.

I also need to add HUD elements to show velocities and whatnot, anyone have any ideas?
Been there, done that, got all the T-Shirts!
PM
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 19th Dec 2016 01:06 Edited at: 19th Dec 2016 01:13
Hi AmenMoses, I can see it really coming along.

There could be a few options with the HUD idea depending on your view point.


First person
External control
1. This could be a remote control panel you need to walk up to.
2. Pickup remote control unit with animation for control, like you would have with a jet-pack, etc.
3. Pickup remote control unit which will then change the HUD view to a panel with a monitor. Maybe zoom-in and camera perspective.

Internal control
1. Dashboard HUD for the craft and a changing camera perspective which would be about four cameras looking outside the crafted, but not all running at the same time (as don't think GG can use multi camera options yet). Some sort of key switching system. Key 7 - Top view, Key 1 - front view, Key 3 side view, Key 9 - landing view so you can touch down, etc. Then you can also use the num's pad as a way to control the ship using Key 4 - Left, Key 6 - Right, etc. Everything in one place. I think I remember someone made a replay script (or was that another game engine...). Maybe a replay at another angle if possible.

Not sure if this helps, but just some ideas.

gd - Ed.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3


A new competition running for GG
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 19th Dec 2016 10:37
@gd, check out the thread in the products forum for the latest on this, no hud elements yet but I've gone for the 3rd person mode.

(anyone downloading it from that thread to try out will need to create an *unarmed* astronaut character in character creator first and you need to have the entities from the asset packs it uses, Sci-Fi Pack and Mega Pack 2)
Been there, done that, got all the T-Shirts!
PM
Meows
12
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 26th Dec 2016 18:18
I am not sure what I am doing here. but what ever I add this script to that is a entity does move.. just hovers at ground level and floats out of sight.

I have looked and looked for the How to use the platform for dummy's, and have not found it yet.

Any one know where it's at?
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 27th Dec 2016 10:48
The entity name must match exactly the name in the two lists in the script, for example if you call the entity "Platform" then the two lists should have an entry in them called "Platform" as well.

Set the physics weight of the entity to 0 and place it where you want it to start, it is best to put a pause at the beginning of the movement sequence because for the first couple of seconds after you hit the test button g_Time acts a bit weird.

To be fair the script is not aimed at dummies, it's aimed at the brighter users with at least some experience of wrestling GG into submission.
Been there, done that, got all the T-Shirts!
PM
Meows
12
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 28th Dec 2016 07:27 Edited at: 28th Dec 2016 07:30
Quote: "To be fair the script is not aimed at dummies, it's aimed at the brighter users with at least some experience of wrestling GG into submission."

Exactly my point! Thank you! To be a brighter user, you must first be a dummy, it's the only way ! The same way to become,
a Man or Women, you must first be a boy or girl.

Thank you for the inside look, I will endeavor to put it all together into a working platform.


PS:: you mention a pause. How do I put in a pause please? Global.lua is lacking that command.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 28th Dec 2016 08:17 Edited at: 28th Dec 2016 08:20
Quote: "
PS:: you mention a pause. How do I put in a pause please? Global.lua is lacking that command."


That would be because there isn't one. He's not talking about LUA commands, he's talking about when you write your sequence an the top of the script (after g_ezentitymover_sequence = ), putting in a pause command at the beginning of that list, all the commands are in the first post.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.

Login to post a reply

Server time is: 2024-03-29 15:15:19
Your offset time is: 2024-03-29 15:15:19