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 / KrazyGrandPrix

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 09:49 Edited at: 10th Feb 2019 07:48
KrazyGrandPrix
I thought it was time I started a thread for KrazyGrandPrix rather than take over Blinks thread with posts, There has been many peoples
comments and help that have gone into the workings but in particular ide like to thank
1>Blink0k for working out how car physics could be acheived in AppGameKit and other help getting the makecar routines etc to work.
2>Chafari for working out how to do a rear view mirror for a car and Rick Nasher for making the code that made installation easy
3>Kenney for his car models



Source can be downloaded here http://users.tpg.com.au/subarpk/KrazyGrandPrix.zip
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 10:14 Edited at: 22nd Jan 2019 10:20
An Older version for those that like to track progress



The traffic lights use the following shader
Neon.ps

Neon.vs


The jeep i designed and people are welcome to use it, you will have to separate the wheels to use.
jeep.obj


The flaming hoop uses an animated flame loop but does some uvshifting to the actual hoop to make it
look like the hoop is actually burning

not sure when or if il use the car, traffic lights or the hoop yet but they were definitely fun making
fubar
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Jan 2019 12:13 Edited at: 22nd Jan 2019 12:25
@fubarpk are they really directional lights instead to omnilights ?? looks awesome


Edited
something goes wrong in the rar file it says corrupted file 347kb



I'm not a grumpy grandpa

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 16:04
Quote: "something goes wrong in the rar file it says corrupted file 347kb"

I tested the uploaded file and it works for me, I use WinRAR but perhaps its either a dif version of rar compression
or perhaps something went wrong when you were downloading it
fubar
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 22nd Jan 2019 20:22
Awesome! This is very cool. I saw one of your YT vids on it a few days or so ago as well and thought that's great! You're making great progress on the 3D game dev in AppGameKit! =)
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 22nd Jan 2019 20:54
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Jan 2019 20:58
Awesome!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 23:22 Edited at: 23rd Jan 2019 00:08
Thanks Everyone

Quote: "You're making great progress on the 3D game dev in AppGameKit! =)"

With help from blink0k ofcourse we kinda been nutting things out on my projects together, but the whole car physics
is blinks code, I just added my own cars, tracks and got a kinda cheap and nasty AI which kinda works by using blocks

L--------- M---------- R
--------------------------
----CCCCCCCCC
----CCCCCCCCC
----CCCCCCCCC
----CCCCCCCCC

Where "C" would be the cars body and L,M and R are used for AI the left and right blocks are used for keeping the car on
the track and M is used for braking which some cars do some do not. Which pretty much somes up how the AI works
PS L,M,R are blocks which I raycast the width depth and height of the block determining if it is in collision with the road
If L is not turn right, If R is not turn left. If M collides with a car then hit the brakes
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Jan 2019 08:55
You don't get the feeling of speed along the straights because it's just one color.
Try using this as a texture for the road surface.
You might have to set SetDefaultWrapU( mode ) and SetDefaultWrapV( mode ) but try it first without this
Just set the texture because the road maker will have set up the UV's correctly

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd Jan 2019 09:27 Edited at: 27th Jan 2019 09:11
Good Point not sure how I can use that texture and still keep the red and white down the sides of the track
with the current box uv mapping but I could do something like this

Video removed for space please see latest post

I think that works better to show the feeling of speed
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Jan 2019 19:38
Yes. Nice work. Much better
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 24th Jan 2019 17:26
Awesometastic!

Didn't notice you gave this baby it's own thread until now.

And you put a mirror in there. Pretty cool!

- If you move the cam bit more backwards then perhaps you can also incorporate your speedometer from 3D Nightdriving.
- You probably need to grab the screen prior to displaying the hud(or hiding buttons and text) for right now it shows up in the mirror.
- Your break and headlights would also look really cool on it.

Btw: I found I'm a much, much worse driver using the keyboard than you are(perhaps even with controller ) so I definitely need guardrails! lol


Well done.



fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 24th Jan 2019 20:25
Quote: "You probably need to grab the screen prior to displaying the hud(or hiding buttons and text) for right now it shows up in the mirror."

