Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 33

Thread: Arkanoid

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

    Re: Arkanoid

    Hi Simone,

    to get model width/height you can use following SUB:
    [code=thinbasic]
    sub Model_GetWidthHeight( model as long, byref width as double, byref height as double )
    local i as long
    local x, y as double
    local minx as double = 1000
    local miny as double = 1000
    local maxx as double =-1000
    local maxy as double =-1000

    for i = 1 to tbgl_m15GetModelVertexcount(model)

    x = tbgl_m15GetVertexX(model, i)
    y = tbgl_m15GetVertexY(model, i)

    minx = min(x, minx)
    miny = min(y, miny)

    maxx = max(x, maxx)
    maxy = max(y, maxy)

    next

    width = maxx - minx
    height = maxy - miny

    end sub
    [/code]

    You just pass model slot, and two variables BYREF.


    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

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

    Re: Arkanoid

    Petr,

    this is perfect for a new M15 native function, isn't it?


    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

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

    Re: Arkanoid

    One more thing,

    Patrice Terrier had nice suggestion for his BassBox player, which we can apply too.
    Currently, game uses almost 100% CPU, but if you put:
    sleep 10
    ... on the line right after center cursor, we get 2 cool things:
    • Process will use 0 to 6% of CPU, while still open to run at 100 FPS
    • Mouse input will work better


    Eros, your wish is my command ;D. I will make it in way it will return even the z size.


    Bye and thanks a lot for new version!,
    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. #24

    Re: Arkanoid

    thank you very much Petr,
    tonight I try to implement it in the script and manage models of paddle.

    Simone
    LapTop Pc: 2GHz Intel Core 2 Duo T7200 • 2GB 533MHz DDR2 RAM • 160GB hard disk • 512MB ATi Mobility Radeon X1600 graphics • Win Vista SP1<br />Desktop Pc: 1.6GHz Intel Core 2&nbsp; • 2GB DDR2 RAM •&nbsp; 1024MB Nvidia GeForce 8800 GT • WinXp&nbsp; SP3

  5. #25
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Arkanoid

    Simone thanks for the update. Good luck on next version... excited to see it when it is out!
    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

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

    Re: Arkanoid

    Hi Simone,

    I developed function TBGL_m15GetModelDimensions, which could be used for the job. You will find it in next thinBASIC release.


    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

  7. #27
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Arkanoid

    Very much needed and appreciated function, Petr
    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

  8. #28

    Re: Arkanoid

    thanks petr, your suggestion for calculate the width and height of a model, works very well.
    I'm wait the new thinbasic version for try the new feature.

    Simone
    LapTop Pc: 2GHz Intel Core 2 Duo T7200 • 2GB 533MHz DDR2 RAM • 160GB hard disk • 512MB ATi Mobility Radeon X1600 graphics • Win Vista SP1<br />Desktop Pc: 1.6GHz Intel Core 2&nbsp; • 2GB DDR2 RAM •&nbsp; 1024MB Nvidia GeForce 8800 GT • WinXp&nbsp; SP3

  9. #29

    Re: Arkanoid

    Hi,

    I have update the first post with new version of Arkanoid.
    Where there is a first test of bonuses.
    The bonuses in the script for now are two:
    - change the width of paddle;
    - possibility of multi ball.

    I hope it is the right way to take.

    Ciao,
    Simone
    LapTop Pc: 2GHz Intel Core 2 Duo T7200 • 2GB 533MHz DDR2 RAM • 160GB hard disk • 512MB ATi Mobility Radeon X1600 graphics • Win Vista SP1<br />Desktop Pc: 1.6GHz Intel Core 2&nbsp; • 2GB DDR2 RAM •&nbsp; 1024MB Nvidia GeForce 8800 GT • WinXp&nbsp; SP3

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

    Re: Arkanoid

    Simone!,

    that is very nice version! And I see you prepared a lot for future - model size check is there.
    My favourite bonus is multiball, it really doubles the fun.


    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

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Arkanoid (a more 3D Version)
    By Simone in forum TBGL Arkanoid
    Replies: 11
    Last Post: 17-09-2008, 11:52

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
  •