Page 8 of 8 FirstFirst ... 678
Results 71 to 79 of 79

Thread: thinbasic Lionmodule :D

  1. #71
    Member
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    406
    Rep Power
    56

    Re: thinbasic Lionmodule :D

    Hi Lionheart,

    i could to test your module with a game.
    do you have already 'Sprites'?
    do you have 'LoadSprite' and 'LoadBitmap','DrawSprite' ?
    it would be good, if you have some of this statements.
    that is necessary in order to write a good game.

    i could begin with a little Pacman at first.
    what do you say ?
    Peter

  2. #72
    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 peter,

    short reply: sounds good, but you may wait some days... this chapter with sprites or loading pictures will come the next time... cause there are still some difficulties / inconveniences between freebasic / thinbasic for this chapter I can remember, as I have tried it some weeks ago without success, but I check it for the next time.. I have more knowledge about compiling after four, five weeks I am sure, it' possible!

    could be also possible to integrate some asm codes... don't tried it before...

    i could to test your module with a game.
    do you have already 'Sprites'?
    do you have 'LoadSprite' and 'LoadBitmap','DrawSprite' ?
    thanks for asking, best regards, Lionheart
    you can't always get what you want, but if you try sometimes you might find, you get what you need

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

    Re: thinbasic Lionmodule :D

    Hi Peter, Frank,

    one thing - Mike Hartlef just developed ton of quality sprite functions for TBGL (available in TB beta), I think doing another sprite system now could be little redundant. But of course - Frank is free to implement whatever he wants.


    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. #74
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: thinbasic Lionmodule :D

    I played around with the new sprite module and it is really impressive, I definitely recommend giving it a try Peter.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  5. #75
    Member
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    406
    Rep Power
    56

    Re: thinbasic Lionmodule :D

    Hi Petr,

    i think that Lionheart would not compete, with the
    "Sprite system " from Mike Hartlef.
    This is only a challenge for him and his module.
    He wants to create his own System. He makes everything great !
    In this case, you can pick out with what you want to write.
    I am pretty curious on this thing !

    Kent,
    i cannot give a try, because i do have some problems with the Beta Version.
    Later i will try it.

    Peter

  6. #76
    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 all

    have made some new progresses belongs to "multikey" functions... thank you charles for new ideas ...

    a) I get the feedback from key inputs... so it might be possible one time to move the objects... how it be realized, I will find a way

    new commands:
    liongfx_getkey
    liongfx_palette
    liongfx_multikey_lefty, 8,24
    liongfx_draw "liongfx"

    notice: "liongfx_draw" isn't just perfect... have got some strange behaviour...
    [code=thinbasic]'--- liongfx with paint and multikey 1a, 7.july.2009 by lionheart

    uses "liongfx", "console"

    dim t,i as double
    dim x,y as long
    dim up as long = 10
    dim lefty as long = 5
    dim righty as long = -6
    dim down as long = -4
    dim clr,blu,grn as integer

    liongfx_screen 15

    liongfx_getkey
    liongfx_PALETTE, i, clr,blu,grn

    liongfx_multikey_up,24
    Liongfx_circle 160, 100, 40, 14
    Liongfx_paint 160, 100, 1 , 14

    liongfx_multikey_up,12
    printl "yes, now with multikey up... " + liongfx_multikey_up,up,12

    Liongfx_circle 260, 120, 80, 15
    Liongfx_paint 260, 120, 2 , 15

    liongfx_multikey_down,24
    printl "yes, now with multikey down... " + liongfx_multikey_up,up,24

    Liongfx_circle 60, 40, 20, 13
    Liongfx_paint 60, 40, 4 , 13

    liongfx_multikey_up

    if liongfx_multikey_lefty, 12 and y < 350 then
    liongfx_multikey_lefty, lefty = -5
    end if
    printl

    liongfx_multikey_lefty, lefty
    printl "kuckuck lefty: " + liongfx_multikey_lefty, 8,24
    printl

    liongfx_multikey_up,24

    liongfx_multikey_righty, righty
    printl "hey righty " + liongfx_multikey_righty, righty,45
    printl
    liongfx_multikey_down, down
    printl "hey down " + liongfx_multikey_down, down
    liongfx_sleep 500

    t = timer
    do
    loop until timer > t + 6[/code]

    uses keyboard inputs to see what happens.. take the ESC key to progress the scene


    b) not ready, but a preview... perhaps a way to get the sprite solutions...

    [code=thinbasic]
    '-- liongfx: sprite problem to solve until end july by lionheart

    uses "liongfx", "console"

    liongfx_Screen 15, 16

    dim sprite, add1,alpha as long
    dim bf,b,x,y as long
    dim s as string
    dim i as integer

    add1 = 60
    alpha = 50
    x=32
    y=32


    liongfx_draw, "Hey!"

    liongfx_sprite, 64*64
    msgbox 0, "hey, this could be some day a sprite example " + liongfx_sprite, 32*32

    liongfx_ImageCreate 32, 32, 10,10,liongfx_rgb, 255,255,255 = liongfx_sprite,32*32 '- 32x32

    liongfx_Cls



    for i = 0 to 63
    liongfx_Line i, 10, i, 300, 255,50, i * 4, i * 4, i * 4
    liongfx_Line i + 128, 5, i + 128, 300, 55,255, i * 4, i * 4, i * 4
    liongfx_Line i + 256, 10, i + 256, 200, 155,55, i * 15, i * 15, i * 15
    Next i

    liongfx_getkey

    liongfx_Put, 0, 0 , liongfx_sprite,24*24, add1
    liongfx_Put, 32, 0, liongfx_sprite,24*24, alpha

    liongfx_Sleep 1000[/code]

    I am honest, there are some bigger problems to say a fine solution for freebasic compiling for thinbasic, but I will not mention it here.. I have to solve it


    best regards and sleep well, 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

  7. #77
    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 all, hi charles...

    hmh... I go around and around in a circle but find no way out...

    I would like to have an image (liongfx_imagecreate) with put command (liongfx_put) and nothing happens! great... I am not sure, but it may concern the compiling handling from freebasic to thinbasic... I have done in my eyes everything right... but I can't see the desired picture...

    there are three, four commands with other handling like I wished from fb and I cannot transport it to thinbasic... at this moment... perhaps I find a way... everything is ok with creation of "lines" and "circles" separately, no problem, but if I want to create a little image with 100x100 and a rectangle or circle in it.. nothing happens...

    I test the scripts often with print or message box to see what kind of results I am getting don't know if anybody have had similar problems... but I am standing before a big wall and cannot see the wonderful blue water and bright sun shining behind it

    my example... it's running, but doing other things I wished

    [code=thinbasic]'-- testscript with feedback , 14.juli.2009 by lionheart

    uses "liongfx", "console"

    dim image1, img8, img32 as long
    dim i, y as integer

    dim s as string = "pipi langstrumpf watchs the clock: " + time$
    dim buffer as long

    liongfx_screen 14,32

    liongfx_circle 124,124,24,4
    liongfx_draw, buffer, "draw something beautiful here...(10,10)"
    printl "kuckuck, the sun is shining " '
    liongfx_draw, buffer, s
    liongfx_print "draw result: " + liongfx_draw, buffer, "draw a string with...(40,40)"
    liongfx_print

    msgbox 0, s
    liongfx_print "draw a string with..(100,100): " + liongfx_color,RGB(55,163,79)

    liongfx_imagecreate 100,100,10,0,0,0 = img32
    liongfx_PUT, 10, 10, img32,buffer

    liongfx_circle 50,50,liongfx_rgb, 255,0,0
    liongfx_print "put: " + liongfx_put, 100,100, buffer,img32

    liongfx_print
    liongfx_print "push a key to continue..."

    liongfx_getkey

    liongfx_screen 15,32

    for i = 0 to 80
    liongfx_Line i, 0, i, 300, rnd(255),50, i * 4, i * 4, i * 4
    liongfx_Line i + 128, 5, i + 128, 350, 55,255, i * 4, i * 4, i * 4
    liongfx_Line i + 256, 10, i + 256, 250, 155,55, i * 15, i * 15, i * 15
    next i

    liongfx_get, 0,0, 100
    liongfx_put, 100,100, buffer,img32

    liongfx_getkey
    liongfx_sleep 1500
    liongfx_error,2
    [/code]

    I am not frustrated, I wonder only why these three, four commands doing in some way other things... I like to have...

    I cannot say it's a kind of fun coding, but it won't hurt me

    @charles: perhaps you know such problems from freebasic while working on your oxygen compiling ?

    good evening, best regards, lionheart

    ps: last edit for charles.. .I have tried it again, the problems belong to the freebasic side, I am sure
    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

  8. #78
    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 everybody,

    one more from the "u2" and "zztop" road and of course some powder of thinbasic liongfx

    a) have played around again with plasma structures... ( four examples for the start) and I had to test it again.. for a newer update of liongfx dll because there were some irregularities from the freebasic side... uff...

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

    Dim T1, T2 As QUAD
    Dim w,h As Double
    w=640
    h=480

    randomize timer

    HiResTimer_Init

    liongfx_Screen 17,32
    liongfx_windowtitle "plasma playing again: 2 "

    Dim x,y,page As Double
    Dim c,t As Double
    dim z as long = 2*gettickcount*(sin(timer)*12
    dim p as long

    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*y)/100)+Cos((y-t)/100)+Cos((x-y+t)/100))*2+Sin(t/100)*15
    liongfx_PSet (x,y,Rgb(Sin(c)*64+128*z,Cos(c)*64+128,Cos(-c/2)*64+12 )

    Next
    printl

    liongfx_PSet (x,y,Rgb(Cos(c)*32+128+z,4*rnd*Cos(c)*32+128+z,log(-c/2)*64+128+z) )
    printl
    printl " liongfx meets plasma " + int(rnd(1)*400), "batgirl is watching you! " + 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)

    liongfx_sleep[/code]

    b) a simple random script I added in the zip folder too...

    [code=thinbasic]'- testscript for rnd and lines after rebuilding liongfx , 22.july.2009
    uses "liongfx","console"

    dim first as double
    dim last as double
    dim b, i as long

    Randomize Timer

    msgbox 0, "good night mr. hulk " + rnd_range(first,last)

    printl "yep tennis: " + rnd(1,2009)

    printl "yep soccer solo " + rnd(11)
    liongfx_print "yep soccer correct " + rnd(11)
    printl
    printl "yep soccer due " + rnd(1,12)

    printl "yep golf " + rnd(1,255)
    liongfx_print "yo golfer correct: " + rnd(40,120)

    printl "yep waterskiing " + rnd(1,24)
    printl
    liongfx_print "doppy! " + rnd_range(first, last)

    function rnd_range (byref first as double, byval last as double) as double
    'first = 100
    'last = 101

    function = rnd(last - first) + first
    end function

    liongfx_print "all is ok with this random script? - push any key to continue "

    liongfx_getkey

    liongfx_Screen 14

    liongfx_Line 10,10, 100,100, 100,255,100,4, 12

    for i = 20 to 319
    liongfx_Line 20, 20, 300, 180, 255+i,100,50,2, 4
    liongfx_Line 140, 80, 180+i, 120,255,100,50, 15, b
    liongfx_Line - 200, 200+i, 255,100, 50, 25,100+i, 15, 4

    next i

    liongfx_print "push a key to end me"
    liongfx_sleep[/code]

    last edit at 23:20 pm: I add a new picture (green, last one) with a certain glass effect, isn't it ?

    good evening, no more words, have fun with the examples or/and feel free to test it, lionheart

    PS: welcome to the big summertime hole, I see there is not a lot of action at the board at this moment...
    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. #79
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: thinbasic Lionmodule :D

    Those are some really cool effects and screenshots Frank. Keep up the cool work!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Page 8 of 8 FirstFirst ... 678

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
  •