Skip to content
Jiri Hnidek edited this page Sep 21, 2013 · 5 revisions

Verse Entities (vrsent) is Python module that simplify implementation of Verse clients. This module requires compiled verse module that could be found here:

https://github.com/verse/verse

Versentities module contains several class of basic Verse entities:

  • VerseSession
  • VerseNode
  • VerseTagGroup
  • VerseTag
  • VerseLayer
  • VerseUser (subclass of VerseNode)
  • VerseAvatar (subclass of VerseNode)

These classes could be used for implementation custom subclasees.

If you want to share some data on Verse server, then simple Verse client could look like this:

import vrsent
import time

def main():
    """
    Function with main never ending verse loop
    """
    session = vrsent.VerseSession()
    session.debug_print = True

    node = vrsent.VerseNode(session)
    tg = vrsent.VerseTagGroup(node)
    tag = vrsent.VerseTag(tg)
    tag.value = (10,)

    while(session.state != 'DISCONNECTED'):
        session.callback_update()
        time.sleep(1.0/session.fps)

if __name__ == '__main__':
	main()
Clone this wiki locally