News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

3d or 2d

Started by ROCAMBOLER529, December 06, 2017, 12:15:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ROCAMBOLER529

I dont understand if simutrans is a 3d game or 2d game because i have different theories if simutrans is a 3D game or a 2D game. I think that the dear community can help:
- Why 3d: Simutrans have  the 3 coordinates X, Y, Z; X, Y are the coordinates in the map that we always see and edit co create our own map but it have a third coordenate that we use it to calculate the floor that is the elevation that we can edit it when we create a map (specially in a map without irregular places).
- Why 2d: I dont see that Simutrans have a 3D design add it (try using 3D glasses and doesnt work XD) so this theory put in question about if simutrans is a 3D game if the game dont have a 3D design.
The Argentian (Argentina Empire)

DrSuperGood

It is completely 2D. Z height is a finite bound property assigned to grounds that are stored per tile. The graphics are done by software rasteriser, basically the CPU composes the scene.

I think the reason that no 3D acceleration is used is that Simutrans predates wide spread use of 3D acceleration. If the game was to be written from scratch now one could expect at least OpenGL to be used, if not also Vulcan.

It is not easy to port Simutrans to use 3D acceleration due to how the graphic code is setup. The code was created such that it assumes 0 overhead for a lot of small, simple drawing operations. OpenGL is quite the opposite to the point where getting the GPU to perform a small, simple drawing operation might take longer than if the CPU had just done the operation itself in software. In theory Vulcan might be able to combat a lot of this due to its simpler calls, however that would greatly raise system requirements and likely still not be as fast as one would expect.

In theory large parts of Simutrans could be rewritten to support efficient 3D acceleration. However this would mean forcing multithread as a requirement, completely breaking the software raster (so only people with minimum OpenGL requirement can play) and greatly raising the system requirements for the game. The gains would also not be that great as graphics seldom bottleneck Simutrans performance as is, and with recent optimizations and multithreading even less so.

prissi

There was (and still is in the SVN) an OpenGL branch, which actually did output something. But because there are not enough model around, it did not continue after some time. Since almost 10 years passed the old limitations may have been somewhat gone away. Then it was impossible for a GPU to hold 32000 different objects in their memory, and loading/unloading to main memory was the limiting step.

Also multithreading the redraw took a lot of pressure away from GPU support.

Leartin

The question is: What is 3D anyway?

There are games which are completely 2D, like (original) Donkey Kong.
There are games which are completely 3D, which you play in Virtual Reality.

And there is a whole lot of gray area between those two - if you go back in time, many, many games claimed to be "3D", for different reasons. Isometric Perspective was surely called 3D when it first came out. Wolfenstein 3D takes place in a 2D environment, rendered in a way to simulate perspective. Likewise, New Super Mario Bros. uses 3D models for graphics, but is still a 2D sidescroller. Is it more 3D than Donkey Kong Country, which used prerendered models which were originally 3D, but put into the game as rasterized sprites? Donkey Kong Country Returns is a 2D sidescroller as well - except this time, there are not only 3D models, but also changes in perspective, making the world seem more three-dimensional, even though it's more like a 2D surface bent in space.
On the other hand, there are games like dwarf fortress, which take place in a three-dimensional world, presented in 2D (layer by layer).

Both arguements DrSuperGood makes are not that clear-cut. The whole z-height-deal is shared by many games considered 3D, eg. Cities Skylines. The whole landscape is just a plane with bumpmap. There is even a program called z-brush, which uses the same concept to create 3D models. Quake, the first (?) game to feature what is understood as 3D, did not need a GPU, so if it's 3D, it's completely in software.

I don't want to claim Simutrans is a 3D game, just that there are a lot of numbers between 2 and 3 and no clear-cut definition which is which.

DrSuperGood

QuoteBoth arguements DrSuperGood makes are not that clear-cut. The whole z-height-deal is shared by many games considered 3D, eg. Cities Skylines. The whole landscape is just a plane with bumpmap. There is even a program called z-brush, which uses the same concept to create 3D models. Quake, the first (?) game to feature what is understood as 3D, did not need a GPU, so if it's 3D, it's completely in software.
I was explaining how Simutrans does its "Z" axis. The height is a tagged on property, with logic mostly working on the flat XY plane. Simutrans mostly works with XY coordinates, with any required XYZ coordinate being the result of tagging on the Z property to an XY coordinate. Most RTS game engines are similar to this such as Warcraft III and StarCraft II as restricting most game logic to XY only greatly improves game performance.

