Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pool
#31
hello OldMoses

was playing your latest pool game and my subconscious anger led me to max the power at 50 on all my shots, after a number of shots I saw the 14 ball roll on top side rail from right to left, I am guessing it's bug Big Grin
Reply
#32
(11-04-2022, 07:07 AM)Jack Wrote: hello OldMoses

was playing your latest pool game and my subconscious anger led me to max the power at 50 on all my shots, after a number of shots I saw the 14 ball roll on top side rail from right to left, I am guessing it's bug Big Grin

Let me guess, it entered this condition after hitting a side pocket bevel and just sort of wiggled along the bumper? If so, I believe it's getting confused as to which bumper normal to take and gets out of bounds, then it just rebounds along the wall vector, zig-zagging back and forth. I've seen it several times myself.

I implemented the following dot product test and tried it with with all full power shots, so far I haven't been able to get it to walk the rail anymore.

Code: (Select All)
 'in SUB ColCheck  

'CHECK FOR BUMPER INTERSECTIONS
    FOR x% = 0 TO 17
        IF NewlineSegCirc(bmp(x%), bl(var)) = 0 THEN _CONTINUE
        IF R2_Dot(bl(var).d, bmp(x%).n) > 0 THEN _CONTINUE '<<<adding this line should stop bumper walkers
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply
#33
(11-03-2022, 10:28 PM)johnno56 Wrote: Forgive me if I sound confused, chances are I am, but, what parentheses? I initially cut and pasted the listing from this site into the IDE then F5. The last time I ran it, using 3.4.0, I actually saved the game first as, 'pool.bas' then F5. I do not recall adding parentheses to any filename...

when you copy and paste a code in the editor, it is automatically renamed to :

for example Untitled(10), try to compile and you will get almost the same error message as you posted here :

https://qb64phoenix.com/forum/showthread...09#pid9109

g++ -no-pie -w -std=gnu++11 -DFREEGLUT_STATIC -I./internal/c/libqb/include -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_NO_ICON -DDEPENDENCY_NO_SCREENIMAGE internal/c/qbx2.cpp -c -o internal/c/qbx2.o
objcopy -Ibinary -Oelf64-x86-64 -Bi386:x86-64 internal/temp2/data.bin internal/temp2/data.o
g++ -no-pie -w -std=gnu++11 -DFREEGLUT_STATIC -I./internal/c/libqb/include -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_NO_ICON -DDEPENDENCY_NO_SCREENIMAGE ./internal/c/libqb_make_00000000000000.o ./internal/c/qbx2.o ./internal/temp2/data.o -o "untitled" ./internal/c/libqb/src/threading.o ./internal/c/libqb/src/buffer.o ./internal/c/libqb/src/filepath.o ./internal/c/libqb/src/threading-posix.o ./internal/c/parts/core/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt
objcopy --only-keep-debug "untitled" "./internal/temp2/untitled.sym"
objcopy --strip-unneeded "untitled"
Reply
#34
You are correct. At first, the compilation was performed on an unsaved (untitled) listing, and later saved and recompiled. The first displayed the error. The second displayed nothing.

Based on the current situation, I believe that the 'compillog.txt' file is 'just' that. A record of the successful compilation of the game. Successful, in the sense, that it did not produce an error. Unfortunately, it seems that the problem may be Linux based, and its apparent inability to handle QB64pe's '_DesktopWidth" and/or "_DesktopHeight".


The solution was quite crude. Instead of allowing QB64pe to determine the screen size of my monitor, I actually "hard code" the width and height of the screen and the game played correctly without error.

Regards

J
May your journey be free of incident. Live long and prosper.
Reply
#35
@johnno56

Another thing to try AFTER you save the file to avoid Untitled() thing,
put _Delay 1 before you call _DesktopWidth" and/or "_DesktopHeight".
b = b + ...
Reply
#36
(11-04-2022, 09:43 AM)Coolman Wrote:
(11-03-2022, 10:28 PM)johnno56 Wrote: Forgive me if I sound confused, chances are I am, but, what parentheses? I initially cut and pasted the listing from this site into the IDE then F5. The last time I ran it, using 3.4.0, I actually saved the game first as, 'pool.bas' then F5. I do not recall adding parentheses to any filename...

when you copy and paste a code in the editor, it is automatically renamed to :

for example Untitled(10), try to compile and you will get almost the same error message as you posted here :

https://qb64phoenix.com/forum/showthread...09#pid9109
What got me is that there was no error actually displayed. "C++ compilation failed" has to give the reason why it failed, not just the steps that it took to create input acceptable to "g++". That was weird in itself, the "compilelog.txt" only showing those commands. If there was an error, it should have been drawn frivolously by "g++", that's why I said "squiggles and whatnot" as that compiler tries to draw attention to where it thinks it found an error, and what is the error, and maybe a suggestion how to fix it such as enabling or disabling an invoke command flag. What was even weirder was the second launch of the program which produced no "compilelog.txt" but also "did nothing". That is an easy way for someone else to lose faith in this product.
Reply
#37
@bplus

Adding the '_Delay 1' prior to setting up the screen size, on an otherwise unedited listing, did in fact work without error.

In fact, I experimented with the delay as low as _Delay 0.0007 (struggled but mostly worked) but perhaps a delay of 0.1 should be okay... After all, a 1 second delay in computer terms, is almost an eternity... lol

J

Sorry... I do not know how to insert a 'user' link...
May your journey be free of incident. Live long and prosper.
Reply
#38
Good the problem is no longer a mystery and can be overcome. Smile
b = b + ...
Reply
#39
(11-05-2022, 02:58 AM)johnno56 Wrote: Sorry... I do not know how to insert a 'user' link...
You did it right, but this forum is moody sometimes.
Reply




Users browsing this thread: 3 Guest(s)