Scripts / LUA scripting versatility in GG compared to basic in AGK

Author
Message
psychoanima
6
Years of Service
User Offline
Joined: 25th Jul 2018
Location:
Posted: 5th Sep 2019 19:36
I am not experienced with GG and I am using AGK. Question is for experienced users that uses both engines, is lua scripting in GG good as basic scripting in AGK? Not in terms of scripting syntax, but things that you can achieve with the code.
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 5th Sep 2019 21:37
If you have GG then load up global.lua and it will show you pretty much all the commands you have available.
And there's some more complex stuff in utillib.lua, physlib.lua and one other lib.lua I can't remember off the top of my head from amenmoses

Other than that you have a few commands from lua itself (mainly file handling)

But to summize, we have access to: sounds, animations, raycasting, physics detection, sprites, player object related stuff (position, angle, weapons etc), object position, scale and angles, detecting keyboard input.

Hard to list everything in brief but take a look around the forums to see what has been done should give you a better idea of what is and isn't possible... GG is not going to give you free reign over the entire game as AGK does though, it's designed to make the process easier so tries to hide a lot of the work behind the scenes (though GG is very much still WIP itself)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Sep 2019 22:18
quatlib.lua
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 6th Sep 2019 20:04
"physics detection" guess I need to look at that because the core engine
collision is sparse on performance to say the least.

Can I ask-- what is the difference between "GetIntersectCollisionX" -- in global.lua
and "PhysicsRayCast"-- in physlib.lua?

It appears that PhysicsRayCast returns the 3 angles in one call?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Sep 2019 20:47
The PhysicsRayCast function only works with 'physics' objects, i.e. it will not detect non-physics objects, it returns the objectId of the detected object.

But, it has an extra functionality in that it can apply an optional force to the object.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 6th Sep 2019 22:20 Edited at: 6th Sep 2019 22:22
Is there some examples so I can practice?

Also, I forgot what exactly is meant by "physics objects"?
Physics On='yes'?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 7th Sep 2019 12:04
Dynamic + Physics On

https://forum.game-guru.com/thread/219758#msg2601608

Work your way through that first if you haven't done so already.

The pickuppables script has some physics in it and there is a boat script in my landfill thread.

Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-12-22 09:30:49
Your offset time is: 2024-12-22 09:30:49