Stunts Forum

Stunts - the Game => Custom Cars with Stressed => Topic started by: GTAManRCR on March 15, 2023, 06:31:15 PM

Title: Trying to create a bicycle
Post by: GTAManRCR on March 15, 2023, 06:31:15 PM
The bicycle I'm trying to create is a Csepel bicycle but I have no idea how to finish it
This is a Csepel bicycle and is very slow
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 15, 2023, 06:32:16 PM
This is how the bicycle would look like
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 15, 2023, 06:54:02 PM
A thing to already start thinking about: the minimum height for the non--transparent part of the dashboard is something like 47 pixels. Below that gameplay footage is not rendered and if it isn't covered the game will start loading random junk, like the curtains from the car selection showroom.
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 16, 2023, 04:31:58 PM
The dashboard is higher now
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 16, 2023, 05:25:48 PM
I hadn't even seen the files yet :-[ Something something reading on my phone.

Your images are more than high enough, even in the first version. But if you try to play with these in game what you'll see is probably a big black block in the bottom of your screen with the handlebar drawn on that black block. What I'm assuming you would actually ideally like is to have the handlebar visible, but all the stuff around it transparent. The good new is: you can do that, with the dast and dasm images you can create a transparent part of your dashboard. The bad news: there has to be a non-transparent block that's at least 47, 48 or 49 pixels high, I'm not quite sure which one it was anymore, but it's relatively easy to test.

How this non-transparent/transparent divide works can be seen in the Indy, or (fittingly) Ryoma's motorcycle (https://forum.stunts.hu/index.php?topic=3966.0), or in the Superkart (https://forum.stunts.hu/index.php?topic=2578.msg46351#msg46351), which is where I learned about the minimum height. So ideally, to make it look good, you'd want something to block the bottom part of the view. Maybe a cargo crate or something???

Your second challenge is to make the handlebar look like there's some proper perspective going on. This is superhard. I've just did a little bit of perspective work for the car I'm working on, it took me way too much time. One thing you can do is take reference pictures for how a bicycle handlebar looks when turned from the point of view of the rider. You won't be able to just cut the view out and paste that into the game, but at least you have something to try to mimic or trace or adapt.

What will work is using the whole handlebar as whl1,2,3 images, showing the whole thing moving.

As a Dutch person, I think it's awesome that you're doing a bicycle! It's a very unique project, and I hope you find a good way to make it all work in a way that you're happy with it!
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 16, 2023, 06:06:58 PM
Quote from: Overdrijf on March 16, 2023, 05:25:48 PMAs a Dutch person, I think it's awesome that you're doing a bicycle! It's a very unique project, and I hope you find a good way to make it all work in a way that you're happy with it!

Thank you for thinking this. I'll try to make this bicycle, but I can't guarantee that I'll finish it because my lack of knowledge. I'll tinker around the dashboard
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 16, 2023, 07:10:09 PM
Another update
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 16, 2023, 10:39:31 PM
I just realized, all of the steering parts have to fall inside the non-transparent parts as well. At least, ins1 and ins3 are anchored to ins2, so I assume they also can't be bigger than it.

...This is a tricky build.
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 17, 2023, 05:53:09 AM
Can I remove the dot?
Bicycles don't have steering wheels
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 17, 2023, 07:33:14 AM
If you remove the image dot completely the game might crash (one way to find out) but you can make dot a one pixel image and then make that one pixel completely invisible by using dotm.