I have to hide the left and right buttons they was an addition as I was planning to try the buttons with my mobile. (didn't have much success with the gyro)
I also found last time i tried the gyro with mobile the other cars started off different than they do on pc weird i dunno know why.

Quote: "If you move the cam bit more backwards then perhaps you can also incorporate your speedometer from 3D Nightdriving."

Thats a good idea i might try that next

Quote: "Btw: I found I'm a much, much worse driver using the keyboard than you are(perhaps even with controller ) so I definitely need guardrails! lol"

lol and it don't help those shits deliberately run you off the track, it seems. lol I find its even harder knowing when to turn when in cockpit view

Il try and get an update up today had weird issues with classic ftp and my hosting website yesterday, Not sure what was wrong but for some reason the
files werent there afterwards. It normall gives an error if out of space or something

fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 24th Jan 2019 20:44
I personally use FileZilla - never let me down.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 24th Jan 2019 23:11 Edited at: 27th Jan 2019 09:11
Thanks Rick
I found the problem was I had used up more than my limit
Strangely both programs didn't report this proper

Ive uploaded the latest and tested so it should work now (see first post to download)

had some strange stuff going on trying to use the code out of my night driving for the speedo
so I saved the images it created as pngs. Then I found that I couldn't use id=createSprite(image)
and had to use createSprite(id,image) weird but it might have to do with me loading the image
within the createSprite commands brackets.

Could prob make a prettier speedo but I kinda like the clean look it has but may try with the same
font as used in the print statements

video removed for space please see latest post
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 02:38 Edited at: 27th Jan 2019 09:12
I thought the speedo and buttons should use the same font as everything else for consistency

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 04:32 Edited at: 27th Jan 2019 09:12
with a wall and grass texture but not sure I like them rotating in the selection part

video removed for space please see latest post

btw the tracks are 3 times smaller in the selection than they are to drive on.
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 05:35
Quote: "Your break and headlights would also look really cool on it."


thought about doing that but would need to texture map the cars proper atm they use really tiny textures that basically
are just a colour for the bits. but still in todo list
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Jan 2019 08:44
Quote: "not sure I like them rotating in the selection part"


The track is off center.
You could get the true center by using GetObjectMinX/Y/Z and MaxX/Y/Z

Then calculate the center for each X/Y/Z
centerx = GetObjectMinX() + (GetObjectMaxX() - GetObjectMinX()) / 2 /// Same for Y and Z

The move it to 0,0,0 center
SetObjectPosition(obj, -centerx, -centery, -centerz)

Make it's center 0,0,0
FixObjectPivot(obj)

Move it back
SetObjectPosition(obj, centerx, centery, centerz)

Now it should rotate around it's center



fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 11:28 Edited at: 25th Jan 2019 12:57
That's a nifty idea just didn't work as expected

this is what happens
Video removed because I accidentally recorded streaming music


fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 25th Jan 2019 11:59 Edited at: 25th Jan 2019 12:11
Looking great.

BTW: Is there a particular reason why the road is higher than the landscape?

Quote: "
Quote: "Your break and headlights would also look really cool on it."

thought about doing that but would need to texture map the cars proper atm they use really tiny textures that basically
are just a colour for the bits. but still in todo list"


if you want to keep it simple( less advanced than your nifty shader solution though) you could do something similar as with the mirror(s):
Just stick a primitive, such as quad(plane called in AGK), flat box or sprite to the rear to simulate a breaking light.

It would look similar to this:
(from: https://forum.thegamecreators.com/thread/223365?page=3#msg2636074 )

For that I simply adapted the entire vehicles texture, but just a square texture such as this would do nicely I think:



[EDIT
I'd actually slice this to a 1/3rd rectangle or something like this:


(love the music track)
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 12:56 Edited at: 27th Jan 2019 09:13
Thanks

Quote: "BTW: Is there a particular reason why the road is higher than the landscape?"

nope that happened when I was trying to set the centre pivot

think its close if I set it like


Then when I reset it back




Quote: "(love the music track)"

just something I was listening too on pc I better remove that video now oops youtube wont like it when they realize

Video removed for space please see latest post


didn't think grandprix cars had brakelights but they obviously have something seeing your pic. Thought brakelights in racing was
a nono as racers don't want to slow down. Remember when one of my friends was racing 125 motor bike class removing headlights
and taillights was common to remove weight

I did play around with planar texture mapping today and successfully got that done so can add taillights if I decide to go down that path
fubar
puzzler2018
User Banned
Posted: 25th Jan 2019 13:14
Fantastic Work....
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 25th Jan 2019 14:59 Edited at: 25th Jan 2019 15:03
Yeah, F1-cars have break lights nowadays. And as you can see from the pic they are now experimenting for the next season with extra breaklights on the wings.
Watching a lot past 2 years as we got a free sportschannel with our cableTV/internet subscription, plus there's this upcoming Dutch talent Max Verstappen who really gave F1 a popularity boost.


Shame about the music, thought it was intended to be the in game menu theme(would have been great).
Nice background landscape addition too.


What I actually meant is if the track needs to be elevated above the terrein plane for some reason.

To test, in main.agc in the function SetupEnvironment() I changed the Y value from in the line:

SetObjectPosition(e.tracks[trackNumber],-200, -350, 0) //track3
into:
SetObjectPosition(e.tracks[trackNumber],-200, -495, 0) //track3

This works and has the benefit if when you accidentally shoot of the track(for instance in corners) you can still get back on track, just as in real life.
But only if you have enough speed left for otherwise nogo (the engine cuts off? damn Renault engine manufactures! lol )

Also the positioning of the AI cars and track selection would need to be adapted for this to properly work of course.
And a proximity check to see how far of track a car is, before getting disqualified or gets a time penalty/reset onto track (no cutting corners, gaining an illegal advantage allowed! )
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 20:28
Quote: "What I actually meant is if the track needs to be elevated above the terrain plane for some reason. "

Oh I was originally planning a stuntcar racer remake, I may add ramps yet and the elevated racing was how that functioned
but a crane put you back on the track then I would go with a damage factor

must admit tho I did think of lowering the track

Quote: "damn Renault engine manufactures! lol )"

LOL maybe its tesla and the battery went flat, thinking maybe turn the grass into sand for that reason
fubar
puzzler2018
User Banned
Posted: 25th Jan 2019 20:55
Have you resolved the checkpoint out.

Maybe use two objects one in front of the other thats on the ground, could be really small boxes across the road (invisible of course)

Going in one direction

First object -------------

2nd object -------------

If car collides with 1st and then 2nd in the order - then going the the right way

If car collides with 2nd and then 1st in that order - then going the wrong way

Awesome....
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 25th Jan 2019 21:15
Quote: "Have you resolved the checkpoint out."

Sure have works well with most tracks just not the figure 8 lol

and yes I did use the invisible object method and my object collision routine
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Jan 2019 03:48 Edited at: 27th Jan 2019 09:13
Here ya go rick brake lights, I also retextured the models so they can have a stripe down the middle
Added some capsules around the track next will be trees but for some reason my random placement aint that good

Quote: "For that I simply adapted the entire vehicles texture, but just a square texture"

I use two textures for the cars this time and just set the object to normal image or braking image

Video removed for space

The capsules are courtesy of blink

Ps the brakelights come on on when your not throttling. but the AI cars have to brake for there brakelights to come on
There is also a separate wheel image.
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Jan 2019 05:50 Edited at: 27th Jan 2019 09:16
We have a grandstand with people even if they are flatheads lol

Video removed for space please see latest post

Im slowly learning how to use Blender combined with lithunwrap
and blinks kenney exporter is a very handy tool

and now that the chassis text and wheels texture are different the select car routine
will have the ability to select different wheels maybe a job for tomorrow

Ps the downloadable version is uptodate and at the top of this thread
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 26th Jan 2019 19:03 Edited at: 26th Jan 2019 19:09
Looking good. Nice atmospheric scenery and brake light implemented.
Although found that the brake light doesn't respond to the spacebar for then usually still pressing forward button too. I'm guessing you're doing it the other way round?
Brake light comes on when releasing Forward button? Smart fix but doesn't resemble how a real brake light works. To have the Spacebar and the Reverse(Cursor Down) key effect the lights I used this:

In LoadVehicle.agc :


And..



And in MoveVehicle.agc




Are you planning to use your traffic lights to give a start sign at beginning of the race?

https://www.motorsport.com/f1/news/australian-gp-halo-start-light-visibility-1017138/1397663/


Not really clear to me, but I'm partially colorblind :
https://commons.wikimedia.org/wiki/File:F1_start_lights_as_seen_by_driver.gif
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Jan 2019 20:51 Edited at: 27th Jan 2019 09:14
Thanks Rick

Added more car selections and now wheel selections.

Video removed for space please see latest post

Quote: "Not really clear to me, but I'm partially colorblind"

I have to wear my glasses at the pc and its still not clear to me either. But if I use a shader
the brake would have full glow when the brake is activated. So I think it will be much clearer
if I do that. Or I could make a bigger area perhaps that whole back of car between the wings.
I was kinda going on the pic you had of the grandprix car showing its rear end. Or another
thing I could do is darken the brake off colour to almost black I might try that
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 26th Jan 2019 21:10 Edited at: 26th Jan 2019 21:17
No, I meant colors of the overhead start signal lights they use to start the race at this link:
F1 start lights as seen by driver

Two rows seem exactly the same color to me.

The brake lights may not be the brightest but visible nevertheless. Could be that that shader improves on it though as you say.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Jan 2019 21:31 Edited at: 26th Jan 2019 21:32
Quote: "No, I meant colors of the overhead start signal lights they use to start the race at this link:"

Oh....I was thinking need some sort of start light to, traffic lights really aren't suitable for that lol I think kenney had a model I could texture

Quote: "Two rows seem exactly the same color to me."

That must suck, sorry to hear about that.

Quote: "he brake lights may not be the brightest but visible nevertheless. Could be that that shader improves on it though as you say. "

I just changed the brightnesses on the brake lights they are now more noticeable. Still not the same as a shader would be but was trying to avoid a shader
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Jan 2019 23:19 Edited at: 1st Feb 2019 07:12
I don't think I understand the proper start sequence never watched it but atm
Ive got the overhead lights starting at red then orange the green go

Video removed please see latest post
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 26th Jan 2019 23:58
Looking good! You act quickly dude!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Jan 2019 00:05 Edited at: 1st Feb 2019 07:13
Thanks

I didn't do allot today but did add 3D sounds

which has sound existances for each car and bases the volume according to the distance from you
I haven't uploaded with the sound yet because im not happy with it.


Video removed please see latest post

The base sound is your car the whiney sounds is other cars, It really needs 3 sounds so as your car sound
is deeper when in cockpit mode.Really think I just need 3 repeated tones perhaps a grumbly one for cockpit view


PS:I also noticed that when the car goes off onto the grass the sound and speedo needle is stuck up high
because the current speed value hasn't changed even tho the physics has stopped

I might also design some new tracks the first two are too small and have a lip that causes issues
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Jan 2019 13:33 Edited at: 1st Feb 2019 07:13
With some pitch changes to the sounds there are now three

Video removed please see latest post

and uploaded see first post
fubar
puzzler2018
User Banned
Posted: 27th Jan 2019 15:06
Niiiiiiicccccceeee - Your in the car now... WOW! well acheived..

Looks blinking awesome

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th Jan 2019 16:19

Tha's nice fubarpk ...you can feel even the vertigo
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Jan 2019 17:26
Thanks
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 27th Jan 2019 18:24
Perhaps it's possible to link the sound pitch to the speed(you already have that variable in the speedometer).
So that the sound starts of with a low pitch at low speed and gets higher as the speeds increases?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Jan 2019 19:10 Edited at: 1st Feb 2019 07:14
Quote: "Perhaps it's possible to link the sound pitch to the speed"


ideally that would be great but as far as I know sound pitch settings haven't been added to AppGameKit yet
which would mean ide need to use memblocks to do that and atm im not sure i want to use memblocks

and i think pitch should change for the other cars as they move away etc

Now with my own sound loops
Video removed please see latest post

The problem with using memblocks to increase the pitch I would have to create a new instance each time
I wanted a pitch change. I think the older games like stuntcar racer had a few sound files at different pitch
settings and just set the sound to loop the one with pitch you wanted


thinking about it I might do the sound for the changing in speed similar to this

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Jan 2019 21:03 Edited at: 1st Feb 2019 07:14
The sounds are close now

Video removed please see latest post

so now the sounds for both the AIvehicles and your own vehicle change pitch and volume depending on speed and distance

just need some starting sounds and perhaps crowd ambience for when you get close to the grandstands
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 28th Jan 2019 05:48
I added this so as it adjusts the speedo needle and sound volume when it hits the grass
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 28th Jan 2019 12:13
Cool Sound effects really adds to the ambiance.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 28th Jan 2019 20:44 Edited at: 1st Feb 2019 07:15
a 3D title and billboard

Video removed please see latest post

after all that texturing not sure il use the 3D title lol
fubar
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 28th Jan 2019 22:44
Nice effect, but bit hard to read.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 28th Jan 2019 22:59
Rick is right. If you make the edges a little darker i think it would work out ok. Billboard looks cool. Maybe shop around for petrol head ads like caltex etc.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 29th Jan 2019 00:52 Edited at: 1st Feb 2019 07:15
Took your suggestions I think the title looks better now
not sure if I can legally use these logos but for now they will do
not so sure sure if they will get used yet unless I figure an easy
placement with blender

Video removed please see latest post

might change the titles colors yet I was just trying to go with the
stuntcar theme


dang I knew there was one I forgot good ole Caltex
Aussie petrol stations that I could find logos for
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Jan 2019 01:24 Edited at: 29th Jan 2019 05:34
I don't think those corporations would mind too much but if you're concerned then maybe you could use these.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-23 05:28:50
Your offset time is: 2024-11-23 05:28:50