A bit of a (inter)change ...

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

Whoops! I said that out loud didn't I ... ;)
I think you are actually hitting a cpu limit there.
Well, I don't think so.
Empire Earth is a far more sophisticated game graphically ... if it used OTTD graphics I reckon it could support thousands of units very easily.
But OTTD groans even with the extremely elementary graphics it uses, from the mid-1990s.
Imagine if you could rotate an OTTD map ... as things stand, OTTD would grind to a complete halt if it had to reconstruct everything, even on a map rotated through 90 degrees, let alone smooth 3D scrolling and rotation like you get in RTIII.
OTTD cannot cope with a single, solitary isometric viewpoint of any magnitude, let alone multiple viewpoints.
That's why it desperately needs tuning in my view ...
Can you give an example that is done every cycle that could be done every 128 cycles?
Nope.
If you check though, you'll see my statements were phrased in a speculative way, not as facts.

Come to think of it though, off the top of my head ...
- thousands upon thousands of trees growing all over the map is utterly irrelevent to gameplay.
- buildings being replaced far more frequently than is necessary
- heaps of graphical elements being maintained that are just eye-junk as far as I am concerned. TTRS is the most obvious example, it completely buries road and rail networks behind vastly overcrowded city blocks.
- the most obvious aspect of the software being 'overclocked' though ... is a day length of 3-5 seconds ... utterly ludicrous I reckon.

That's just my opinion though - as I said, I'm back to playing RTIII these days. :) :) :)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: A bit of a (inter)change ...

Post by Yexo »

one billion daleks wrote:Whoops! I said that out loud didn't I ... ;)
I think you are actually hitting a cpu limit there.
Well, I don't think so.
Empire Earth is a far more sophisticated game graphically ... if it used OTTD graphics I reckon it could support thousands of units very easily.
But OTTD groans even with the extremely elementary graphics it uses, from the mid-1990s.
Imagine if you could rotate an OTTD map ... as things stand, OTTD would grind to a complete halt if it had to reconstruct everything, even on a map rotated through 90 degrees, let alone smooth 3D scrolling and rotation like you get in RTIII.
OTTD cannot cope with a single, solitary isometric viewpoint of any magnitude, let alone multiple viewpoints.
That's why it desperately needs tuning in my view ...
As I was trying to point out, it's got nothing to do with the graphics. The problem (I think, you'd need some testing to prove it) is that all those trains are actually moving all the time. In Empire Earth, you can have a lot of units, but then won't be moving all at the same time.
That's just my opinion though - as I said, I'm back to playing RTIII these days. :) :) :)
Well, succes with playing RTIII then :)
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

Yes, but when I play RTIII, using a true 3D engine (not isometric) ... I can sit inside the cab of a train moving through a hi-resolution 3D landscape, where every single pixel on the screen is being updated in realtime, with no lag whatsoever - it's perfectly smooth.

Yet OTTD - graphically, an extremely basic simulation in comparison, running on the same CPU - grinds to a jerky stuttering crawl.

That's why I think it's a coding issue ... sure, the devs can write the code alright, but they seem to know next-to-nothing about code optimisation at all.

Well, that's my impression anyway ...
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: A bit of a (inter)change ...

Post by Yexo »

one billion daleks wrote:Yes, but when I play RTIII, using a true 3D engine (not isometric) ... I can sit inside the cab of a train moving through a hi-resolution 3D landscape, where every single pixel on the screen is being updated in realtime, with no lag whatsoever - it's perfectly smooth.

Yet OTTD - graphically, an extremely basic simulation in comparison, running on the same CPU - grinds to a jerky stuttering crawl.

That's why I think it's a coding issue ... sure, the devs can write the code alright, but they seem to know next-to-nothing about code optimisation at all.

Well, that's my impression anyway ...
What I'm trying to make clear to you, it has got nothing to do with the graphics! Have you ever tried to create 500 trains in RTIII? I'd like to hear if you can still play it without lag then. Again, 2d/3d is only the interface, the basic engine for moving the trains will also be 2d in RTIII, simply because a map is 2d (with height information).
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

I agree, it has nothing to do with the graphics per se ... it's to do with the way CPU resources are allocated. Or more properly, not allocated. The jerky graphics are just a symptom of non-existent code optimisation ...

... and that I suppose is just an inevitable side-effect of projects that employ the 'open' development model ... there's a tendency towards a lack of cohesion at the core of the development - no one is overseeing the project as a whole - working on streamlining / optimising the application into a single coherent entity.

