Scripts / GG racing

Author
Message
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 24th Apr 2018 20:17
I'm currently writing the scripts for and making some new race tracks here it is on my very old Mars racetrack (some of you may remember it from dropzone2150) so excuse some of the models they are proper old now so will be building an all new one to race around


Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 24th Apr 2018 23:25
God that takes me back to the 80's.
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 25th Apr 2018 00:21 Edited at: 25th Apr 2018 00:38
lool its cool !!! bit of a crappy racetrack (well some of the models) maybe you could sort out some other race track users using your skills (long tracks tho) maybe a carmageddon thingy lol. Hey m8 its nice just to have the collision working as i demonstrated by slamming into the wall lol, just needs the hurtplayer adding to that bit but could kinda get a racing game going wonder if you could tie opponents into the player position as in so far in front or behind depending on how well the player is driving?
going to try to add some jumps next with gravity = 0 so you kind of fly for a bit see how that works out
TBH Chris i saw one of your posts about SetGamePlayerControlTopspeed () also the PositionCamera( 0, g_PlayerPosX, g_PlayerPosY + 50, g_PlayerPosZ) and have been playing with it with the mechs, bikes tank etc
We really need some instructions on these new commands
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 13th May 2018 10:07
hahah so nice man ! great !!
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 13th May 2018 13:53
Thanks Duch would be nice if i can get the player/bike to kind of slide out on corners (bit more like a real bike) but its a bit of fun
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 14th May 2018 04:33
Good job Honkeyboy! I keep watching your video's. It seem's that we like the same stuff. I want to be able to use vehicles in my games. Only if you can move the bikes handle bars when turning? That would add a lot. Your good at scripts, can that be done? Or do we need better physics added to game guru?
Jim C
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 14th May 2018 19:38 Edited at: 14th May 2018 19:40
I think there is a bit of confusion about the whole 'physics' issue.

Basically if you want to move something around in the game world directly, i.e. by taking control of it's positioning from within a script, then 'physics' *must* be OFF for that object.

If you instead want objects to react in a physical sense to other objects 'naturally' then 'physics' must be ON for that object and any others it reacts with.

Now in the currently released engine there is no way of moving a 'physics' object (without seriously screwy results) but I have added, a very simple at present, Push command which will simply impart an instantaneous force to an object in a particular direction. I have also added various constraint commands and a SetObjectDamping command which in combination can be used to control how physics objects react BUT as soon as you attempt to explicitly move a physics object (with SetPosition or SetRotation for example) then all bets are off as to what will happen, basically the Bullet engine will probably not like it very much!

What this means is that to drive around in a vehicle of some sort the vehicle itself must be position controlled so cannot be a physics object (I supposed you could make it a physics object and 'Push' it around but controlling it would be a nightmare) but the player cannot really just sit in it, instead the trick is to take control of the camera directly and move that as well. The 'player' can either be 'transported' around along with the vehicle or simply moved out of the way whilst you do the driving bit. Also though you need some way of ensuring that the vehicle object doesn't drive straight through objects on the map, there are various ways of doing this but all require a lot of planning and clever scripting.

Anyhow, I am about to embark on another vehicle script effort which I hope to make a lot more generic than previous efforts and more useable, stay tuned!
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 14th May 2018 23:18
Ahh yeah m8 but in this case there is no (spoon) lol vehicle its just the player with a HUD so presume we are dealing with player physics here? does that make any difference?
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th May 2018 07:54
If the 'bike' part is just a HUD image then you would need to make versions of it at different angles and select the appropriate one to display based on the 'lean' of the bike in the turns. Alternatively you would have to take control of the camera and 'lean' by rotating the camera view.

If instead you used a 3d model for the bike part then you would have to position/rotate it to relative to the camera position to suite the particular motion you wanted to convey. For example when accelerating you could have the camera pull back slightly from the bike and under braking the reverse, when turning the bike should lean first then the camera follows it.

There is a fine line between creating a realistic motion effect and creating a vomit machine!
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 15th May 2018 12:44 Edited at: 15th May 2018 12:57
OOh i see good idea kinda like this sort of thing? (just some rough ones)







and the scripts so far so i presume i would need to switch the image on a keypress? e.g right and left?
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th May 2018 19:29
That's a good starting point, simply use the steering to decide which one to use.

Eventually you could use different images depending on the speed , i.e. at low speeds you 'steer' the bike but as you go faster you start to 'lean' the bike, at some point there is no steering at all and turning is all done by leaning.

Depending on how realistic looking you want it you also should move the camera to mimic where the head position of the rider would be, take a look at some videos of bike races for hints on that. Plenty of nutters on pootube with go-pros!

Been there, done that, got all the T-Shirts!
PM
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 15th May 2018 22:15
Thanks Guy's. I understand now. We probably would need to make a banged up front end for when the bike crashes into things also. Or make it easier and just have the bike explode. Lol. Question, So to stop the vehicle from driving through obstacle's. we could put a" stop the vehicle script" on each obstacle (example) being a tree race track side rails or rock etc? This is way to much for me to comprehend since I don't make up scripts .
Jim C
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th May 2018 23:11
Nope, if using a model for the vehicle you can cast rays in the direction of travel and detect other objects. If an object is detected within a certain distance (meaning you are going to hit it!) then you do some sort of crash action.

