Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Very simple kart physics

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Jan 2019 09:20
Sorry
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2019 09:51
Not a problem at all. Still have lots to do not least of all RIcks Mirror
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jan 2019 01:41 Edited at: 27th Jan 2019 09:22
Been having a lovely break away from coding but today I thought
Ide start naming the opponents and count lap times (names were randomly chosen and not a go at any individual)

Video removed for space please see latest post

blinks car physics code really works well

Ive really only added ricks mirror which you cant see in this video
and the AI opponent code as previously explained how it works
and ofcourse track and car selection


The check point code was quite simple really two rectangular boxes across
the track near the start and two variables added to vehicle type
this is how it determines if you have done a lap. If you have reset ie fallen off
the start variable is set back to 1. With checkpoint 1 just being infront of the start
car position and checkpoint 2 just in front of that by about the length of a car


The only individual characteristics they have atm
is they all have different top speeds and "Bulldoze Bret" doesn't slow down if theres a car in front. (sounds like me lol)

Source can be downloaded here http://users.tpg.com.au/subarpk/KrazyGrandPrix.rar
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Jan 2019 04:21
Looking great Fubes. If i get a chance i'd luv to design a track
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jan 2019 04:32 Edited at: 20th Jan 2019 04:48
Thanks

Sure I did what you said and used your track editor
loaded into Blender reduced vertices and extruded
I think by 1.00

I may try again with my extruder that worked well too
but only on normal settings and not smooth extrude.
Which would go well with the block theme


Still lots to do to make a game out of it instead of just
a test a track theme
fubar
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 20th Jan 2019 10:16
@fubarpk
Looking good. Starting to look like a real nice F1 racer game. I miss 'my mirror' (=chafari's) view though.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jan 2019 12:59 Edited at: 27th Jan 2019 09:23
Quote: " If i get a chance i'd luv to design a track"

Havent successfully done the double helix part of your track yet, haven't given up on the possibility tho just need to be a good driver

Following your track design I wipped up this track seems to work ok altho that nasty neville and bulldoze bret knocked each other off
the track in this attempt

Quote: "I miss 'my mirror' (=chafari's) view though."

That mirror is kinda handy for knowing whats behind you but I just find the driving a little harder that way but theres some of that here

Video removed for space please see latest post

Source can be downloaded here http://users.tpg.com.au/subarpk/KrazyGrandPrix.rar
fubar
puzzler2018
User Banned
Posted: 20th Jan 2019 13:05
AGK for Dummies required

I have this code


Have a camera,

Have a cube (red land)

Have a smaller object sitting just underneath the cameras location (object collisioning object for the camera/player)

How do we write this code to stop the camera from moving when the camera object hits the land object? (I.E landed on a surface of another object)

My skills at ray casting to and from objects is just not coming to me.

Any help tips would be great


PS Who the heck is ray anyway... he beginning to wind me up LOL
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jan 2019 13:20 Edited at: 20th Jan 2019 13:22
Raycasts are always a pain I find
if your using another object for positioning the camera
you can use the width, height depth of that object to determine if it is colliding with object 2



where objId might be your white block and objID2 your red block


PS when you find ray tell him im looking for him too
fubar
puzzler2018
User Banned
Posted: 20th Jan 2019 13:30 Edited at: 20th Jan 2019 13:34
Works beautifully. Smart peice of code there



The idea is to have 6 small .01,.01,.01 collission boxes surrounding the camera (will be invisible of course) to act on collisioning when move about.

These will be underneath, above, front, left, right, back of the camera

Is that how you all would do it or is there a better way
Cheers
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Jan 2019 13:45 Edited at: 20th Jan 2019 13:46
that sounds like a good method to me,, that's how the AI cars work they have blocks in the front left middle and right
left and right ones keep them on the track while the middle one I use for deciding if brakes should be applied. So I
don't see any problem with using the same style to keep a camera on track. but blink is pretty good with his camera
movements he may have a better idea. but its late in Australia atm so you may have to wait until tomorrow for his
response
fubar
puzzler2018
User Banned
Posted: 20th Jan 2019 14:28
Thanks - finally figured something out with the 6 point collisioning




fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 21st Jan 2019 00:56 Edited at: 4th Feb 2019 12:52
And the true test of Crazyness a figure 8 track,
The AI doesn't know if its coming or going lol but they still do laps even if its the wrong direction

Video Removed for space but this one is kinda an improvement I think

fubar
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 21st Jan 2019 14:06
Awesome!
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 25th Jan 2019 15:26 Edited at: 25th Jan 2019 15:28
At times it appears when holding the Spacebar(brake) and then also still pressing Forward button then the speed value appears to accumulate and launch the vehicle faster then should, when Spacebar is released.

This has just became more noticeable when using KrazyGrandPrix by fubarpk, when I've lowered the track to terrain level, so that the vehicle can then sometimes in corners(when still has enough speed) get back on track when slipped off. If used the spacebar to brake then gets and increadible speed which launches it over to the otherside of the road, effectively shooting off track on the otherside.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Jan 2019 19:55
Ok. I'm a bit busy on other stuff right now but i'll check it out as soon as i can. Thanks!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Jan 2019 12:08
I have noticed since I added a speedo and sounds
that when a car runs off the edge onto the grass (in krazyGrandPrix)
velocity.current doesn't change. Which to me shows
that velocity.current needs to be set somewhere
to its actual current velocity. Il have a think about
that and see what might be the best way to achieve this
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 27th Jan 2019 21:05 Edited at: 28th Jan 2019 00:50
That is true. When the vehicle leaves the ground it doesn't change the velocity.
I found that if velocity was reduced while in the air (as it should be) The speed of the vehicle when it
came in contact with the ground again was too slow (at least for mario style games).

Also if you think about it, when a car is in the air and you still have your foot on the accelerator then the wheels will spin faster as there is no friction
making the car think it's going faster

You might be better off converting GetObject3DPhysicsLinearVelocityX/Y/Z( objID ) to a distance and using that for your speedometer
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 28th Jan 2019 05:16
I ended up doing this


which kinda cuts out the engine when your on the grass

I did try a formula using those vectors which worked well for the sounds but the speedo needle was erratic
and kinda anoying but the engine stalling seems to work
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 28th Jan 2019 05:24
O am I stupid today lol


was all that was needed
fubar
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 30th Jan 2019 00:25 Edited at: 30th Jan 2019 00:32
Added some head & rear brake light mods. Not as pretty as could be(the quick & dirty method, just for fun)



LoadVehicle.agc


MoveVehicle.agc


main.agc
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Jan 2019 01:20
Wow! That looks very nice. I gotta get around to sticking this stuff into the engine
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 1st Feb 2019 10:46
It's fun but not very sophisticated: When the car isn't level, the 'beams' can go up in the air and reveal it's a fake, destroying the illusion.
Not ideal on uneven terrain.

Perhaps a solution would be a raycast towards the terrain and extend the lightcone until the point of contact, but currently haven't got time enough to try that, so perhaps later.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Mar 2019 23:24
Going to have to give this a go at some point
https://twitter.com/KenneyNL/status/1107783904784715788
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 26th Apr 2019 17:23
@blink0k

Hey
Glad to see the Posting is Still Open

it's easier than it uses to be to make game compared to the real old days of the computer before windows
but is the Physics that can be confusing with not eacly knowing ware to start.

The Vehicle Physics I am after
are Grand Theft Auto and Need for Speed: Most Wanted
I wish they had dun a few more things with those games
I know a lot of effore whent into them

(Edy Vehicle Physics) vs (MS Vehicle System) vs (Realistic Cars)

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=2ahUKEwjW_52Dk-7hAhVHiqwKHdSIB4gQwqsBMAF6BAgHEAc&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Db5DFLwGaWaI&usg=AOvVaw0yyQb99i9yI6QycfBFViUS

and since i don't have or can get the program you use to make 3d with
it makes it a bit harder to achive the path I am after

saying all that and show the example video
I want to achive a Driving Game ware it dose not repate the same things over and over
and is expandable not by just me but the every one who want to play it .
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 29th Apr 2019 21:22
Heyyy an update in this thread.
Xaby
FPSC Reloaded TGC Backer
16
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 1st Jun 2019 08:17
I am working on a FPSC Classic model "converter" tool, so it would be more easy to find the assets we want to use for our projects and prototypes.
Here are about more than 8 GB of data in the model files, textures, sounds, music, objects and so on.
https://github.com/TheGameCreators/FPS-Creator-Classic

At this moment there is a lot to do, but I am thinking, that in combination with this project, we could expand maybe the streets, trees, houses, roads, or traffic lights

Attachments

Login to view attachments
Xaby
FPSC Reloaded TGC Backer
16
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 1st Jun 2019 08:29
[offTopic]
may I ask, what happend to puzzler2018?
[onTopic]
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Jun 2019 22:33 Edited at: 1st Jun 2019 22:36
That looks great Xaby. I reckon it would be good for making tracks too
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 2nd Jun 2019 00:42
@Xaby

Apparently he was multi-posting messages (while could have just used edit) and when asked not to, he got abusive with the moderator, thus was banned.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd Jun 2019 03:39
Theres allot more than that Rick including some very aggressive and vial emails that are punishable by law
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 2nd Jun 2019 16:42
My-oh-my. Yeah, I now recall some e-mail stuff I thought was mistakenly sent. Forgot it was even worse than what I mentioned.
Something must have short-circuited in his brain. Weird..

Good to remember: lay low on drugs/booze. lol
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 2nd Jun 2019 17:08
What path-finding are you using on the vehicles?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd Jun 2019 21:25
@Golelorn not sure what blink uses
but when I used his code to create KrazyGrandPrix
https://forum.thegamecreators.com/thread/223651
I attached small invisible boxes ahead of the opponents cars ie left middle and right
so basically if the left block went off the track it kinda turned right slightly if the right
one went off the edge it turned left if the middle one ran into the back of a car brakes
were applied. Its very primitive but worked well for that game see the link for the source
code for that method
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 2nd Jun 2019 22:34
Ah, gotcha. Thanks!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Nov 2020 04:26
If anyone has a minute id really appreciate it if you could give this a flogging and see if it tunnels

Arrow key to move, R to reset, C for topdown view

When you reset it leaves a copy of the vehicle at the position and rotation so you can see where it reset.

Sometimes if it ends up lying against a wall and it resets it will reset "in" the wall and cause tunneling. With the marker you can check and see that the reset caused tunneling not the motion

It judders a bit when it flips over but don't worry about that. I am only concerned with tunneling atm.

Download extract and run convexhull.exe

Anyway thanks heaps for any help
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 18th Nov 2020 07:11 Edited at: 18th Nov 2020 21:42

what walls?

nmd. i cant see the track on monitor but can on tv. i gotta adjust my monitor
[My Itch.io Home] [Now Playing]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]
Santiago3D
3
Years of Service
User Offline
Joined: 11th May 2020
Location: Argentina
Posted: 18th Nov 2020 15:10
hiii, its excelent!!!! great work!!!

if i can make a lite edition on steer control

its a excelent physics vehicule!!! congrats for this work!

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Nov 2020 20:02
Your enthusiasm is very encouraging Santiago. Thank you

Login to post a reply

Server time is: 2024-04-16 04:34:39
Your offset time is: 2024-04-16 04:34:39