In the end, it's a lot of individuals creating a lot of bits and pieces - all sort of fitted together - but not really integrated at all. The result is manifested on our screens as a breakdown in graphical coherence. There is no way such a simple graphical application as OTTD would literally 'dis-integrate' like that if the development was 'integrated' - not with todays CPU / GPU capabilities. Oh well!
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: A bit of a (inter)change ...

Post by belugas »

Next time we need an opinion, Dalek, we are sure NOT going to ask you.

You could at least tell us where, in your grand wisdom, that "next-to-nothing about code optimisation at all." could be spotted and solved/removed.
But no.... That is indeed not worthy of you, too humble a task :S

Apart some nebulous assessments who are more about HOW you formulate those cuttie sentenses then WHAT are the possibles avenues to follow,
your rhetoric is as usefull as a popsicle in the middle of antartica.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: A bit of a (inter)change ...

Post by athanasios »

A few things could probably be optimized a bit. Attempts have been made in the past. They prove that performance can be increased, but not much to worth the effort-at least for the time beeing. Other things are more urgent.

One billion daleks: first compare OpenTTD with many many other commercial games and then talk. :P

From personal experience: I have a vintage PC and most new games don't work or are very slow. Not so with OpenTTD in 8bpp mode.

regards
athanasios
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

belugas:

Yes well, thanks for downgrading the discussion into an off-topic attack on the person instead of their arguments - a classic indicator of intellectual bankrupty. Or more likely a strategy to precipitate a thread-lock on a topic you find unpalatable ...?

Because that post is just provocative, poorly spelt, incoherent grandstanding - not really an opinion about anything really is it - apart from an opinion about my opinions. Still, I am really not interested in your opinion of my opinions belugas.

There are in fact some glaringly obvious areas for code optimisation, staring you in the face, if you bothered to look.

Incidentally, from what I've studied so far - your code is remarkably similar to your posts - longwinded and superfluous, and entirely unoptimised ... and lastly, (to paraphrase your abuse) ... about as much use as a chocolate teapot!

*shrug* (cos as I mentioned, I'm already outta here!)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: A bit of a (inter)change ...

Post by Yexo »

athanasios wrote:A few things could probably be optimized a bit. Attempts have been made in the past. They prove that performance can be increased, but not much to worth the effort-at least for the time beeing. Other things are more urgent.

One billion daleks: first compare OpenTTD with many many other commercial games and then talk. :P

From personal experience: I have a vintage PC and most new games don't work or are very slow. Not so with OpenTTD in 8bpp mode.

regards
athanasios
Of course, there is always room for improvement, but it's not as bad as One billion daleks would like us to believe.
one billion daleks wrote:belugas:
Yes well, thanks for downgrading the discussion into an off-topic attack on the person instead of their arguments - a classic indicator of intellectual bankrupty. Or more likely a strategy to precipitate a thread-lock on a topic you find unpalatable ...?
What arguments? The only thing you keep shouting is that openttd is poorly programmed and can be optimized. As many people already asked, please give some examples.
one billion daleks wrote:There are in fact some glaringly obvious areas for code optimisation, staring you in the face, if you bothered to look.
And will the enlightened one billion daleks bother to share some of his wisdom with the rest of the dump coders around here that obviously miss the point? Again: give examples!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: A bit of a (inter)change ...

Post by DaleStan »

Code: Select all

---------------
| Do not feed |
|  the troll  |
---------------
       |
       |
       |
Oh, and *plonk*.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

OK, here's an example, using the post by belugas ... ;) ;) ;)

Original code: as usefull as a popsicle in the middle of antartica. (52 chars)
Debugged code: as useful as a popsicle in the middle of Antarctica. (52 chars)
Optimised code (initial iteration): as useful as a popsicle in Antarctica. (38 chars)
Optimised code (final iteration): useless as a chocolate teapot. (30 chars)

Creating optimised code entails a very different skillset from just churning out code any-old-how - it's a whole new level in application development. I can't see any evidence of these skills in the OTTD Development Team - they're mostly code-writers, not optimisers. The coding here is of a standard you see in secondary-school students, not at the tertiary level, which involves knowledge of Applied Mathematics and Systems Engineering. This is why the OTTD application crumbles, even under relatively light workloads. But hopefully this will change as Developers progress with their studies and careers ... we'll see. In the meantime it's back to RT3 for me.

Mind you, at least DaleStan has the skills to make derisive posts efficiently haha ;) - I guess it reflects his background in Assembler.

