Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - justsomeguy

Pages: [1] 2 3 4
2
QB64 Discussion / OpenGL support
« on: February 20, 2022, 08:13:31 pm »
Hello all,
 I have a question for the developers. I've noticed that OpenGL commands have been scrubbed from the "HELP" in the later versions, but it seems that the commands themselves are still active and working.
  • Is OpenGL being depreciated, and eventually dropped all together?
  • Is there another alternative i.e. Vulkan that will be added?
  • If not, what version of OpenGL is currently supported?




3
QB64 Discussion / Re: I'm getting a inconsistant error
« on: February 04, 2022, 02:19:10 pm »
It appears @SMcNeill suggestion was correct.
Quote
My suggestion would be to try adding a few _Delay statements into your code at various points (especially at initialization) and see if the issue goes away.  If so, then you can narrow down on the *exact* line that's causing the glitch, and just add a single _Delay before it and resolve the issue.

I put a delay before initializing the screen and I was able to restart multiple times without issue.

Thanks for your help guys!

4
QB64 Discussion / Re: I'm getting a inconsistant error
« on: February 04, 2022, 02:06:01 pm »
I ran it in a debugger and I got the same error message. So I did a little bit of googling and came across this https://github.com/SFML/SFML/issues/1696 It pertains to SFML -Simple and Fast Multimedia Library, which I can only assume that QB64 is using. The Reply to the question was:
Quote
When using threads on Linux you need to be calling XInitThreads as the error messages suggests.
Keep in mind that you should not be using globally initialized SFML resources.
And when you do multi-threading, you have to properly synchronize the shared resources (the sprite and boolean in your case).
I did not plan on digging into the inner workings of QB64, but It seems the issue is coming from that side.


5
QB64 Discussion / Re: I'm getting a inconsistant error
« on: February 04, 2022, 01:23:12 pm »
 [ You are not allowed to view this attachment ]  

Yea, Like I said it will compile and run fine about half of the time.

6
QB64 Discussion / I'm getting a inconsistant error
« on: February 04, 2022, 12:42:08 pm »
Hello

I'm sorry about bothering you guys, but I keep getting an error that is intermittent. About half of the time it compiles and runs with no problem, the other half it core dumps with the following error.
 [ You are not allowed to view this attachment ]  
Code: QB64: [Select]
  1. [xcb] Unknown sequence number while processing reply
  2. [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
  3. [xcb] Aborting, sorry about that.
  4. RougeLike_1_1: ../../src/xcb_io.c:639: _XReply: Assertion `!xcb_xlib_threads_sequence_lost' failed.
  5. Aborted (core dumped)
I'm currently using the 2.1 Dev build. I'm not using multi-threading my code.
I am running Linux Mint 19.1 (Yes, It is up to date). My computer specs should be more than enough. I have tried it on my Windows machine and it seems to work fine with crashing.

I have enclosed the project, so you can test it on your end.  [ You are not allowed to view this attachment ]  




7
Programs / Re: Try an Othello game that was published in 1977
« on: May 19, 2021, 07:25:41 pm »
@DANILIN Cool thanks for that!

8
QB64 Discussion / Re: Errors in an $include file
« on: May 17, 2021, 09:18:36 pm »
@SMcNeill You method seems to work except minor thing. I had to use the $LET.

I had to change it to:
Code: QB64: [Select]
  1. $IF VARIABLENAMEYOULIKE = UNDEFINED THEN
  2.     $LET VARIABLENAMEYOULIKE = TRUE
  3.     SUB MyLibrarySub
  4.        .
  5.        .
  6.        .

This works good. THANKS!

9
QB64 Discussion / Re: Errors in an $include file
« on: May 17, 2021, 07:39:00 pm »
Thank you gentlemen! You have given me some options. This will go a long way to clean up the code.

10
QB64 Discussion / Re: Errors in an $include file
« on: May 16, 2021, 09:03:58 pm »
Quote
TYPEs can be placed anywhere in your program though (even between subs/functions)

@FellippeHeitor  Well to expand on my example. I'm trying to refactor the physics engine I'm working on, and I literally use some TYPEs like 'tVECTOR2d' all over the place. I have numerous modules using 'tVECTOR2d'. So, declaring the type in the module wont clear the error in the other modules.

I was just wondering if my implementation is incorrect, or some command to tell the module that it is a module and suppress that error?

11
QB64 Discussion / Errors in an $include file
« on: May 16, 2021, 08:25:51 pm »
Hello

I'm getting an error in files that I've included into my main program. I know the cause of the errors, but they are not really errors.

For example my main program will look like this.
Code: QB64: [Select]
  1. '**********
  2. ' Main Program
  3. '**********
  4. Type tTEST
  5.     a As Integer
  6.  
  7. Dim test As tTEST
  8.  
  9. test.a = 5
  10. Print test.a, aPlus(test)
  11.  
  12. '$include :'TestModule.bas'

And my module will look like this.

Code: QB64: [Select]
  1. '**********
  2. ' TestModule.bas
  3. '**********
  4. FUNCTION aPlus (t AS tTEST)
  5.     aPlus = t.a + 1

Don't get me wrong, the main program works and it compiles with no errors.

The problem arises when I want to edit my module. I get an 'Illegal SUB/FUNCTION parameter.' This makes sense since because it has no idea what a 'tTEST' in this context.

Have I missed something? Is there some clever workaround for this?

12
Programs / Re: Simple Pool Game in QBasic
« on: May 16, 2021, 02:52:49 pm »
Quote
I was thinking to counterbalance the left cue ball for selecting Left and Right English, at Right bottom corner, use for Angle and Power numbers then use +-  or {} or [] <> some natural pair keypress for increase and decrease angle and power should be as easy to change as the Left right arrows for English (save up and down arrows for cue ball of course).

I like it! I'll see what I can do.

13
Programs / Re: Simple Pool Game in QBasic
« on: May 16, 2021, 02:35:46 pm »
@bplus You are absolutely correct about about the mouse control being too difficult get that precise shot. I end up zooming out to get a little more fine control on the stick, but end up hitting way harder than intend. However, I was playing it on my Microsoft Surface and playing with a touchscreen is awesome, I might give the users a choice on how to aim.

The space bar does shoot, but it is about twice as hard. Per your suggestion this will probably change.

The left and right spin 'English' is simulated by putting angular velocity on the cue ball like you do in real pool. Because the engine is 2D, I'm not sure the best way to simulate angular velocity in a dimension it does not have (top and bottom). I have had a little success with playing with restitution of the cue ball, but it can only approximate top spin and not draw. Over all not a good solution. I will have to ponder this one.

Right now I'm going to see if using InForm would be a good choice for a GUI and, that would give access to real time tweaking of parameters and some options for varying the play style.

I had planned on circling around back to the aiming issue, so expect an up date in the near future.


 


14
Programs / Re: Simple Pool Game in QBasic
« on: May 15, 2021, 10:55:27 pm »
Quote
Can I assume that the table cloth colour can be changed? Say... to blue... lol (just for you bplus... lol)

Can do! Just insert this in 'SUB animateScene ()'

Code: QB64: [Select]
  1.     IF _KEYDOWN(ASC("B")) OR _KEYDOWN(ASC("b")) THEN
  2.         _SOURCE textureMap(19)
  3.         _DEST textureMap(19)
  4.         DIM AS INTEGER x, y, r, g, b
  5.         DIM AS LONG c
  6.         FOR x = 0 TO _WIDTH
  7.             FOR y = 0 TO _HEIGHT
  8.                 c = POINT(x, y): r = _RED(c): g = _GREEN(c): b = _BLUE(c)
  9.                 IF g > 96 THEN
  10.                     PSET (x, y), _RGB32(r, b, g)
  11.                 END IF
  12.             NEXT
  13.         NEXT
  14.         _SOURCE 0
  15.         _DEST 0
  16.     END IF

15
Programs / Re: Simple Pool Game in QBasic
« on: May 15, 2021, 09:16:34 pm »
@bplus Hold down the TAB key and see what happens.

Pages: [1] 2 3 4