News for hackers. Stuff that matters.
Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by kogepathic on Thursday February 16, 2017 @03:34AM (#13658469)
> I want all the cars, all the roads, no traffic, no police, only driving.

Then you don't want to play ETS2.

> It's amazing to see a game with the roads of half continent

As someone else noted, the road network is only an approximation of the highways. Each city is essentially the same layout with slightly different buildings to make it look like the namesake city (outside the drivable world, basically a 3D skybox).

The AI vehicles are quite stupid. I've had them suddenly brake in front of me, or merge into the trailer from behind. Oh, and you get penalised for this (ticket & damage repair costs).

Apart from the PS of trucks, there's virtually no difference between them. Want a basic Volvo? It'll haul trailers. Want the top of the line Volvo Globetrotter with sleeping cabin? It'll haul trailers. Oh, and you still need to stop at the designated rest areas to sleep, even though you have a bloody sleeping compartment in the Globetrotter!

You have to follow all the laws, all the time. Speeding? That's a ticket. Running a red light? Ticket. Bumping another car? Ticket!

I wish they would include an arcade or "god mode" so you could actually have fun.

/rant

Can anyone comment on how this is actually obtaining the video output from ETS2?

Is there some way you can feed the output of an OpenGL application into this? Or is it just capturing the desktop area where ETS2 is running?

Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by omegaham on Thursday February 16, 2017 @10:02AM (#13660335)
> Can anyone comment on how this is actually obtaining the video output from ETS2?

In Windows, it's done by grabbing the handle of the window with the "Prism3D" classname.

This then goes to the hwnd2mat function[1], which does `GetDC`[2] to get the device content and then creates a bitmap with `CreateCompatibleBitmap`[3].

---

On Linux[4], it's done by grabbing the screen with `XOpenDisplay` and the current window with `DefaultRootWindow`. It then uses `XGetImage` and memcpys the result into the vector of pixels.

Note that the `main` function in the Windows and Linux version is slightly different to accommodate the difference in how these images are grabbed.

[1] https://github.com/bethesirius/ChosunTruck/blob/master/windo...

[2] https://msdn.microsoft.com/en-us/library/windows/desktop/dd1...

[3] https://msdn.microsoft.com/en-us/library/windows/desktop/dd1...

[4] https://github.com/bethesirius/ChosunTruck/blob/master/linux...

Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by werid on Thursday February 16, 2017 @04:16AM (#13658618)
> You have to follow all the laws, all the time. Speeding? That's a ticket. Running a red light? Ticket. Bumping another car? Ticket!

> I wish they would include an arcade or "god mode" so you could actually have fun.

They do. Look in settings, you can disable vehicle offenses (so no fines for running red light, crashing, speeding) and you can disable traffic too (might need a mod, i dont recall)

When it comes to the city layouts, the DLCs for Scandinavia and France have better and different layouts than the main game.

Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by yread on Thursday February 16, 2017 @04:58AM (#13658766)
What I'm missing is road construction. You can't go 100 km pretty much anywhere without encountering something out of the ordinary - narrower lanes, blocked lanes, lanes running on the opposite side. Also the ramps look more or less the same no exit within exit or those weird X-shaped exits - where an off-ramp is an on-ramp at the same time.
Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by NTripleOne on Thursday February 16, 2017 @07:06AM (#13659243)
That would make a pretty cool mod, randomised roadworks.
Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by ajurna on Thursday February 16, 2017 @04:16AM (#13658617)
Have you looked in the options? you can disable most of those things your complaining about in the vanilla game. you can even disable the limiter if you're feeling brave!
Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by kogepathic on Thursday February 16, 2017 @07:54AM (#13659512)
> Have you looked in the options?

I have, but it's been about 6 months since I played. Maybe they've updated it to add additional options.

I also haven't installed any mods, so perhaps this could be enabled via additional mods.

Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by mathgeek on Thursday February 16, 2017 @09:03AM (#13659895)
> The AI vehicles are quite stupid. I've had them suddenly brake in front of me, or merge into the trailer from behind.

I'm sure the issue here is that it is "more common than the real world", but you could replace "AI vehicles" with "other drivers" and that would be a valid real-world complaint.

Re:ChosunTruck – Euro Truck Simulator 2 autonomous driving s... by gktreop on Thursday February 16, 2017 @04:04AM (#13658570)
ETS2 has several "No police" mods.