Good Luck with your project!
Noldo
Engineer
Engineer
Posts: 75
Joined: 16 Jun 2005 13:17
Location: Lappeenranta, Finland

Re: A bit of a (inter)change ...

Post by Noldo »

You used many ships on a large map didn't you?
andrewas
Engineer
Engineer
Posts: 115
Joined: 03 Oct 2005 19:14

Re: A bit of a (inter)change ...

Post by andrewas »

one billion daleks wrote:OK, here's an example, using the post by belugas ... ;) ;) ;)

Original code: as usefull as a popsicle in the middle of antartica. (52 chars)
Debugged code: as useful as a popsicle in the middle of Antarctica. (52 chars)
You should not leave yourself open to this kind of nitpickery when insulting every coder on the board. Also, you were asked for an example of where OTTD could be optimized to give significant gains, not on how to optimize use of the english language.

So, where, exactly, do you see a major lack of optimization? Pathfinding for ships needs work, but nobody is disputing that. Someone needs to write a blitter which uses the GPU, theres a huge amount of gruntwork involved in software rendering on a modern display with over a million pixels. AI is always expensive, but the AI is a work in progress so it would be premature to optimize it right now. (Ive seen it many times. Write a function. Spend hours optimizing it. Throw it away after finding a bug in the program and having to change approach entirely). Most of the rest of the program consists of a huge number of functions which are called occasionally. It doesn't matter if, say, the function to create a new vehicle takes 50% longer than ideal, because thats only called a few thousand times per game at most.
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

The ability of programmers to entirely miss the point is a source of endless wonder to me, and one that is much-commented on within the IT industry these days ... the purpose of my example was to illustrate the difference between writing code and optimising code - it's the difference between clear concise English and mediocre waffle. That the point should be entirely missed by coders here nicely illustrates the problem, underscoring the subtle nature of the issue rather well I think ... but the generic mindset of coders has already been discussed elsewhere.

As for specific examples within OTTD code ... I moved on from coding to Project Management a long time ago, and my ability to smell a dud-piece-of-code has long since become second-nature, irrespective of the platform - that's what I'm paid for these days. But hey, you've already started a decent enough list yourself anyway - off the top of your head - one that would be quite sufficient to be going on with. It's the tip of a rather large iceberg in my view.

The thing is ... I played the original TTD on a 66Mhz 80286 processor with nothing more than a extremely primitive graphics chip on the motherboard ... and it ran flawlessly. Granted, it was coded in assembler, but I can't see how on earth a well-written HLL implementation could possibly floor a modern-day PC with a top-end graphics processor - one with more processing power and VRAM in the graphics card alone, than my entire PC from 15-odd years ago. And yet OTTD manages to do just that, pretty darned quick - floor my PC, without being significantly different from the original.

Still, given that this is an open-source project ... I daresay sooner or later some venture capitalist will come along, download the source, present it to a team of half-a-dozen fulltime professional programmers for six months ... and hey presto, a properly optimised, fully-working and balanced application based on OTTD code for around 250,000 bucks! Negotiate a deal with Atari and there's potential megabucks in it for all concerned I reckon - so that would be a very good investment indeed. There again, maybe that's what Atari plan to do anyway - no need to mess around with legal issues - let OTTD do all the legwork, then just grab it and tidy it up ...

Alternatively, the way things are going, I reckon OTTD could well be routinely flooring even state-of-the-art PCs by v0.8! ;) ;) ;)
Anyway, like I said - Good Luck! - I don't want to spend any more time on this discussion thanks.
But it'll be interesting to see what happens eh ... :)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: A bit of a (inter)change ...

Post by Yexo »

I didn't want to react in this discussion again, but you are talking such nonsense I have to.
one billion daleks wrote:As for specific examples within OTTD code ... I moved on from coding to Project Management a long time ago, and my ability to smell a dud-piece-of-code has long since become second-nature, irrespective of the platform - that's what I'm paid for these days. But hey, you've already started a decent enough list yourself anyway - off the top of your head - one that would be quite sufficient to be going on with. It's the tip of a rather large iceberg in my view.
So you say you haven't viewed the source code in quite some time and still want to say it's not optimized? I don't get that :?
The thing is ... I played the original TTD on a 66Mhz 80286 processor with nothing more than a extremely primitive graphics chip on the motherboard ... and it ran flawlessly.
Even with 500 trains on one map?
Still, given that this is an open-source project ... I daresay sooner or later some venture capitalist will come along, download the source, present it to a team of half-a-dozen fulltime professional programmers for six months ... and hey presto, a properly optimised, fully-working and balanced application based on OTTD code for around 250,000 bucks!
Which will have to be released under the GPL :wink: So what company would do that?
Negotiate a deal with Atari and there's potential megabucks in it for all concerned I reckon
When everyone can download the source for free? (At least after one person buys it and get's the source).
- so that would be a very good investment indeed.
It would actually be a very bad investment. Not that I wouldn't like it, but it's not an investment you can make money with.
Anyway, like I said - Good Luck! - I don't want to spend any more time on this discussion thanks.
I agree with you here :) But please you valid arguments the next time and stop saying nonsense.
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: A bit of a (inter)change ...

