Results 1 to 5 of 5

Thread: New article on TBGL website covering entity data signing

Hybrid View

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

    New article on TBGL website covering entity data signing

    Dear friends,

    some time ago I announced awaking of TBGL website and this trends continues today with article on newly introduced entity data signing and enumeration.
    TBGL_EntityEnumByDataSignature brings new air to design of your TBGL applications with ability of filtering entities of completely user defined type out.

    Read more about it here:
    TBGL Entity Data Signature [PDF]

    You can access the article anytime later by visiting Tutorials section of TBGL website.


    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. #2

    Re: New article on TBGL website covering entity data signing


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

    Re: New article on TBGL website covering entity data signing

    Petr, nice idea but, wouldn't it be easier and simpler to make it an optional parameter when creating an entity?

    dim entity as long = tbgl_entitygetfreeid(scene, optional "signature string")

    then behind the scenes tbgl would create the id, keep a list of the id with the string signature in the background.
    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

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

    Re: New article on TBGL website covering entity data signing

    Hi Kent,

    good thought, but you can already describe entity using string with TBGL_EntitySetName and retrieve using TBGL_EntityGetName.
    The possible disadvantage of this are variable memory requirements while the data signature is always 4 bytes small while still providing great range of different values.

    It would be possible to create the number from string as well (for example sum of the ASCII values), but that is up to the programmer.

    I am prepairing multiple EntityEnum functions, so this will not be the only one. But it is the first in row, and I picked it to demonstrate new possibilities.
    EnumByName could be another candidate in the row, maybe filtering just by partial names like "Rocket*"...

    Thanks a lot for your opinion Kent, it is always interesting to hear and it only helps pushing TBGL forward.

    Another thing I was thinking of was not enumerating to array, but directly executing functions with calling entity specified. The possibilities are endless.

    If you remember the example we did with landscape and doctor Aeraix in the balloon, we had to prepare dedicated ID section for rockets. Now you could add rockets dynamicaly and then filter them out easily.


    Thanks!,
    Petr

    P.S. Added RSS feed for the TBGL website
    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

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

    Re: New article on TBGL website covering entity data signing

    Oh, didn't know about the new enums coming up too... then-- well done with this article!!
    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

Similar Threads

  1. New article on TBGL website covering function slot entity
    By Petr Schreiber in forum TBGL module by Petr Schreiber
    Replies: 4
    Last Post: 01-06-2010, 16:04

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
  •