This is very different from a fully 3D aware engine where everything is defined in XYZ terms. In such an engine you can orientate everything in any 3D direction. A good example of such an engine is Mario Galaxy where literally you could walk on any surface the designers wanted you to no matter how it was orientated. Most space simulators are also like this for the logical reason that space is 3D.

I also was referring to 3D hardware acceleration. This is a general term for accelerating any kind of graphics using a dedicated graphic accelerator unit, commonly a GPU from Intel, AMD or NVidia. One can call it 3D hardware acceleration because the GPUs are designed and optimized to perform 3D calculations extremely efficiently. Even if one ends up using only 2 dimensions because your game does not need to deal with 3D space, the hardware still is capable of 3 and you are just not using 1. The hardware likely takes as long to perform 2D calculations as it does 3D calculations (but might use less power due to fewer transistor state switches). A good example of this is Direct2D which Microsoft made, it is nothing more than a 2D convenience wrapper around Direct3D which can use a systems graphic accelerator.

Ters

Simutrans is a three-dimensional game. The graphics is mostly 2D, but so was Wolfenstein 3D and the original Doom (with the former being fundamentally a two-dimensional game, just presented in semi-3D). The ground in Simutrans is kind of 3D like the walls in those two (and floors and ceilings in Doom), but not quite (the ground in Simutrans is preprocessed into a 2D form that is used together with the other 2D graphics, whereas the walls in the other two are projected from scratch every frame). While you can set up a completely flat map and ignore the existence of height, it does remove a lot of gameplay. Proper playing of Simutrans, with hills (that slow vehicles down), bridges and tunnels requires thinking in all three dimensions, even if two are more dominant. As it is in real life for everyone but skydivers and acrobats.

Using 3D acceleration is a completely different concept. Even the desktop on moderns OSes are 3D accelerated, but the third axis is used only for fancy effects (unrelated to the z-ordering of windows that has been around since at least the 1980s). Quake was three dimensional in all aspects, although few have experienced it fully three dimensionally due to lack of 3D glasses at the time, but did not use 3D acceleration originally.  3D acceleration has the potential to boost Simutrans performance, but the game logic and presentation logic in Simutrans is too tightly coupled at the moment. You just can't push the entire game world from RAM to GPU every frame. That is slower than just doing everything (except DPI scaling) on the CPU. And since the graphics is 2D, you would not notice any visual difference. The rotations would be fixed to the four that are currently supported, because the fixed rotations in the graphics would be much more apparent and disturbing than the corresponding sprites in Wolfenstein 3D and Doom. For a fully 3D Simutrans, it is probably better to start from scratch, but that is a lot of work, for both artists and programmers. And first, one has to figure out how things are supposed to work (there is a lot of ground between Simutrans today and Train Simulator).

Leartin

Quote from: Ters on December 06, 2017, 07:36:46 AM
And first, one has to figure out how things are supposed to work (there is a lot of ground between Simutrans today and Train Simulator).
Take Mashinko and add the Simutrans gameplay...?

prissi

That was almost done with Strasse und Schiene in 2001. Unfourtunately a lawsuit and bankrupsy killed this game prematurely. The programmer was even contributing to Simutrans at that time. It had passerngers with destinations, smooth bends, track and signals, and was real 3D.

(I think the sources are though to be released, although 15 years later it might be too late.)

Ters

What I didn't like about the switch to 3D graphics for games like this, was that the maps became much smaller. That was also true for other genres as well. Age of Empire III maps at least feel much more cramped than even the first Age of Empires. I didn't feel the same with Railroad Tycoon 3D though, but that game had a much less detailed world to begin with, putting more focus into economics than Transport Tycoon or Simutrans.

miriamguimel

I totally understand the confusion. I would say it uses isometric design and all the isometric artworks are created by using 3D Geometry composed of three distinct geometric plane structures: XY, YZ, and ZX.


anon666

the coordinate space might be 3d but the graphics is 2d/isometric, it will appear flat if you could look at it from an angle, at it only simulates "3d" (technically its a projected 3d)

this is the difference

also internal level of 3d-ness can vary from component to component