Product Chat / Loving Game Guru, More Lua Commands Please!

Author
Message
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 22nd Mar 2015 21:48


This probably looks fairly tame - it's certainly no 'guns of icarus' yet - but a number of achievements behind this:

AI faction code to pit side 'A' against side 'B' until one side wins, with retreat and recover stages
Basic box collision (to stop flying entities merging with each other)
Player/camera slaved to flying entity that also allows mouselook
Remote entity control using new key in commands
Conversion of .fbx assets into .X format - I know this is real easy for some - but it was a massive learning curve for me
(I noticed that we have full control over the colour of text as well as placement now - this works great)
The music is from http://teknoaxe.com ... some great royalty free music here of all kinds

What would be extremely helpful is:

A command such as GetTerrainHeight(x,z). This would enable accurate landing and terrain avoidance code for flying and ground entities AND procedural placement of assets (randomise fuel dump, enemy etc placement for each play through).

A FireWeapon command that isn't triggered just when pointing to player. So entities can shoot at other entities other than the player.

A projectile type that isn't hard coded (I had to subvert the grenade code to create a new cannon with cannon ball projectile).

Some control over the size of explosions - airships need a massive explosion

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Mar 2015 00:41
cool video, like team fortress 2
i'm curious how you got box collision without any sort of size check unless you're just using a specific size just for those (rather than a general collision script?)
i agree with the GetTerrainHeight(x,z) command, i was going to suggest exactly the same, it's really needed (while it's possible to workaround with an extra object each time, that's too expensive with the fps cost)
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 24th Mar 2015 05:09 Edited at: 24th Mar 2015 05:10
Hi cybernescence

Great Video / well done!

Quote: "Player/camera slaved to flying entity that also allows mouselook"


Just wondering how you "slave" the player to the entity? I thought I saw you post something on this, but can't find it now.

Please share again

Thanks
"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 24th Mar 2015 06:11
Very nice, Great job.
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

GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 24th Mar 2015 07:08
@ Cybernescence

I found your earlier post on this subject. You mentioned that you were going to publish the script.

Have you had a chance to do that?

"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 24th Mar 2015 23:55
Awesome game style!! Thanks for sharing, it's also nice to get a thumbs up now and again Also happy to support creativity in the community so let me know what three LUA commands you think the scripting public as a whole might need, and if they are simply hooking some existing functionality, I will see what I can do. One of the missions of Game Guru is to keep the door open for a wider selection of game types, and we're aiming to do that through additional LUA commands. This way we can focus on working on core things, while the community create complex patterns with our LUA building blocks and produce games very much like the one in your video.

One idea I had was a few commands that would allow you to station little people on the other airships, and a good shot would have them fall off via ragdoll and plummet with a small scream Perhaps a command which locks entities (and characters) relative to a parent entity so when one moves, the other moves with it, maybe... let me know!
PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM

cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 25th Mar 2015 01:21
Thanks for the comments re the video ...

Hi smallg - I'm not aware of any e.size.x or e.size.y etc type variables, so you're correct, I had to pre calculate the size of the flying entities (all the same size in this case). The only way I could get responsive collision avoidance was to have a supervising script running for the job (rather than collision checking in with each entity script) - which I suppose makes sense . I also found this loop checking code useful to only check each object with each other object once per cycle (you likely know this being a master scripter, but in case anyone else needs it):



Hey GoDevils - sorry yes, I'll post it soon - I just haven't disentangled it from all of the other stuff but I'll do so - it's really straight forward once you see how to do it - there are other scripts in the script board using the same technique now (repurposing 'TransportToIfUsed')

Hi Lee - I think you/GG/TGC have a lot of long-time passionate supporters even if this often times manifests itself in constructive criticism .
I've seen many people wanting in-game camera control (to fly, for third person etc). I think this can mostly be achieved by using TransportToIfUsed but probably isn't massively intuitive until you've seen it work and does have some limitations. But I've seen this request many, many times in the forums. Your idea would be fantastic (and one of the reasons suggested a GetTerrainHeight(x,z) - so we could procedurally place non character entities and for entities that need(?) to have collision removed to smoothly make them shift about on the ground, and in air). As you say though locking to a parent entity for movement purposes would open up a lot of interesting scenarios. Whilst I'm going - and I don't know if this isn't like this already because it's difficult to achieve, but is it practical to have the ShowImage command display more than one image at a time? In that HideImage would explicitly hide the image rather than the next call of ShowImage automatically removing the previous image before displaying a new one? I think there would be an explosion of in game (image based) HUDs if this could be made to work - and would complement the new text placement/colour commands very effectively, producing a much richer visual experience.

Whilst I get there are a lot of pressures from all corners (and at the risk of adding yet more), please could you drop in some extra lua commands with the releases when you can - I now see this happening a lot more than in the past (even if they are not always mentioned in the change log) - I think there is a solid crew of very capable programmers in the GG user group who could help you demonstrate the power of lua if a drip feed of commands could be maintained. This would help show that GG, as well as being 'easy', is also a 'flexible' engine. Anyway, hope you are able to keep the coding to the max


Cheers.
J_C
16
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 25th Mar 2015 16:07
Great suggestions cybernescence... I agree

Can we also have the capability to have the AI target other entities.. so we can programme the rocket man to blow up some barrels/buildings..
as now they will only target and fire at the player... if you point them at anything other than the player they refuse to fire rocket...
With this feature we could have allies and companions to obey our every command...
PM
Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location:
Posted: 27th Mar 2015 07:08
I like it!
PM

Login to post a reply

Server time is: 2024-05-06 04:48:36
Your offset time is: 2024-05-06 04:48:36