Patch: Juanjo's patches
Moderator: OpenTTD Developers
Re: Patch: Juanjo's patches
I'm currently trying to reserve paths for ships. It works using YAPF or NPF. The goal was to get a better behaviour at docks.
Ships still do strange things sometimes.
Ships still do strange things sometimes.
- Attachments
-
- Ships loading on a multiple dock
- spath.png (589.03 KiB) Viewed 7811 times
Formerly known as Juanjo
Re: Patch: Juanjo's patches
Another clean-up of the patches (some desyncs, critical bugs, memory leaks, documentation...).
I have added the possibility of building one-tile docks. Building complex docks with object tiles is easier using it.
I have added the possibility of building one-tile docks. Building complex docks with object tiles is easier using it.
Formerly known as Juanjo
Re: Patch: Juanjo's patches
Getting this when compiling against r r24754:
As far as I can tell all the revisions since r24751 are all translation things.
No other patches applied.
Code: Select all
make[1]: *** No rule to make target `/home/liam/ottd/working/src/pbs_rail.cpp', needed by `pbs_rail.o'. Stop.
make[1]: Leaving directory `/home/liam/ottd/working/objs/release'
make: *** [all] Error 1
No other patches applied.
Re: Patch: Juanjo's patches
Don't know what I've missed out. Try making another time "./configure" and "make" again if you are running a Linux OS. If that doesn't solve it, I hope somebody else can help with this.Gremnon wrote:Code:
make[1]: *** No rule to make target `/home/liam/ottd/working/src/pbs_rail.cpp', needed by `pbs_rail.o'. Stop.
make[1]: Leaving directory `/home/liam/ottd/working/objs/release'
make: *** [all] Error 1
As far as I can tell all the revisions since r24751 are all translation things.
No other patches applied.
Formerly known as Juanjo
Re: Patch: Juanjo's patches
i haven't checked the patch, but possibly you forgot "svn add" the new files before "svn diff"? then the diff wouldn't have them.
Re: Patch: Juanjo's patches
I just moved to GitHub so I can maintain the code easily and prevent some problems like the one Gremnon had. Code can be found here.
From previous version, most noticeable change is the way locks are controlled. I have also added Cargo Distribution, as I always play with it while testing my own patches.
From previous version, most noticeable change is the way locks are controlled. I have also added Cargo Distribution, as I always play with it while testing my own patches.
Formerly known as Juanjo
Re: Patch: Juanjo's patches
Toying with the idea of adapting OpenTTD for tablets, I am trying these on the tablet branch:
- Build airport, depots and most of the infrastructure when releasing the mouse instead of when clicking it.
- Force buttons to be bigger. The feature doesn't make sprites bigger, but at least buttons can be set to a more appropriate size for tablets. Values for the size of buttons and scrollbars are set in the configuration file of OpenTTD. You may want to add these to that file under [misc] section:
Code: Select all
min_button_size = 40 min_step_size = 30
- Add buttons for supr, shift and ctrl keys. Also add a button for moving around. The "Ok/Cancel" buttons still don't work as expected, as I don't have a tablet to test them and figure out how they would have to work.
Formerly known as Juanjo
Re: Patch: Juanjo's patches
I have added a link for a compiled version of my latest branch for Android (see first post of the thread). It is intended to work with tablets, not with phones.
I'm still working on adapting the GUI. By now, I have adapted sizes of most GUI elements. I think the feature is working for screen resolutions between 640x400 and 2560x1504. I still have to adapt automatic sizing for screens with lower resolution, though I'm not keen on doing so.
The other feature I've added is a touchscreen mode. In the settings you can choose between:
I'm still working on adapting the GUI. By now, I have adapted sizes of most GUI elements. I think the feature is working for screen resolutions between 640x400 and 2560x1504. I still have to adapt automatic sizing for screens with lower resolution, though I'm not keen on doing so.
The other feature I've added is a touchscreen mode. In the settings you can choose between:
- playing with mouse,
- playing with a simple adaptation for touchscreens (buttons to substitute X, Supr, Shift and Ctrl),
- or playing with a confirm mode (the same as the previous, but having to confirm construction actions pressing a button). The confirm mode is not complete, as I don't want to modify the tile selection on viewports more than I have.
Formerly known as Juanjo
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patch: Juanjo's patches
Michi_cc had a tentative patch queue which principally enabled zoom levels for the GUI sprites as well, allowing sprites to be provided for 2x and 4x sizes in the base sets. Unfortunately I fail to dig it up at this time, I expected to find it in his gitweb at icosahedron.deJuanjo wrote: Next step is to see if it is possible to provide a NewGRF with sets of GUI sprites with different sizes and make the program automatically select the best set for screen resolution.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Patch: Juanjo's patches
I found it in http://www.icosahedron.de/openttd/git/o ... s/heads/ez. I will go that way.planetmaker wrote:Michi_cc had a tentative patch queue which principally enabled zoom levels for the GUI sprites as well, allowing sprites to be provided for 2x and 4x sizes in the base sets. Unfortunately I fail to dig it up at this time, I expected to find it in his gitweb at icosahedron.de
Anyway, is it not technically possible to make a NewGRF that loads different sets of GUI sprites via a parameter? I mean a NewGRF that when GUI sprites are needed at 1x size, loads GUI sprites at 1x size; when GUI sprites are needed at 2x, loads them at 2x...
Formerly known as Juanjo
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patch: Juanjo's patches
That's feasible. That's doneJuanjo wrote:I found it in http://www.icosahedron.de/openttd/git/o ... s/heads/ez. I will go that way.planetmaker wrote:Michi_cc had a tentative patch queue which principally enabled zoom levels for the GUI sprites as well, allowing sprites to be provided for 2x and 4x sizes in the base sets. Unfortunately I fail to dig it up at this time, I expected to find it in his gitweb at icosahedron.de
Anyway, is it not technically possible to make a NewGRF that loads different sets of GUI sprites via a parameter? I mean a NewGRF that when GUI sprites are needed at 1x size, loads GUI sprites at 1x size; when GUI sprites are needed at 2x, loads them at 2x...
But it's not the best which can be done. A NewGRF needs be configured, either in the NewGRF settings which are saved with a map - thus you force every player to use the same setting. Or it can be done as static NewGRF, which has no ingame GUI yet. And it IMHO belongs simply into the GUI settings like language, currency, window snap radius etc. Alongside with a GUI for font and font size selection.
Thus an improvement over the current situation is to allow base sets provide the sprites for the different zoom levels directly, so that it needs no special config by any user other than choosing the right GUI size. Those spites in turn can still be replaced via NewGRFs to different looks, if desired.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Patch: Juanjo's patches
I even based my project on that one!planetmaker wrote:That's feasible. That's done
I explained the problem I have really bad. Right now, I don't know how to do the same with 32bpp. I need time to look NewGRF documentation and examples. Even better, I need help of NewGRF experts.
I included a new setting: GUI sizing is user specified/automatic. In case it is user decided, user can decide sizes of GUI elements in the config file. In case it is automatically decided, the parameter of the NewGRF will be decided automatically and sprites reloaded when necessary.planetmaker wrote:But it's not the best which can be done. A NewGRF needs be configured, either in the NewGRF settings which are saved with a map - thus you force every player to use the same setting. Or it can be done as static NewGRF, which has no ingame GUI yet. And it IMHO belongs simply into the GUI settings like language, currency, window snap radius etc. Alongside with a GUI for font and font size selection.
Formerly known as Juanjo
Re: Patch: Juanjo's patches
Juanjo, sorry if this is an ignorant question, but exactly where can I find the compiled APK download URL with your modifications and updates? I'd like to try it on my Iconia B1 tablet. Thanks...
Re: Patch: Juanjo's patches
There is a link at the end of the first post of this topic. Just download the .apk file.Andrex wrote:Juanjo, sorry if this is an ignorant question, but exactly where can I find the compiled APK download URL with your modifications and updates? I'd like to try it on my Iconia B1 tablet. Thanks...
Formerly known as Juanjo
Re: Patch: Juanjo's patches
Hi. I've merged your GUI-related patches into Android port, more info here.
Re: Patch: Juanjo's patches
Is there any chance of getting these broken into separate patches?
I know a few people have asked now. I would really like to use the grouping with some other patches I have applied to the trunk. It would be much easier to apply the grouping patch and fix any issues it may have with trunk and the other patches I am using if we could get separate patches.
I know a few people have asked now. I would really like to use the grouping with some other patches I have applied to the trunk. It would be much easier to apply the grouping patch and fix any issues it may have with trunk and the other patches I am using if we could get separate patches.
Re: Patch: Juanjo's patches
You may find individual Git commits here, they are quite hairy though: https://github.com/JJ-OpenTTD/openttd-c ... ts/JJ-last
Re: Patch: Juanjo's patches
I only do separate patches if somebody asks for them. I won't maintain different branches for each individual feature. The one with grouping vehicles is in the attached file. If it doesn't work, let me know.Antaguana wrote: I would really like to use the grouping with some other patches I have applied to the trunk. It would be much easier to apply the grouping patch and fix any issues it may have with trunk and the other patches I am using if we could get separate patches.
- Attachments
-
- build-groups-r26654.diff
- (35.71 KiB) Downloaded 265 times
Formerly known as Juanjo
Re: Patch: Juanjo's patches
I have added two new features.
You can change fonts and their sizes while playing: I also added some fonts and graphics needed in the bundle.
I am also toying with the idea of multi-tile depots, built like stations and with added limitations, changing the strange "black wormhole" effect that allows to keep lots of trains hidden in just one tile. First of all, the default behaviour of depots (small depots) isn't altered.
For big depots, there are some issues to fix, but I think that the feature is already playable. As a first approach, I thought about this rules:
In big depots, user can join different depot tiles under the same depot (per vehicle type).
Servicing in big depots take some time: service is not done instantly.
In big water depots, only one ship is allowed in each depot part and ships don't disappear in the depots.
In big road depots, each tile can only store three vehicles. If one road depot consists of x road type tiles and y tram type tiles, the depot can have at most x*3 road vehicles and y*3 trams at the same time.
In big rail depots, a depot can be made of different platforms of different rail types. If possible, the trains are placed in the depots and can be seen if transparency for depots is enabled. In some cases, trains can't be placed in the platforms (length, rail type, no free platforms...). Under such circumstances, trains will be in the "black depot wormhole", waiting for a free platform where to be placed.
These images show what the idea is about: I don't have much time to improve the patches, but I will continue working on them when I have time and post here any update.
You can change fonts and their sizes while playing: I also added some fonts and graphics needed in the bundle.
I am also toying with the idea of multi-tile depots, built like stations and with added limitations, changing the strange "black wormhole" effect that allows to keep lots of trains hidden in just one tile. First of all, the default behaviour of depots (small depots) isn't altered.
For big depots, there are some issues to fix, but I think that the feature is already playable. As a first approach, I thought about this rules:
In big depots, user can join different depot tiles under the same depot (per vehicle type).
Servicing in big depots take some time: service is not done instantly.
In big water depots, only one ship is allowed in each depot part and ships don't disappear in the depots.
In big road depots, each tile can only store three vehicles. If one road depot consists of x road type tiles and y tram type tiles, the depot can have at most x*3 road vehicles and y*3 trams at the same time.
In big rail depots, a depot can be made of different platforms of different rail types. If possible, the trains are placed in the depots and can be seen if transparency for depots is enabled. In some cases, trains can't be placed in the platforms (length, rail type, no free platforms...). Under such circumstances, trains will be in the "black depot wormhole", waiting for a free platform where to be placed.
These images show what the idea is about: I don't have much time to improve the patches, but I will continue working on them when I have time and post here any update.
Formerly known as Juanjo
Re: Patch: Juanjo's patches
Still an unfinished feature, but it is worth a video. An intercontinental airport handled with a new controller.
Formerly known as Juanjo
Who is online
Users browsing this forum: Bing [Bot] and 0 guests