Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 79

Thread: thinbasic Lionmodule :D

  1. #21
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    @ good morning dear thinbasic medicine help doctors

    I am sooooo glad to see it works... - thanks to all (michael h., michael c., charles , eros...) for this good help and infos, that's the main reason I am here since some month... to learn and it's allowed to make mistake or running new ways with thinbasic to explore unknown terrain ! must laugh... I am in a good mood to catch the next hurdle

    my edit of today: I add here the fixed version of "liongfx" thinbasic test script

    a new idea for liongfx is just waiting... see you, have all a nice day, Lionheart

    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #22
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    my little 5 cent for this night

    no really time last day to create new things... but I have played around with this liongfx example with well known coding stuff (fbgfx!), translated for my purpose and so it looks like this one...

    [code=thinbasic]'Plasma-like effect with liongfx
    uses "liongfx", "console"

    Dim T1, T2 As QUAD
    Dim w,h As Double
    w=400
    h=350

    '---Initialize hi resolution timer
    HiResTimer_Init

    liongfx_ScreenRes(w,h,32,2)

    Dim x,y,page As Double
    Dim c,t As Double

    T1 = HiResTimer_Get
    t=t+1
    For x = 0 To w
    For y = 0 To h

    c=(Cos((x+y+t)/100)+Cos((x-t)/100)+Cos((y-t)/100)+Cos((x-y+t)/100))*2+Sin(t/100)*15
    liongfx_PSet(x,y,Rgb(Sin(c)*64+128,Cos(c)*64+128,Cos(-c/2)*64+12)
    liongfx_PSet(x,y,Rgb(Cos(c)*32+128,4*rnd*Cos(c)*32+128,log(-c/2)*64+12)
    'liongfx_Circle rnd(100,540), rnd(10,380), rnd(10,200), rnd(1, RGB(255,255,255))
    Next
    printl " just an liongfx learning script " + int(rnd(1)*400), "Ciao Julius Cesar! " + int(rnd(1)*400)

    Next

    T2 = HiResTimer_Get
    MSGBOX 0, "Elapsed time in microseconds: " & format$((t2-t1)/1000000, "#.000") '- (t2-t1)/1000000
    sleep 5000
    page=-page+1
    liongfx_ScreenSet(page,-page+1)
    'printl
    'printl "press any key to exit"
    'waitkey
    stop[/code]

    ok, I have included two different functions, not very new things, but was a good exercise to learn for me... and you can test also your machine for speed

    more to come, hope it works, good night, Lionheart
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  3. #23
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    hi dear animal friends...
    hi charles... have done it

    Your FB code is not expecting the b parameter.
    well, one little progress for thinbasic / lionmodule (liongfx)... I managed to create a new box line for lines... one more little good thing for thinbasic, but for me very important to understand the lines commands ... now it's just missing the box should be filled too.. I will do it this little new feature for the next time ...

    old: liongfx_Line (60,60, 300,260, 0,0,255)
    new: liongfx_line (40,40, 300,260, 0,0,255,4)
    info: the last number (here "4") is important for the rectangle !

    my advice: push "escape" for the three divided example... to come forward and see what happens...

    [code=thinbasic] '-- more input for tb module liongfx, here: rectangle , 10.juni.2009

    uses "liongfx", "console"

    liongfx_WindowTitle "thinbasic liongfx: Test 0.3c for new thinbasic Lionmodule by FreeBasic"

    liongfx_ScreenRes 800, 600, 32

    dim x, y as long
    For x = 1 To 800
    For y = 1 To 600
    liongfx_PSet x, y, x * y
    Next
    Next

    randomize

    liongfx_Locate 5, 20
    liongfx_Print "What about some colored circles, lines, rectangles? Press any key to see!"
    liongfx_Sleep

    liongfx_WindowTitle "Press only ESCAPE key to stop this drug "
    dim CountCircles as quad
    dim CountLines as quad
    dim ch, ch1 as string
    dim T1 as double = TIMER

    Do
    incr CountCircles
    ch = liongfx_Inkey
    liongfx_locate 10, 75
    if ch <> "" then liongfx_Print "[" & ch & "]"
    liongfx_Circle rnd(100,540), rnd(100,380), rnd(10,200), rnd(1, RGB(255,255,255))
    Loop Until ch = chr$(27)

    Do
    incr CountLines
    ch1 = liongfx_Inkey
    liongfx_locate 30, 80
    if ch1 <> "" then liongfx_Print "[" & ch & "]"

    liongfx_locate 60+ rnd*10, 20+rnd*30
    liongfx_color 255, 60
    liongfx_print "enjoy... new lions gfx effect !"

    liongfx_locate 20+ rnd*10, 10+rnd*30
    liongfx_Line (60,60, 300,260, 0,0,255,4,2)
    liongfx_Line (100,100, 300,200, 255,0,0,16,4)
    liongfx_Line (100,100, 300,200, 255,0,0,16,
    liongfx_Line (200,200, 400,300, 128,60,0,16,16)
    liongfx_Line (rnd(20,100),rnd(40,100), rnd(128,300),rnd(0,200), rnd(100,255),60,255,24,24)
    Loop Until ch1 = chr$(27)


    dim DeltaTime as double = (timer - T1)
    if DeltaTime = 0 then DeltaTime = 0.0001

    msgbox 0, "..sorry for more coloured stress, all is ok! "

    liongfx_Color 255,10
    liongfx_Locate 8, 50
    liongfx_Print "This test was performed in " & format$(DeltaTime, "#0.000") & " secs. "
    liongfx_Locate 10, 50
    liongfx_Print "Beautiful Circles on screen: " & CountCircles
    liongfx_Locate 15, 50
    liongfx_Print "more crazy Lines on screen: " & CountLines
    liongfx_Locate 20, 50
    liongfx_Print format$(CountCircles/DeltaTime, "#0") & " circles x second"
    liongfx_Locate 25, 50
    liongfx_Print format$(CountLines/DeltaTime, "#0") & " lines x second"
    liongfx_Locate 30, 50

    liongfx_Print "Thanks a lot for your time. Press any key to end."
    liongfx_Sleep
    [/code]

    the files test_liongfx_screenres3c.tbasic and test_liongfx_screen_F.tbasic example I have included in the zipfile plus liongfx.dll

    have fun with it, best regards, Lionheart
    ps: have included a second example liongfx_screen_F.tbasic file for testing...
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  4. #24
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    ...have forgotten to show the code of the second script: test_liongfx_screenF.tbasic

    [code=thinbasic] uses "liongfx"

    liongfx_WindowTitle "Thinbasic Screen_F test for liongfx module"

    liongfx_Screen 18, 32

    dim x, y as long
    For x = 1 To 640
    For y = 1 To 480
    liongfx_PSet x, y, x * y
    Next
    Next

    randomize

    dim MaxLines as long = 10000
    liongfx_Locate 5, 25
    liongfx_Print "What about " & MaxLines & " colored lines ? Press any key to see!"
    liongfx_Sleep

    '---Clear screen
    liongfx_Cls

    for x = 1 to MaxLines

    liongfx_locate 20+ rnd*10, 10+rnd*30
    liongfx_Line (60,60, 300,260, 0,0,255,4,2)
    liongfx_Line (100,100, 300,200, 255,0,0,16,4)
    liongfx_Line (100,100, 300,200, 255,0,0,16,
    liongfx_Line (200,200, 400,300, 128,60,0,16,16)
    liongfx_Line (rnd(20,100),rnd(40,100), rnd(128,300),rnd(0,200), rnd(100,255),60,255,24,24)
    liongfx_Line (rnd(40,120),rnd(80,120), rnd(250,360),rnd(80,200), rnd(20,255),0,55,224,24)
    next

    for x = 1 to 10
    liongfx_Locate rnd(1,2, rnd(1,60)
    liongfx_Print "Hi there in sydney and rome " & x
    next

    liongfx_Locate 1, 1
    liongfx_Print "Test performed successfully!. Thanks for your cooperation. Press a key to end."
    liongfx_Sleep
    [/code]

    that's all for this night, servus and salve, cheerio, Lionheart


    ps: do you think it's worth to develop further this ex-fbgfx module for thinbasic ??? I have done only one or two per cent from hundred
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  5. #25
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: thinbasic Lionmodule :D

    Quote Originally Posted by Lionheart008
    ps: do you think it's worth to develop further this ex-fbgfx module for thinbasic ??? I have done only one or two per cent from hundred
    Hi Frank.

    In some sense, developing a thinBasic module is a kind of responsibility assumption.
    If you develop it just for fun or to show other how to do or for learning/teaching purposes, that's ok, no problem: you can decide what you want.
    But if you develop it for distribution, you have to think other people will base their work on it so you should think about maintain it, further develop, be open to user requests, make documentation, ... and so on.

    So, in my opinion, you can answer by yourself to your question depending where you want to go with your module.

    Ciao and thanks a lot for your many nice works.
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #26

    Re: thinbasic Lionmodule :D

    hi frank.

    I guess you asked this because you didn't got much response about it.

    Like Eros said, what is the purpose of this module? For fun, to learn, to give other tb users a new toolset? The motivation to develop a module can come from so many directions. For me it was that

    1. Wanted to give myself some new commands
    2. Give something back to Eros for developing tb
    3. Learn more about coding

    In small communities like ours you will not get much response. Hell I am not even sure if someone uses tbem or tbdi. Or how many will use the new sprite commands. But that is fine with me. Because i had fun creating all this stuff. I know i finished things. The problem with a lot of coders is that 99,9% of them won't finish projects they have onced. Why?

    At the beginning of a project it is fun. Things are running smoothly. But later on it becomes work. Simply work and a lot of it. Most people loose interest then.
    And developing a module is hard work. Designing and coding it. Write a helpfile for it. Samples. Test it. And you are not sure if other people will use it.

    Do it for yourself. Make a plan and follow it.

  7. #27
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: thinbasic Lionmodule :D

    Exactly Michael. Plus a bit of auto-motivation is not bad.

    It is hard to reply to Frank question. Why say yes or no? On what basis I can tell you: "yes, it is worth to go on" or "no, it is not worth"?

    When things do not go into the direction one expect, auto-motivation makes the difference.
    I would have stopped thinBasic many years ago without auto-motivation reasons.

    So, as Michael said: if it is in your list of interests, make a plan and follow it even if you will not get much responses.
    Our replies can seem a bit rude but are honest (I suppose)

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #28
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    hi michael, eros, thank you so much for your honest and helpfully reply...

    I was very tired last night... but today it's quite another power again in me I will go the hard way and try to create my own module and climb up new mountains... perhaps with a little help from my friends (joe cocker!)... and I am eager enough to learn with new module technology and coding for thinbasic
    "auto-motivation" is not the main problem for me I see it's a time problem for me !

    @michael
    The motivation to develop a module can come from so many directions. For me it was that ...
    for me: - learning coding language with thinbasic
    - I love and like a lot tbgl, oxygen and special effects
    - to see how easy or hard it is to jump over walls I never wanted to try it some
    month before and I am glad about this very good feeling
    - and I like the community with often very good feedback and help

    now I see the next hurdles and perhaps charles, eros, michael, petr or another guy can help here...

    dim myliongfxSprite() as byte

    createsprite mysprite(), spritesize, spritesize
    'put (-spritesize+rnd*(xRes-1+spritesize), -spritesize+rnd*(yRes-1+spritesize)), myliongfxSprite, PSET
    I will try to define a "sprite" for the next script and the thinbasic code is ready since one week, only the fb compiling becomes strange for me at the moment... I will check it
    ok, it was not intended to go the same way as at the board are similar topics about sprite themes, but to create a rectangle with a picture or circles and lines will be the next step for me and the liongfx module !

    the example did it in the old tbgl way... to create a sprite... it was only an example for me to learn this way too... cause I have never built this kind of sprite examples before... no joke ! michaels and petr's new tbgl-sprite power it's quite another great theme !

    @eros:
    So, as Michael said: if it is in your list of interests, make a plan and follow it even if you will not get much responses.
    yes, I will make a good structured and organized plan for the module... that's very important for me... because I am sometimes chaotic in daily life... uargh

    best regards, Lionheart and fit again

    ps: the demo for my next idea you can see in the zip folder of liongfx-testsprite
    pps: I am loyal with thinbasic and would like to become grown up with this language !
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  9. #29

    Re: thinbasic Lionmodule :D

    ok Franck, so where is the problem? Did you wanted someone to help you?

    The first file (thinBasic) ran fine. The second one didn't had any sprites in it, right? And was a FreeBasic compiled executable?

    It ran fine but what does that have to tell me now?

  10. #30
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    hi michael...

    It ran fine but what does that have to tell me now?
    ... ok must grinning, the two examples I have submitted were intended in the right way... the first one how to build a sprite example with tbgl, but without the new sprite commands, was only one example for me how to build it and yes, works very fine ...

    I am looking for a definition for a "sprite" (image) to compile it from freebasic into thinbasic example script... therefore I have tried to show this second example what it's my next aim...

    dummy code example like this one:

    dim myliongfxSprite() as byte

    createsprite mysprite(), spritesize, spritesize
    'put (-spritesize+rnd*(xRes-1+spritesize), -spritesize+rnd*(yRes-1+spritesize)), myliongfxSprite, PSET
    now I am just looking for a "sprite" or "image" definition... as I am not sure what kind of dimension an image or a sprite need...

    for eg.
    Img = Imagecreate(64, 64, RGBA(64, 160, 0, 255))
    Dim Img as byte '-- (that's right???)
    Circle Img, (32, 32), 28, RGBA(255, 0, 0, 12,,,,F
    my idea was: img = x_width, y_heigth, d_bitmap (d=for depth) ...

    I cannot handle yet with a User defined Type...(it's not important in my eyes for my purpose), that's all... hope you can follow me...

    I try to write down the Sub Exec_LIONGFX_IMAGE() so you can better see what I am meaning.

    best regards, thanks, Lionheart
    you can't always get what you want, but if you try sometimes you might find, you get what you need

Page 3 of 8 FirstFirst 12345 ... LastLast

Similar Threads

  1. MOVED: thinbasic Lionmodule :D
    By Petr Schreiber in forum User tools
    Replies: 0
    Last Post: 01-08-2009, 10:59

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •