VSim - A 3D Vehicle Simulator


Current private build : 0.6.0
Current release build : 6


I remove screenshots of all older versions of the game…
Most recent screenshots:


Public Release Build 1

Public Release Build 2

Public Release Build 3

Public Release Build 4

Public Release Build 5

Public Release Build 6

Written in Java, software rasterized.
2.5D physics currently.

Features to be expected in next update:
another car type.
A car selection interface.
An upgrade shop.

Maybe List:
Opponents :smiley:

Car model in Public Release Build 1 is not mine, downloaded a while ago from a site I cannot remember, but it was free.
Audio in Public Release Build 6 was ripped from Spotlight searches on my computer. Most seemed to be from Rigs of Rods (which is a free game).

“Yoo this is cool af” - My cousin

(first of all I do get that this is probably not the most serious of projects)

Pretty nice, as a pretty blank slate I reckon it’s got quite a bit of potential. From the thumbnail I thought it was a clone of an early GTA game.

There are a number of visual glitches that happen when you go off the map. I’m not certain for which direction this happens, but when you go off the map in one direction the screen will begin to fill up gradually from the bottom with what looks to be strips of the map.

I also noticed a bit of skipping with the car, like the camera perspective jumped a tad, I’m not sure why though.

Just a personal thing though - I know it mightn’t be of use to everyone but is it possible for you to add an option for a small yet widescreen resolution (e.g. 1280 x 720)? Just that I do most things on a laptop so the resolutions are either too small or too big.

Quick tip too if you’re using OS X and want to just screenshot the screen, use Cmd+Shift+4 and then the space bar to take screenshots of just the window instead of drawing a rectangle around it first.

Thank you for the feedback. I am aware of these visual glitches, it happens in all directions. Obviously the player is not meant to go off of the map if this game becomes a real game.

Thanks for the tip with screenshots on OS X. Also I’ll consider adding that display mode.

It’s pretty nice. The graphics remind me of early revisions of RuneScape. The controls are really slippery though. I think it’s a good start.

Thank you, and yes the controls are fairly slippery (mostly because I love drifting) but it almost feels as if I’m driving on ice. I’m working on fixing that, shouldn’t be too hard.

The graphics probably look like that because I use 16.16 fixed point for rotations/triangle drawing. Also the shading is done using a lookup table that contains the shaded 15 bit version of the 24 bit color you give it. I’m probably happiest because I fixed the memory leaks I used to have so now it runs at a near constant memory.

The gouraud shading looks a bit strange to me when the car changes directions. There’s no smooth transition between intensity levels somehow. The intensity on the vertices seems to jump, which causes the shading to look very wobbly.

Anyway, good work. I like software rasterizers.

Hm I don’t know what you are talking about, the scan lines account for the X bounds of the screen. It might be that the depth of field is too low for you.

Depth of Field has nothing to do with Gouraud Shading.

Usually, the lighting intensity on each vertex is defined by calculating the angle between the vertex normal and the vector from the light source to the vertex. So if the car moves, the intensity should change smoothly and so should the resulting shading. But that’s not the case here…it somehow seems to jump between different intensity values. It doesn’t look smooth.

I am aware of that. I was referring to the “odd” look EgonOlsen was speaking of.

The gouraud shading is done correctly, it’s the car model that makes it look odd. (I thought that you were saying that the shading on the ground was not being interpolated properly when a triangle was slightly out of the viewport, which was why I responded with the depth of field remark).

The shading doesn’t use floats by the way, it’s all 16.16 fixed point, so I think that that might make it a bit more inaccurate.
I’m not sure why the car has such issues, I think it looks fine, perhaps it’s just the fact that the car is very low poly.

Started work on making an actual car based on the specs of the car.

Also working on tire marks for epic drifting action! (These black cubes are placeholders)

I’m not sure about this. I took the model from your jar file and made a quick test case with jPCT. It’s also software rendered, it’s also using fixed point math…but it looks smooth as I expect it to look. Have a look for yourself: https://youtu.be/caFlf8eaDEo

Yes, that model is the one that wasn’t used in the demo. Could I bother you to do it with the model used in the demo? I’m now curious to know what it should look like.

This is what the old model looked like rendered in my engine:

I think I see what you mean.

Sure. I wasn’t aware that I picked the wrong one. Anyway, here it is: http://youtu.be/4FWhoBa7jB8. Sorry about the flickering text in the upper left corner. Somehow, the recording software felt that it has to do that… >:(

How do you get that red aura effect?

Which aura?

In both videos. Is that just shading using red instead of black? Can’t be because the intensities change as the camera rotates…

Also did you see the pictures I posted a reply before?

Oh that red…it’s just an additional color applied to the object, so yes…basically what would otherwise be black is now red. I did it to make it look more interesting. It brightens up when it’s lit, just like black would. You don’t see it without any lighting in these videos, because the light source is placed above and behind the player.

And yes, I saw the pictures. Looks wrong somehow. Either your shading itself is buggy or the normals are wrong or your intensity calculation is.

Speaking of shading…what about the terrain itself? I would expect it to look more or less uniform. But it’s not…it has these dark spots all over the place… ??? It that lit and shaded by the same algorithms as the car?

I made the terrain have very slight bumps randomly spread throughout it in order for the terrain to get some form of gouraud shading without the terrain poking through the car model or making it look like the car is just at a constant height.
In this image, I increased the amount to give you a better look at the shading. It’s all coming from one source.

Keep in mind that the gouraud shading is done at every update for the car to give it real time lighting, so the algorithm needs to be very fast and as close to accurate as possible.