Stunt Race Xtreme - 8 player mayhem (image heavy)

Community Forums/Showcase/Stunt Race Xtreme - 8 player mayhem (image heavy)

Vorderman(Posted 2006) [#1]
I now (finally) have the AI working in SRX, and it seems to cope well with 8 cars together. Full Tokamak physics model for each vehicle, with the AI only having the same input access as the human player (steering, throttle, brakes and turbo).

Currently they're too stupid to dodge each other or overtake, but they seem to be able to post lap times that I struggle to keep up with. Just need a bit more intelligence to allow them to dice for the lead.

In the process of creating a new buggy model also, so currently it's just a frame, wheels and engine.

Screenshots of the cars waiting to race:





and during the race:




ErikT(Posted 2006) [#2]
Well that certainly looks killer. How about allowing the good blitzers to beta-test some :)


degac(Posted 2006) [#3]
incredible!!!


Stevie G(Posted 2006) [#4]
Looks great .. any chance of a video of it in action?


ImaginaryHuman(Posted 2006) [#5]
My only suggestion ... the rear view mirror is currently the rear-view-magic-floating-rectangle. Can it be attached to the car body and move with it? Can it have a nice `mirror border`?
?-0)


Vorderman(Posted 2006) [#6]
The only problem is that the in-car camera is fairly dynamic, it moves and tilts seperately from the car body, so the rear-view camera would need to be rendered to a texture that was mapped onto the mesh somehow. I might have a go at some point.

Doing that would however also solve the problem of how to flip it left to right - it's just a camera pointed backwards so a car approaching on one side passes on the other - currently very confusing.


puki(Posted 2006) [#7]
This is looking good "Carol". Shame it isn't an RPG.


Damien Sturdy(Posted 2006) [#8]
oh *HELL* yeah! :D

AI only having the same input access as the human player (steering, throttle, brakes and turbo).



Fantastic, Thats the best way to do it too, a lot of effort but it achieves a very realistic result.

Can I ask, was it my advice you followed? (Actually, I can't remember if I emailed you that info! :D)


Red Ocktober(Posted 2006) [#9]
WWWOOOOO HAAAAAA!!! I Luv The Way This Looks...

--Mike


Matty(Posted 2006) [#10]
That looks great - what system requirements are you expecting for it?

It would be good to see it in motion.


Vorderman(Posted 2006) [#11]
what system requirements are you expecting for it?

It's running at between 60fps and 30fps with 8 cars, hi-res textures and anisotropic filtering on my P4 2.4 (with 6600GT), but 8 cars is a bit over the top - 4 cars would probably be enough in most cases.

I also need to try out some complex tracks and see how it reacts to those.

Can I ask, was it my advice you followed?

I just checked my emails and you did send me some info, thanks. I made up a pretty simple system of waypoints in 3 lanes around the track. The cars have the option of following each lane, then they react by accelerating or braking dep. upon the distance and angle to the next checkpoint.
They have 4 states - accel, coast, brake or handbrake dep. upon the situation they are in.

The tricky bit was getting a balance between these states, so the car is fast but not too fast to stay on the track.


Steve Elliott(Posted 2006) [#12]
Demo immediately! ;-)


Grisu(Posted 2006) [#13]
DEMOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO! ;)


GfK(Posted 2006) [#14]
Looks pretty good. Gotta say I don't like the car model, though - looks like you've just got the drivers seat bolted on to a tubular frame. Bottom of the car needs to be completely enclosed.

Also don't like how the car tyres are sunk into the road (most evident in pic #4 above).

One other thing about the rear view mirror - why is the sky in the mirror dark, even though the sky is actually blue?


ErikT(Posted 2006) [#15]
Also don't like how the car tyres are sunk into the road
I like that. Maybe it's not the most realistic thing to do but it gives a sense of them being actual tyres giving in to the weight of the car and not concrete slabs with tire paint on them. It might be a bit much as it is now though.


Vorderman(Posted 2006) [#16]
Gotta say I don't like the car model, though - looks like you've just got the drivers seat bolted on to a tubular frame


Like I said in the original post -
In the process of creating a new buggy model also, so currently it's just a frame, wheels and engine.



Rob Farley(Posted 2006) [#17]
OK... All looks pretty...

Rear view mirror thing... Personally I just wouldn't bother... no-one uses them in games, it's more hassle than it's worth.

Every single driving game that has a rear view mirror with an option to turn it off.... I turn it off.


BlitzSupport(Posted 2006) [#18]
Looks very nice [call for demo goes here], but it looks like the mirror images need to be flipped. I might be wrong, but looking at the 3rd and last pics this seems to be the case.


big10p(Posted 2006) [#19]
Looks very nice. However, I found it hard enough staying on the track when it was only me, so God knows what it's gonna be like with others to contend with. :)

BTW, I'm sure you're aware of this but I'm going to point it out, anyway: you only have shadows on the first car.


Vorderman(Posted 2006) [#20]
Shadows are an option for the other cars, but linepicks are SOOOOOOO slow that it makes the game chug. If I could figure out another way of getting shadows working I would add them back in straight away, but because the cars can fly I need to know whether they are airborne or not and place or remove the shadows accordingly.

Every single driving game that has a rear view mirror with an option to turn it off.... I turn it off.

Well I have it as a toggle option, but it's very hard to have a decent race when you've no idea where the guy behind is. Especially in a network game, it's far more fun to be able to see the car behind spin off trying to catch up, and means you can ram and block overtakers.

but it looks like the mirror images need to be flipped

They do, and I am certainly going to try flipping the image in a texture as otherwise it's incredibly confusing as the overtaking car seems to magically swap sides.


Stevie G(Posted 2006) [#21]
Vorderman,

I like to be able to press and hold a button to see behind you .. may be a better option than the rear mirror and will give you a better view of those behind. You would only ever take a butchers on a long straight.

Have you considered sswifts shadow system ... I know that there is a fake shadow type which will probably be pretty fast with only 8 cars assuming your track sections are separate meshes. Maybe worth a try.

Stevie


big10p(Posted 2006) [#22]
Vord: to flip the mirror image, try scaling the mirror cam with a negative X. I think that works. Might muck up normals, though - can't remember, TBH.


MikeT(Posted 2006) [#23]
looking good - whens the demo out?


Sledge(Posted 2006) [#24]

Vord: to flip the mirror image, try scaling the mirror cam with a negative X. I think that works. Might muck up normals, though - can't remember, TBH.



I think it does (screw up rendering)... scale the texture instead.


GfK(Posted 2006) [#25]
the best way is to render your camera to a texture, apply the texture to a quad (you might have to play with UVs as your texture is square and the rear view mirror isn't). Then draw the quad pointing away from the camera with backface culling disabled. That should do the job.


Damien Sturdy(Posted 2006) [#26]
What GfK has mentioned is exactly how I did it :) Works like a charm, and it runs extremely fast :)


LineOf7s(Posted 2006) [#27]
/me saves Gfk's post to a text file called "How to do rear view mirrors"

Back on topic: I won't be so rude as to ask for a demo, but a video would be cool. :o)


WedgeBob(Posted 2006) [#28]
I can see this game along side Mario Kart Super Circuit on my game shelf already. That, Need for Speed, you're almost right there, yo! Keep on trucking, literally! Hehe...


Blitzplotter(Posted 2006) [#29]
This looks very remarkable. I don't believe there are many/any other racers available where the cars get quite so much air. As an upside to the bottom of the car not being totally enclosed, if you get serious air you would be able to 'see' the opposition floating away underneath your buggy.


LineOf7s(Posted 2006) [#30]
You could sell advertising space on the underside of the cars...


Vorderman(Posted 2006) [#31]
As an upside to the bottom of the car not being totally enclosed, if you get serious air you would be able to 'see' the opposition floating away underneath your buggy


I intend to panel the cars to a certain degree, only really the sides around and under the driver. There's no way to look downwards so you won't notice a lack of vision in the game.

I like to be able to press and hold a button to see behind you

Me too, I shall probably add that as well as a look left and right function.

The problem is I'm running out of buttons on the joypad / wheel - I'm very tempted to remove the handbrake and make the normal brakes work more like the handbrake - that is, they slow you less but make the back slide out. When playing I tend to rarely use the normal brakes, just lift and handbrake into a corner, then hold the slide. It doesn't really need two forms of braking.

What do people think of pitch control in the air? I had this in but removed it ages ago, but I'm tempted to add it back in - accel to bring the nose up, brake to bring it down.

Also, what about in-air direction changes - I'm thinking of allowing the player to steer a little bit in the air so they can save themselves if they're slightly off-course during a big jump. Currently, once you're airborne if you're off target, you crash.

Any thoughts on these things?


LineOf7s(Posted 2006) [#32]
Pitch control in air: Great idea - will add depth.

In-air direction changes: Depends. If the racing is such that a single crash will remove *all* chance of winning the race, then yes, add this. If the racing is more forgiving (which I personally hope it would be), then reducing the likelihood of crashing on a big jump would make it too easy, imho.

Its encouraging from a gameplay perspective that you're considering such things. :o)


Vorderman(Posted 2006) [#33]
It seemed that lots of people had problems just staying on the track in the last demo I released. Don't know if that's because the game is really hard or just because you lot are useless at racing games... :)

So, I want to try to make it more accessible and the hardest thing at the moment is trying to land some of the trickier jumps, especially those after corners.

The thing that annoyed me about Trackmania was that there was no way to correct a slightly off jump. For me it ruined an otherwise fun game. I don't intend to make the same mistake.


Vorderman(Posted 2006) [#34]
OK, sorted the mirror with a render-to-texture, which is incorporated into the chassis. Much nicer, and reflects the right way.
Thanks for your various suggestions about this.




Bouncer(Posted 2006) [#35]
Looks even better... brilliant! So how about a demo... ;)


Vorderman(Posted 2006) [#36]
Not sure about doing a demo yet. I have no way to protect all the assets etc... and some of them are still temp stuff ripped from other places which need swapping out (mainly the SFX).

Anyone got any ideas how to do shadows without linepicks? I'm just after a placed blob under each wheel and one under the body, or even just one large blob under the whole car. The problem is the cars take off, so I can't just place a shadow object at a certain point as you could if they were stuck to the ground.


Mark Judd(Posted 2006) [#37]
Hi Vorderman,

Agree with Stevie G, go with Sswifts shadow system - works well for airborne vehicles (you can set distance attributes so the shadow gets fainter as the car gets further from the track).

Game is looking really cool, can't wait to play multiplayer.

Also put me down as a loud 'yes' for the pitch control - essential to recover those jumps where you are looking to land on your nose or arse.

keep up the excellent work

Mark


Stevie G(Posted 2006) [#38]
Not sure how much the commercial liscence is for Sswifts system but may be worth it.

I'm using something atm which looks not bad and is super fast and 2 x the resoluton you can get with a normal render to texture. I can explain how it's done if you like? Probably not what your looking for but it's better than nothing and would probably look alot more subtle with a lighter shadow.

Stevie



EDIT :

In fact, as your roads seem smooth then a quad mesh system would probably work for you. Instead of using linepicks position a pivot at the middle of the car, set it to collide with the track, point it straight down and every loop move it a large distance downward. After updateworld you'll have the position on the track and the alignment normals. In my experience it's faster than line pick.

Stevie


Grisu(Posted 2006) [#39]
@Vorderman:
The mirror looks great, but it seems a bit too dark??
Is the mirror updated realtime?

@Steve:
Ahm, Steve, is there an updated demo of your car game as well? ;)


Vorderman(Posted 2006) [#40]
Cool looking game Stevie!
Can you explain how you're doing your shadows?

I like your idea about using a pivot - I'll give it a try.

but it seems a bit too dark??

Hmm, you're right - perhaps it's being shadowed because it's tilted downwards slightly.

Is the mirror updated realtime?

It is, yes. I'm using a second camera with a very small viewport, render that facing backwards, then grab the backbuffer and copy to a texture that is on a single poly that's a child object of the chassis. Seems to be quick enough.


Stevie G(Posted 2006) [#41]
@ Vorderman, I'll let you try the pivot method as I'm sure this'll work for you. If not give me a shout and I'll send you the details of my own shadow system.

@ Grisu, I don't want to hijak Vordermans thread so I'll keep this short. I'll have another demo out in a week or so. I've improved the handling quite a bit and would like others feedback. There'll be a couple more levels / tracks to run around for those who can be arsed testing it for me. I'm much more focused & motivated on what I want to do now .. which is good :)


Banshee(Posted 2006) [#42]
Doing that would however also solve the problem of how to flip it left to right - it's just a camera pointed backwards so a car approaching on one side passes on the other - currently very confusing.

I know in DX if you specify the viewport co-ords backwards the scene is rendered backwards - i'm not sure if Blitz supports it (at work on a Mac atm so I cant test) but you could try it:

ie: cameraviewport mirrorCam,0,0,-100,50

As for the screenies, my first words (out loud whilst at work and supposed to be working...), "oh wow, I gotta have a try at that."

:)


Vorderman(Posted 2006) [#43]
@ Vorderman, I'll let you try the pivot method as I'm sure this'll work for you. If not give me a shout and I'll send you the details of my own shadow system.

OK, thanks. I'll try it tonight if I get the chance.

I know in DX if you specify the viewport co-ords backwards

I don't think Blitz lets you do that - it was the first and most obvious thing I thought off too.


Mark Judd(Posted 2006) [#44]
Just a thought on the mirror reversing thing, could you not rotate the mirror poly 180 degrees and set the entityfx to remove backface culling (16 i think).

However this assumes the mirror is just two triangles, i.e. one sided and not a box, and you'd also have to hide the 'front' of the mirror (facing forwards) when looking at the car from an external viewpoint.

Mark


Stevie G(Posted 2006) [#45]
Surely, all you needed to do is swap the u coords on the quad mesh :/


Damien Sturdy(Posted 2006) [#46]

Surely, all you needed to do is swap the u coords on the quad mesh :/



Bingo.


big10p(Posted 2006) [#47]
I thought that too, Stevie. However, if you think about it, you'll quickly realize that it won't work. :)


Vorderman(Posted 2006) [#48]
Surely, all you needed to do is swap the u coords on the quad mesh :/


Yep, that's what I did for that screenie above.

I thought that too, Stevie. However, if you think about it, you'll quickly realize that it won't work. :)


It does work! (see that last screenshot)


Stevie G(Posted 2006) [#49]

I thought that too, Stevie. However, if you think about it, you'll quickly realize that it won't work. :)



Bow your head in shame ;)


big10p(Posted 2006) [#50]
Oh, yeah - it does work. :P


polygoon(Posted 2006) [#51]
To get the image on the mirror brighter, it may be that if you change the color of the mirror to a pale grey then it makes the image brighter also. If that turns out to be the case then simply make the reflective bit a brighter colour and the surround a darker one.

Sometimes this can work in DirectX. Hope this is one of them for you. Applied textures can be affected by the base colour of the underlying poly that it's rendered to, in certain circumstances.

As a modeller my instinct would be to try a 225,225,225 (or maybe just a little brighter) first.

Best of luck on that.

Looking good! ;O)

OH. PS on feedback as requested above; on my controller setup I got 6 buttons for views, and still have dedicated up/down gears, handbrake, as well as acccel/brake, so you could use 6 (user definable) buttons for extra/glance views easily - added to the mirror, total bliss I'd imagine!

Not so keen on pitch or dir change while airborne, but a last moment flick or the wheel as you jump and then the fading inertia from that would be fully wild I'd have to guess!