rein:

Archived discussions related to Transport Empire. Read-only access only.

Moderator: Transport Empire Moderators

Locked
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

rein:

Post by Lilman424 »

rein and anyone else who might be working on this that we don't know of:

Could you please post things as you add/change something? and NTOY but it seems to me (with my limited knowledge of programming, so...) that all you really have done is the classes and the empty map.....for at least 2 months since it was decided to actually make it, I don't think this is a lot that is completed, but I don't really know.

I know it IS just a hobby and it's on your spare time, but look at Josef, he spits out at least three alphas a week and, before X-mas, he hada new one every day!

Not to offend you, rein, as I'm sure you're working as hard as you can in the time you have to work on it.......what does Hellifire do on the project, as I could have sworn rein or someone said earlier that he (rein) was working on it by himself.......what we need is more programmers.

Also, I know we have tons of artistic talent on this forums, just look at the Finished Graphics topic! So why don't you artists help a new project and do some 3d models? Please.....

Evan



(OT: My fingers hurt)
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

I’m trying to speed up the map rendering.

At a close view, comparable to the normal view in TTD, the frame rate is quite good, between 250 and 500fps on my computer. But as the zoom ratio drops, the frame rate drops as well. On the minimum zoom level, 0.02 at the moment, the frame rate can’t get above 5.

To increase the frame rate when only a small piece of the map is shown, rein implemented a small algorithm that doesn’t draw tiles of the map that aren’t on the screen. Unfortunately, this doesn’t work as well as it should yet.

But there’s another way to increase the frame rate. This involves an OpenGL technique, called “Display Lists”. Here’s what “NeHe” has to say on display lists:
nehe.gamedev.net wrote:For example. Lets say you're making the game asteroids. Each level starts off with at least 2 asteroids. So you sit down with your graph paper (grin), and figure out how to make a 3D asteroid. Once you have everything figured out, you build the asteroid in OpenGL using Polygons or Quads. Lets say the asteroid is octagonal (8 sides). If you're smart you'll create a loop, and draw the asteroid once inside the loop. You'll end up with roughly 18 lines or more of code to make the asteroid. Creating the asteroid each time it's drawn to the screen is hard on your system. Once you get into more complex objects you'll see what I mean.

So what's the solution? Display Lists!!! By using a display list, you create the object just once. You can texture map it, color it, whatever you want to do. You give the display list a name. Because it's an asteroid we'll call the display list 'asteroid'. Now any time I want to draw the textured / colored asteroid on the screen, all I have to do is call glCallList(asteroid). the premade asteroid will instantly appear on the screen. Because the asteroid has already built in the display list, OpenGL doesn't have to figure out how to build it. It's prebuilt in memory. This takes A LOT of strain off your processor and allows your programs to run A LOT faster!
Take a look at the images. They show the problems of the map drawing as it is right now.
Attachments
Far view. Notice the frame rate. Level of Detail could do miracles here, but I don't think that zooming out this much will add a lot of extra value.
Far view. Notice the frame rate. Level of Detail could do miracles here, but I don't think that zooming out this much will add a lot of extra value.
far.png (39.37 KiB) Viewed 4892 times
Medium view. If it were up to me, this would be the maximum zoomout. The frame rate is playable, but the cutoff is wrong.
Medium view. If it were up to me, this would be the maximum zoomout. The frame rate is playable, but the cutoff is wrong.
medium.jpg (41.2 KiB) Viewed 4912 times
Near view. The frame rate is good, but the cutoff is wrong.
Near view. The frame rate is good, but the cutoff is wrong.
near.jpg (50.44 KiB) Viewed 4929 times
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)

Code: Select all

+------------Oo.------+
| Transport Empire -> |
+---------------------+
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
User avatar
Arathorn
Tycoon
Tycoon
Posts: 6937
Joined: 30 Nov 2002 17:10

Post by Arathorn »

The maps look very very good! :D
User avatar
spaceman-spiff
Retired Moderator
Retired Moderator
Posts: 20634
Joined: 28 Jul 2002 07:08
Location: Belgium
Contact:

Post by spaceman-spiff »

The framerate is good, 292 is excellent :!:
Well, back to work, lot's of it in the near future
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

spaceman-spiff wrote:The framerate is good, 292 is excellent :!:
It's empty, Spiff!!! It will decrease as soon as you plant 1 tree! But it sure looks good!
ken52787
Engineer
Engineer
Posts: 107
Joined: 14 Mar 2003 19:26
Location: New York, USA
Contact:

Post by ken52787 »

Yea, I think we can go easy on the zoom-outs, we don't need to see that much of the map :shock:
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

Post by Lilman424 »

Yeah, the middle picture is good enough. Anyway, has anyone seen rein recently?
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein
User avatar
seanlawn
Engineer
Engineer
Posts: 10
Joined: 31 May 2003 00:41

Post by seanlawn »

wow :shock:
looks better than i thought it would at this stage,
i thought grass would just be a green square
User avatar
rein
Traffic Manager
Traffic Manager
Posts: 132
Joined: 12 Jan 2003 17:16
Location: Poland - Czestochowa

Post by rein »

hmm, the terrain has currently turned the shading functions off, so it looks crappy, but anyway i'm sure Hellfire has done a good piece of job with it (i mean - on my GF4 when max zoom out was reached the fps didn't excess 0.05 :wink: )

i'm not an OpenGL programmer anymore - i gave it up, so i can't tell you anything about the 'visual' progress. I'm trying to set the best conditions for future graphic coders by splitting the code into smallest classes including functions made straight by them
User avatar
SGWebmaster
Tycoon
Tycoon
Posts: 1564
Joined: 11 Jan 2003 15:47
Location: Preston, UK
Contact:

Post by SGWebmaster »

I agree with Hellfire's comments on the images. The farthest out view is really too far out to be useful. At this distance, I should imagine that any fine detail will not be seen fully due to its minute size. This kind of detail would only lead to lock-ups on lower spec machines. I agree that the medium view should probably be the furthest that the zoom goes out as it gives an overall picture by showing a large amount of the map without being too far away to include enormous levels of "invisible" detail.

Did all that make sense?
SGWebmaster
-/-/-/-/-/-
http://www.multibellropes.freeserve.co.uk
UD Team
-:-:-:-:-:-
Urah, hanevel, v'chinor! A-irah shahar!
-/-/-/-/-/-
Please Note: Brain Shut Down For Maintence
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Not really, it all depends on how big the objects will be in the zoom levels. If the middle zoom levels only shows one town it will never be sufficient!
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Post by Hellfire »

Check the tile size in the middle picture! If there would be any town that's bigger than the screen... That would really be a huge town!
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)

Code: Select all

+------------Oo.------+
| Transport Empire -> |
+---------------------+
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Hellfire wrote:Check the tile size in the middle picture! If there would be any town that's bigger than the screen... That would really be a huge town!
Sorry, didn't check it :oops: !

Topic locked, really old moot (12112006).
Locked

Return to “Transport Empire Development Archive”

Who is online

Users browsing this forum: No registered users and 0 guests