Scripts / Throwing this out there...

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Nov 2019 16:11
..........Would be great if it where possible..........
A> to change up the GamePlayerControl
for each new game level.

B> (not absolutely crucial, but might be nice)
to change up GamePlayerControl on the fly at any time.

This would be HUGE for some circumstances.
How to implement?? Come on Devs, HELP! Restraint not.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Nov 2019 19:45
Change it how?

You can replace any of the functions with your own versions any time you like.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Nov 2019 22:07
AmenMoses-- @ Lee, Preben and to whom it may concern.

There are various >>Different<< types of games people can make by changing
the GamePlayerControl script as it's called by the core engine.
So this would be a significant advantage to users if they could assign at least
each level to a custom GamePlayerControl. (Most users might never do it.)

Or if you cannot, then you are stuck like super glue to that particular style of
game all throughout it's entirety when in fact you might want to make a "2D"
platformer for one level, then change up to another type or back to normal.

Also-- look at this! Just as importantly-- when you create one GamePlayerControl
for some level, then go back to test a standard level where you want the original
script for-- it's not in place! You then have to swap out the scripts in the folders,
or rename them or whatever you can to accomplish a simple test between the
various levels. I just did this. A change for easier implementation is in order.

We want to get the word out that GG is not only easy, but it's easy and can be
more than just a FPS! (...or top down crawler.)

The work that has gone into the GamePlayerControl is vast and nearly perfect,
but to limit all levels and all games to it is a dinosaur system.
Dinosaurs have gone extinct. Progress by flexibility.
Thanks for your consideration. It seems like a pretty small request ... ?
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Nov 2019 22:53
As I said you can replace the functions as and when you want to.

gameplayercontrol is a global list so you can replace any of the defined functions with your own versions at runtime.

Alternatively you can replace PlayerControl() with your own version at runtime, hence bypassing gameplayercontrol entirely.
Been there, done that, got all the T-Shirts!
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 5th Nov 2019 22:56
What he means is like with unity you can isolate an Instance of a script to use in a scene, and use a different version of that script in a different scene, so in the unity example on one scene (level) you could have the player control script with the normal controls, but when you move to the second scene you could have a player controller script with the controls reversed. This is why I was pushing to get a project system implemented into gameguru where you could have multiple maps under one project with their own project and scene folders where assets and scripts would be copied to for each map. It would probably solve quite a few issues with creating standalone such as items not copying over too.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 5th Nov 2019 23:05 Edited at: 5th Nov 2019 23:06
Not sure if this works, but have you tried writing your own GamePlayControl script in a different directory and then using it in an entity on your level? Most of the Base scripts like music.lua and global.lu a can be over ridden by a custom copy placed on a map, it might be the same for gameplaycontrol?

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Nov 2019 23:39

I don't see a place to change GamePlayerControl over when you make levels...

What would be very convenient is if it was in the properties panel to the left
just like how you can assign any other object a custom script...
That goes for each level. So if it was set in properties by separate maps, then
it would be just that easy. And it sounds easy to do-- why not?

Can you explain AmenMoses what you are talking about if the GamePlayerControl
is not able to be assigned, then how can someone change it up?
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Nov 2019 23:44 Edited at: 5th Nov 2019 23:46
@ Belidos -- Change over Game Player Control via scenes-- YES!

That or even just levels would be a happy day. Progress.

Yes, I have made a couple different variations on GPC, and would like
to be able to make different levels ((same game!)) with different kinds
of >camera views< for example-- or whatever is desired of future users.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Nov 2019 00:05
I'll try again.

gameplayercontrol is a global list.

This means that at any point you can replace functions in it with your own version, at runtime, per level whatever.

So for example if you wanted to change the gameplayercontrol.jetpack() function to instead be something else entirely you simple say gameplayercontrol.jetpack = somenewfunctionwotyourwrote