All the images ending in m are masks, dasm for dast, inm1 and 3 for ins1 and 3 and dotm for dot. They tell the game which parts should be visible and which shouldn't. If your dot image is all black and your dotm image of the same size is all transparent you won't have a dot. (This explanation brought to you by the association of people who don't know how much you already know.)

Edit: alternatively: you can have the dot just move from left to right in a straight line or any other pattern you like, it doesn't have to move in a circle. That's done by setting the dot coordinates using Carworks (should be the fastest option but I don't know how to do it, ask Daniel 3D) or Car Blaster.
Title: Re: Trying to create a bicycle
Post by: Daniel3D on March 17, 2023, 09:11:33 AM
Quote from: GTAMan18 on March 17, 2023, 05:53:09 AMCan I remove the dot?
Bicycles don't have steering wheels
you could make the dot move in a line to simulate the centre of gravity.
It's easy with carworks because you can create a flat arc (thus s line)
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 17, 2023, 03:53:39 PM
This INS2 gets ruined by Stressed
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 17, 2023, 04:55:57 PM
What does Stressed do? Make it all spotty and dithered?
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 17, 2023, 05:00:17 PM
Yes, basically
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 17, 2023, 05:01:15 PM
However, I updated the bicycle to only have one gear
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 17, 2023, 09:12:33 PM
Quote from: GTAMan18 on March 17, 2023, 05:00:17 PMYes, basically

Okay, that one because of the palette. Stunts can only make use of 255 colors, a specific set of 255 colors. This set:
(https://wiki.stunts.hu/wiki/File:Stunts-pal-vga.png)
Apparently I can't show an image from the Stunts wiki here. Here it is as a link. (https://wiki.stunts.hu/wiki/File:Stunts-pal-vga.png) And here's the page it's on. (https://wiki.stunts.hu/wiki/Resource_file_format)
(Okay, there are less than 255 colors, because there are duplicates.)

Stressed converts your images into the format Stunts uses. There is no way to get around this limitation.

There are two good ways to make sure the game doesn't make any unwanted changes to your colors:
1 Use only these colors.
2 Manually convert your images to "modus: indexed" using a palette with only these colors, and correct anything you don't like in the indexed file before saving it as a gif. These gifs can be imported into Stressed without problems.

A mix of these two is usually the best. You don't want to lose the ability to do things like color gradients and scaled images completely by only pixelarting with the right colors. Just do all that stuff before converting it.

I attached the palette file I made to use for this. I had great trouble finding this file since forever, I even remade it the last time I moved to a new computer, but it turns out GIMP saves its user made palettes in a different place than the ones installed with the program. I wish I could give you detailed instructions on where to put it, but even if you also use the GIMP you're probably about a dozen versions ahead of me, I'm stuck on 2.2 because I'm too lazy to learn where the new versions put everything. You can also make a file like this yourself through the palette editor, just enter every single color that's in the image above. It's a bit tedious, but it saves you so much trouble in finding out in Stressed that your colors didn't quite match.
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 18, 2023, 09:45:16 AM
Another update, now the steering wheel is a straight line
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 18, 2023, 09:49:54 AM
I think the transparent parts need to be black
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 18, 2023, 09:56:31 AM
I created a proper dast and dasm but the dashboard is still not transparent
However I fixed the turning issue on it, so if you corner either left or right the middle part of the dashboard will be in a fixed position
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 18, 2023, 11:09:30 AM
Quote from: GTAMan18 on March 18, 2023, 09:56:31 AMI created a proper dast and dasm but the dashboard is still not transparent

Your dash and your dast are in the same position, and your dash is not transparent. dasm applies to dast, but not to dash.

This also gives you a good opportunity to see the issue I was talking about earlier. Put the Y position for dash at 199, leave the position for dast and dasm as it is. You will be able to see the transparancy, but you will also be able to see, well, the issue with too much transparancy...
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 18, 2023, 11:39:32 AM
I tried this method earlier, but then whl1 and whl3 won't show up
Title: Re: Trying to create a bicycle
Post by: Daniel3D on March 18, 2023, 11:57:23 AM
About transparency.
The lower part gives trouble with that
But I think that I have a typical Dutch solution.
Title: Re: Trying to create a bicycle
Post by: Overdrijf on March 18, 2023, 12:27:43 PM
Quote from: GTAMan18 on March 18, 2023, 11:39:32 AMI tried this method earlier, but then whl1 and whl3 won't show up

That's yet another issue, yes, whl1 and 3 need to be on dash, not dast. The meters and the dot (you know, the one you're not using) too.

Dast seems to have been added as an afterthought. As a result it's drawn last and on top of everything else.

So yeah, a fully functional bycicle is a pretty big challenge.
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 18, 2023, 01:49:10 PM
I'll try to repair it later
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 18, 2023, 06:03:09 PM
It'd be great if whl1-3 could be masked the way dast can be
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 19, 2023, 08:44:14 AM
I decided to make whl1-3 segments a black line as they can't be masked and they're hidden in the bottom part of the dashboard, which is a box
And repaired the steering wheel
I don't want tachometer so I moved it out of the instrument. This way the tachometer doesn't show up
Title: Re: Trying to create a bicycle
Post by: GTAManRCR on March 19, 2023, 08:45:18 AM
Now I clarify this version a beta, as I don't have the bicycle model yet
Title: Re: Trying to create a bicycle
Post by: Daniel3D on March 25, 2023, 09:49:45 AM
Quote from: Overdrijf on March 17, 2023, 09:12:33 PMI attached the palette file I made to use for this. I had great trouble finding this file since forever, I even remade it the last time I moved to a new computer, but it turns out GIMP saves its user made palettes in a different place than the ones installed with the program. I wish I could give you detailed instructions on where to put it,
its easier than you think in the current version.
Load a stunts image that is exported with stressed. (i used a menu screen).
The "Palettes" dialog is a dockable dialog; see the section Section 2.3, "Dialogs and Docking" for help on manipulating it.
You can access it: