Stunts Forum

Stunts - the Game => Stunts Related Programs => Topic started by: Cas on January 26, 2024, 05:27:42 PM

Title: Pretty Garage
Post by: Cas on January 26, 2024, 05:27:42 PM
Pretty Garage 1.2 - 2025-01-18
Feel free to try it. The program will try to auto-detect Stunts and your garage, but you may still want to edit pgarage.cfg before running the program. Some things can be configured while you use it. Let me know if the controls are intuitive to you.

Previous versions download:
2024-02-10 - 3 times
2024-03-08 - 6 times
Old pgarage.com - 3 times


--- Original post ---
Enter Pretty Garage
As I have been mentioning in the forum and Telegram group, I'm currently working on a new garage program. I'll call it Pretty Garage because in contrast with Simple Garage, its focus is more about the looks and comfort, although I can tell you it's simple too.

The current state of development is advanced, except for one very important feature that hasn't been implemented yet: automatic generation of car images. I left it for the end because it takes time and the program can be useful even before it has that.

So, what this is about is a visual program that you can use to move cars between Stunts and one or more garages, create groups, etc., the things that Simple Garage does, but visual. My idea is for the car lists to display a little image of the car to the left of the car name and information. For now, that side is empty. I'll prepare an alpha version and compile it and then share it with you guys, in case you want to test it. I don't think it has too many bugs. It's very stable for an alpha, but you never know.

Repositories and CRIs
One feature I'm going to include and is not implemented yet is the ability to access online car repositories. With the soon-to-come Car Archive, I think it'll be best to cooperate and see how much we can help one another in this. Anyway, my idea is to make Pretty Garage capable of reading different list formats. The program would periodically download what I'm calling "CRIs". CRI (Car Repository Index) is not a file format, but a type of file that contains certain information. It could be formatted as whatever can contain that. I'll probably make Pretty Garage support about three formats. The CRIs would provide a list of car IDs, their names and the files included in the package, so that the program knows those cars are available at that repository, then it car request the car files if the user wants to download them.

Closing
I'll soon be posting it and surely this first post will be edited to accommodate a link or package, then any discussion about the software can continue through the thread. Let me know if there's any feature that you guys consider very important or any question :)
Title: Re: Pretty Garage
Post by: Cas on January 26, 2024, 06:04:25 PM
Alright. I have posted the first alpha version. As you can see, no car images yet. Editing the pgarage.cfg file, you can set your directories, window size and everything else.

Controls as of now, more or less:

Some things to point out:
Title: Re: Pretty Garage
Post by: Duplode on January 27, 2024, 04:30:26 PM
I like the design of the new interface, and in particular how it handles groups -- it's quite a bit easier now to create an ad hoc group for swapping cars around. Worth mentioning the program does the "right" thing when you add a missing car (i.e. a car not in any garage) to a group: it handles it as an unknown car with zero files that can't be moved.

Quote from: Cas on January 26, 2024, 06:04:25 PMEditing the pgarage.cfg file, you can set your [...] window size

