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 - Colonel_Panic

Pages: 1 [2] 3 4
16
Programs / Re: Exploding logo
« on: December 25, 2021, 12:46:58 pm »
Well, I never was in love with GIMP calling them "filters" anyways.
But, now its the word i use for it, "filter".

I assume you have seen "ALPHA TO LOGO" set of filters in GIMP?
some versions have the alpha to logo filter collection, some dont.

anyways, from your description of your "particle trace" routine...
I had the idea of... someone else makes a "different filter" and it gets added to a list...
a routine for editing TEXT and controlling text attributes...

and BING, we would have a "alpha to logo"  little IDE going on. We could slowly assemble extra filters, as people took it upon themselves to write a new filter...

In GIMP? I can only do ONE alpha-to-logo FILTER at all... if i want to go and do a "frozen" over top of the "sparkle" filter? It undoes it, and re-does the new one... I want to run BOTH one after the other...

the whole thing SOUNDS way more complicated than it actually is.
(if YOU dont want to play with this idea? i will try it in my spare time)

17
Programs / Re: CLOCK.BAS
« on: December 25, 2021, 12:36:47 pm »
to everyone: thanks for the warm welcome.
@frost: YES... you have the "airport clocks".

very attractive "airport clocks".

18
Programs / Re: Exploding logo
« on: December 24, 2021, 06:39:32 pm »
you got me thinking particle trace; GIMP filter... ?

19
QB64 Discussion / different C compilation things ?
« on: December 24, 2021, 01:44:30 pm »
okay... I read about the part where you can add "debug" information at compile time
and it exposes variable names and increases file size

why cant  run from a "minimalist" linux setup? shouldnt my "freestanding" exe
fire up and execute even on some "micro" or "nano" linux?

a online buddy suggested I could "compile" in such a manner as to include the "graphics stuff" into the compilation??
to MY ears, it sounded similar to the DEBUG flags in the IDE...

I mean, why cant i make a graphical application, and its the little GUI for some tiny linux??
is what i am asking sane and coherent? i just want to run my C executable on (minimalist) linux

20
QB64 Discussion / Re: Error compiling sound programs on Linux. Error log...
« on: December 24, 2021, 01:36:09 pm »
i dont get compile errors; i just experience... sound doesnt work and it gets "skipped"
OR, the sound is a horrible popping noise. when it even "tries"

my "click sound" in my GUI project? is actually a really SHORT "popping" noise error... its just so
SHORT that you perceive it as a ghetto-click sound... but its in reality a short FUBAR

21
QB64 Discussion / Re: Error compiling sound programs on Linux. Error log...
« on: December 24, 2021, 02:23:51 am »
I have "general sound issues" with QB64 on Linux Mint
other linux mint users dont experience what i do
maybe i need to sudo apt get some stuff too?

22
Programs / scaled graphics / window management
« on: December 24, 2021, 02:06:19 am »
okay, this is a weird one.

I scale this listbox to ANY size
clickable and accurate to the pixel at any size.
(it reports which folder clicked on, see if you can get it to be "wrong", I cant, i gave up and called it "accurate")

its got 777 folders for the demo.

just read the instructions...

23
Programs / river-raid style demo
« on: December 24, 2021, 01:27:15 am »
I am fooling around with "large internal images" and how to use them.

there are 2 programs in the folder...
milliontest2 and milliontest3

#2 is a river-raid style demo of a vertical scroller.
Use the 4 arrow keys for other movement, but, the vertical "pull" is constant, like gravity
NOT a game, just the scrolling engine

#3 is a "SUB HUNT" type demo...
same IDEA, different image, you move around the sea map.

NOTE: I included a bunch of extra "maps" to play with
if you peek at the first couple lines of code? you will see where you change
how many vertical tiles and how many horizontal tiles

<esc> to exit both programs

