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: 19th Dec 2018 07:06 Edited at: 23rd Dec 2018 09:44
Video removed for space please see latest post
Using the same wheels the kart has just moved slightly
also uses the original hit object just sized a little
its almost as tho im dragging on the ground
but it does behave heaps differently with the wheels apart more
I think its turning better

i tried this command MakeCarFromModel("suv", "jeep.obj")
with no success so that may be half the issues im getting
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Dec 2018 08:13
Send it to me and i'll have a look
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 19th Dec 2018 13:14 Edited at: 23rd Dec 2018 09:45
EDITED Added a flaming hoop animation

Thanks

Advanced Driving School

Maybe add a jeep logo and then
I think Jeep Australia should give us both a brand new Jeep
Video removed for space please see latest post

PS If I had a new Jeep I wouldn't be doing this with it lol

ok so I ran 2 red lights lol but theres no other cars maybe I will add a wall that pops up on red lights

just having fun playing around with blinks ground model and source atm
fubar
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 19th Dec 2018 18:07
@blink0k

I tried your example

it works very well-ish

the skating on the rink ice was one thing that needs to be tweaked

what program did you use to make the land ?

I have milkshape3d which is very old and it seems
the land mass you created does not all fit on the screen

I started working on my own in milkshape3d
I had to change the scale mode in the programming and
it was necessary to increase the size to 10 times size I started out with
get it closer to the correct size

the backup steering does not work as in being able to turn

find attached is my 3d built land mass

well I might as well send the file I changed so others can see what I did

I also found the code in the file to show if the car is touching the ground
and activated it on

a few months back I started working on my own version of car physics
I had created the car using the command built into agk2 tear 1
but I had not got the physics yet

the physics seem for cars is there but there is no example to work with
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Dec 2018 19:17
@fubarpk Nice! I have some resources for that type of game. I'll send them to you when i get a chance. I think Jeep should do that too
@resourceful
1. If you download the latest source it stops that skating issue when your not accelerating
2. For AppGameKit Physics everything has to be huge unfortunately. You could scale everything down and then reduce the physics scale by the same amount. So half the size with a physics scale of 20. 1/4 the size with a physics scale of 10
3. You forgot to upload your model
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 19th Dec 2018 19:25
@blink0k

I downloaded the example you posted first in the forum
and it was just after 3 pm cst when I did it
so I thought I had the latest version

my 3d model is in that file I uploaded

what 3d program did you use to build your 3d level ?

another thing that just occurred to me
this needs to run terrain map instead of 3d model

I would think more code would be needed to detect
ground levels
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Dec 2018 19:37
Quote: "another thing that just occurred to me. this needs to run terrain map instead of 3d model "

There is a terrain map (Height ma) version there but it is old

I use a very old, discontinued modeller call swift3D. I suggest you learn blender, I am.

Quote: "my 3d model is in that file I uploaded"

I cannot see where you have uploaded your model
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 20th Dec 2018 08:30
someone remembers this one? simple, but lots of fun back then:



blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Dec 2018 19:03
Definitely do-able. I more of a Mario Kart guy.


This style in 3D rather than mode7 would be cool too

janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 20th Dec 2018 20:43
Nice project you have going there, other than the the steering, which is a bit abrupt, everything feels great.
Keep it up, I like how you keep us updated
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Dec 2018 21:02
Thanks @janbo

V1.3
1. Separated out the walls to prevent tunneling. There is some code there in CheckWalls() which turns off the engine if the collision is abrupt
2. There are three methods for calculating the direction of linear force: VEHICLE/GROUND/AVERAGE
- VEHICLE : Direction is the car facing forward
- GROUND: Direction is where the wheels contact the ground
- AVERAGE(Current setting): Average of GROUND and VEHICLE
3. Added some debug switches to show what's going on
4. Fixed the sliding when you stop accelerating

Note that it is set to a VERY high speed. Hoping you guys will bash it and find tunneling
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 20th Dec 2018 23:11 Edited at: 20th Dec 2018 23:12
These demos all have a good sense of hectic speed and action, I can't help but picture an endless 3d scroller car chase game with obstacles, jumps, stunts, in and out of other traffic.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 20th Dec 2018 23:29 Edited at: 20th Dec 2018 23:32
Hi blinkok

Well, I finally found the time and a way to reduce the Fraps recordings output file sizes using in order to convert and upload the animGIF's.

But I see you have been a busy bee and made progress so probably doesn't apply no more..




Those issues above I can no longer replicate since your latest update, so that's good news.


Not all is solved yet though..
The first run I got stuck in the wall with the front of the car, but happened only once and couldn't replicate, the other examples below I can replicate.

At top of the wall:




And at the ramp:



Perhaps for there's no check right underneath the middle of car chassis only at the corners, so gets stuck?
Car handling appears better though and love the additions.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Dec 2018 23:37
Thanks rick. Awesome stuff. If you want to see the hit shape just press H.
I made some changes (First post)
If you could thrash it when you get a chance i would really appreciate it.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 21st Dec 2018 12:00 Edited at: 21st Dec 2018 16:46
Great fun so far: acceleration is pretty fast and it jumps quite high.

When stuck on the wall with one side of the wheels hanging off, it neatly slides and falls off eventually.
It can take a while though and I think if you want to speed that up, getting unstuck then one way would be to still be able to move the steering wheels and gas, so one could wiggle and free itself and slide off faster (if possible to implement).
[EDIT: that doesn't work on the loops road guides though; it's like you drove your upon a concrete roadblock, as in reall life, so stuck then, unless you can get out of the car and find some people to help you push.. or in our case press reset. lol]

I do miss that 1st reset press was not being a full reset to the arena center before. It helped with the debug and was less drastic.
Also, I think if reset, the cam should be reset to original settings too(or perhaps if pressed twice in a row?).

Another thing I really miss is a handbrake(spacebar?) if possible to implement at least. Perhaps pretend it hit something?
After that you'd need brake lights on the rear(the agk logo?) and for the front some light cones to lit up the road for driving in night mode and then nearly there' d say.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 21st Dec 2018 14:53 Edited at: 21st Dec 2018 15:09
Added a wall of stacked boxes, just for little fun and testing the physics:




For who wants to try add before the main loop:
Create_box_Wall(100, 5, 10, 1, -200, GetObjectY(env.ground), 2500)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Dec 2018 21:32
Quote: "I do miss that 1st reset press was not being a full reset to the arena center before. It helped with the debug and was less drastic. "

SHIFT+R

Quote: "Another thing I really miss is a handbrake(spacebar?) if possible to implement at least. Perhaps pretend it hit something?
After that you'd need brake lights on the rear(the agk logo?) and for the front some light cones to lit up the road for driving in night mode and then nearly there' d say."

Will do

Quote: "Added a wall of stacked boxes, just for little fun and testing the physics:"

Brilliant!
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 21st Dec 2018 21:53
@blink0k
Wow vast improvement ;O)

I know you have a lot on your plate

I've got a couple of things I would like to be added

adding the option to switch from one to another vehicle would be nice
when that vechicle is near anther say with in 5 to 10 feet

i'll take a poke at it and see if I can add in other camera point of view
not just from out side but inside and a drop camera

attching or detatching a trailer to the vechicle
would be a anther nice option

a radar sytem for other vehicle's and other objects with being able to show only
what the users want to be able to see

the shift + R dose not seem to be needed as the R on it's own works fine

this been the best exameple vehicle code I have seen for agk2 basic
My understanding of the c++ version is beyound me at this point

I have to wonder how big a world could be created with out
totaly makeing either the pc or the android too slow to use it on



blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Dec 2018 22:24
Quote: "adding the option to switch from one to another vehicle would be nice
when that vechicle is near anther say with in 5 to 10 feet"


