Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: liongfx: graphic input: pixel-monitor-test, circles, lines, rendering

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

    liongfx: graphic input: pixel-monitor-test, circles, lines, rendering

    hello dear liongfx fans...

    if somebody is interested in testing this pixel-monitor test script, you can do that...

    [code=thinbasic]'- monitor testing with liongfx, by lionheart, 28.juli.2009
    uses "liongfx","console"

    dim sx, sy, x, y, s as integer
    dim f1, f2 as integer
    f1 = &HFF00FF
    f2 = &H00FF00

    liongfx_Screen 19,32
    liongfx_windowtitle "liongfx: nothing but pixels "
    sx = 800
    sy = 600

    msgbox 0, "liongfx monitor pixel test"

    liongfx_Cls
    for y = 1 to sy-1
    for x = 1 to sx-1 step 2
    liongfx_PSet x, sy-y, f1
    liongfx_PSet x+1, y, f2
    next
    swap f1, f2
    liongfx_screensync
    next
    liongfx_Sleep[/code]

    no more words.

    edit: today, 14:24 pm.. new pixel-monitor-test script you find here

    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

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

    Re: liongfx: pixel-monitor-test

    next one..

    this example generates geometric structure of lines to a circle

    [code=thinbasic]uses "liongfx", "console"

    liongfx_screen 20,8
    liongfx_windowtitle "liongfx: generates geometrics circle with 'two colours'"
    dim xn,an,yn,bn,cn,in1 as single
    dim tn as double

    xn = 100
    an = 384
    yn = 100
    bn = 384
    cn = 512

    liongfx_sleep 500

    for in1 = 0 to 6.28 step 0.31415/2
    xn = sin(in1) * 300 + 512
    yn = cos(in1) * 300 + 384
    for an = 212 to 812 step 100
    liongfx_color in1+1,255
    liongfx_lines xn,yn, an,bn,12 '-rnd(12,125)
    next an
    for an = 84 to 734 step 100
    liongfx_color in1+2,155

    for tn =1 to 1000000
    next tn

    liongfx_lines xn,yn, cn,an,10 '- rnd(10,255)
    next an

    next in1
    liongfx_getkey
    liongfx_sleep 1500
    [/code]

    two codes variants (with a) two colours and b) many colours) I have included in zip file.

    that's all and makes a lot of fun !

    good night, lionhead
    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. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: liongfx: pixel-monitor-test

    Hi Frank,

    I like these short but interesting demos.

    The first one gives some interesting optical effects when playing with f1/f2 colors.
    It seems you can use RGB function instead of &Hxxxxxx too.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

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

    Re: liongfx: pixel-monitor-test

    hi petr, hi all

    have modified the pixel-monitor-test and now it's running with colors, but not with the whole variety of all colours was just a test for me and thank you !

    I like these short but interesting demos.

    The first one gives some interesting optical effects when playing with f1/f2 colors.
    It seems you can use RGB function instead of &Hxxxxxx too.
    best regards, Lionheart
    add the new script in my first post
    you can't always get what you want, but if you try sometimes you might find, you get what you need

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

    Re: liongfx: graphic input: pixel-monitor-test, circles, lines

    good morning all

    have made some more experiments with lines and math. structures as you can see. these two examples I have adapted for thinbasic from an old freebasic example

    [code=thinbasic]'- liongfx example with line and closing to a point of intersection with steps by iteration
    uses "liongfx", "console"

    liongfx_screen 19,8
    liongfx_windowtitle "liongfx: lines, iteration, part two"

    dim x,y,p,i,a,b,w as single

    for x = -20 to 20 step .01
    y = x ^ 2
    liongfx_PSET x * 15 + 400,y + 100,10
    next x

    p = 620

    for x = 100 to 700 step 2
    y = p - x
    liongfx_PSET x,y,12
    next x

    for w=0 to 520 step 12
    x = 160+w
    y = 520
    liongfx_sleep 100

    liongfx_PSET x,y,20

    for i = 1 to 30
    b = ((x - 400) / 15) ^ 2 + 100
    a = x
    liongfx_COLOR i,255

    liongfx_lines x,y, a,b,10
    x = a
    y = b

    b = y
    a = p - y

    liongfx_COLOR i, rnd(1,200)

    liongfx_lines x,y, a,b,8

    x = a
    y = b

    next i
    next w
    liongfx_sleep 100
    liongfx_getkey


    [/code]

    nice day,
    best regards, 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

  6. #6

    Re: liongfx: graphic input: pixel-monitor-test, circles, lines

    hi lionheart, I like your example very much and have tested three, four. lion: It`s a tool or something like tbgl ? Can you tell more about it and if I can use it with tbgl ? it`s very important for me to get a clear overview, so many modules and every part do quite other special things. you are very engaged, that` s I like it so.

    best regards, lydia
    ps: I am thinking you are a german guy ?
    hasta la vida

  7. #7
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: liongfx: graphic input: pixel-monitor-test, circles, lines

    Hi Lydia,

    To summarize graphic systems currently provided by ThinBASIC:

    "Canvas"
    This is part of UI (user interface module), which allows drawing lines, ellipses, boxes and text to fixed size control or fixed size window.

    Software rendering (no use of 3D card), pixel perfect art.

    LionGFX
    Module developed in FreeBASIC, in some ways similar to "Canvas" approach.
    The syntax is more closer to DOS basics... Frank will tell you more as he is the father of module.

    Software rendering (no use of 3D card), pixel perfect art.

    TBGL
    TBGL is OpenGL based module for hardware accelerated both 2D and 3D graphics, which can be drawed to sizeable window, even fullscreen or inside dialog (like 3D editors do).

    In latest beta of ThinBASIC it provides basic primitives like lines, circles, rectangles, spheres, boxes, cylinders, toruses or 3D models which can be exported from applications like Blender, Wings3D, ...

    It allows you to define custom shapes too, use textures on them, manipulate them.

    TBGL also provides function on fonts - you can print both 2D text and text floating in 3D space.

    It contains 2 big high level systems you might use if you want - Scene/Entity system for designing 3D scene (cameras, lighting, primitives), and Sprite system very suitable for 2D games, which even handles collision detection automagically.

    From this list you can see TBGL and LionGFX follow different path. First is hardware accelerated, while the second not.
    That means you cannot combine them to produce one image.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

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

    Re: liongfx: graphic input: pixel-monitor-test, circles, lines

    hi dear liongfx fans with humour

    it's brand new, out now, unbelievable, all for free !

    "push the coloured circle!" my first game with liongfx! horrible game with no ending !

    and you will get...

    a) no highscore
    b) no panic to loose
    c) nobody will be hurt or must die
    d) you can choose your own velocity to play
    e) you only need four keys to make it coloured and four healthy or broken fingers
    f) no complicated spaghetti code
    g) no time to loose try and get the bitter lemon cup
    h) no fantastic effects, no !
    i) everybody can win and makes a lot of life experiences !...

    just a little start for a game for people with sense of humour and people with a lot of courage to play it...

    good night, lionheart
    Ps: I must bundle the game, it's so full of features! awesome !

    pps: @lydia...
    I say welcome from my left side to you too
    I will write you more and closer details about "liongfx" tomorrow, I am very tired petr has told you already important and good things ...
    lydia, thank you for friendly words and I would recommend to start with tbgl and using tbgl features for your game ideas. "liongfx" is still under construction and I have made in my eyes only 10 per cent from 100 for a really good thinbasic module... good night
    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. #9
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: liongfx: graphic input: pixel-monitor-test, circles, lines

    Hi Frank,

    that is not bad, the smooth color change is very entertaining to watch!
    Maybe the circle could collect something ?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

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

    Re: liongfx: graphic input: pixel-monitor-test, circles, lines

    hi petr, hi all,

    the circles can catch now a box, you can change with the circles the colour of the box and the 'short game' ends after some time period and clearing the screen with GAME OVER and I have added a new variation of moving by key "p".

    Maybe the circle could collect something Smile?
    even a child can play with it, simply great !

    btw: this little chapter makes a lot of fun !

    ' ----------------------------------------------------------
    update: circle-game, saturday, 19:15 p.m
    ' ----------------------------------------------------------

    best regards, Lionheart
    ps: catch-the-box game is work in progress
    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

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 01-08-2009, 10:57

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
  •