For AI vehicles I would use my zones script to define areas that the vehicle needs to stay within, if the vehicle starts to wander off course it simply steers back towards the middle of the area. That's how I did it for the whacky racers anyhow.

You can also create 'avoidance' objects, maybe fence posts or something similar, which if the vehicle gets too close to it turns to avoid them. For something like a race track a ring of tyres would be fitting.


Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 15th May 2018 23:31 Edited at: 15th May 2018 23:49
Also m8 if your using the hud idea collision is on so you dont go through buildings, up terrain etc as you are actually the player (hence i was playing with the idea)
here's the sounds so you can add them to test it all out the bike terminal needs to go on the bike itself sounds in 2,3 and 4 slots. If you use shift to speed up and a ramp you can do some pretty impressive jumps lol
have a play with the scripts the pics need to go in a folder indicated in the bike script
p.s the SetGamePlayerControlTopspeed part in the bike script sets the speed, spotted this in one of AM's posts (thanks m8) I have it set to 7 but you can make the bike or any other vehicle go pretty ballistic by upping the value
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Attachments

Login to view attachments
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 15th May 2018 23:55
Thanks m8's, That's right about collision. I didn't realize that I'm the hud. I'll give it a go. In more way's than one.
Jim C
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th May 2018 14:44 Edited at: 16th May 2018 15:18
Jump test



and rotating spike wheels

Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 16th May 2018 23:36
Cool! I like the spike wheels. I got your scripts to work kinda. When I went into test mode I got a message saying something about the file doesn't exist or is missing from the directory. And I didn't understand how to add the weapons. I put a gun and a rocket launcher on the map then put the entities numbers in the script. And it didn't work. I could drive with the bike hud though. When I loaded into test mode I was instantly the bike hud. When I walk up to the bike. It say's to hit e to enter. The bike then vanished. So that worked also. I just couldn't use any weapons.
Jim C
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 18th May 2018 22:58 Edited at: 18th May 2018 23:02
No weapons with the bike m8 if you want I can include the tank scripts which do have them, for these you have to manually add a weapon off the map and change the id in the script let me know if you want them and i'll package them all up in 1 zip I'll post the wheels etc as well but im having to dig for things as a major win 10 crash has meant I have had to reinstall and so only had the windows old folder to try to drag my GG stuff out of
:/

Also you can point the bike up and down as if looking maybe someone can chip in as to how to solve this
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 19th May 2018 03:11 Edited at: 19th May 2018 03:59
Wow "SORRY" to hear that Bud! They just released a big windows 10 update. I set my pc to not except any new updates. But they forced them down my throat! So far I haven't had any thing bad happen. I just updated this morning. Good luck! Don't bother sending any thing if it's going to take away from fixing your pc Bud. Anyway, I wanted to post a video on here so you can see me trying out your scripts. And to just post a video on here. LoL I never did one before. I just updated my graphic card driver's and it came with some recording software called Relive. If your a AMD user you probably heard of it. Well here goes. It just keep's loading then ERROR. I'll try the youtube method instead. That didn't work either. I put the URL on here for now. I'll have to hunt for steps on posting a video. https://youtu.be/7M-xBJmTS7U
Jim C
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 19th May 2018 07:34 Edited at: 19th May 2018 08:26
Make sure it's 'always active'!


I'll just leave this here in case it's of interest: https://forum.game-guru.com/thread/215012?page=16#msg2600572
Been there, done that, got all the T-Shirts!
PM
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 19th May 2018 09:48
AmenMoses, You Sir are Awesome!!! I'm going to try it out right now. I was having fun with Honkeyboy's bike. I need to get the order of the bikes sounds right. And find out why I keep getting that pop up when loading into test game.
Jim C
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 20th May 2018 22:49
Thanks m8 will have a play with those when I get GG set up again lost around 40 gb of my models with the crash so feeling kind of gutted atm....trying to go with the oh well its a new start type thing :/ heh but that's easier said than done
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st May 2018 08:36
So I take it you had no backup copy?

Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 21st May 2018 22:40 Edited at: 21st May 2018 22:50
Unfortunately on the same drive that was buggered I managed to scrape some of it from it but the drive was pretty fried and so lost a lot... oh well onwards and upwards as they say, I will sacrifice the drive to the god of Biffa (after hitting it a lot with my lump hammer) just for some self satisfaction of course! ( a lot of it was older stuff anyway I suppose and my modeling is better now abit so...time to set back up and make a new ...I did save the scriptbank and about 60% of the entitybank and have the games backed up to the cloud so will have the maps and the older versions of the games. will Hammer fifa 18 a lot for the next week or so and then get back to it.
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 22nd May 2018 00:04
Note for the future, stick a cheap HD in you machine as drive F or whatever and routinely just copy anything important to it. Or you could invest in some proper back up software and configure it to back up certain folder automatically to the spare disc.

I, being a bloody nerd, have 3 SSD drives all of which have copies of everything important. I've been stung way to many times in the past.
Been there, done that, got all the T-Shirts!
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 22nd May 2018 23:16 Edited at: 24th May 2018 22:29
I usually would m8 but this is an usff and no room in it for anything apart from 1 drive and the graphics card :/ I could have used the usb sata but gave it to my son to use...sods law, I did however have it partitioned which kinda didn't help as the drive was krackered lol.
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Login to post a reply

Server time is: 2024-11-17 00:56:38
Your offset time is: 2024-11-17 00:56:38