Do you mean like The Simpsons Hit & Run. That is a very cool idea
Everything that is related to the vehicle is in the vehicle structure so you could have multiple vehicle structures or an array.

Quote: "i'll take a poke at it and see if I can add in other camera point of view. not just from out side but inside and a drop camera"

Great idea!
Look in SetupCamera() in LoadVehicle.agc there is a camera object which is fixed to a dolly object so you can pan around using the WASZ keys (For debug).
I would place the camera over the bonnet and the dolly out in front on the road. Let me know how you go with this and make sure you ask if you have and problems.

Quote: "attching or detatching a trailer to the vechicle would be a anther nice option"

That sound like a job for Create3DPhysics6DOFJoint( ) . I'll have play with that when i get a chance

Quote: "A radar system for other vehicle's and other objects with being able to show only what the users want to be able to see "

I think you could do that by using the x,z positions in 3D as x,y positions in 2D. Then use the GetObjectAngleY() to rotate the 2D sprite. You might have to scale the numbers but it should work.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 21st Dec 2018 23:30
SHIFT+R : nice! (I should have seen that in the code of course)

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Dec 2018 00:45 Edited at: 22nd Dec 2018 00:47
Bugs:

1. If you go up that big sloping curved ramp in the corner the steering stops working.
That is because the angular turning velocity is set on the world Y axis and it needs to be on the vehicles Y axis.
I'm working on that but my angle math is appalling so it may take a little time

2. I just realized i can limit the velocity when falling so i might see if i can fix that tunneling when falling from a great height

3. I need to refactor it so it scales with the physics world scale. I think this will make it more accessible because it will work with smaller models


Thanks everyone for all the help! It certainly wouldn't be anywhere near where it is without you guys
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 22nd Dec 2018 18:34
@blink0k
'
ya I like they have in "The Simpsons Hit & Run."

bugs that creep in when you least expect them

with what you have dun I can work on the game program I want to

if I had to keep working on the code for driving
i think it would take me a year and still not get close to what you have

after going through the code I found the location I need to tweak
it's the control section for the camera as in the "aswz" keys

the mass version of the camera locations is 14 and the low end is 6
that most people would use .
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Dec 2018 20:25
I'm just gonna leave this here


puzzler2018
User Banned
Posted: 22nd Dec 2018 20:33 Edited at: 22nd Dec 2018 20:33
Wow - yes - I can imagine where this will take you, and looks like a promising project. ill check back soon
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Dec 2018 20:41
Awesome Assets Blink
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Dec 2018 20:56
Haha. I posted it so you guys could make something from it. I woking on something else
puzzler2018
User Banned
Posted: 22nd Dec 2018 20:58
Supercars!!!!! maybe after lemmings lol
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 22nd Dec 2018 21:08
Looks like Lego City floor plates.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Dec 2018 21:21
Maybe
puzzler2018
User Banned
Posted: 22nd Dec 2018 21:25
Wow - a nice field ground for Little Big Adventure 2

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Dec 2018 21:44
Kenney certainly does some great assets all low poly too
Your Kenney Converter will come in very handy
fubar
puzzler2018
User Banned
Posted: 22nd Dec 2018 21:46
Or take the challenge and make them all in house...
puzzler2018
User Banned
Posted: 22nd Dec 2018 21:55
How we going to acheive the road barrier to push a car back into the road and the checkpoints passing.


Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 22nd Dec 2018 22:00
@blink0k

Thanks for additions ;o)

yes I for one plan to make use of what you have most brilliantly Created

This cuts down about 30 percent of what I have to get dun for it
well only 80 percent after I build or find all the assets I need to bring it to life
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 22nd Dec 2018 23:36
Oh my...


lol
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Dec 2018 02:04 Edited at: 23rd Dec 2018 02:09
Quote: "How we going to achieve the road barrier to push a car back into the road and the checkpoints passing."

