|
Post by rosy on Dec 11, 2020 5:22:23 GMT -6
It works better on another phone.
Well, strange that the main.bas, which I included earlier, works terrible for me, and another version is much better, although the procedure is the same ...
And in other games I didn't notice any problems. I will now pay more attention to it ...
|
|
|
Post by rosy on Dec 12, 2020 9:00:03 GMT -6
How is KeyColor deleted? I still have a problem with GetPixel. I attach the code. From line 415 there is collision detection. The white pixels on the corners of the car are the detection sites. In android, it does not always detect black (the sound of a shot), other colors (red, blue) probably OK. Looks OK on Windows. Attachments:main.BAS (20.37 KB)
|
|
|
Post by n00b on Dec 12, 2020 12:37:42 GMT -6
You can change color key but you can't really delete it. If you want to keep the base image the way it is then use CopyImage and set the color key on the new image.
I ran your game and it worked the same on both windows and android for me.
On another note, I do think you should change how you are doing your collision detection. The performance is so slow that it is basically unplayable. GetPixel() is really slow in RCBasic because color data is not stored in RAM. All images and even the canvas is stored in GPU memory. It may seem like a weakness but its actually a strength if you optimize for it. The best way to do that is to limit your use of functions that access pixel data directly when performance is important: GetPixel(), ColorKey(), WindowClip().
You can use CanvasClip() as much you want. Just set flag to 1 and it won't access pixels at all.
I will add some more notes about this in the manual when I get some time.
|
|
|
Post by rosy on Dec 12, 2020 13:52:50 GMT -6
So if I set Colorkey, I can't take it back anymore? And how do you set up another Colorkey?
How I changed Rectfill On Drawtex the performance is ok, I added Wait for tests ...
Maybe I'll make a movie and show that getpixel does not work ...
|
|
|
Post by n00b on Dec 12, 2020 21:29:16 GMT -6
So if I set Colorkey, I can't take it back anymore? And how do you set up another Colorkey? You can change the colorkey but you can't unset it. And you can possibly add another color key by copying the image to a different slot after you set the color key although I have not ever tried that so I do not know if that would actually work.
|
|
|
Post by rosy on Dec 13, 2020 2:59:18 GMT -6
I made a movie, but the image has gone apart with the sound. When on an android I leave the route to a black field, I hear shots sometimes, sometimes not, and they should always be heard. Hope you understand it. www.youtube.com/watch?v=wIU3bl46RdUp.s. Wait, however, removed ... Turns slowly, because the tires wear out after leaving the route and skidding.
|
|
|
Post by n00b on Dec 13, 2020 13:20:04 GMT -6
I have re ran my test on GetPixel and it is working correctly. I can't really understand your code well enough to find whats causing your issue but maybe you could try checking for a color other than black and see if that fixes it.
|
|
|
Post by rosy on Dec 13, 2020 14:13:15 GMT -6
I checked again and e.g. red is not always detected either. On Windows it works OK.
What don't you understand there? I substitute GetPixel for the BUM variable and depending on the color, a sound is issued ... A white pixel Pset is drawn in the place of checking. This is in Sub Peugeot, from the 415 line. Got to get the sounds from my game. And it's best to post Wait 100 or 50 after Update
Well no ... now I checked in Windows and when the car is set straight it also does not detect ...
I removed these white dots and in Windows is OK. I don't understand why they only disturbed at zero turnover ...
In Android, detection of other colors has improved, black is still a problem.
Maybe it's a transparency or scaling problem ...?
Because black is a black background.
I did an additional test - detection in the center of the window. The same - it detects other colors, black yes and no.
|
|
|
Post by rosy on Dec 28, 2020 17:44:20 GMT -6
I understand that I have more errors not to report ...
|
|
|
Post by n00b on Dec 29, 2020 9:16:12 GMT -6
Please create a thread in bug report and list the errors you are getting. I will try to have them fixed in the next release.
|
|
|
Post by rosy on Dec 30, 2020 7:43:30 GMT -6
I do not want to expose myself to further accusations that I am criticizing ...
|
|
|
Post by n00b on Dec 30, 2020 10:30:57 GMT -6
If you have a legitimate bug then it benefits everybody to report it. Just be aware that it probably isn't going to get fixed as quickly as you might like. I am just one guy who does this in his free time.
And there are some cases where a bug could either be a problem with one of the libraries RCBasic uses or a quirk that is specific to a operating system. If that is the case I usually put workarounds for it in the release notes.
|
|
|
Post by rosy on Dec 31, 2020 7:02:47 GMT -6
These are a few more comments. The slow operation is not Android's fault, but the window size. In the larger window, the program runs slower also in Windows.
I was wondering why the image is not stretched on the phone. It turned out that I unconsciously chose the window size well as 640x400, these are almost the same proportions as windows in android. It turns out that the old computers worked on widescreen screens. For example, the maximum resolution of Atari - 320x192 is exactly the same proportions as in the phone. But it is still strange that another phone, with a higher resolution, has different proportions, and still different when we measure the screen with a ruler - about 2: 1 for both the same. Nevertheless, the image looks OK on all these screens, it is strange again, maybe the differences are hard to notice ...
|
|
|
Post by n00b on Dec 31, 2020 9:45:37 GMT -6
On Android and IOS the image should be stretched to the entire screen. I have only tested it on my phone which is a Samsung Galaxy A20. Before that I had a Samsung Galaxy J5. Both phones run everything I tested on it without issue.
There could be compatibility differences between phones that I am not aware of or it could be an issue with the specific version of OpenGL ES that phone is running. I could do some research on this.
|
|
|
Post by rosy on Dec 31, 2020 10:33:14 GMT -6
No problem. I was only surprised that there were no distortions.
|
|