Post by one billion daleks »

So you say you haven't viewed the source code in quite some time and still want to say it's not optimized? I don't get that.
Well, study software engineering from a Project Management perspective and then you might 'get it'. Sorry, I don't do online tutorials.
Even with 500 trains on one map?
Try extrapolating from a basic 66Mhz PC with no VRAM, to a modern-day PC ... then add coding for the main graphics chipsets by a specialist graphics team, who'd only have to code the handling of one simple isometric viewpoint (even SimCity has four!) ... and yes, 500 trains would be a walk-in-the-park.
Which will have to be released under the GPL So what company would do that?
You tell me what on earth OTTD could do to stop say, Atari ...? Protest ...? Sue ...? What a joke that would be. OTTD don't have the financial means or the ethical grounds to stop Atari seizing what they can legitimately claim to have been a pirated product in the first place. OTTD would get laughed out of court if they made any kind of formal protest ... surely, that much is obvious to you.
When everyone can download the source for free? (At least after one person buys it and get's the source).
Who would bother downloading unoptimised OTTD source once a fully functioning / optimised / balanced compiled version was available on a $19.95 CD-ROM from say, Atari ...? No one, that's who.

Look, I am now officially bored with this discussion. Carry on posting by all means, but don't assume the lack of a response from me means that you finally managed to say something worthwhile. Bye.
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: A bit of a (inter)change ...

Post by richk67 »

one billion daleks wrote:Creating optimised code entails a very different skillset from just churning out code any-old-how - it's a whole new level in application development. I can't see any evidence of these skills in the OTTD Development Team
Thats because you arent looking properly.

Take TerraGenesis; my first draft at introducing nice terrains to OTTD ran at about 45% of the time taken to produce the same sized blocky terrain. Once it had been optimised by Truelight and kudr, it was running at around 10-15% of the time. Of course, we all know nothing of optimisation.

*** HORROR ALERT: I agree with Dalestan!!! ***

Oh, and all your "3D works wonderfully, and doesnt have CPU lag like OTTD" just shows how ignorant you are. 3D works wonderfully because it DOESNT USE the CPU; it uses dedicated onboard graphics processors. OTTD has not been optimised to use those (and given that the view isnt broken down into millions of triangles, but is thousands of layered bitmaps instead, most 3D cards are not optimised to handle those well.)
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
Sir A. Boey
Transport Coordinator
Transport Coordinator
Posts: 299
Joined: 17 Nov 2006 17:40
Location: Everywhere and nowhere

Re: A bit of a (inter)change ...

Post by Sir A. Boey »

:evil: I've unsubscribed myself to this topic X(

And to think I was about to post an other road junction I've made this afternoon
sorry lads don't make this forum a place where you insult each other
remain with the topic please!!!
Image
_____________# If you believe in it, you can achieve it" # ____________
__________________# Check out My Closed Platform #___________________
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: A bit of a (inter)change ...

Post by Yexo »

I was about to post anohter reaction, but nah. I'll keep DaleStan's advise 8)
Sir A. Boey wrote::evil: I've unsubscribed myself to this topic X(

And to think I was about to post an other road junction I've made this afternoon
sorry lads don't make this forum a place where you insult each other
remain with the topic please!!!
You're absolutely right. Please post your junction anyway, I'd like to see it.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: A bit of a (inter)change ...

Post by athanasios »

So one billion daleks is the top coder and all others are amateurs. :roll:

one billion daleks:
1. You talk too much. I simply don't have the patience to read your damned XXL posts.
2. And when you talk too much you make errors: 66MHz 80286?
3. If your optimized code is like your XXL posts, better forget it...

Now, I don't speak this way because I am your foe. Prove what you say by making a decent patch, e.g. new AI and I will be the first to :bow: . And for sure it will make it into the trunk in a snap. Otherwise use a zipper please. :mrgreen:

As the Bible says: "Faith without works is dead."

regards
athanasios
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
Locked

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 31 guests