I would scale the tiles and use them as invisible hit shapes. You could do the same with invisible checkpoints

I have updated the code to Version 1.6 (In the first post)

Changes;
1. Throttle velocity when falling from a great height
2. First person camera (C to toggle cameras) very early, needs more easing of the camera and modelling to show windscreen frame etc
3. Brakes... Who am i kidding, it's just an excuse to drift
4. Added massive ramp

Bugs;
It still tunnels if you slam into the side of the small ramps where they meet the ground. It forces the car into the ground. For now i'm calling it a design flaw and will probably change the shape of the ramp


This will probably be it for a while. Christmas an all.
So all you guys have a Very Merry Christmas and a Happy New Year!
Xaby
FPSC Reloaded TGC Backer
16
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 23rd Dec 2018 11:11
@blink0k

this is a very great Christmas gift. A lot of possibilities now. AppGameKit GTA, AppGameKit Autoball / Rocket League or Farming Simulator

Also a very Merry Christmas and a Happy New Year.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 23rd Dec 2018 17:50 Edited at: 23rd Dec 2018 17:52
@blink0k
Gave it a shot(of course).

Quote: " 1. Throttle velocity when falling from a great height"

Great stuff, jump gives that great old American TV show feel, like in Dukes Of Hazzard, A-team or Knight Rider.

Quote: " 3. Brakes... Who am i kidding, it's just an excuse to drift"

Indeed! lol Pretty cool.

Quote: " 4. Added massive ramp"

Always fun.

Quote: " Bugs;
It still tunnels if you slam into the side of the small ramps where they meet the ground. It forces the car into the ground. For now i'm calling it a design flaw and will probably change the shape of the ramp "

Noticed that one indeed, very rarely happens anywhere else, the occasional wall here and there.

Quote: "
This will probably be it for a while. Christmas an all.
So all you guys have a Very Merry Christmas and a Happy New Year!"

Merry Christmas and a Happy New Year to you & the rest of the guys too!



@Xaby
Quote: "this is a very great Christmas gift. A lot of possibilities now. AppGameKit GTA, AppGameKit Autoball / Rocket League or Farming Simulator"

So agree! Only thing is, before commercial release the tunneling needs to be completely tackled, but I have a feeling will be possible.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 24th Dec 2018 22:33 Edited at: 24th Dec 2018 22:40
So just curious, I got the non physics based driving almost working, with a basic suspension....but after HOURS of head scratching as to why there was a "jitter" I doscivered it seems to be the raycasting....or AGK's landscape creation leaving holes between vertices.

In the attzched you'll see an occasional glitch - this is because, wven when sitting still on the landscape, the raycast collision outcome can very occasionally not detect the ground. Both normal and sphere raycasts have this issue.

Has anyone else found this issue with raycasts? Blink, did you get this with pyhsics? Could that be the tunnelling issue - is there "holes" in AGK's terrain generation (by holes I mean seams that don;t join enough for raycasting that allows them to fall through)?



EDIT: I've now done two back to back raycasts using EXACTLY the same cooridnates, and it very occasionally shows one hitting the ground, and one not. Is this normal, or is there somethng more sinister going on?
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 25th Dec 2018 02:13 Edited at: 25th Dec 2018 02:26
Can't tell for sure.. I vaguely remember in the Blitz3d language there was also an issue in detecting terrain tris perfectly as there where sometimes no triangles detected.
I'm speculating here, but maybe this depends on the triangle density. Are you using a very large landscape, and therefor scaling the heightmap?

If so then perhaps it works better with higher resolution heightmaps(raw, introduced in latest AppGameKit version) that would maybe allow for greater precision?