Kinda off-topic, but it would be nice to be able to set window size in the configuration file in Bliss and the other tools as well. (I've recently went back to XMonad as my window manager, and FreeBasic windows don't play nicely with it, the most worrying symptom being that it's rather easy to get stuck in full screen. My current workaround for that is setting the window size to something that isn't a standard resolution, so that the program won't be able to go full screen.)
Title: Re: Pretty Garage
Post by: Cas on January 27, 2024, 08:25:51 PM
I did the best I could with group handling, but I can tell you that that bit about the behaviour of unknown cars was partly luck. I'm very happy with the result, though!  When you list a group, Pretty Garage will try to identify where each car is found. It'll first look for it in Stunts and then in the garages in order. It'll report where the car is found and leave it as unknown otherwise. If repositories are added, I'm not sure yet if the listing should fall back to them if the car is not found in any garage, but if I do that, definitely repositories and online-based groups should be different things.

Yeah, I've realised too late that I could've been more flexible with window resolutions. Also, FreeBasic had a bug in the past when the program decided to change resolution at run time. It doesn't have it anymore. Now Bliss and CarWorks are designed for a fixed size and changing the resolution would mean a lot of modifications. For Bliss, maybe I go for version 3.0 at some point. The more I learn with this project, the more I'll be able to apply later.

Simple things that can't be done and I want to implement:
Title: Re: Pretty Garage
Post by: Cas on February 03, 2024, 05:01:34 AM
2024-02-03 Update

An update of Pretty Garage which now supports repositories. To test it, I had to simulate a repository first, then create a temporary one, so chance of bugs is a little more than before, but still, nothing serious should happen. I've left this repository at R4K for you guys to use in your tests and you can set up your own if you want.

How it works

There's the online configuration now. A variable called "lastupdate" that will automatically be set to the current date whenever you run the program. You can leave that one alone. There's another field called "autoupdate". I think "yes" is the best configuration for most cases. It means that Pretty Garage will only attempt to update your repository lists either if the date has changed (so once per day) or if it's not finding the list in your local files. If you set this to "always", it'll download every time. Set it to "no" and it won't try to keep your list files updated, but it will try to download if you attempt to load the list and the file is not present. Set it to "never" and well, it will never download any list.

In the default configuration, I've included the simple R4K repository I've been playing with. You'll see it on the right with the groups and garages. You can use it to run your tests.

If you want to create your own repository, look at the CRI file that's downloaded and create a file with the same format listing the cars you have, then place it in your website and provide the address line in the configuration. Notice that for each car, you need to give an address line to the zip file, so the files don't need to be located at your server. They could be anywhere. This means that Pretty Garage is already capable of handling downloads from the Car Archive when they become available.

Requirements

Pretty garage has not been compiled with third party libraries. Instead, https get requests rely on curl, so you need to have it installed and in your PATH. If you don't have it, you won't be able to use online features, but the program will still work for everything else. Similarly, for unzipping packages, you need an external command. You can use any external unzipper. Edit the unzip field in the configuration to specify the command and variables $targetdir and $zipfile at the positions where these parameters should go. The default configuration will work for InfoZip, which is frequently found in Linux installations.
Title: Re: Pretty Garage
Post by: Cas on February 10, 2024, 05:39:06 PM
2024-02-10 Update

This is the first version that could be considered "complete", although I do want to add some more things. In this release, I have finally added car image generation.

Things to notice


Let me know if you guys notice any bug other than wheels always facing front ;D
Title: Re: Pretty Garage
Post by: Erik Barros on February 11, 2024, 04:30:24 PM
I'm downloading it to use, thank you for developing this tool
Title: Re: Pretty Garage
Post by: Cas on February 11, 2024, 11:01:46 PM
Thanks!  Do let me know of any issues or if something is not comfortable. I still want to add a few things, like online groups, car information and some more powerful handling of groups and garages from inside the interface.
Title: Re: Pretty Garage
Post by: Cas on March 08, 2024, 11:05:24 PM
2024-03-08 Update - Version 1.1

This is the first version that has all the features I had originally planned for it, although some functionality that would add comfort is still not available.

New things
What's still pending
Title: Re: Pretty Garage
Post by: Cas on April 23, 2024, 11:37:15 PM
I've added the pgarage.com file to the downloads at the beginning of this thread. You can place the file with the rest of the package to run Pretty Garage in DOS. Make sure to edit the configuration and set the window size to 800x600 or it'll crash. In later packages, I'll just include the DOS binary with the set.
Title: Re: Pretty Garage
Post by: Duplode on July 08, 2024, 05:57:15 AM
A little late, but I have finally added the March 8th release of Pretty Garage to the Southern Cross downloads (https://scr.stunts.hu/mods.html).
Title: Re: Pretty Garage
Post by: Cas on July 08, 2024, 11:36:31 PM
Thanks!  I think I did a bug fix that I haven't published because I expected to make more changes... Right now I don't feel like doing all the recompilation and that, but at some point, I'll update it
Title: Re: Pretty Garage
Post by: Cas on January 18, 2025, 06:31:27 PM
2025-01-18 Update - Version 1.2

The enhancements in this version have to do mainly with making the first run easier and adding filters so that you can find and group cars in a more versatile way.

New things
To take into account
Title: Re: Pretty Garage
Post by: Matei on January 18, 2025, 08:53:34 PM
https://raceforkicks.com/projects/pgarage.php

pgarage-2024-03-08.zip -> pgarage-2024-03-08

./pgarage
./pgarage: /lib64/libncursesw.so.6: no version information available (required by ./pgarage)
./pgarage: /lib64/libc.so.6: version `GLIBC_2.38' not found (required by ./pgarage)
./pgarage: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./pgarage)

Everything is fine.
Title: Re: Pretty Garage
Post by: Cas on January 19, 2025, 06:28:26 AM
That is the old version. But that's no problem. Compilation instructions are in the package.
Title: Re: Pretty Garage
Post by: Duplode on January 19, 2025, 01:39:41 PM
Thanks for the update, @Cas ! Nice to see the integrated command prompt coming along.