Re: 2.6 nightly/alpha discussion

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: 2.6 nightly/alpha discussion

Post by OzTrans »

...
Last edited by OzTrans on 04 Feb 2012 00:42, edited 1 time in total.
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: 2.6 nightly/alpha discussion

Post by eis_os »

May I ask how many sprites TTDPatch shows for CanRail when loaded? (unload other grfs)
TTDPatch supports no more then 64k sprites (all categories together), otherwise the action processing goes nuts. As far as I can see you have around 52k sprites
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: 2.6 nightly/alpha discussion

Post by OzTrans »

...
Last edited by OzTrans on 04 Feb 2012 00:42, edited 1 time in total.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: 2.6 nightly/alpha discussion

Post by michael blunck »

OzTransLtd wrote: [...] Could the maximum number of sprites for each category be changed (permanently). No one will ever have 1,000 aircraft or ships in a GRF. We could take about 2,000 sprites from each (aircraft and ships), and reallocate them to 'Trains' and 'Other' respectively. How about that ?
Has been discussed a number of times, e.g. here.

regards
Michael
Image
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: 2.6 nightly/alpha discussion

Post by eis_os »

Some notes: I don't currently know where I have stored the unfinshed grf local sprite patch and I don't know if there was any problem in the concept...

Ohh, and I am not sure why TTDPatch crashes, the last time I debugged TTDPatch is ages ago
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: 2.6 nightly/alpha discussion

Post by eis_os »

*bump* Found it, I am unsure if there are enough TTDPatch Players who would really need it.
The the amount of time to complete these patch and rewrite parts of the vehicle system would be huge. Let me know if there is really need...
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: 2.6 nightly/alpha discussion

Post by wallyweb »

eis_os wrote:*bump* Found it, I am unsure if there are enough TTDPatch Players who would really need it.
The the amount of time to complete these patch and rewrite parts of the vehicle system would be huge. Let me know if there is really need...
Would this help OzTransLtd's issue with CanSet? Would your rewrite allow for future developments? I for one would appreciate any improvement(s) to TTDPatch.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: 2.6 nightly/alpha discussion

Post by michael blunck »

wallyweb wrote: I for one would appreciate any improvement(s) to TTDPatch.
Why not send him some cookies? I´d do it myself but I don´t know his preferred brand. :cool:

regards
Michael
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: 2.6 nightly/alpha discussion

Post by wallyweb »

michael blunck wrote:Why not send him some cookies? I´d do it myself but I don´t know his preferred brand. :cool:
Now there's a thought. I wonder if Oskar finished the last batch I sent to him. :D
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: 2.6 nightly/alpha discussion

Post by OzTrans »

...
Last edited by OzTrans on 04 Feb 2012 00:42, edited 1 time in total.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: 2.6 nightly/alpha discussion

Post by wallyweb »

OzTransLtd wrote:
eis_os wrote:... the amount of time to complete these patch and rewrite parts of the vehicle system would be huge. Let me know if there is really need...
What would it do ?
Oskar, is this a continuation of the work you started on sprite limits?
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: 2.6 nightly/alpha discussion

Post by eis_os »

Sorry for the bit chaotic style, this is really a hardcopy of the thoughts I currently have:

11,483 is hard limit, otherwise TTD recolouring gets really fuzzy. The real problem I see in my old code are features that allow normal sprites (Action5) and Action1 based ones. In the current planed way, TTDPatch would use grf local spriteids. So instead changing the sprite numbers all the time, they would be resolved one time at load time to be grf local. (Means really that a debug output would tell you the sprite number as seen in your GRF) The problem here, you can't access the TTD sprites any more. *panic*

Vehicles:
Actually the direction of a Train is simply changed by tweaking the sprite number, so I really can't use a pointer here to allow even more sprites.

Drawing of something would work with the new patch in this way:

1. getnewsprite
- Returns a grf local sprite id + a pointer to the grf sprite list.
- This currently will count pseudo sprites again as normal sprites!
- There would be a way to cheat here and return a fake spritepointer pointing to the most recent action1 for this feature instead.
- Debugging would get bit harder here but an single Action1 could work with 16k sprites despite other grf action parts would fall into pieces

