News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Pretty Garage

Started by Cas, January 26, 2024, 05:27:42 PM

Previous topic - Next topic

Cas

Pretty Garage 1.1 - 2024-03-08
Feel free to try it. You may want to edit pgarage.cfg before running the program. Still some things can be configured while you use it. Let me know if the controls are intuitive to you.

Previous versions downloaded 1, 5 and 3 times. Updating Zip


--- 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 :)
Earth is my country. Science is my religion.

Cas

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:
  • Right mouse button to select cars. Combine with SHIFT and CTRL
  • Left mouse button to drag cars from one side to the other
  • Left and right buttons on the right hand side panel to select a garage or group
  • Ctrl+drag to create a group out of a set of cars
  • Del to delete cars
  • Shift to force actions that get denied
  • Right mouse button at the top of lists to edit garage/group name and directories
  • Esc to exit saving the configuration
  • Ctrl+Q to exit without saving the configuration

Some things to point out:
  • Dragging from a garage (or Stunts) to another moves cars and their files
  • Dragging to a group copies a car (but not the files, of course)
  • Dragging from a group to a garage finds the cars that are missing at destination and moves them from their source garages
  • If a garage called something that begins with "Junk" exists, deleting actually moves cars there. Otherwise, it's permanent deletion and you get a warning
  • Deleting from the Junkyard is always permanent deletion
Earth is my country. Science is my religion.

Duplode

#2
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.)

Cas

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:
  • Ability to remove groups from the interface
  • Ability to create and remove garages from the interface
  • Ability to reorder groups and garages
  • Maybe auto-selecting a single car with the left mouse button if none is yet selected
Earth is my country. Science is my religion.

Cas

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.
Earth is my country. Science is my religion.

Cas

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

  • When you browse any list, Pretty Garage will check the icons subdirectory for cachéd car images. If an image is found there, it'll use it
  • If no cachéd image exists and you're browsing Stunts or a garage, the program will try to generate an image from the shape file, which should be uncompressed. If so, it'll add the image to the caché
  • If the car shape is compressed and you have configured a target directory for stunpack, Pretty Garage will try to use it to uncompress the shape and then generate a caché image
  • If you want to force image regeneration, you can delete the caché images from icons
  • The program will always use the first paintjob (for now)

Let me know if you guys notice any bug other than wheels always facing front ;D
Earth is my country. Science is my religion.

Erik Barros

I'm downloading it to use, thank you for developing this tool

Cas

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.
Earth is my country. Science is my religion.

Cas

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
  • Star feature of this release: online groups. Basically, when retrieving a CRI, it can either be a true car repository index, with a location from where to download the cars, or a list of IDs separated by commas, an online group, that is. It is a lot easier to set up the second one on websites, but it's not the same thing. It depends on what you want to achieve.
  • A manual.txt file where you can learn about the shortcut keys and the different options in detail
  • Cachéd images of the cars are included
  • A small feature to force re-create the image of a car that also allows you to select the paint job for it

What's still pending
  • Some way to configure from the interface, especially on first run, to be able to set up your directories and not have to edit the configuration file manually
  • Ability to create, reorder and modify garages easily from the GUI
  • Some commands, like to quickly add cars to a group or create a group based of a name filter
  • The equivalent to the "only" command in Simple Garage
Earth is my country. Science is my religion.