|
Post by n00b on Nov 23, 2020 11:08:09 GMT -6
Can you post your code so I can troubleshoot the issue?
|
|
|
Post by rosy on Nov 23, 2020 16:01:27 GMT -6
i do... Attachments:ZXa.BAS (15.42 KB)
|
|
|
Post by n00b on Nov 24, 2020 13:14:46 GMT -6
Your issue is with SetCanvasColorMod. Try setting the color mod to RGB(255,255,255) instead of -1 on line 195.
|
|
|
Post by rosy on Nov 25, 2020 7:23:01 GMT -6
Did you test it At stage 1, the garbage did not show up?
|
|
|
Post by n00b on Nov 25, 2020 9:20:23 GMT -6
Here is the APK I built with the change to SetCanvasColorMod on line 195. I tested it on a pretty old phone and it did not have any garbage that I could see. You should probably make that same change on every line where you are setting color mod to -1. Cart APK
|
|
|
Post by rosy on Nov 28, 2020 14:26:45 GMT -6
You can see the canvases, there is still a problem with colors ... But now I struggle with speed.
The last step is simple, but still works slowly. I removed what was possible, it sped up ... IT SEEMS that a slight acceleration was away from the conversion of RIGHT $ to MID $ and STR $ to CHR $, finally I changed the operations on the chain to arrays, but I'm not sure either ...
More quirks:
1. Immediately after starting it works significantly faster and slows down after a while.
2. I didn't want the items to be drawn the same in a row. I made a mistake, but Windows did not have 2 rockets in a row, and Android did. Apparently, random generators work differently,
|
|
|
Post by n00b on Nov 28, 2020 15:16:49 GMT -6
To improve performance you should try to reduce primitive draw calls ( box, line, rect, etc. ) and use images as much as possible. And for most cases, you only want to call UPDATE once during your main loop.
|
|
|
Post by rosy on Nov 29, 2020 13:45:52 GMT -6
However, this is not a random generator, but rather a lack of protection against exceeding the range of the array and different behavior when using the negative index of the array. There is still a problem with colors and garbage. And more spells appeared: During the balloon flight (Sub "BALON") stops responding to the held finger, you have to release it and press again. It also happens suddenly exiting the program. The code included earlier, I ran it several times and it worked OK, below I include a new code, which sometimes works OK, but usually bad. Riddle - what's the difference? I improved the "TASMA" stage and the speed is OK, although I did not check on slower equipment. Ah ha ... In the earlier version (ZXa) I commented on GP and PEUGEOT to enter BALON right away, it did not run under Android at all ... Eggs, normally ... Someone tested RFO Basic! ? How does it look in terms of speed? Attachments:main.BAS (15.64 KB)
|
|
|
Post by n00b on Nov 30, 2020 10:09:46 GMT -6
There is no protection against exceeding the range of an array. You will have to check to make sure you are in range yourself.
To fix the problems with colors and garbage try calling CLS after opening the window and ClearCanvas after opening each canvas. You should probably just use ClearCanvas each frame.
I would suggest you use the touch commands if you are not already. I will look at your code when I get some time.
I have tested RFO basic and it ran pretty well for me in terms of speed but I never did anything all that complex with it. It was built specifically for android so it probably runs faster than RCBasic on android but I have never done a real comparison between them.
|
|
|
Post by rosy on Dec 1, 2020 5:16:01 GMT -6
I tried TOUCH and it's the same. The procedure is the same in both programs, but one works OK, the other wrong ...
I think she can cope with the speed of action and I hope that the rest will also be quite OK, but I need a working GetColor ...
|
|
|
Post by n00b on Dec 1, 2020 13:37:30 GMT -6
With touch, check each finger. It could be that you had 2 fingers on the screen and the finger you were checking got reassigned.
I am still working on a few more bugs and performance optimizations before I can upload another release. It should be up by the end of next week.
|
|
|
Post by rosy on Dec 2, 2020 9:02:26 GMT -6
It's nice how GetPixel would work on virtual without UPDATE ...
|
|
|
Post by rosy on Dec 5, 2020 16:34:48 GMT -6
And what about this effect on UPDATE keyboard reading? I did different UPDATE frequencies and I did not notice any differences in the operation of KEY or INKEY ...
|
|
|
Post by n00b on Dec 7, 2020 3:00:23 GMT -6
UPDATE only needs to be called once through your mainloop. It will update the state of the keyboard when its called and KEY and INKEY will read that state.
|
|
|
Post by rosy on Dec 7, 2020 4:42:17 GMT -6
But I do, for example, every 4th mileage and I do not see the difference ...
|
|