24
Programs / text file browser
« on: December 24, 2021, 12:26:16 am »
I wanted to make one of these things for a while.
last time i was on the internet? I *almost* got it working enough to post it, but...
knew to wait until I had the bug worked out.

very basic and straight-forward.
this TEXT version works out of CWD$

this is a linux only deal, due to the way I SHELL out.



25
Programs / Re: Language
« on: December 23, 2021, 09:13:06 pm »
Hi everyone... I'm back for a few days on the internet.
whoever else here says:

"I use parentheses for stuff like this !"

they are in agreement with me.
I intend to next use this thing when I want to do "algebraic notation; calculated fields"
on my database. I *think* as long as I use parenthesis, I will be fine to
for instance calculate sales tax.

PS - I myself would "routinely" use (-2) to represent negative 2 to avoid MY OWN confusion, regardless of what the compiler thinks.
I mean, as my own programmer? I want to just GLANCE at a screen of code and see what I was doing.

26
QB64 Discussion / smallest LINUX that will run compiled QB64 ?
« on: November 08, 2021, 12:53:30 am »
I mean, QB64 creates a standalone executable, a C executable.
the holy grail of linux.

question --- smallest LINUX distro anyone got QB64 executables to run on?

27
Programs / Re: Space Invaders
« on: November 07, 2021, 11:21:29 pm »
did you try compiling the BAS file?
(remember to use *EXE in the folder option)

28
Programs / Re: Space Invaders
« on: November 07, 2021, 11:17:22 pm »
I just went and played 3 screens worth.... fine.

line 301, I checked "my" code here that I just deployed from
then
I went in and checked the ZIP folder I deployed from...
THAT line 301, in the BAS file? its the same there...

line 301:
    aliens_at = aliens_at + alien_d

29
Programs / Re: Language
« on: November 07, 2021, 11:04:54 pm »
it is *supposed* to do:

addition, subtraction, multiplication, division, exponent

if you peek at the code around line 120+ you will see where "any operation"
between 2 values, the operand could easily be inserted and the result calculated.
fairly easy to add math operations one at a time to get your library going.
I always stayed pretty "lean" and didnt ask it to do much beyond reduce algebraic.

What I do, is I check a string... and if it starts with a VARIABLE followed by an equals sign,
 then this module is a go.
If I am doing ARRAYS? I will want more than straight integer numbers, the end user
 of my software will expect to have algebraic equations for array indexes, like any programmer
 needs. This module?

well... its a STRING, and its surrounded by PARENTHESIS... the module automatically spits back the
 array index. If its a integer index, fine. if its a variable index, thats fine too. If the index of the array
 reference is an algebraic equation of existing variable assignments? Hey, it spits back the result.

if the STRING isnt a variable name followed by an equals sign?
Then its probably a COMMAND, and I would then search a list of commands in a string array.
take appropriate action.

NOTE: this is not "the actual code" I used twice before; I recreated it because I have done it a
  couple times before. If you can "trip it up" and prove it makes a parenthetical or order of operations error? That's good work on your part.

30
Programs / Language
« on: November 07, 2021, 10:23:19 pm »
This is the first place online where I have *seen* stuff just like mine.
which makes me feel sort of "at home" I suppose.

LANGUAGE
=======
I have seen stuff like this called a "math module", and its a good description.
it continually asks you for an "expression to evaluate".

you are making variable assignments;
 the variable list "grows" at the top of the screen
if you enter:
x=2
y=3
z=((x*2)+(y*4))/2

you can watch as it keeps track and performs the evaluation(s)

this module, one just like it... is always my "ground zero" if I
am going to do any kind of "make my own language" work. Which is
why its called "language". I have used these routines several times in the past, they never fail me.

this is a stripped down special version, where it stops and shows you, step by step,
each "pass" as it reduces the math expression. In real life, it just SPITS it back out,
it seems instantaneous.

In one of my projects, I might have to calculate algebraic expressions, out of a $string.
this module will obviously be re-purposed for that.

LINUX MINT executable:
 

got code?

Code: QB64: [Select]
  1. NumVars = 0
  2. DIM VN$(128), VV(128)
  3.  
  4. AnotherExpression:
  5. FOR t = 1 TO NumVars
  6.   PRINT VN$(t); " ="; VV(t)
  7. PRINT "Enter expression to evaluate :";
  8. PRINT "-----------------------------"
  9. 'strip the spaces; meaningless in a math expression
  10. N1$ = ""
  11. FOR t = 1 TO LEN(z$)
  12.   IF MID$(z$, t, 1) <> " " THEN N1$ = N1$ + MID$(z$, t, 1)
  13. z$=N1$
  14. 'check for assignment
  15. VarFlag = 0
  16. FOR t = 2 TO LEN(z$)
  17.   IF MID$(z$, t, 1) = "=" THEN
  18.     GOSUB Assign:
  19.     IF VarFlag > 0 THEN z$ = EXP$: GOTO Start:
  20.   END IF
  21.  
  22. Start:
  23. pErrL = 0: pErrR = 0 'checks L's = R's
  24. pErr = 0 'other error(s)
  25. FOR t = 1 TO LEN(z$) 'check # of P's match
  26.   IF MID$(z$, t, 1) = "(" THEN pErrL = pErrL + 1
  27.   IF MID$(z$, t, 1) = ")" THEN pErrR = pErrR + 1
  28. IF (pErrL <> pErrR) THEN
  29.   PRINT "Fatal Error; (="; pErrL; "and )="; pErrR
  30.   PRINT "press <ENTER> :";: LINE INPUT nothing$
  31.   CLS: GOTO AnotherExpression:
  32. pErrL = 0: pErrR = 0
  33. FOR t = 1 TO LEN(z$)
  34.   IF MID$(z$, t, 1) = "(" THEN pErrL = pErrL + 1
  35.   IF MID$(z$, t, 1) = ")" THEN pErrR = pErrR + 1
  36.   IF pErrL = 0 AND pErrR = 1 THEN
  37.     PRINT "Fatal Error; 1st Paren must be a ("
  38.     PRINT "press <ENTER> :";: LINE INPUT nothing$
  39.     CLS: GOTO AnotherExpression:
  40.   END IF
  41.  
  42. pErrL = 0: pErrR = 0
  43. FOR t = LEN(z$) TO 1 STEP -1
  44.   IF MID$(z$, t, 1) = "(" THEN pErrL = pErrL + 1
  45.   IF MID$(z$, t, 1) = ")" THEN pErrR = pErrR + 1
  46.   IF pErrL = 1 AND pErrR = 0 THEN
  47.     PRINT "Fatal Error; last Paren must be a )"
  48.     PRINT "press <ENTER> :";: LINE INPUT nothing$
  49.     CLS: GOTO AnotherExpression
  50.   END IF
  51.  
  52. 'done error trapping;
  53. ' add Paren's to force one pass and contain any ops
  54. z$ = "(" + z$ + ")"
  55.  
  56. RunAgain:
  57. hasP = 0
  58. FOR t = 1 TO LEN(z$)
  59.   IF (MID$(z$, t, 1) = "(") OR (MID$(z$, t, 1) = ")") THEN hasP = 1
  60. IF hasP = 1 THEN GOTO Find_inner_paren:
  61. IF hasP = 0 THEN
  62.   PRINT "done, final value ="; z$
  63.   IF VarFlag > 0 THEN
  64.     VV(VarFlag) = VAL(z$)
  65.   END IF
  66. PRINT "press <ENTER> :";
  67. LINE INPUT nothing$
  68. CLS: GOTO AnotherExpression:
  69.  
  70. Find_inner_paren:
  71.  
  72. Find_left_paren:
  73. FOR t1 = 1 TO LEN(z$) - 1
  74.   IF MID$(z$, t1, 1) = "(" THEN
  75.     GOSUB Find_Right_Paren:
  76.     IF rpFlag <> 0 THEN
  77.       lft$ = LEFT$(z$, t1 - 1)
  78.       rht$ = RIGHT$(z$, LEN(z$) - rpFlag)
  79.       ' PRINT "."; lft$; "."; rht$; ".": END
  80.       GOSUB Eval:
  81.       z$ = lft$ + LTRIM$(STR$(zval)) + rht$
  82.       GOTO RunAgain:
  83.     END IF
  84.   END IF
  85. NEXT t1
  86.  
  87. '--------------------subroutine Find_Right_Paren:-------------
  88. 'driven entirely by Find_Left_Paren:
  89. Find_Right_Paren:
  90. rpFlag = 0
  91. FOR t2 = t1 + 1 TO LEN(z$)
  92.   IF MID$(z$, t2, 1) = "(" THEN
  93.     rpFlag = 0
  94.     RETURN
  95.   END IF
  96.   IF MID$(z$, t2, 1) = ")" THEN
  97.     rpFlag = t2
  98.     RETURN
  99.   END IF
  100. NEXT t2
  101. rpFlag = 0: RETURN
  102. '--------------------END subroutine Find_Right_Paren:----------
  103.  
  104. '------------------subroutine Eval:----------------------------
  105. 'we are always working at the innermost Paren's
  106. 'this routine reduces it to a value one operation at a time
  107. Eval:
  108. z1$ = MID$(z$, t1, t2 - t1 + 1)
  109. EvalAgain:
  110.  
  111. FOR t3 = 1 TO LEN(z1$)
  112.   IF MID$(z1$, t3, 1) = "^" THEN op$ = "^": GOSUB EvalAdd:: GOTO EvalAgain:
  113. NEXT t3
  114.  
  115. FOR t3 = 1 TO LEN(z1$)
  116.   IF MID$(z1$, t3, 1) = "*" THEN op$ = "*": GOSUB EvalAdd:: GOTO EvalAgain:
  117.   IF MID$(z1$, t3, 1) = "/" THEN op$ = "/": GOSUB EvalAdd:: GOTO EvalAgain:
  118. NEXT t3
  119.  
  120. FOR t3 = 1 TO LEN(z1$)
  121.   IF MID$(z1$, t3, 1) = "+" THEN op$ = "+": GOSUB EvalAdd:: GOTO EvalAgain:
  122.   IF MID$(z1$, t3, 1) = "-" THEN op$ = "-": GOSUB EvalAdd:: GOTO EvalAgain:
  123. NEXT t3
  124. GOSUB ReplaceVar:
  125. PRINT "no more ops; value = "; z1$
  126. zval = VAL(MID$(z1$, 2, LEN(z1$) - 2))
  127. '--------------------END subroutine Eval:---------------------
  128.  
  129. '--------------------subroutine EvalAdd:----------------------
  130. 'performs the actual OPeration(s) when called by Eval:
  131. EvalAdd:
  132. FOR t5 = t3 - 1 TO 2 STEP -1
  133.   IF INSTR("^*/+-", MID$(z1$, t5, 1)) <> 0 THEN
  134.     Lend = t5 + 1: GOTO GotLeft:
  135.   END IF
  136. NEXT t5
  137. Lend = 2
  138. GotLeft:
  139. L1$ = MID$(z1$, Lend, t3 - Lend)
  140. FOR t4 = t3 + 1 TO LEN(z1$)
  141.   IF INSTR("^*/+-", MID$(z1$, t4, 1)) <> 0 THEN
  142.     Rend = t4: GOTO GotRite:
  143.   END IF
  144. NEXT t4
  145. Rend = LEN(z1$)
  146. GotRite:
  147. R1$ = MID$(z1$, t3 + 1, Rend - (t3 + 1))
  148. GOSUB ReplaceVars:
  149. PRINT L1$; " "; op$; " "; R1$; " = ";
  150. IF op$ = "+" THEN res$ = LTRIM$(STR$(VAL(L1$) + VAL(R1$)))
  151. IF op$ = "-" THEN res$ = LTRIM$(STR$(VAL(L1$) - VAL(R1$)))
  152. IF op$ = "*" THEN res$ = LTRIM$(STR$(VAL(L1$) * VAL(R1$)))
  153. IF op$ = "/" THEN res$ = LTRIM$(STR$(VAL(L1$) / VAL(R1$)))
  154. IF op$ = "^" THEN res$ = LTRIM$(STR$(VAL(L1$) ^ VAL(R1$)))
  155.  
  156. z1$ = LEFT$(z1$, Lend - 1) + res$ + RIGHT$(z1$, LEN(z1$) - Rend + 1)
  157. PRINT z1$
  158.  
  159. '--------------------END EvalAdd:-----------------------------
  160.  
  161. '--------------subroutine Assign:-----------------------------
  162. 'sets up a variable assignment to the expression
  163. Assign:
  164. VarFlag = 0
  165. Epl = t
  166. NAM$ = LEFT$(z$, Epl - 1)
  167. EXP$ = RIGHT$(z$, LEN(z$) - Epl)
  168.  
  169. namErr = 0
  170. FOR t1 = 1 TO LEN(NAM$) 'legal var names are A-Z, 0-9, a-z, and _ ;cant start with a #
  171.   ch$ = MID$(NAM$, t1, 1)
  172.   IF t1 > 1 AND ch$ >= "0" AND ch$ <= "9" THEN GOTO DuLast: 'cant start with #
  173.   IF ch$ >= "A" AND ch$ <= "Z" THEN GOTO DuLast:
  174.   IF ch$ >= "a" AND ch$ <= "z" THEN GOTO DuLast:
  175.   IF ch$ = "_" THEN GOTO DuLast:
  176.   namErr = namErr + 1
  177.   DuLast:
  178. NEXT t1
  179. IF namErr > 0 THEN
  180.   VarFlag = 0
  181.   PRINT "Fatal Error; illegal variable name"
  182.   PRINT "press <enter> :";
  183.   LINE INPUT nothing$
  184.  
  185. IF NumVars = 0 THEN
  186.   NumVars = NumVars + 1
  187.   VN$(NumVars) = NAM$
  188.   VarFlag = NumVars
  189.   GOTO DuLast2:
  190. IF NumVars > 0 THEN
  191.   FOR t1 = 1 TO NumVars
  192.     IF NAM$ = VN$(t1) THEN
  193.       VarFlag = t1
  194.       GOTO DuLast2:
  195.     END IF
  196.   NEXT t1
  197. 'add new variable
  198. NumVars = NumVars + 1
  199. VN$(NumVars) = NAM$
  200. VarFlag = NumVars
  201. DuLast2:
  202. '------------------END subroutine Assign:----------------------
  203.  
  204.  
  205. '--------------subroutine ReplaceVars:-------------------------
  206. 'checks for operands being variables
  207. ReplaceVars:
  208. FOR t9 = 1 TO NumVars
  209.   IF VN$(t9) = L1$ THEN L1$ = LTRIM$(STR$(VV(t9)))
  210.   IF VN$(t9) = R1$ THEN R1$ = LTRIM$(STR$(VV(t9)))
  211. NEXT t9
  212. '-----------------END subroutine ReplaceVars:------------------
  213.  
  214.  
  215. '----------------subroutine ReplaceVar:------------------------
  216. 'catches case of a variable not being an operand
  217. ReplaceVar:
  218. chNam$ = MID$(z1$, 2, LEN(z1$) - 2)
  219. FOR t9 = 1 TO NumVars
  220.   IF VN$(t9) = chNam$ THEN z1$ = "(" + LTRIM$(STR$(VV(t9))) + ")"
  221. NEXT t9
  222. '-------------------END subroutine ReplaceVar:-----------------
  223.  
  224.  

Pages: 1 [2] 3 4