News for hackers. Stuff that matters.
Re:A chill driving game with procedurally generate scenic la... by xeonmc on Sunday October 23, 2022 @07:37AM (#33306165)
This would be great for Rally racing games, since it's all about reacting to unknown terrain
Re:A chill driving game with procedurally generate scenic la... by anslo on Sunday October 23, 2022 @08:20AM (#33306371)
Thanks! I'll give that a go and at least add it as an optional alternative, if not the default :)
Re:A chill driving game with procedurally generate scenic la... by xeonmc on Sunday October 23, 2022 @08:31AM (#33306436)
Oh, and I noticed that the tyres don't seem to respond to the steerangle changes immediately, instead it seems to slowly interpolate towards it. Not sure if it's cosmetic and does not represent the logical wheel state, but if it does then you might want to change it so that the steer-bar position directly sets the wheel angle, otherwise they'll end up being derivatives of derivatives making it extra sluggish.
Re:A chill driving game with procedurally generate scenic la... by aliqot on Sunday October 23, 2022 @09:54AM (#33307036)
bike doesnt lean
Re:A chill driving game with procedurally generate scenic la... by erwincoumans on Sunday October 23, 2022 @04:58PM (#33310203)
Any chance for joystick controls?
Re:A chill driving game with procedurally generate scenic la... by whoopdedo on Sunday October 23, 2022 @11:42AM (#33307789)
Your description is that steering decays then has mouse impulse added, which makes sense to me. But the code decays the steering after adding the delta-X. Is there a reason for that?
Re:A chill driving game with procedurally generate scenic la... by xeonmc on Sunday October 23, 2022 @11:59AM (#33307906)
As the discrete impulse is meant to approximate average derivative, applying decay after the impulse ensures that the value is always attenuated by decay (low frame rate underestimate the ground truth impulse, whereas the converse overestimates at low framerate).
Re:A chill driving game with procedurally generate scenic la... by astrobe_ on Sunday October 23, 2022 @01:02PM (#33308414)
> This would be great for Rally racing games, since it's all about reacting to unknown terrain.

Indeed, eventually you know the tracks by heart, so much so that you don't need the pacing notes anymore. I'm surprised nobody thought of using procedural generation here.

It's not exactly true that you react to unknown terrain, though, because IRL there's reckons in order to make pace notes, and I suspect that rally races tend to happen more-or-less on the same roads.

PS: actually someone did think about using procgen for rally games: https://www.racedepartment.com/downloads/procedurally-genera...

Re:A chill driving game with procedurally generate scenic la... by consumer451 on Sunday October 23, 2022 @01:21PM (#33308542)
I have a keyboard steering related question. I like key control, but I do find the on/off nature of keyboard turning to be lacking.

First let's move WASD over to the right by one key, so ESDF.

E and F would now turn slightly.

Now let's add A and G and assign those to more extreme turning.

Is there any driving game which has done this, or at least has some sort of configurable system where it could be tried? I assume it has to exist somewhere if it is at all usable.

Re:A chill driving game with procedurally generate scenic la... by anslo on Sunday October 23, 2022 @01:34PM (#33308647)
Interesting idea - I could try implementing this experimentally
Re:A chill driving game with procedurally generate scenic la... by xeonmc on Sunday October 23, 2022 @01:40PM (#33308690)
Or alternatively, have ijkl serve 75% weight and esdf serve 25% weight. Then you can achieve 100%, 75%, 50%, and 25% combinations using both hands.
Re:A chill driving game with procedurally generate scenic la... by nomel on Sunday October 23, 2022 @05:59PM (#33310698)
> but I do find the on/off nature of keyboard turning to be lacking.

This may interest you: https://aimpad.com/

> Aimpad® patented technology adds full analog movement control to the traditional WASD keyboard layout

Re:A chill driving game with procedurally generate scenic la... by Karawebnetwork on Wednesday October 26, 2022 @09:53AM (#33343710)
Does this require software at all?
Re:A chill driving game with procedurally generate scenic la... by Toutouxc on Sunday October 23, 2022 @02:42PM (#33309132)
> This would be great for Rally racing games

I'm pretty sure the tracks in Dirt 4 were procedurally generated. This made them feel extremely generic and bland compared to the hand modelled tracks in the sibling-series Dirt Rally.

Re:A chill driving game with procedurally generate scenic la... by galangalalgol on Sunday October 23, 2022 @04:06PM (#33309820)
That is also why Bethesda switched from procedural generation for Daggerfall to hand built for Morrowind. I have to wonder if we could train a model now to do this stuff? For terrain it is mostly mappable to an image anyway. Could fix undercut cliffs in a post processing step using voxel models instead. Probably not a very good database to pull from for underground stuff though if you want to generate dungeons.
Re:A chill driving game with procedurally generate scenic la... by anslo on Sunday October 23, 2022 @04:22PM (#33309930)
You're right - I spent a while looking for existing procedural driving games before I started, and seeing how disappointing the Dirt 4 implementation was was all the motive I needed. Thanks for the kind words.
Re:A chill driving game with procedurally generate scenic la... by xeonmc on Tuesday November 01, 2022 @11:48AM (#33422835)
CORRECTION: missed a divide-by-dt for the +=

corrected code should be

  sensitivity = userpref.sensitivity * max_ang / ( screenwidth/2 )
  decay_rate = 6.0

  frame(dt){
    dx = mouse.x - center_pos
    mouse.reset()
    steer_ang += sensitivity*dx/dt
    steer_ang.clamp(-max_ang,max_ang)
    steer_ang *= exp(-decay_rate * dt)
  }