[EDIT]
Hmm.. From [href=file:///C:/Program%20Files%20(x86)/The%20Game%20Creators/AGK2/Tier%201/Help/Reference/3D/CreateObjectFromRawHeightMap.htm]CreateObjectFromRawHeightMap[/href] I get:
Quote: "
CreateObjectFromRawHeightMap
Description
Creates an object from a specified .raw or .dat height map, useful for making terrain. The file should be in raw 16-bit data. If you use extension ".dat" in szFilename it will expect that this is a GameGuru 32-bit raw height map and convert that to 16-bit. If the file is not a GameGuru height map then you must change the extension to ".raw". If you convert a GameGuru height map (.dat) file, rawWidth and rawHeight should always be set to 1024. The object will have a single UV channel with the range 0 to 1 mapped to the entire terrain. If you wish to modify this then you can use SetObjectUVOffset and SetObjectUVScale, or use a shader that multiplies the UV coordinates by a specified amount. A shader can also be used to create multiple UV channels from this single channel by applying different scale factors to each. Normally when using 16-bit data you dont need to set a smoothing value, but if its not already been smoothed adjust as necessary. The split value lets you create multiple meshes which can improve performance, as unseen meshes will not be drawn. The split value specifies how many meshes to create along each edge, for example a split value of 5 will create 5x5 = 25 meshes in total. Unlike other objects collision data is not generated by default on this object as it can consume a lot of memory, use SetObjectCollisionMode if you want to turn it on. For terrains greater than 1024x1024 this is not recommended on mobile devices, and you should use GetObjectHeightMapHeight instead if possible. Turning on physics for this object will use even more memory and is not recommended on terrains greater than 1024x1024 on any platform."


Quote: "CreateObjectFromHeightMap
Description
Creates an object from a specified height map, useful for making terrain. The image should be PNG 8-bit greyscale or RGB, if it is RGB then only the red channel is read. 16-bit greyscale support may be added in future. The object will have a single UV channel with the range 0 to 1 mapped to the entire terrain. If you wish to modify this then you can use SetObjectUVOffset and SetObjectUVScale, or use a shader that multiplies the UV coordinates by a specified amount. A shader can also be used to create multiple UV channels from this single channel by applying different scale factors to each. A smoothing value of 1 is recommended to remove stepping artifacts, adjust as necessary. The split value lets you create multiple meshes which can improve performance, as unseen meshes will not be drawn. The split value specifies how many meshes to create along each edge, for example a split value of 5 will create 5x5 = 25 meshes in total. Unlike other objects collision data is not generated by default on this object as it can consume a lot of memory, use SetObjectCollisionMode if you want to turn it on. For terrains greater than 1024x1024 this is not recommended on mobile devices, and you should use GetObjectHeightMapHeight instead if possible. Turning on physics for this object will use even more memory and is not recommended on terrains greater than 1024x1024 on any platform.

"

So.. perhaps use GetObjectHeightMapHeight instead?
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Dec 2018 02:58
Thanks Rik, but there's no height map used as such, and a memblock isnised tonalyer the vertices converting the heightmapnheight doesn't work either.

I played around some more and found that it works mkre reliably if you cast further through the terrain. So let's say the terrain is at a Y coord of 1000. The collider is at the base of the wheel, so if the wheel is right below the surface, so lets say 999, then we cast a ray from 2000 to that point......it occasionally returns no impact. However casting the ray from 2000 to 0, then deducting the Y impact seems far more reliable, so perhaps the end of rays are imprecise, or maybe that's just how they work.

It's nothing to do with movement speed either as even when the car is still it happens occasionally if the end of the ray is too close to the surface I want to detect. Perhaps it's a translation issue of the 3d shape to the collision ray space or something? Not my area of expertise, clearly. Lol.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Dec 2018 04:23
I would just use more raycasts. So on all corners and the middle of the edges (8 in total). If you get a good cast along 3 of the four edges then you're on the ground
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Dec 2018 21:54
Quote: "before commercial release the tunneling needs to be completely tackled"


My number one priority so if you can give me som screen shots/video that would help heaps.
I'm working on something to record keystrokes now
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 27th Dec 2018 23:44
@Santman
Weird, perhaps supply a simplified piece of source to AppGameKit team and let them comment on the issue?
Perhaps we're lacking in depth understanding or it's a bug?

@blink0k
I'll try and see if can get you a good example where goes haywire. But it's way less easy to replicate now, so that's good and bad news at the same time I guess.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Jan 2019 23:20
v1.7
1. Tunneling changes
2. SCALE_3D value scales forces/values to the scale of the 3D environment (Not sure i've got every value yet)
3. Changed environment to prevent pinching
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd Jan 2019 00:37
Great Stuff Blink0K
fubar
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 2nd Jan 2019 22:28 Edited at: 3rd Jan 2019 00:09
Great work. Couldn't get any tunneling so far. Hardly ever gets stuck and if does then very, very hard to replicate and is just design of the geometry for happened on sharp edge of ramp one time and in between the hill and looping.. I think the tunneling issues are solved. (it's crazy fun!)

(Quality of the gif is really bad, used a new tool, which s*cks) [EDITED]

Didn't thoroughly checked the code but am I correct into thinking you aren't making use of these functions? Are they residu or for future expansion?


They seem like could bne useful to determine direction for instance for direction lights?

Was wondering what would need to go into the dir value..
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Jan 2019 22:41 Edited at: 2nd Jan 2019 23:06
Quote: "am I correct into thinking you aren't making use of these functions?"

GetVehicleDirectionGround(vehicle as vehicle, dir as integer) Used. Is the current technique for getting the angle to apply the linear velocity. So this is the angle, along the ground, between the back wheel contact point and the front wheel contact point
GetVehicleDirectionVehicle(vehicle as vehicle, dir as integer) Not used. This uses the angle of the vehicle to calculate direction. I think sometimes when it popped up it would cause tunneling
GetVehicleDirectionAverage(vehicle as vehicle, dir as integer) Not used. Was the average of the above functions

Quote: "Was wondering what would need to go into the dir value.."

That is a hangover value from an older function so it's not used. I'll get rid of it for the next version
Correction: dir is required for Average and Vechicle (Not ground). It may be one of the following;
#constant MOVE_FORWARD=1
#constant MOVE_REVERSE=-1
#constant MOVE_RIGHT=2
#constant MOVE_LEFT=3

Quote: "They seem like could bne useful to determine direction for instance for direction lights?"


GetVehicleDirectionVehicle() Would definitely be the one for lights

Quote: "Hardly ever gets stuck"

Getting stuck is something for the full on game i think. I'm pretty sure i can remember the last time the car had 3 wheels on the ground and reset to that position. Like the cloud dude on mario kart

Thanks heaps for testing. I really, really appreciate it!

ps: One thing i've noticed is if a cube is sitting next to a wall and you smash directly into it then the cube will tunnel. I'll have to have a think about that
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 3rd Jan 2019 00:27 Edited at: 26th Jan 2019 19:16
Braking light was easy, you can see me pressing the brake while stuck on top there, but that's just a car stuck as it would normally do in real life too, so no tunneling.

Probably not the prettiest nor preferred way but by far the easiest/fastest way was alternating between 2 images, for anybody who needs it:

and

I just added this to MoveVehicle()

[EDIT: showing all changes to be more clear]

In LoadVehicle.agc :


And..



And in MoveVehicle.agc





Quote: "Thanks heaps for testing. I really, really appreciate it!"

Don't mention it. Glad to be of help. You've really done a marvelous job with this one. It's just so much fun to be able to do this in AGK.

Only thing that's a bit unnatural still is that the steering stops working completely once the car is upside down or stuck somewhere. In some games wiggling with the wheels can set you free.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Jan 2019 00:38
Quote: "Braking light was easy"

Nice!

Quote: "But that's just a car stuck as it would normally do in real life too"

Yes. I see this happening all the time in my street

Login to post a reply

Server time is: 2024-03-29 05:24:31
Your offset time is: 2024-03-29 05:24:31