2. Store the spriteid + spritelistpointer to the grf sprite list to the sort list (Add*Sprite)
3. At drawing stage, get the spriteid + spritelist pointer.


Stations:
As soon as I need TTD sprite for Stations or Houses I get a big problem:
Currently TTDPatch features tell the drawing code the feature it should use.
For feature "Station", the low spriteids point to the TTD sprites and the high ones to the Station SpriteIDs, no problem, drawing of Stations can work as normally

New Patch: The low spriteids are really feature based so we can put a huge amount of sprite into them, every time a DrawSprite Add*Sprite call is made we need to pass the right pointer list (TTD sprites or GRF local sprites), otherwise we can't access TTD sprites any more!. Guess what, houses have the same problem.

On the other hand, if we could rip out a lot of the spriteid translation TTDPatch would work much better. For Windows TTD there would be even a chance to reload a grf ingame someday... And changing around 1/5 of the TTD(Patch) sprite system isn't an easy task, and I am unsure if it's even possible to add a switch between modes...
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: 2.6 nightly/alpha discussion

Post by wallyweb »

eis_os wrote:... and I am unsure if it's even possible to add a switch between modes...
Would this be necessary?
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: 2.6 nightly/alpha discussion

Post by eis_os »

wallyweb wrote:
eis_os wrote:... and I am unsure if it's even possible to add a switch between modes...
Would this be necessary?
Yes, because the overall memory usage would be increased quite much and maybe I make a big mistake?
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: 2.6 nightly/alpha discussion

Post by wallyweb »

eis_os wrote:Yes, because the overall memory usage would be increased quite much and maybe I make a big mistake?
Aha! I understand now. I thought it was to provide backwards compatibility to previous TTDPatch versions. Instead, it would provide a safe fallback in case of programming issues?
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: 2.6 nightly/alpha discussion

Post by eis_os »

Yes, as a new grf loader, bit new drawing handling, new spritelayout, removing of the SpriteCache system, all action features needs a rewrite, the action2/1 code need a rewrite, Vehicle Sprite Bounding Box code, Sprite Activation, GRF Window (to show the right stats), mouse cursor handling. I think I will use the approach to pass grf action 1 local spritelists around, this way we can throw away some activation pass resolving spriteids in a grf. That should reduce the code for activating grfs quite a lot.

- The discussion should be moved to a new topic -
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: 2.6 nightly/alpha discussion

Post by wallyweb »

eis_os wrote:- The discussion should be moved to a new topic -
I will see if I can find Lakie or a global moderator.
What would be a good subject line?
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

eis_os' work on Patch changes

Post by wallyweb »

This topic will be renamed.
It is the continuation of discussion re Oskar's (eis_os) work on changes to TTDPatch originally inspired by sprite limits.
Thank you to jonty-comp for splitting this discussion off from 2.6 nightly/alpha discussion
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: eis_os' work on Patch changes

Post by eis_os »

Would it be possible to get a bundled package that crashes TTDPatch (newgrf folder, newgrf config, ttdpatch config)? (PM / Mail)

The simple problem with bridges is, these aren't action based.

- For properly written vehicle grfs I am quite confident to raise the sprite limit to 64k sprites (including pseudo sprites, otherwise I would need to change the action2 format to allow pointers instead of spriteids, that would be a complete break of existent GRF)
- For houses and industries this should work too.

The problem I see is the GRM Action5 sprite usage. Could GRF Authors please dump here their usage of ActionA based sprites for Action321 allowing features? If we could move them to grf local sprites this would be a huge bonus and allow non action321 based features to use the "other sprites". So instead of using Action5 you would use Action14 to define grf local other sprites for action based 321 features... (Ohh, and for Action0 for stations layout and houses we would need a good way to address them)

-edit-
changed action5 to actionA
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Post by OzTrans »

...
Last edited by OzTrans on 04 Feb 2012 00:42, edited 1 time in total.
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 29 guests