The next time PlayerControl() is called by the engine your function will be executed instead of the standard one.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 6th Nov 2019 01:00
@AmenMoses
Hmmm... Sounds awkward for me. I'm not a pro scripter, just trying to get by.

Maybe if the name of the GamePlayerControl can change each map,
or instance-- but this probably isn't the case if global accesses it? So that doesn't
sound like a system that would be GG easy, or GG convenient!

Regardless, it's because a few tweaks here and there in GPC is all that might be
needed, and if that new GPC works like hoped, then it seems like it would be nice to
then just have a way to call that whole script up.

Mostly, the functions themselves may have been edited from one variation of the
GPC to the next... so getting a error seems most likely?? ((I'm saying here that
I have edited out portions of the GPC, here and there))... so calling those changed
up parts in one map that wants the changes in a different GPC... wouldn't work.

The camera control -- changed up in first version, different from the original.
Movement control -- changed up in second version, different from the original.
Version 3 -- different than the two above.
Go back to the original, switch back and forth -- not possible the functions have
themselves been changed! Need to access the whole file!

A person like me would break it all up trying to get it right again...

Might be possible to work this out with an AAA team, but as stated, and for me,
it sounds too complex. I got GPC versions that work individually-- but cannot
change them. == >> File change -- per map sounds EASY!



PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 6th Nov 2019 06:13
Make a folder in your script bank, call it whatever you want.

Put a copy of the game play control script in there.

Keep it named the same but change whatever you need to change.

Then put the new game play control scrept in anyour dynamic object on your map.

Repeat with a new folder and new copy for each level.

If I'm right you should have a different gameplaycontrol script running on each level.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 6th Nov 2019 08:59 Edited at: 6th Nov 2019 09:15
@GubbyBlips,
I think AM answered pretty well but maybe you missed his point

So in regard to the GPC:
- Don't edit the global one, make modified version of it.
- So you can simply have different versions for different levels.
- Use the method Belidos described, or just have unique names for your custom scripts - whatever works best for you.
- If you attach the modified script to an entity for your level it will override the global one:

This is what I do for stuff like that:


I made nice little boxes for this purpose, so I can just attach the required script for each component, so that it is unique to each level if required.

I put code in the script to hide the little boxes at run-time, and by placing them near the start marker it is easy for me to remember where they are and what they are doing.

You can of course attach the script to any thing you want.

OldFlak....
aka Reliquia
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.

Attachments

Login to view attachments
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 6th Nov 2019 21:10
Let me try it with a script.
Been there, done that, got all the T-Shirts!

Attachments

Login to view attachments
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 6th Nov 2019 22:12
Thanks all, for the info, and for having patience against my rigid ignorance.

I'll give it a try! I just didn't imagine GPC getting overridden
by standard script placements. Alrighty.
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 7th Nov 2019 06:22
Yeah most can be over ridden with your own.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
J_C
17
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 8th Nov 2019 13:05
OldFlak
Thank you for that control box picture it looks amazing and easy to follow..
This should be part of GameGuru design..
So we don't have drums, boxes, plants, etc. being used to attach random bits of control logic to our levels..

This is obviously the best way to go..
I have learned from your great example..Thank again..
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Nov 2019 14:55
Ideally GameGuru should let us add "empties" to the map (that is entities with no mesh or texture data) that we can add those scripts to and access them through a properties panel, Every extra object we add, even if it's only 4 vertices and a tiny texture, is a drain on resources and should be avoided.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 10th Nov 2019 13:44
OldFlak your idea with the boxes is a very good
I always use barrels for some of my scripts , sometimes i use a crate, but a lot of times i cant remember were i have put what sound script. so your idea is good.
So i have also made some boxes , My first try, and my first model with 3dwings that i could get in to GG.


but it almost took me the hole day.. Again i take my hat off for the modelers.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11

Attachments

Login to view attachments
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 10th Nov 2019 17:59
PCS!
PM

Login to post a reply

Server time is: 2024-12-22 09:37:36
Your offset time is: 2024-12-22 09:37:36